jayanth.devarayanadurga
Banned
- Joined
- Dec 4, 2012
- Messages
- 4,280
- Helped
- 822
- Reputation
- 1,654
- Reaction score
- 791
- Trophy points
- 1,393
- Location
- Bangalore, India
- Activity points
- 0
I need 4 bit LCD Code. I know that first the Upper nibble of data or command is sent and then Lower nibble of data or command is sent. I have code but I have to define data port like
#define LCD_DATAPORT PORTD
and then send upper nibble and lower nibbles to LCD_DATAPORT and after assigning each nibble I have to toggle EN pin. What I want is...
I will be using pins like
LCD_D4 = PORTBbits.RB0
LCD_D5 = PORTCbits.RC7
LCD_D6 = PORTDbits.RD1
LCD_D7 = PORTAbits.RA0
i.e., I must be able to use any pins for lcd data
So, I need code which assigns bits of the upper and lower nibbles to individual pins and then toggles the EN pin.
#define LCD_DATAPORT PORTD
and then send upper nibble and lower nibbles to LCD_DATAPORT and after assigning each nibble I have to toggle EN pin. What I want is...
I will be using pins like
LCD_D4 = PORTBbits.RB0
LCD_D5 = PORTCbits.RC7
LCD_D6 = PORTDbits.RD1
LCD_D7 = PORTAbits.RA0
i.e., I must be able to use any pins for lcd data
So, I need code which assigns bits of the upper and lower nibbles to individual pins and then toggles the EN pin.
Last edited: