Running 2 uCs instead of 1
Hello,
I'm building a device which will have a user control panel with knobs ( adc ), buttons, encoder knobs, and LEDs etc which will use up many pins. The device will perform time sensitive output tasks such as DAC and PWM based on user input.
I'm thinking of using two uCs instead of one; The first to handle all the UI input and the second to handle the output tasks. My plan is to have the user interface uC send short commands to the second uC over SPI. Some advantages include being able to test my device by just sending serial messages instead of having physical knobs, buttons, etc. I could 'connect' different types of UI boards, as long as they can send SPI messages to the second uC. I would also have more peripherals/pins to work with. I could also use USART as well as SPI so that I could connect a USB->Serial to my board to send commands to test.
I was planning on sending a static sized 'packet' ( and not variable packet size ) so that the receiving uC knows how many bytes to 'receive' over SPI.
If I add a 3rd uC, the UI uC could use a second SPI port to send commands to it as well.
Is this a reasonable approach? ( just need some direction on a good way to handle this )
Thank you!
