Parallel to SPI GLCD conversion
An old project taken from the old wiki.
A parallel display can’t be controlled directly at a reasonable speed because the software layer simply can’t flip the IO pins fast enough. Even the low level hardware methods with direct register access to fast IO port control can’t help. The display needs fast control of 8 data lines, 2 chip select, data/instruction then the final clock/enable.
The SPI bus is a very fast shift register and can transfer a large buffer at low level hardware speeds. The only weakness is that it still has to flip the chip select pin for the start and end of transfer. The original type 1 schematic worked but wasn’t fast because it had to latch every 2 byte transfer with e CS pin. There had to be a way to eliminate the CS pin and still have the 74595 chips latch data every 2 bytes.
The solution is to have the shift registers automatically latch every 16 bits. By adding a counter(s) it’s possible to auto clock and latch everything so the entire 2k worth of SPI instructions can be sent at once. The counter(s) will count to 16 then reset and trigger the shift register latch and LCD clock at the same time.
For the type 2 schematic, the OR gates are used with the 4017 so the CS pin can sync and reset if needed. It can’t be connected directly because it would be connecting the 4017 outputs to the CS which is also an output. A high on the CS pin will override and reset both counters along with disabling the output of the shift registers.
•(2) 74HC595 shift registers.
•(1) 4049 invert buffer.
•(1) 2.2K Ω resistor for backlight gate control.
•(1) 100 Ω resistor for backlight current limit.(50 Ω can also be used for brighter backlight but also twice the power needed. The backlight LEDs seem to be connected in series so there isn’t a need for much current control)
•(1) 10K Ω potentiometer for LCD contrast.
•(1) PNP transistor of any kind, 200mA minimum.(P-channel MOSFET would also work)
•(1) 4071 OR gate.(schematic type 2 only)
•(2) 4017 decade counters.(schematic type 2 only)
•(1) 4516 HEX counter.(schematic type 3 only)