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 display

Status
Not open for further replies.

stevenb_61

New Member
Hello i am trying to interface an lcd to a pic16f84a (the reason why i am using these is that i have a small quanity of them) Every time i try to get it running all i see are black squares on the display! I dont know what i am doing wrong? If someone who has had success with this could point me in the right direction i would apprciate it very much. i am posting my latest code so that comeone could point out my mistakes?
 

Attachments

  • idenity.asm
    3.4 KB · Views: 149
The black Bar's in one Line of the Display mean - Power is Present - Display is not initialized.
First thing i would do ist to check the connections from Controller to Display.
Data Direction and Ports in Hardware and Software fit's together?
Carry one of the used Ports special Functions that are activated? ( Like JTAG or Clock Out ).
Are the unused Data Lines Conected to GND ( 4 Bit Mode )?
Then check the frequency of the controller the times of your delays appends from that.

When that's all right, there can only be a Problem with your Software.
 
Last edited:
stevanb!! when you are calling Lcd_ins or Lcd_chr the working reg (w) has the command or data... as soon as you call "nano" you replace the data or command with 0x6... so that's ALL you ever send to the display.
 
I believe you may have to setup the TRISA and TRISB registers so that some of your pins are outputs...
 
What Ian Rogers pointed out is your main issue.

However once you fix that you may then have problems with the lcd_ins routine since you set the clock (EN) high, then change the data on the pins.

In reality you should be changing the data on the pins first, then clock it in.
 
so should i rework that subroutine or eliminate it completely? i read that the timing for lcd displays is important(thre display i am using is an optrex dmc-20171)
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top