This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Best approach for a 240 x 4 synchronous stream?

Folks,

Would appreciate some advice from those here with more Piccolo experience than me.  I have an old 128x480 LCD display that I want to use in a project (for a machine tool CNC conversion; hence the need for this ruggedized display, which contains a Hitachi LM215X module).  Controller chips for this module seem to be long obsolete.  For this and other reasons, I intend to use a Piccolo F28027 to drive it.

The fundamental problem is painting a horizontal line of 240 single-bit pixels, in parallel across 4 quadrants of the LCD at a fixed clock rate of about 1 microsec/cycle.  I can slice and dice the bits from my frame buffer/character generator to assemble this 240 x 4 bit stream in RAM, but what's the best way to feed these 240 4-bit nibbles out synchronously at 1 µs each?

1. I can run a clock at 1 MHz and use an ISR to read the next nibble and put it out to GPIO0-3.  From testing, I can reliably get into the ISR and the first C instruction in about 24-25 cycles.  Might be doable, since I have almost 60 cycles per nibble.

2. I looked at using the SPI peripheral, but it's only 1-bit at a time, not 4.

3. However, maybe I should still use SPI to put out 4*240 = 960 bits at 4 MHz and use an outboard shift register to convert back to 4-bit parallel.

4. Rather than using an ISR, I could monitor a 1 MHz internal clock in a polling loop, and service the RAM-read/GPIO-output that way.

5. Is there a simple outboard hardware solution, e.g., a 240(or more) x 4 FIFO?  What chip(s)?

Thanks in advance for any advice.  I'll make one of these ways work, but thought it would be useful to ask for some advice before charging off into blind alleys :-)

Mike

  • Folks,

    I'm currently pursuing approach 3.  Looks like it should work.  Timing will be OK if I set the LSPCLK prescaler to 1x (vs default 4x) and the SPI scaler to 13x.  That times the 4x scaling in the outboard serial to parallel conversion gives me a net 52x clock scaling and puts me in spec for the target LCD board.

    Please feel free to add comments and hints.  I'll report further results.

    Mike

    PS: Is SPI the only peripheral that uses the LSPCLK scaler?  Will I screw up anything else by changing it from the default value of 4x to 1x? (Looks like I need to index all the Piccolo peripheral docs and do a more thorough search -- thank heavens for Acrobat PDF indexing and search.)