Beginner's I2C question

mydnight

New Member
I am working on a robotics project using PICAXE 18X microcontrollers. The robot that I'm designing will work in two parts -- a base unit, which on it's own will simply have obstacle avoidance programming, plus the code to control the drive train, and various "backpacks", which will contain other code to "specialize" the bot in various ways. Each backpack will contain it's own microcontroller. What I want to do is have the backpacks essentially jumper two pins on the base micro, to force the base unit into I2C slave mode, but still allow the 'bot to function with no backpack installed. Ideally, the drive train code would remain on the base unit itself, and the backpack micro would simply call subs from the base unit. Unfortunately, as I am still a complete newb with regards to microcontroller commands, I have no idea how to do this -- I can't find any documentation about how to use one micro to control another in this way. Any help, suggested reading, or code snippets would be greatly appreciated.
 

mydnight

New Member
BCJKiwi said:
On 18X and 28X i2cslave relates only to the external part, not to the PICAXE itself.
Does this mean it's going to be difficult/impossible to force any of the x series micro's into slave mode without using handshaking? (I.E. should I upgrade my "base unit" -- which is just controlling an L293 motor driver for 2 small motors, and taking input from one bump sensor on the front -- to some X1 series?)

EDIT: Sorry about multiple edits, I'm 3/4 asleep while I write this lol
 
Last edited:

Technical

Technical Support
Staff member
You can use a 28X1 as the slave and an 18X / 28X / 28X1 as the master. No handshaking is necessary is simple designs e.g. controlling a motor.
 
Top