PDA

View Full Version : i2c and byte or word



aftab
- 20th August 2007, 08:07
Hello,

a] To write a value(Say integer 12,000 to 30,000) in 24C04 using I2cwrite should I use
a vriable declared as byte or word ?



i2c_read_value var word 'Is it the right one ?

I guess word. (becasue 12000 will be more than 8 bits in binary ?) What is the right one.


b] And to store a value of integer 12000 in a vairable do I declare it like this ?


delay_value var word 'Most likely byte is incorrect




Thanks

Darrel Taylor
- 20th August 2007, 19:43
You are correct on both accounts.

delay_value var word
<br>

aftab
- 22nd August 2007, 00:57
You are correct on both accounts.

delay_value var word
<br>

Thanks .

aftab
- 22nd August 2007, 04:14
http://www.picbasic.co.uk/forum/showthread.php?t=544