Tod's been working on a super-duper breadboard system. No doubt it has every bell and whistle imaginable piled on top of a kitchen sink. One feature is a line based LCD. Now these are real cheap these days, but they usually use a PCF8574 I2C I/O expander. Not that I2C is bad, but to write a byte into the LCD takes at least 8 I2C operations, not to mention that for whatever reason I2C takes lots of interrupts and states in the software. Serial UARTs and SPI both potentially faster and the hardware on the micro is such, you write a byte and go away.
A number of years ago we did a BASIC for the LPC812, but never took it to market as the LPC1114 in a DIP28 came out weeks later, and that one looked like a better low end device.
So rather than a simple I/O expander why not use a small micro, just like the LPC812. The LPC812 is a few pennies cheaper than the PCF8574 at Digikey, who knows in Shen Zhen. With the jumpers in place this is 2 connectors and 5 components total (2 ICs, 2 caps, 1 pot). So while I was watching Aaron Rodgers go down in flames I designed a board to do just that.
With feedback from Tod and Olzeke another KiCAD board was shipped out to OSHpark. This is an open source design, including software (to be published later), so please copy it.
Here is the schematic
And the PCB
And the KiCAD files
So what are the optional parts?
- Cut JP2, install Q1 and R3 (1K or so) and you can control the backlight from the LPC812.
- R1 and R2 1K pullups for optional I2C interface, that could be smarter than the bit-banged I/O expander
- Cut JP1, pins 1-2, and solder 2-3 for 5V to the LCD controller chips
- Lower left connector J3 allows for external control of the backlight or contrast. It also could function as a standoff.
The parts chosen were 0805 and SO-20, easily soldered down even with fat fingers.
And after sending the PCB out, and looking for parts, pots (variable resistors) are still ridiculously expensive in SMT, so I pushed stuff around for the rev 2 board to accept either SMT or thru-hole. Updated KiCAD project above.