| ??? 10/09/99 20:21 Read: times |
#831 - RE: LCD |
How to connect LCD module to a shift register. Connect your LCD module in 4 bit mode with only high 4 bits of module AD bus (use low 4 bits of your shift register like 4094). Tie R/W signal permanently to ground, for you will only write to the LCD. Use the remaining bits for EN and RS signal and that's all.
A small tip about the software. Put an image of the shift register output to BDATA space (f.e. at address 20h) and define special bits so when you turn on EN of LCD module it goes like this SPORT: EQU 20H BIT EN SPORT.4 BIT RS SPORT.5 SETB EN ACALL SER_OUT CLR EN ACALL SER_OUT if you want to send data, do it with logical OR-ing and AND-ing to the bdata variable SPORT when sending 3h you do it by: ANL SPORT,0F0H ORL SPORT,003H ACALL SER_OUT This way you get a low level driver that can be replaced by the new one if using different type of connection but the high level LCD driver routines stays the same. Another good tip is to use I2C expander PCF8574. This way you use only 2 lines to connect to 8051. The same bus can be used to drive your I2C EEPROM, RTC like PCF8583. By combining two spare outputs of the expander and using of 4 diodes, you can also add 4 keys and you get an I2C operator's panel that is connected with only 4 lines (SCL, SDA, GND and +5V). One spare output is used to drive diodes and one to drive a beeper - or piezzo buzzer. |
| Topic | Author | Date |
| LCD | 01/01/70 00:00 | |
| RE: LCD | 01/01/70 00:00 | |
| RE: LCD | 01/01/70 00:00 | |
| RE: LCD | 01/01/70 00:00 | |
| RE: LCD | 01/01/70 00:00 | |
| RE: LCD | 01/01/70 00:00 | |
| RE: LCD | 01/01/70 00:00 | |
| RE: LCD | 01/01/70 00:00 | |
| RE: LCD | 01/01/70 00:00 | |
| RE: LCD | 01/01/70 00:00 | |
| RE: LCD | 01/01/70 00:00 | |
| RE: LCD | 01/01/70 00:00 | |
| RE: LCD | 01/01/70 00:00 | |
Timer 2 auto reload | 01/01/70 00:00 |



