Code
ogram softpwm_m2;
{$NOSHADOW}
{$WG} {global Warnings on}
Device = mega16, VCC=5;
{ $BOOTRST $01C00} {Reset Jump to $01C00}
Import SysTick, SoftPWM;
From System Import ;
Define
ProcClock = 16000000; {Hertz}
SysTick = 10; {msec}
StackSize = $0032, iData;
FrameSize = $0032, iData;
SoftPWMport = PortA; {use PortA for PWM output}
SoftPWMtimer = Timer0, 10; {use timerx, PWM cycle time msec}
SoftPWMres = 100; {PWM resolution is 100 points}
SoftPWMchans = 3, 0; {x channels, bity is the first bit}
Implementation
{$IDATA}
{--------------------------------------------------------------}
{ Type Declarations }
type
{--------------------------------------------------------------}
{ Const Declarations }
{--------------------------------------------------------------}
{ Var Declarations }
{$IDATA}
{--------------------------------------------------------------}
{ functions }
{--------------------------------------------------------------}
{ Main Program }
{$IDATA}
begin
EnableInts;
loop
endloop;
end softpwm_m2.
{$NOSHADOW}
{$WG} {global Warnings on}
Device = mega16, VCC=5;
{ $BOOTRST $01C00} {Reset Jump to $01C00}
Import SysTick, SoftPWM;
From System Import ;
Define
ProcClock = 16000000; {Hertz}
SysTick = 10; {msec}
StackSize = $0032, iData;
FrameSize = $0032, iData;
SoftPWMport = PortA; {use PortA for PWM output}
SoftPWMtimer = Timer0, 10; {use timerx, PWM cycle time msec}
SoftPWMres = 100; {PWM resolution is 100 points}
SoftPWMchans = 3, 0; {x channels, bity is the first bit}
Implementation
{$IDATA}
{--------------------------------------------------------------}
{ Type Declarations }
type
{--------------------------------------------------------------}
{ Const Declarations }
{--------------------------------------------------------------}
{ Var Declarations }
{$IDATA}
{--------------------------------------------------------------}
{ functions }
{--------------------------------------------------------------}
{ Main Program }
{$IDATA}
begin
EnableInts;
loop
endloop;
end softpwm_m2.
hi,
obwohl ich den code von dem demos übernommen habe und nur den controller geändert habe, lässt sich der code nicht compilieren auch der ungeänderte nicht. bricht immer mit der meldung "SoftPWMTimer0 occupied by another driver", komme irgendwie nicht weiter, was stimmt da nicht?
gruss
miro