Hi,
vielleicht habe ich irgendetwas übersehen, aber aktuell komme ich hier nicht weiter:
Device = XMega256A3, VCC = 3.3;
:
import SysTick, SPI_C, LCDGraphic, ADC_B, I2Cport, SwitchPort_G;
:
define
SwitchPort_G = [RightSwitchPushKey, PinF, 3][RightSwitchCWKey, PinF, 4] [RightSwitchCCWKey, PinF, 5];
:
{ main program }
EnableInts($87); //all levels enabled
:
DDRF.3 := 0; // right switch push input
PIN3CTRLF := %00010000; // internal pull-down
DDRF.4 := 0; // right switch CW input
PIN4CTRLF := %00010000; // internal pull-down
DDRF.5 := 0; // right switch CCW input
PIN5CTRLF := %00010000; // internal pull-down
if bit(PinF, 3) then incl(PortB, 6); else excl(PortB, 6); endif; // das funktioniert
if Inp_Raise_G(RightSwitchPushKey) then incl(PortB, 6); else excl(PortB, 6); endif; // das funktioniert nicht
Die obige Abfrage "if bit(PinF, 3) ... " funktioniert, womit bewiesen ist, dass die Hardware und Pinkonfiguration korrekt sind. Aber Inp_Stable_G() liefert immer False.
Ich komme nicht weiter. Vielleicht erkennt jmd. das Problem?
Compiler Version ist die aktuelle 6.00.05.
/Alois
vielleicht habe ich irgendetwas übersehen, aber aktuell komme ich hier nicht weiter:
Device = XMega256A3, VCC = 3.3;
:
import SysTick, SPI_C, LCDGraphic, ADC_B, I2Cport, SwitchPort_G;
:
define
SwitchPort_G = [RightSwitchPushKey, PinF, 3][RightSwitchCWKey, PinF, 4] [RightSwitchCCWKey, PinF, 5];
:
{ main program }
EnableInts($87); //all levels enabled
:
DDRF.3 := 0; // right switch push input
PIN3CTRLF := %00010000; // internal pull-down
DDRF.4 := 0; // right switch CW input
PIN4CTRLF := %00010000; // internal pull-down
DDRF.5 := 0; // right switch CCW input
PIN5CTRLF := %00010000; // internal pull-down
if bit(PinF, 3) then incl(PortB, 6); else excl(PortB, 6); endif; // das funktioniert
if Inp_Raise_G(RightSwitchPushKey) then incl(PortB, 6); else excl(PortB, 6); endif; // das funktioniert nicht
Die obige Abfrage "if bit(PinF, 3) ... " funktioniert, womit bewiesen ist, dass die Hardware und Pinkonfiguration korrekt sind. Aber Inp_Stable_G() liefert immer False.
Ich komme nicht weiter. Vielleicht erkennt jmd. das Problem?
Compiler Version ist die aktuelle 6.00.05.
/Alois
