I2C addressing several adjacent memory locations

cpedw

Senior Member
I need to transfer several adjacent bytes between a 14M2 and a DS3231 clock via I2c. The twist is that the top end in the 14M2 memory is the bottom end in the DS3231

Are these bits of code going to work as I'd like?
Code:
bptr=Axestart
HI2CIN Clockstart,(@bptrdec, @bptrdec, @bptrdec )

bptr=Axestart
HI2COUT Clockstart,(@bptrdec, @bptrdec, @bptrdec )
And presumably, if that's OK, I could use @bptrinc if the two data sets are in sync?

Derek
 

hippy

Technical Support
Staff member
Your examples should work for moving code from the DS3231 to PICAXE RAM and back out again.

Whether they work "as I'd like" depends on what exactly you are wanting, which locations in the DS3231 and PICAXE are being read or written.
 
Top