Asked
— Edited
There has been some discussion on the forum on I2C port extenders for the EZ-B so I thought it may be relevant to show what we are doing with this on the EZ;1 and EZ:2 robots.
The EZ-B is an I2C master so the external (18 pin) micro must be a slave (although it is possible to have more than one master on an I2C bus), in the video the EZ-B script sending the I2C commands can be seen running in the background.
The EZ:1 currently has 25 head functions, the single head micro does all the work (releasing the EZ-B to do other things) like controlling the eye servos, RGB LED pupils, PWM eye rims, smile LEDs, Frown LEDs, ear LED rims and also sends head sensor data back to the EZ-B. When in debug mode the micro also sends out the last command to an I2C LCD that's connected to the bus as you can see in the video. If the head was directly connected to the EZ-B it would use 12 EZ-B port lines.

j
The EZ-B here just sends the command (just one byte) to the PIC, then the PIC does all the work so I guess you can call it a sub controller.
Tony
Is the 16F819 difficult to program?
I built up quite a big code library for PICs over the years, so what you see in the video is about a days work. But starting from scratch it would take you quite a bit of time to do the more complex stuff like I2C. All my boards have in-circuit programming, so I can download new firmware straight into the head itself, the in-circuit programmers are around £30.
If you need something specific (and dont mind waiting until I get some spare time), I could knock one up to your particular specification, then you will just need to add it to a stripboard. If you had an in-circuit programmer, then if you needed any modification, then all I need to send you is the .hex file
Tony
Melvin's head could have done with it's own PIC for eye movement and LEDs etc. but now I've replaced the LEDs for BlinkMs it's barely worth doing for 2 servos. I will bear that in mind for future project though, I have a few things in mind that will need a lot of ports where I'd like them grouped together but that project is getting further and further away these days.
Glen
www.robot-electronics.co.uk/htm/gpio14tech.htm
My PIC is slightly different as I also build in routines for things like facial expressions like happy/surprise etc and controlling the servos.
Tony
You have the experience I want to add to my robotics projects!
Thank You,
Steve S