Hi,
what im trying to achieve is an rc switch.. simple on off operation nothing else.
i have been doing some research and have figured out my best option is the pulsein command. I have set this up and come to the conclusion... that the 1 - 255 act as ms... example 150 = 1.5ms is this correct ?
now my main problem is i have written the program and tried and tested many things; to no joy it just sits there pulsing the led randomly... im now at a loss..
heres the code i have.. very new to pics so using logicator for now till i get better idea...
thanks for any help
what im trying to achieve is an rc switch.. simple on off operation nothing else.
i have been doing some research and have figured out my best option is the pulsein command. I have set this up and come to the conclusion... that the 1 - 255 act as ms... example 150 = 1.5ms is this correct ?
now my main problem is i have written the program and tried and tested many things; to no joy it just sits there pulsing the led randomly... im now at a loss..
heres the code i have.. very new to pics so using logicator for now till i get better idea...
Code:
'BASIC converted from Logicator for PICAXE flowsheet:
'C:\Documents and Settings\James\My Documents\Flowsheet3.plf
'Converted on 21/12/2010 at 22:37:09
symbol varA = b0
symbol varB = b1
symbol varC = b2
symbol varD = b3
symbol varE = b4
symbol varF = b5
symbol varG = b6
symbol varH = b7
let dirs = %00010111
main:
label_2: pulsin 3,1,varA
if varA > 150 then label_8 'Compare command
goto label_2
label_8: let pins = 4 ' %00000100
pause 3000 'Wait command
let pins = 0 ' %00000000
goto label_2