mrfunkyjay
New Member
Hi all,
I have a source code as my project and would like to modify it.
The project is getting pulse from Receiver Module of RC and process it then giving output to LEDs. For those who were posting in my thread knew this.
Now I wish to do some kind of modification.
I have a forever loop, checking the pulse from 1st and 2nd channel of RC Receiver module and now I wish to have a system where after 10s there is no pulse greater than 1.6ms and less than 1.4ms, led will blink, let's say this simulates four blinking LEDs when stopping (for a while) in the middle of the road (real cars).
At the moment I have a subroutine called vStandby, this is used to turn off the blinker (left or right leds), turn on four LEDs, two of them sourced by PIC output pin high and two of them by CCP1 register, using PWM. In short, this standby subroutine executed everytime my remote control is positioned at the center (both steering and throttle).
I cannot get the idea of making 10s counter that counts up to 10s when it is more than 10s, it should execute the four blinker LEDs subroutine.
Anyone care to give an Idea?? I am using 20Mhz OSC and PIC18F4520. MPLAB C18 Compiler and PICkit2.
Thanks!
Best regards,
Kelvin
I have a source code as my project and would like to modify it.
The project is getting pulse from Receiver Module of RC and process it then giving output to LEDs. For those who were posting in my thread knew this.
Now I wish to do some kind of modification.
I have a forever loop, checking the pulse from 1st and 2nd channel of RC Receiver module and now I wish to have a system where after 10s there is no pulse greater than 1.6ms and less than 1.4ms, led will blink, let's say this simulates four blinking LEDs when stopping (for a while) in the middle of the road (real cars).
At the moment I have a subroutine called vStandby, this is used to turn off the blinker (left or right leds), turn on four LEDs, two of them sourced by PIC output pin high and two of them by CCP1 register, using PWM. In short, this standby subroutine executed everytime my remote control is positioned at the center (both steering and throttle).
I cannot get the idea of making 10s counter that counts up to 10s when it is more than 10s, it should execute the four blinker LEDs subroutine.
Anyone care to give an Idea?? I am using 20Mhz OSC and PIC18F4520. MPLAB C18 Compiler and PICkit2.
Thanks!
Best regards,
Kelvin