simple newbie question:
I want to use a page memory chip in a BS2 project. The page memory chit is a 24LC16B, data is read and written serialy using two I/O lines from the BS2. There is a lot of toggeling and pulsing on these two lines, so I want to put groups of LOW 9, HIGH 8, and the like on one program line. I would like to do: LOW8, HIGH 9, HIGH 8, PULSOUT 9, LOW 8, PULSOUT 9, PULSOUT 9. And do them all on one line. Can a multiple commands be put on one program line? I really do not want to use 70 lines of code to write one byte of data.
Comments
·· You might want to check out the attached code for reading and writing to the 24LC16 without all those LOW and HIGH commands...I hope this helps.· Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
The 24LC16 is an I2C part. There's already existing code that helps a BS2 interface with I2C devices.· And yes, that does take 70 LOC, and about 200 bytes of the BS2 eeprom.· Still, what's your alternative?
Oh, and "LOC" is not that important a metric in the BS2.· What IS important is the amount of EEPROM in the BS2 that gets used.· You could put everything on ONE loooong line, and use 200 bytes.· Changing the number of lines used doesn't affect the amount of memory used.
Post Edited (allanlane5) : 9/19/2006 2:57:39 AM GMT
Again, thank you.
Comments don't count. 'CON' statements don't count. An IF or SEROUT does count.