Dr Jefyll wrote:
MichaelM wrote:
Great idea Michael.
Yes, indeed -- a very tidy solution!
Michael wrote:
I would use a newer (and less expensive) device, perhaps an 18 pin 16F1527 ($1.73) or a 20 pin 16F1507 ($1.53)...
Hmmm.. with the 20-pin device, does that give you two more inputs? Those could be put to use. The extra inputs could be:
- a strobe for an input latch. Gives you the option to drive the device straight from a CPU data bus
- a polarity control that inverts the output sense, so you have freedom to use either common-cathode or common-anode display (or deliver AC to a simple LCD)
Hi Jeff,
Yes, a 20 pin device would give you two more inputs, though I'm not sure the PIC would be fast enough to latch data at a high clock rate so you might want to use a separate latch IC. One of the extra inputs could be used to select output polarity for CC or CA displays. However, if you don't have an extra pin, you can change one instruction in the PIC code to change LED polarity.
I should mention that you could use seven (7) pins on a 65C22 VIA port to drive multiple seven segment displays and an HD44780 type LCD. For example, in the photo of the Serial LED/LCD Backpack mockup below, a 14-pin PIC is using seven I/O pins to drive two 4-digit 7-segment displays (at 5% brightness) and a 2x16 HD44780 LCD display. The diagram shows my MacMux method for driving 16 displays with six pins. Add one pin to that and you can drive an HD44780 LCD, too.
Cheerful regards, Mike