Hooking Multiple I2C devices to one Picaxe

RNovember

Well-known member
Hi.
I was just wondering how to hook up multiple I2C devices to a picaxe 20m2.
I want to use both as slaves.
One is an RTC, part number DS3232N, and the other is an EEPROM, part number 24LC256.
The EEPROM has pins that can be wired high or low to set the address, but the RTC doesn't, as far as I can tell.
How do I get the picaxe to access the right one?
I do know that the hi2cin and hi2cout commands have an address parameter, but as far as I can tell, the RTC responds to anything.
 

AllyCat

Senior Member
Hi,

The DS3232N Slave Address is rather buried in the data sheet (on page 18), but it's %1101 0000 (or $D0). I think those two chips have different address lengths (word for the memory and byte for the clock) so you will need to issue a new HI2CSETUP command when changing from one device to the other.

Cheers, Alan.
 

westaust55

Moderator
You will find some of my past information and code examples for the DS3232 here:
 
Top