Mege16 hat an einigen Pins(z.B. PortC) immer 5V - Warum?
Hallo,
irgendwie komisch, ich habe an einigen Pins immer 5V anliegen oder gar nichts, egal, was ich ihm für ein Zustand gebe.
Habe diesen Testaufbau auf meinem Steckbrett:
https://www.roboternetz.de/wissen/im...g_mitquarz.gif
Und dazu diesen Code:
Code:
$regfile = "m16def.dat"
$crystal = 8000000
Config Pinc.0 = Output
Config Pinc.1 = Output
Config Pinc.2 = Output
Config Pinc.3 = Output
Config Pinc.4 = Output
Config Pinc.5 = Output
Config Pinc.6 = Output
Config Pinc.7 = Output
Do
Portc.0 = 1 '5V
Portc.1 = 1 '5V
Portc.2 = 1 '5V
Portc.3 = 1 '5V
Portc.4 = 1 '0V ***
Portc.5 = 1 '5V
Portc.6 = 1 '5V
Portc.7 = 1 '5V
Loop
Und den hier:
Code:
$regfile = "m16def.dat"
$crystal = 8000000
Config Pinc.0 = Output
Config Pinc.1 = Output
Config Pinc.2 = Output
Config Pinc.3 = Output
Config Pinc.4 = Output
Config Pinc.5 = Output
Config Pinc.6 = Output
Config Pinc.7 = Output
Do
Portc.0 = 0 '0V
Portc.1 = 0 '0V
Portc.2 = 0 '5V ***
Portc.3 = 0 '5V ***
Portc.4 = 0 '0V
Portc.5 = 0 '5V ***
Portc.6 = 0 '0V
Portc.7 = 0 '0V
Loop
Ich habe die komischen Zustände mal mit 3*** markiert.
Woran kann es liegen, das der Mega 16 so ein Quatsch macht.
Habe auch schon einen 2. Chip probiert, aber mit dem gleichen Ergebnis
Gruß
Papsi