Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Problems with LCD in pic 18f8520 (BIG PIC5)

Status
Not open for further replies.

javehe

Newbie level 1
Joined
Jan 15, 2012
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,294
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.
 

Hey use...

These lines at the starting of ur code...

ADCON1 |= 0x0F; // Configure AN pins as digital
CMCON |= 7; // Disable comparators

I don';t know basic...

By defaul PORT A is Analog port..
Make it digital input output using this...

I don't know basic..
But hopes this helps u
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top