Software trouble with CD74HC259 CMOS logic latch

I'm trying to control an LCD screen with a high speed addressable latch (similar results as the 74HC595 shift register but only with a bit more functionality ie more stubborn to program). The only problem is that I'm an inexperienced programmer and struggling to write a basic structure to eventually drive either a display panel switching RGB Leds showing individual states with another CD74HC driving an 20x2 line LCD display.

I'd appreciate insight in writing a basic script to initialize the latch with its all its deferent inputs (A0, A1, A2, A3 and D)

Possible comments on how to write a program using this device to control either leds or an LCD.

Attached is the Texas Instruments datasheet for the device in question with a functional diagram.

CD74HC259E.pdf (458 KB)

ok I did a little Googling..and found this: http://www.flatline.net/journal/2009/10/30/the-magic-of-the-74ls259/

enjoy

Cris H. 8)

Thank you very much. Your post showed me that I am over complicating the whole thing. The basic code isn't as complicated as I previously thought, actually it's quite doable. Thanks again. :slight_smile: