Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

LCD for PIC tutorials

Status
Not open for further replies.

c828

New Member
hello!
I am newcomer with PIC (I have used Pic19f84)
But i don't know to control and display LCD
I want a tutorial about it
Can you help me?
Thanks a lot
 
c828 said:
hello!
I am newcomer with PIC (I have used Pic19f84)
But i don't know to control and display LCD
I want a tutorial about it
Can you help me?
Thanks a lot

Try reading the 'sticky' at the top of this forum, and check my PIC tutorials!.
 
Hi,
please try this:

' Set LCD Data port
DEFINE LCD_DREG PORTB
' Set starting Data bit (0 or 4) if 4-bit bus
DEFINE LCD_DBIT 4
' Set LCD Register Select port
DEFINE LCD_RSREG PORTB
' Set LCD Register Select bit
DEFINE LCD_RSBIT 1
' Set LCD Enable port
DEFINE LCD_EREG PORTB
' Set LCD Enable bit
DEFINE LCD_EBIT 0
' Set LCD bus size (4 or 8 bits)
DEFINE LCD_BITS 4
' Set number of lines on LCD
DEFINE LCD_LINES 2
pause 100
lcdout $fe,1,"Hello"
end


LCD Connection
Pin1=Vss: connect to ground
Pin2=Vdd: connect to Vcc=5V
Pin3=Vo: connect to middle pin of the POT(20K) to control brightness
Pin4=RS(register select): connect to micro pins that specify in the software(RB1)
Pin5=RW(Read/Write): connect to ground because we want to only write
Pin6=E(Enable): connect to micro pin that specify in the software(RB0)
Pin7 to 10: No connection
Pin 11 to 14: connect to RB4 to RB7
Pin15: connect to Vcc with a resistor(100 or 200 ohm resistor is good)
Pin16: connect to ground.
pin 16 and pin 16 are for backlights

the other two pins of pot should connect to VCC and ground and you should connect the MCLR with a 4.7K or 10K resistor to the VCC.
 
And this? Pic19f84
 
Thank you very much!
But I write in ASM, I don't write by PicBasic
Can you help me again?
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top