Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Using SPI to drive 8-bit parallel LCD via shift registers


  • Please log in to reply
3 replies to this topic

#1 dragonfly

dragonfly

    Member

  • Members
  • PipPip
  • 12 posts
  • LocationSouth Africa

Posted 15 November 2010 - 09:46 PM

Here's a small project I have been working on to drive an LM6029 LCD display (128x64 @ 2 bits per pixel) using two 74HC595 8-bit shift registers daisy-chained to give 16-bit output. The display requires 8 data lines and a minimum of 3 control lines. Using the shift registers reduces the number of pins required from the netduino to 3. The code also implements a simple text interface for rendering 8x8 text characters using an embedded font. The drawing rate is quite low at the moment (about 2 seconds to fill a screen), which mainly has to do with the fact that an interop. call (SPI.Write) is done for every character. This seems to be necessary to force the CS line to toggle in order for the shift register to latch the output. I'm currently looking at workarounds to be able to blast a whole array of data to the display in one call but the only solution may be to resort to a native-code implementation (I'm still struggling to get the vanilla firmware to compile so it may take a while). There's also one minor optimization which could still be done, and that's to set the display into continuous write mode (aka Read-Modify-Write) which will reduce the number of instructions sent to the display by about a third to a half. Do with it what you will :D

Attached Files



#2 sweetlilmre

sweetlilmre

    Advanced Member

  • Members
  • PipPipPip
  • 62 posts

Posted 16 November 2010 - 09:24 AM

I'm currently looking at workarounds to be able to blast a whole array of data to the display in one call but the only solution may be to resort to a native-code implementation (I'm still struggling to get the vanilla firmware to compile so it may take a while).


Perhaps I can extend my BitBang implementation to offer a latch-per-bytes-sent functionality or such.
I'll look into it.

-(e)

#3 sweetlilmre

sweetlilmre

    Advanced Member

  • Members
  • PipPipPip
  • 62 posts

Posted 16 November 2010 - 07:43 PM

Sorry, meant to add: Do the continuous mode stuff. This made a significant difference in the LED matrix performance. -(e)

#4 stotech

stotech

    Advanced Member

  • Members
  • PipPipPip
  • 143 posts
  • LocationAustralia

Posted 31 October 2013 - 08:38 AM

This is exactly what I've been looking for i think. One thing I need help with though is that they are not the only 595 shifters I'm using. there are 8 and i'm using the .net micro framework toolbox. how do i modify the code to skip the spi configuration and just feed it some toolbox GPO ports.

 

grant






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.