I made a start on integrating the display, multiplexer and encoder software into a single executable running on one processor.
Immediately I ran into a quite unexpected problem! The Arduino has a high speed Serial Peripheral Interface (SPI), which permits cooperating devices to share a bidirectional port. Each device is supposed to request service by asserting a hardware select line. Well it doesn't work!
I have three devices that need to access the SPI.
- The Ethernet card
- The SD RAM
- The Flash ROM which holds the fonts on the display card.
I'm getting some assistance on the Arduino forum but so far there is no obvious solution in sight.
Meanwhile, I've returned to my dual Arduino solution, this time using the second Arduino merely as a display processor. It's quite easy to implement a byte-wide parallel interface between the two microcomputers, using 8 data pins and data available/ready lines to handshake byte movement across the interface. A simple protocol to package the display data into a data stream for transmission is straightforward as well.
So that's what I've done. And it works very well. Complete with handshaking I am seeing single byte transfer times around 22us and a typical packet of 12 bytes (a VFO frequency change update) takes 250us to transfer. That's more than adequate.
|The display working on a second Arduino (underneath the|
display). The 8-bit parallel interface wiring is clearly visible.
I still have to implement data transfer in the opposite direction. It's not even slightly demanding, as the only traffic is touch screen transactions. A simple low speed serial interface will eat that problem without even pausing for breath.
So I have a solution, albeit at the cost of more hardware. Hardware is cheap, so that doesn't bother me but it would be nice to get to the bottom of this SPI problem!