my fault - I didn't pay attention to that, only glitches problem - ... it's obvious you do not get any response.
your pulse is > 1890µs ...
@ 20 Mhz: 2µs per count
Code:
IF (pulse >= 1850 µs) AND (pulse <= 1950 µs ) Then
might be written
Code:
IF (pulse >= 1850 /2) AND (pulse <= 1950 /2) Then
where 2 is your resolution in µS ( or also 40 / Osc freq. )
second point ... do not set the limits too close to your nominal values ... ( always a +/- 1 count jitter for " pulsin " !!! ) and also think to temp and voltage effects on Tx pulse length ...
so ...
Code:
IF (pulse >= 925) AND (pulse <= 975 ) Then ...
will give you fine practical results for nominal values from 1855 to 1945µs.
one more thing to do is to set the PWRTE fuse in the config : the processor will reset if your supply goes too low due to the ESC and the motor ( surprises should arise ! even with a " BEC " circuit ... )
also use a nice Electrolytic ( say 100+ µF low ESR ) or tantalum capacitor at the input on your board.
Bookmarks