Attached is my proposal. One PIC driving 7 MCP23017 port expanders, driving 6-16 channel triac boards in a matrix (the seventh board is the matrix controller that controls what segment gets turned on and what color light). In other words I have to present the matrix code and the individual light code at the same time, like a logical AND circuit.
The "matrix controller" could be another i2c device, or it could just be 9 channels of DIO from the PIC, 6 channels for each segment of the star and 3 for the color, depending how easy it is to program the i2c version. I'm thinking of "repeated start" in the i2c code where a stop is not sent at the end of the string, but a start is instead. That way I can push the code to the MCP23017 simultaneously.
If I do the 9 channel DIO, then I can just put the i2c individual-light code into the same loop that defines what lights are going to light up. Make sense?
I envision it like this: 1) determine what segment to light, 2) determine what color, 3)enable those triacs and hold, 4)determine 16 bit light pattern to display, 5) transmit to I2C network. As soon as that happens of course, the lights should light. Then the code will jump to next routine.
The triac matrix is not a problem. I have that running now with straight DIO outputs from a PIC.
Bookmarks