PDA

View Full Version : Rc PCM signal Read (Help)



jetpr
- 8th March 2005, 03:08
'** R/C **
'Measure the pulse width of the incoming RC signal


PulsIn Throtpin, 0, Throttle


IF Throttle = 0 Then
GoTo EmergencyOff
EndIF

IF Throttle < ThrottleTrim - 6 Then
MSG_LCD=5
GoTo EmergencyOff
endIF


PumpMath = (Throttle - ThrottleMin) * 100 / dioScalefactor

if (PumpMath > 100) or (PumpMath <=0) then
PumpMath=1
endif

mister_e
- 8th March 2005, 03:37
and the problem is???

BTW i see some things that should be consider about the maths


PumpMath = (Throttle - ThrottleMin) * 100 / dioScalefactor


use some () for your math can save your 6 o'clock...


PumpMath = ((Throttle - ThrottleMin) * 100) / dioScalefactor


but as we don't have many details... it's hard to know what's wrong. Tell us the whole story including the PIC model, wich pins you're using and blah blah blah will really help