I was wondering if anyone here has found a practical way to interface a microcontroller to a microprocessor circuit. Even at the assembly level I don't think a PIC micro is going to be fast enough to reliably respond to a microprocessor's read/write cycle directly.
I currently perform a number of tasks (eg keyboard, mouse and I²C) entirely in software on the main microprocessor, which bogs down the main CPU when polling for input. Being able to attach a microcontroller to handle these tasks and feed the results back to the CPU as and when they are available would make things a lot smoother.
The most obvious solution I could think of would be some sort of FIFO memory. When I wanted to send a byte from the microcontroller to the microprocessor I would clock some data into the FIFO, and the microcontroller could then dequeue it at its own leisure (ideally the FIFO could also have an output pin that indicated when there was at least one byte of data stored in it, and this pin could trigger an interrupt on the microprocessor). Unfortunately, such FIFO memories don't appear to exist - at least not with an 8-bit word size.
An alternative solution may be to use another part which incorporates a FIFO as part of some other functionality - such as a UART - between the microprocessor and microcontroller, but this seems to be overkill for the task, and complicates code at both ends.
I currently perform a number of tasks (eg keyboard, mouse and I²C) entirely in software on the main microprocessor, which bogs down the main CPU when polling for input. Being able to attach a microcontroller to handle these tasks and feed the results back to the CPU as and when they are available would make things a lot smoother.
The most obvious solution I could think of would be some sort of FIFO memory. When I wanted to send a byte from the microcontroller to the microprocessor I would clock some data into the FIFO, and the microcontroller could then dequeue it at its own leisure (ideally the FIFO could also have an output pin that indicated when there was at least one byte of data stored in it, and this pin could trigger an interrupt on the microprocessor). Unfortunately, such FIFO memories don't appear to exist - at least not with an 8-bit word size.
An alternative solution may be to use another part which incorporates a FIFO as part of some other functionality - such as a UART - between the microprocessor and microcontroller, but this seems to be overkill for the task, and complicates code at both ends.