Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DEVICE 16F628A ;We gebruiken een 16F628A type
- CONFIG INTRC_OSC_NOCLKOUT, WDT_OFF, PWRTE_ON, LVP_OFF, MCLRE_OFF
- ALL_DIGITAL TRUE ;Alle ingangen digitaal
- DIM Servo1 as byte
- dim servo2 as byte
- dim teller as byte
- Symbol Kniptijd1 = 175
- Symbol Remtijd1 = 250
- While 1 = 1
- Servo1 = Pulsin Portb.1 , 1 ;Servo 1 inlezen
- Servo2 = Pulsin portb.2 , 1 ;Servo 2 inlezen
- ;|||||||||||||||||||||||Knipperlicht||||||||||||||||||||||
- Repeat
- delayms 1
- if teller = kniptijd1 then
- low portb.3
- low portb.4
- teller = 0
- endif
- if servo1 < 120 Then
- high portb.3
- endif
- if servo1 > 180 then
- high portb.4
- endif
- inc teller
- until teller = 350
- Wend
- END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement