Hello, new member here and first post.

I got into PIC's by learning on PICAXE. One thing that makes PICAXE great for beginners is the built-in functions that let you develop programs quickly without worrying about all the code running underneath. The drawback is that there are limitations (like program size and speed). My needs have grown beyond what I can do with a PICAXE, so I picked up PBP and a programmer and am starting to learn more about PICs and how they work.

I have a project that I got working using four PICAXE chips, one acting as the master and three as slaves. All communicate using I2C. The built-in functions for I2C on the PICAXE I found extremely useful. The master can read and write data to the slaves at will, without affecting the operation of any program running on the slave PICAXE. In essence, the slave PICAXE behaves just like an I2C EEPROM. When data is written to the slave PICAXE, an interrupt is set so the slave knows it has data "waiting".

I used this in a project where the slaves are gathering data from various sources, performing math on the data and placing the results in scratchpad memory for the master to read (polled at specific intervals). I also have the master send "commands" to the slaves by placing data into their scratchpad memory. The slaves then go and perform tasks on their own while the master continues on with its own tasks (mainly user input and data display).


I did search the forums for I2C communication and PIC to PIC, but haven't yet seen anything similar to this. I'm wondering if anyone has done something like this, and what methods they used (I2C, HSERIN/OUT or something else). I have a feeling this might be a significant programming challenge.