christinescoms
Member
I am brand new to Microchip controllers but have extensive experience with Motorola, especially the cpu32Kline.
Have a PICDEM 2 Plus board with a 18F452 that I can make do what I want with the exception of the LCD. It is in 4-bit data mode RD0-RD3 and control bits on RA lcd screen supplier 1,2 and 3 for E, R/W, and RS respectively.
I am using the following lines of code. Any suggestions?
DEFINE OSC 4
DEFINE LCD_DREG PORTD
DEFINE LCD_DBIT 0
DEFINE LCD_RSREG PORTA
DEFINE LCD_RSBIT 3
DEFINE LCD_EREG PORTA
DEFINE LCD_EBIT 1
DEFINE LCD_BITS 4
DEFINE LCD_LINES 2
TRISA = $00
TRISD = $00
PORTA.2 = 0
PAUSE 1000
LOOP:
LCDOUT $FE, 1
PAUSE 100
LCDOUT $FE, $0F
PAUSE 100
LCDOUT $FE, $80
PAUSE 100
LCDOUT "Hello"
PAUSE 100
GOTO LOOP
Thanks,
Have a PICDEM 2 Plus board with a 18F452 that I can make do what I want with the exception of the LCD. It is in 4-bit data mode RD0-RD3 and control bits on RA lcd screen supplier 1,2 and 3 for E, R/W, and RS respectively.
I am using the following lines of code. Any suggestions?
DEFINE OSC 4
DEFINE LCD_DREG PORTD
DEFINE LCD_DBIT 0
DEFINE LCD_RSREG PORTA
DEFINE LCD_RSBIT 3
DEFINE LCD_EREG PORTA
DEFINE LCD_EBIT 1
DEFINE LCD_BITS 4
DEFINE LCD_LINES 2
TRISA = $00
TRISD = $00
PORTA.2 = 0
PAUSE 1000
LOOP:
LCDOUT $FE, 1
PAUSE 100
LCDOUT $FE, $0F
PAUSE 100
LCDOUT $FE, $80
PAUSE 100
LCDOUT "Hello"
PAUSE 100
GOTO LOOP
Thanks,
Last edited: