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.

LCD flicker with 16f877a problem

Status
Not open for further replies.

zero2004

Member level 1
Joined
Dec 12, 2009
Messages
33
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,505
Hi every one

the problem is when i connect a 16*2 LCD (type m1632) with 16f877a pic and write any word, first the word appears but for just a second and the LCD flicker and fills with black blocks.

thanks
 

Hi

Check your software - something in it continue writing to the LCD after transferring data


All the best

Bobi

The microcontroller specialist
 

Dear bobcat1

the software contain LCD definitions and only one print string

thanks
 

Hi,

As Bobcat1 says its probably your software, post your code if its still happens.

Also check your hardware as pic to lcd connections are a common cause of problems.

Remove the pic chip and check all the pins from the ic socket to the lcd connection pads with an ohm meter, check each line for continuity and shorts with the surrounding pins.
 

dear sir

the program listed below, i write it with proton ide, i check the connection and every think fine. thanks

Device = 16F877A
XTAL 4



Declare LCD_TYPE 0
Declare LCD_DTPIN PORTD.4
Declare LCD_ENPIN PORTD.3
Declare LCD_INTERFACE 4
Declare LCD_RSPIN PORTD.2


' Define program variables
Dim Col As Byte
Dim Row As Byte
Dim Key As Byte
Dim k[4] As Byte
Dim ikey As Byte
Dim ti As Word
Dim tii As Float

OPTION_REG.7 = 0
Output PORTC.0


DelayMS 100
Print 254,1, "In Freq. in Hz"
Print At 2,1
k[0] = 0
k[1] = 0
k[2] = 0
k[3] = 0

Loop2: GoSub Getkey

If Key = 1 Then
k[ikey] = "1"
Print "1"
Inc ikey
End If

If Key = 2 Then
k[ikey] = "2"
Print "2"
Inc ikey
End If

If Key = 3 Then
k[ikey] = "3"
Print "3"
Inc ikey
End If

If Key = 4 Then
k[ikey] = "4"
Print "4"
Inc ikey
End If

If Key = 5 Then
k[ikey] = "5"
Print "5"
Inc ikey
End If

If Key = 6 Then
k[ikey] = "6"
Print "6"
Inc ikey
End If

If Key = 7 Then
k[ikey] = "7"
Print "7"
Inc ikey
End If

If Key = 8 Then
k[ikey] = "8"
Print "8"
Inc ikey
End If

If Key = 9 Then
k[ikey] = "9"
Print "9"
Inc ikey
End If

If Key = 11 Then
k[ikey] = "0"
Print "0"
Inc ikey
End If



If Key = 12 Then
ti=Val(k,Dec)
Print 254,1, "frequency: ",#ti," Hz"
tii = (1/ti) * 500
loop:
PORTC.0 = 1
DelayMS tii
PORTC.0 = 0
DelayMS tii


If PORTB.7 = 0 Then
Print 254,1, "In Freq. in Hz"
Print At 2,1
k[0] = 0
k[1] = 0
k[2] = 0
k[3] = 0
tii = 0
ti = 0
ikey = 0
GoTo Loop2
End If


GoTo loop
End If




GoTo Loop2



Getkey:
DelayMS 50

Getkeyu:
' Wait for all keys up
PORTB = 0
TRISB = $F0
If (PORTB >> 4) <> $0F Then Getkeyu

DelayMS 50
Getkeyp:

For Col = 0 To 3
PORTB = 0
TRISB = (DCD Col) ^ $FF
Row = PORTB >> 4
If Row <> $0F Then Gotkey
Next
GoTo Getkeyp

Gotkey:
Key = (Col * 3) + (NCD (Row ^ $0F))
Return

Label:
End
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top