RC Receiver with PIC16F628A Very Glitchy
I read this post http://www.picbasic.co.uk/forum/showthread.php?t=12007 and though the code did help somewhat I am having a lot of glitches when steering the car. All I am doing is turning on lights with the 3rd channel of my RC system.
Here is my setup.
Airtronics MX-3S PLL synthesized 3 channel 75Mhz.
PIC16F628A running at 20mhz.
Here is the code I am running.
Code:
Define OSC 20
CMCON = 7
'-------------------------------------------------------------------------------
signal VAR PortA.0
pulse VAR BYTE
'-------------------------------------------------------------------------------
main:
PulsIn signal, 1, pulse ' reads signal from receiver
IF (pulse >= 150) AND (pulse <= 200) Then
High PortA.1 ' turns LED off
Else
Low PortA.1 ' turns LED on
EndIF
GoTo main
There are 10 kinds of people. Those that know binary and those that do not.
Bookmarks