Hi all,
I would like to use seeprom 24C512.
Please tell me how to assign control byte.
Thanks
Hi all,
I would like to use seeprom 24C512.
Please tell me how to assign control byte.
Thanks
from_myanmar
cont con %10100000
I2CWRITE SDA,SCL,cont,Addr,[x]
or............ I2CWRITE SDA,SCL,%10100000,Addr,[x]
its all in your PicBasic Pro Compiler manual under i2cwrite and i2cread commands.Goto Microchip.com and Download the 24c512 datasheet, well tell you everything you need to know.
One thing to remember:
Constants should not be used for control commands.
Ex:
Cont CON %10100000
Use them as BYTE variables.
Ex:
Cont CON %10100000
Control VAR BYTE
Control = Cont
Now, use "Control" instead of Cont.
I2CWRITE SDA,SCL,Control,Addr,[x]
==========================
"If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte
Bookmarks