LCD mit BASCOM an Port C

OP #7665267
Lesenswert?

Gibt es bei dem Mega 32 einen Unterschied zwischen den Port C und den Port A ? Ich habe ein LCD betrieben am Port C und da passierte absolut nichts. Habe ich das an den Port A betrieben funktionierte es einwandfrei. Ich hatte es dann mit BASCOM programmiert. Das GOTO sei entschuldigt.

$crystal = 8000000 $regfile = "m32def.dat" $baud = 31250

Dim A As Byte

Config Lcd = 16 * 2 Config Lcdpin = Pin , Db4 = PortC.0 , Db5 = PortC.1 , Db6 = PortC.2 , Db7 = PortC.3 , E = PortC.5 , Rs = PortC.4 Config Lcdbus = 4

Label:

If Pina.0 = 0 Then Locate 1 , 1 Cls Lcd " Taster 1 " Printbin $cb ; $0 Wait 1 End If

If Pina.1 = 0 Then Locate 1 , 1 Cls Lcd " Taster 2 " Printbin $cb ; $1 Wait 1 End If

If Pina.2 = 0 Then Locate 1 , 1 Cls Lcd " Taster 3 " Printbin $cb ; $2 Wait 1 End If

If Pina.3 = 0 Then Locate 1 , 1 Cls Lcd " Taster 4 " Printbin $cb ; $3 Wait 1 End If

Goto Label

End

#7665284
Lesenswert?

Ingo L. schrieb:

Gibt es bei dem Mega 32 einen Unterschied zwischen den Port C und den Port A ?

Port C ist default als JTAG enabled. Du mußt JTD in MCUCSR setzen oder das JTAGEN Fusebit.

"• Bit 7 – JTD: JTAG Interface Disable When this bit is zero, the JTAG interface is enabled if the JTAGEN Fuse is programmed. If this bit is one, the JTAG interface is disabled. In order to avoid unintentional disabling or enabling of the JTAG interface, a timed sequence must be followed when changing this bit: The application software must write this bit to the desired value twice within four cycles to change its value."

Antwort schreiben

Bitte melde dich an, um einen Beitrag zu schreiben.

oder

Mit Google-Account einloggen

Die Registrierung ist kostenlos und dauert nur eine Minute.

Jetzt registrieren