Dangerous Prototypes

Other projects => Past projects => Open 7400 Competition => Topic started by: stephen on October 14, 2011, 05:43:30 am

Title: [Entry] SPI LCD
Post by: stephen on October 14, 2011, 05:43:30 am
Hi, this is my entry for the Open 7400 Competition.

This idea might not be new, but I haven't seen able to find a design for a LCD backpack with less than 3 interface wires. Most designs either use a microcontroller or additional pins

Features of my LCD Backpack design:
- Interfaces via 3 wire SPI (Clock, Data, Chip Select)
- Uses only 1x 74HC14 and 2x 74HC595
- LED backlight brightness adjustable to 4-bit resolution (via R2R DAC)
- Able to work directly with 3.3/5V systems without any additional buffers
- Ability to expand to control more LCD panels with the same 3 wires (not part of this competition submission)

Schematic:


Operation:
Chip Select pin is first pulled HIGH by external device, causing the shift registers output to be DISABLED at the same time (CS=G=HIGH).
2 bytes of data is then sent to the LCD backpack via SPI (MSB first).

The 2 magic bytes are shifted into 2 74HC595 (shift registers):

Upper byte contains data to be written on LCD's 8-bit interface.
Lower byte contains backlight brightness and HD44870 RS command value.

Upon transfer of 2 bytes, the Chip Select pin is pulled LOW by external device, shift registers output are ENABLED at this momenet (no effect as data during this transient period is not latched to the LCD controller).



RCK pins on the shift registers (connected to CS through 1 inverter) is then pulled HIGH with a propagation delay. The rising edge transition latches the data onto the shift register's output pins.

E pin on LCD (connected to CS through 6 inverters) is pulled LOW with a longer delay. The falling edge transition initaties the LCD controller to read the data on the input pins.

Note: This is possible as RCK (on shift register) and E (on LCD) only respond to rising and falling edge transitions respectively.

LED Backlight:
4 pins on lower byte shift register is connected to the input of a 4-bit R2R DAC, of which the DAC's output is fed directly to the LCD panel's LED backlight. By writing 4-bits according the brightness desired to bit1:3 of lower byte, the brightness can be controlled.

Prototype:
A TI Launchpad with MSP430G2553 is used as the SPI master for this prototype. +5V is supplied to backpack from a powersupply off camera.


Some future developments:
3 bits were reserved on lower byte shift register. A 3-to-8 decoder can be connected to select up to 8 LCD controllers and flip-flops to store the brightness of each individual LCD back light. An AND gate is used to choose which LCD receives the latch signal for loading of information.

A prototype is ready (shown below), but it does not work reliably with different LCD models at the moment.
Title: Re: [Entry] SPI LCD
Post by: arupbsk on October 14, 2011, 09:31:39 pm
I'm sure you'll win any of the prizes for sure. I was thinking to make a such serial data transmission model, but you already made it. 7 days left to enter competition and I'm now thinking to do my same entry in different way, rather than SPI. I may use TWI for information interchange for my project.
Hmm, 7 days only left.
Anyways, best of luck.

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.00892056816session_write_close ( )...(null):0
20.00922188408ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.00922189184Database_MySQL->query( ).../DatabaseHandler.php:119
40.05312327920Database_MySQL->error( ).../Db-mysql.class.php:273