Ik had sample gezien van het Proton.
zie code:
OPTIMISER_LEVEL = 6 ' Set for maximum optimiser level
Device 16F877 ' We'll use a 16F877 for this experimemt
XTAL = 20 ' Choose a crystal frequency of 20MHz
Dim Loop As Byte
Inf: Loop = 0 ' Start the loop at 0
Repeat ' Beginning of the loop
PWM PORTB.0,Loop,20 ' Output the value in loop for 20ms
Inc Loop ' Increment the loop counter
Until Loop = 255 ' Loop until 255 revolutions
Repeat ' Loop still contains 255
PWM PORTB.0,Loop,20 ' Output the value in loop for 20ms
Dec Loop ' Decrement the loop counter
Until Loop = 0 ' Loop until 255 revolutions
GoTo Inf ' Do it foreverMaar het werkt niet op PIC Simulator IDE.
Ow zo geen real time.
Dat wist ik niet.
En wat niet werkt bedoel ik:
Als ik simulatie draai.
Geven het beeld van led niet aan.
Zoals aan en uit.
Op 7 april 2006 21:15:44 schreef Captain Nguyen:
En wat niet werkt bedoel ik:
Als ik simulatie draai.
Geven het beeld van led niet aan.
Zoals aan en uit.
Ja dat ligt aan het niet real-time zijn van PIC Sim IDE.
Gewoon even testen met een echte PIC, als ik de code zo even vlug bekijk is er niet al te veel mis mee...