bryan1
Well-Known Member
Hiya Guy's,
I'm now on building up a development box and it contains my 16f877a development board, a 20x4 LCD, 4x4 keypad and I've made up a 3-9 volt converter and got the board running of 2 AA rechargable batteries. Now for the question all the assembly code I've got always use one port for the LCD but I want to use the r/s, r/w and E lines using port E and the data lines in 4 bit mode using the 4 lower bits in portA. I know this is probably a basic question but how would I setup the EQU's to handle the lcd lines for the 2 different ports. Would the code below work or would I need to clarify more for portA if I needed to use the rest of the port.
Cheers Bryan
I'm now on building up a development box and it contains my 16f877a development board, a 20x4 LCD, 4x4 keypad and I've made up a 3-9 volt converter and got the board running of 2 AA rechargable batteries. Now for the question all the assembly code I've got always use one port for the LCD but I want to use the r/s, r/w and E lines using port E and the data lines in 4 bit mode using the 4 lower bits in portA. I know this is probably a basic question but how would I setup the EQU's to handle the lcd lines for the 2 different ports. Would the code below work or would I need to clarify more for portA if I needed to use the rest of the port.
Code:
LCD_DATA EQU PORTA
LCD_TRIS EQU TRISA
LCD_CTRL EQU PORTE
; PORT E control lines
LCD_E EQU 2
LCD_RW EQU 1
LCD_RS EQU 0
Cheers Bryan