TeensyLCD

Status
Not open for further replies.

jimmayhugh

Well-known member
My TeensyNet project has the ability to run multiple "actions" that can monitor and control devices based on temperature. I wanted to have the option of displaying the information of each action on a separate 4x20 HD44780-compatible LCD.

My first go round used a MCP23017 to control the LCD via I2C. Problem here was that there are only 8 possible I2C addresses, limiting the total number of LCDs.

I've now created a library that uses a single MCP23017 to control up to 11 LCDs. The HD44780 is used as a write only device (R/W is grounded), and the backlight, if it exists, is not controlled by software.

The MCP23017's I/O pins are all configured as outputs:
  • All HD44708 RS pins are attached to MCP23017 pin 8 (GBP7)
  • All HD44708 D4 pins are attached to MCP23017 pin 7 (GBP6)
  • All HD44708 D5 pins are attached to MCP23017 pin 6 (GBP5)
  • All HD44708 D6 pins are attached to MCP23017 pin 5 (GBP4)
  • All HD44708 D7 pins are attached to MCP23017 pin 4 (GBP3)
  • HD44708 0 C/E pin is attached to MCP23017 pin 3 (GBP2)
  • HD44708 1 C/E pin is attached to MCP23017 pin 2 (GBP1)
  • HD44708 2 C/E pin is attached to MCP23017 pin 1 (GBP0)
  • HD44708 3 C/E pin is attached to MCP23017 pin 28 (GAP7)
  • HD44708 4 C/E pin is attached to MCP23017 pin 27 (GAP6)
  • HD44708 5 C/E pin is attached to MCP23017 pin 26 (GAP5)
  • HD44708 6 C/E pin is attached to MCP23017 pin 25 (GAP4)
  • HD44708 7 C/E pin is attached to MCP23017 pin 24 (GAP3)
  • HD44708 8 C/E pin is attached to MCP23017 pin 23 (GAP2)
  • HD44708 9 C/E pin is attached to MCP23017 pin 22 (GAP1)
  • HD44708 10 C/E pin is attached to MCP23017 pin 21 (GAP0)

I've written a small library that can control the MCP23017 and LCDs, it's available at my github repository, along with a couple of test examples.

This should allow (although I have not exhaustively tested and verified this) one Teensy3.x to control up to 88 LCDs.

If this is of any interest to anyone else, feel free to use it or comment.
 
Status
Not open for further replies.
Back
Top