javehe
Newbie level 1
Hi!
I have been working on BIGPIC 5 (use pic 18f8520) on microcode studio.
I uses the code that is in the folder examples that comes in microcode studio. This is the code that I use:
' PICBASIC PRO program to demonstrate operation of an LCD in 4-bit mode
'
' LCD should be connected as follows:
' LCD PIC
' DB4 PortA.0
' DB5 PortA.1
' DB6 PortA.2
' DB7 PortA.3
' RS PortA.4 (add 4.7K pullup resistor to 5 volts)
' E PortB.3
' RW Ground
' Vdd 5 volts
' Vss Ground
' Vo 20K potentiometer (or ground)
' DB0-3 No connect
DEFINE OSC 4 ' Definición de la frecuencia de reloj
DEFINE LCD_DREG PORTB ' Define el bus de datos del LCD
DEFINE LCD_RSREG PORTA ' Define el port de registro
DEFINE LCD_RSBIT 0 ' Define el bit 0 de port A como RS
DEFINE LCD_EREG PORTA
DEFINE LCD_EBIT 2
DEFINE LCD_BITS 8
DEFINE LCD_LINES 2
Pause 500 ' Wait for LCD to startup
mainloop: Lcdout $fe, 1 ' Clear LCD screen
Lcdout "Hello" ' Display Hello
Pause 5000 ' Wait .5 second
Lcdout $fe, 1 ' Clear LCD screen
Lcdout "World"
Pause 500 ' Wait .5 second
Goto mainloop ' Do it forever
but i dont see anything, just a few leds blinking, but in the LCD nothing. What can i do? is everething wrong or i have to do something special with the bigpic 5? I have been trying everything but still not working... Please help.
I have been working on BIGPIC 5 (use pic 18f8520) on microcode studio.
I uses the code that is in the folder examples that comes in microcode studio. This is the code that I use:
' PICBASIC PRO program to demonstrate operation of an LCD in 4-bit mode
'
' LCD should be connected as follows:
' LCD PIC
' DB4 PortA.0
' DB5 PortA.1
' DB6 PortA.2
' DB7 PortA.3
' RS PortA.4 (add 4.7K pullup resistor to 5 volts)
' E PortB.3
' RW Ground
' Vdd 5 volts
' Vss Ground
' Vo 20K potentiometer (or ground)
' DB0-3 No connect
DEFINE OSC 4 ' Definición de la frecuencia de reloj
DEFINE LCD_DREG PORTB ' Define el bus de datos del LCD
DEFINE LCD_RSREG PORTA ' Define el port de registro
DEFINE LCD_RSBIT 0 ' Define el bit 0 de port A como RS
DEFINE LCD_EREG PORTA
DEFINE LCD_EBIT 2
DEFINE LCD_BITS 8
DEFINE LCD_LINES 2
Pause 500 ' Wait for LCD to startup
mainloop: Lcdout $fe, 1 ' Clear LCD screen
Lcdout "Hello" ' Display Hello
Pause 5000 ' Wait .5 second
Lcdout $fe, 1 ' Clear LCD screen
Lcdout "World"
Pause 500 ' Wait .5 second
Goto mainloop ' Do it forever
but i dont see anything, just a few leds blinking, but in the LCD nothing. What can i do? is everething wrong or i have to do something special with the bigpic 5? I have been trying everything but still not working... Please help.