18X i2c slave address

Maleny

New Member
I have just started to investigate i2c. Having no i2c devices thought I would set up a couple of 18X's, one as a master and one as a slave to have a play with. If I understand the datasheet this should be possible also I assume I can use 0000 as a start address but what would the slave address be for an 18X be?
 

Technical

Technical Support
Staff member
Only X2 parts can be slaves, so this is not possible with an older 18X (which can only be a master).
On X2 parts you can choose your slave address, any even number 2-254 (don't use 0)
 

nick12ab

Senior Member
From hi2csetup - only X1 and X2 parts are supported by slave mode. X parts are not and you cannot use an 18X.

It may be possible to bit bang it if it's possible to poke some SFRs to override the data direction of the pins when necessary but it would be very slow and it would just be better and more reliable to use a 20X2.
 
Top