skimask;64450]Right. I understand what you are trying to do, with the EEPROM and the LED matrix's and such. It's a relatively common project.
What you aren't understanding is that you are only writing ONE BYTE at a time with those statements, not 3 at a time as your changing addresses would indicate.
And one other thing is 'precedence'. I'm not sure if it's applicable in this case, but...
In your statement above...
How does that get interpreted?Code:i2cwrite I2CDAT, I2CCLK, $A0, adr,[temperature.LOWBYTE dig 4+48 ]
Assume temperature.lowbyte = 123
You are trying to retrieve the 4th (actually 5th) digit of a byte value to which there can only be 3 digits.
I understand what you say , but I try something , to see what display
Another thing, still assuming temperature.lowbyte = 123, and assume that 'dig 4' is actually 'dig 0'...
Will that statement return "3" + 48 or does it try to return the 52nd digit of temperature.lowbyte?
A better way to put that statement might be:
Code:i2cwrite I2CDAT, I2CCLK, $A0, adr,[ ( temperature.LOWBYTE dig 4 ) + 48 ]
Is not imprtant , + or - paranthesis I see on display the same result .
For the result of " temperature.LOWBYTE " I do not understand what is this number .
If I put
adr = 24
i2cwrite I2CDAT, I2CCLK, $A0, adr,[(temperature dig 2) + 48]
pause 15
adr = 27
i2cwrite I2CDAT, I2CCLK, $A0, adr,[(temperature dig 1) + 48]
pause 15
adr = 30
i2cwrite I2CDAT, I2CCLK, $A0, adr,[(temperature dig 0) + 48]
pause 15
Obtein a number which is a hexa from a teperature ...968 ,975 - 2408,2421
For a LCD display write DEC2 (temperature/100) "," DEC2 (temperature//100). But for me in this moment I do not know what to do !




Bookmarks