I've only dabbled a little with i2c, but my current project looks like I'm going to have to split the code into two parts and run 'control processing' and 'ui processing' on a separate chips. This actually suits me since I can mount the 'ui display & keypad' separate from the other parts.
The circuit involves a couple of other i2c devices, DS1307, an i2c lcd driver and potentially a 24LC32.
Originally I was only going to use a single picaxe, but moving to multiple chips opens up new possibilities that I haven't thought thru fully yet. So, is it possible, providing I implement some form of 'locking' mechanism for an i2c bus to have more than one master device, so for example, could I read a DS1307 from two separate master picaxes providing only one at a time?
Can a picaxe running as an i2c slave read other i2c slave devices?
What sort of distances does i2c work over, couple of feet?
What if I want to go further, say 20 to 30 feet how could I do that? Copper or optic?
Finally, the project includes several DS18B20 sensors which I'm reading using the 'readtemp12' functions. These devices also have some in-built nvram available that would be really useful to store 'calibration' info in since that will then stay with the sensor if it gets relocated. Is it straightforward to access this using a picaxe and retain the 'readtemp12' function, ie, anybody got any pointers or code snippets?
Hope thats not too much for one post!
Cheers
Chris
The circuit involves a couple of other i2c devices, DS1307, an i2c lcd driver and potentially a 24LC32.
Originally I was only going to use a single picaxe, but moving to multiple chips opens up new possibilities that I haven't thought thru fully yet. So, is it possible, providing I implement some form of 'locking' mechanism for an i2c bus to have more than one master device, so for example, could I read a DS1307 from two separate master picaxes providing only one at a time?
Can a picaxe running as an i2c slave read other i2c slave devices?
What sort of distances does i2c work over, couple of feet?
What if I want to go further, say 20 to 30 feet how could I do that? Copper or optic?
Finally, the project includes several DS18B20 sensors which I'm reading using the 'readtemp12' functions. These devices also have some in-built nvram available that would be really useful to store 'calibration' info in since that will then stay with the sensor if it gets relocated. Is it straightforward to access this using a picaxe and retain the 'readtemp12' function, ie, anybody got any pointers or code snippets?
Hope thats not too much for one post!
Cheers
Chris