hye.. i am newbie here and this is the first time ever i joined a forum in the net. first of all, sorry 4 my poor english..
a little question. is there a limit number of pin for microcontroller to generate pulse? i am using pic16f877 with a 4Mhz oscillator to drive a servos. i started with the code for centering 8 servos and the problem is when i checked the pulseout signal with a oscilloscope, the delay between pulse (1.5ms) is about 40ms. how could this happen?
here is my code:
b0 var byte
b1 var byte
b2 var byte
b3 var byte
b4 var byte
b5 var byte
b6 var byte
b7 var byte
b8 var byte
b1 var 150
b2 var 150
b3 var 150
b4 var 150
b5 var 150
b6 var 150
b7 var 150
b8 var 150
trisb = %00000000
portb = %00000000
init:
pulsout portb.0, b1
pulsout portb.1, b2
pulsout portb.2, b3
pulsout portb.3, b4
pulsout portb.4, b5
pulsout portb.5, b6
pulsout portb.6, b7
pulsout portb.7, b8
pause 20
goto init
end
------------------------------
is it microcntrlr problem or my code or anytihng else that i dont know?
sorry for being dumb. i am new to this pic and picbasic thing.
appreciate any helps
Bookmarks