This is Arduino sample code for any display that uses the Sitronix ST7066U controller. The data sheet for this controller is available here. The code can be used for both 2 and 4 row displays.
These displays are part of the CFAH character family and operate at 5V. Please refer the display datasheet before connection to a power source. Further, a variable resistor connection is required for contrast adjustment and its connection scheme has been outlined in the datasheet of the respective part.
Arduino | Port | Display pin* | Function: 8-bit parallel |
---|---|---|---|
Power | |||
5V | 5V | POWER 5V | |
GND | GND | GROUND | |
Control Lines | |||
D8 | PORTB | RS/DI | Register Select (RS) |
D9 | PORTB | R/W | Read/Write (RW) |
D10 | PORTB | EN | Enable (EN) |
D11 | PORTB | EN2 | Enable (second half of display) (EN2) |
Data Lines | |||
D0 | PORTD | DB0 | DATA BUS LINE (DB0) |
D1 | PORTD | DB1 | DATA BUS LINE (DB1) |
D2 | PORTD | DB2 | DATA BUS LINE (DB2) |
D3 | PORTD | DB3 | DATA BUS LINE (DB3) |
D4 | PORTD | DB4 | DATA BUS LINE (DB4) |
D5 | PORTD | DB5 | DATA BUS LINE (DB5) |
D6 | PORTD | DB6 | DATA BUS LINE (DB6) |
D7 | PORTD | DB7 | DATA BUS LINE (DB7) |
- Actual pinout varies by display, consult the display's datasheet to confirm
Here are links to our active displays that use the Sitronix ST7066U controller:
- CFAH0802A-GGH-JT
- CFAH0802A-NYG-JT
- CFAH0802A-TMI-JT
- CFAH0802A-TTI-JT
- CFAH0802A-YMI-JT
- CFAH0802A-YYH-JT
- CFAH0802D-NYG-JP
- CFAH0802D-YYH-JP
- CFAH0802Z-YYH-JP
- CFAH1601A-GGH-JT
- CFAH1601A-NYG-JT
- CFAH1601A-YYH-JT
- CFAH1601B-TFH-ET
- CFAH1601B-TMI-ET
- CFAH1601B-YYH-ET
- CFAH1601L-TMI-ET
- CFAH1601L-YYH-ET
- CFAH1602A-YYH-JT
- CFAH1602A-YYH-JTE
- CFAH1602B-NGG-JTV
- CFAH1602B-NYG-JT
- CFAH1602B-TMI-JT
- CFAH1602B-YMI-JT
- CFAH1602B-YTI-JT
- CFAH1602B-YYH-JT
- CFAH1602B-YYH-JTE
- CFAH1602B-YYH-JTV
- CFAH1602C-TMI-JT
- CFAH1602C-YYH-JT
- CFAH1602C-YYH-JTV
- CFAH1602D-TMI-ET
- CFAH1602D-YTI-ET
- CFAH1602D-YYH-ET
- CFAH1602J-NYG-JT
- CFAH1602J-YYH-JT
- CFAH1602L-GGH-JT
- CFAH1602L-TGH-JT
- CFAH1602L-YYH-JT
- CFAH1602M-TMI-ET
- CFAH1602M-TTI-ET
- CFAH1602M-YYH-ET
- CFAH1602O-TFH-ET
- CFAH1602O-TMI-ET
- CFAH1602O-YYH-ET
- CFAH1602P-TMI-ET
- CFAH1602P-YYH-ET
- CFAH1602S-YYH-ET
- CFAH1602Y-NYG-ET
- CFAH1602Y-YYH-ET
- CFAH1602Z-YYH-ET
- CFAH1604A-NYG-JT
- CFAH1604A1-TMI-JT
- CFAH1604A-YYH-JT
- CFAH1604B-NGH-ET
- CFAH1604B-TMI-ET
- CFAH1604B-YYH-ET
- CFAH2002A-NGG-JT
- CFAH2002A-NYG-JT
- CFAH2002A-NYG-JTV
- CFAH2002A1-TFH-JT
- CFAH2002A1-TMI-JT
- CFAH2002A1-YMI-JT
- CFAH2002A-YMI-JTV
- CFAH2002A1-YYH-JT
- CFAH2002A1-YYH-JTV
- CFAH2002D-TMI-ET
- CFAH2002D-YYH-ET
- CFAH2002L-TFH-ET
- CFAH2002L-TMI-ET
- CFAH2002L-YYH-ET
- CFAH2002M-TMI-ET
- CFAH2002M-YYH-ET
- CFAH2004A-NYG-JT
- CFAH2004A-TFH-JT
- CFAH2004A-TMI-JT
- CFAH2004A-YTI-JT
- CFAH2004A-YYH-JT
- CFAH2004A-YYH-JTE
- CFAH2004B-TFH-ET
- CFAH2004B-TMI-ET
- CFAH2004B-YYH-ET
- CFAH2004D-TMI-ET
- CFAH2004D-YYH-ET
- CFAH2004L-NYG-ET
- CFAH2004L-TMI-JT
- CFAH2004L-YYH-JT
For more inforamtion about other character LCD display offerings, please see our full list here.