TODOPIC
Microcontroladores PIC => Lenguaje Basic para microcontroladores PIC => Mensaje iniciado por: seinkraft en 07 de Octubre de 2008, 00:10:15
-
Buenas a todos!
Tengo un problema con un loop el cual no...no hace loop xD Cuando terminaria tendria que volver a empezar pero no funciona.
sub procedure lat_center()
SetBit(portb,0)
Delay_us(374) '274
ClearBit(portb,0)
Delay_ms(250)
end sub
sub procedure lat_right()
SetBit(portb,0)
Delay_us(399) '274
ClearBit(portb,0)
Delay_ms(250)
end sub
sub procedure lat_left()
SetBit(portb,0)
Delay_us(349) '274
ClearBit(portb,0)
Delay_ms(250)
end sub
sub procedure servo_start()
do
lat_center
lat_right
lat_center
lat_left
loop until PORTA.0=1
end sub
Llega al ultimo lat_left y no vuelve a saltar a lat_center. Tambien probe con el while true para hacer el loop sin fin pero tampoco funciona.
-
Disculpen pero pueden borrar el tema, no era problema del programa sino del programador :P
No estaba llamando a servo_start sino a lat_center
Saludos.-