LCD flicker met 16f877a probleem

Z

zero2004

Guest
Hi iedereen

het probleem is wanneer ik een 16 * 2 LCD (type m1632) met 16f877a pic en schrijf elk woord, eerst het woord verschijnt, maar voor slechts een tweede en het LCD-scherm flikkeren en vult met zwarte blokjes.

bedankt

 
Hi

Controleer uw software - iets in blijven schrijven naar het LCD-scherm na de overdracht van gegevensAl het beste

Bobi
De microcontroller-specialist
 
Geachte bobcat1

de software bevat LCD-definities en slechts een print string

bedankt

 
Hoi,

Zoals Bobcat1 zegt zijn waarschijnlijk van uw software, post uw code indien haar nog steeds gebeurt.

Controleer ook of uw hardware pic om lcd-verbindingen zijn een veelvoorkomende oorzaak van problemen.

Verwijder de pic chip uit en controleer alle pinnen van de IC-aansluiting van de LCD-verbinding pads met een ohm meter, controleer elke regel voor de continuïteit en shorts met de omliggende pinnen.

 
geachte heer

het programma hieronder, ik schrijf het met proton ide, controleer ik de verbinding en denk elke boete.bedankt

Device 16F877A =
XTAL 4Verklaren LCD_TYPE 0
Verklaren LCD_DTPIN PORTD.4
Verklaren LCD_ENPIN PORTD.3
Verklaren LCD_INTERFACE 4
Verklaren LCD_RSPIN PORTD.2'Definieer programma variabelen
Dim Col As Byte
Dim rij als Byte
Dim sleutel als Byte
Dim k [4] As Byte
Dim iKey As Byte
Dim ti als Word
Dim tii als float

OPTION_REG.7 = 0
Output PORTC.0DelayMS 100
Print 254,1, "In Freq. In Hz"
Afdrukken op 2,1
k [0] = 0
k [1] = 0
k [2] = 0
k [3] = 0

Loop2: GoSub GETKEY

Als Key = 1 Then
k [iKey] = "1"
Afdrukken "1"
Inc iKey
End If

Als Key = 2 dan
k [iKey] = "2"
Print "2"
Inc iKey
End If

Als Key = 3 Dan
k [iKey] = "3"
Print "3"
Inc iKey
End If

Als Key = 4 Dan
k [iKey] = "4"
Print "4"
Inc iKey
End If

Als Key = 5 Dan
k [iKey] = "5"
Print "5"
Inc iKey
End If

Als Key = 6 Dan
k [iKey] = "6"
Print "6"
Inc iKey
End If

Als Key = 7 Dan
k [iKey] = "7"
Print "7"
Inc iKey
End If

Als Key = 8 Dan
k [iKey] = "8"
Print "8"
Inc iKey
End If

Als Key = 9 Dan
k [iKey] = "9"
Print "9"
Inc iKey
End If

Als Key = 11 Dan
k [iKey] = "0"
Print "0"
Inc iKey
End IfAls Key = 12 Dan
ti = Val (k, dec)
Print 254,1, "frequentie:", # ti, "Hz"
tii = (1/ti) * 500
lus:
PORTC.0 = 1
DelayMS tii
PORTC.0 = 0
DelayMS tiiAls PORTB.7 = 0 Then
Print 254,1, "In Freq. In Hz"
Afdrukken op 2,1
k [0] = 0
k [1] = 0
k [2] = 0
k [3] = 0
tii = 0
ti = 0
iKey = 0
GoTo Loop2
End IfGoTo lus
End If
GoTo Loop2GETKEY:
DelayMS 50

Getkeyu:
'Wacht tot alle toetsen boven
PORTB = 0
TRISB = $ F0
Als (PORTB>> 4) <> $ 0F Dan Getkeyu

DelayMS 50
Getkeyp:

Voor Col = 0 tot 3
PORTB = 0
TRISB = (DCD Col) ^ $ FF
Rij PORTB =>> 4
Als Row <> $ 0F Dan Gotkey
Volgende
GoTo Getkeyp

Gotkey:
Key = (Col * 3) (NCD (Rij ^ $ 0F))
Terugkeer

Label:
Einde

 
Zorg ervoor dat de cursor niet in "knipperen mode" wanneer je schrijft om met elkaar de cursor knippert snel, sommige LCD begint te flikkeren ...

 

Welcome to EDABoard.com

Sponsor

Back
Top