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.

problem with PIC16F877+LCD display

Status
Not open for further replies.
meera83 said:
what's mean by this code?

LCD_RS Equ 0x04 ;LCD handshake lines
LCD_RW Equ 0x06
LCD_E Equ 0x07
Define LCD_RS as bit 4 of the port, RW as bit 6 and E as bit 7.
So during programming, when you want to set RS, you simply
Code:
bsf PORTA, LCD_RS
if my port pin connection is like
RA1 - E
RA2 - RW
RA3 - RS

DB4 - RD0
DB5 - RD1
DB6 - RD2
DB7 - RD3

then what location should i write??
You can define them as:
Code:
LCD_RS		Equ	0x03		
LCD_RW		Equ	0x02
LCD_E		Equ	0x01
Depends on which port and which pin are you connecting them to.
You use portD for the data bits, just change it in the code.
 
bananasiong said:
Your attachment is only this:
Code:
	list      p=16f877            ; list directive to define processor
	#include <p16f877.inc>        ; processor specific variable definitions
	
	__CONFIG _CP_OFF & _WDT_OFF & _BODEN_OFF & _PWRTE_ON & _LP_OSC & _WRT_ENABLE_OFF & _LVP_OFF & _DEBUG_OFF & _CPD_OFF 

; '__CONFIG' directive is used to embed configuration data within .asm file.
; The labels following the directive are located in the respective .inc file.
; See respective data sheet for additional information on configur


i had re-attach the file again..

i think the port pin that i define is right, but i didn't understand that why the LCD still no respond...
 

Attachments

  • lcd1.txt
    5.8 KB · Views: 147
Did you notice this:
Code:
LCD_CTRL	Equ	PORTA
LCD_TRISA	Equ	PORTA
Have you connected them well? Or did you adjust the contrast?
 
meera83 said:
i didn't connect anything to CONTRAST part, what use of this part??

Hi,
You require a 10K0 potentiometer, between +5V and 0V and the wiper of the pot connected to Vo of the LCD pcb. Adjusting the pot will set the 'contrast' of the LCD so that you can see the LCD characters.
At first, set the contrast so that you can just see the pixel blocks on the LCD.

Have a look where the +5V and 0V wires are connected to the LCD pcb, next them [on my lcd] is pin#3, which is Vo.

Does this help?
 
Status
Not open for further replies.

Latest threads

Back
Top