Hi all,
i have found a bug in my temperature logger (16F88 + 24LC512+LM35).
I works pretty well until it reaches temp values of 124șC, for values above it are displayed as 0șC or 0,5șC.
I've looked at my code and i think a know what the problem is: I need to separate the variable into lowbyte and highbyte.
The problem is that i'm not being able to get this working that way. Here's why :
This way does not work:
This way does not work:Code:I2CWRITE SDA,SCL,CTW,ADDR,[tempe.highbyte] pause 10 ADDR=ADDR+1 I2CWRITE SDA,SCL,CTW,ADDR,[tempe.lowbyte]
Only this way one works:Code:I2CWRITE SDA,SCL,CTW,ADDR.highbyte,addr.lowbyte,[tempe.highbyte] pause 10 ADDR=ADDR+1 I2CWRITE SDA,SCL,CTW,ADDR.highbyte,addr.lowbyte,[tempe.LOWBYTE]
Long story short:Code:I2CWRITE SDA,SCL,CTW,ADDR.highbyte,addr.lowbyte,[tempe] pause 10 ADDR=ADDR+1 I2CWRITE SDA,SCL,CTW,ADDR.highbyte,addr.lowbyte,[tempe]
I can make it work with the eeprom BUT only with Address high and low. If i try to separate the variable tempe into high and low it doesnt work
Any ideas ?
Thanks
.


 
						
					 
			 
			 
			 
					
					 I2C write - value too big
 I2C write - value too big
		
 
				
				
				
				
			

Bookmarks