You guys are great and have humor!
Thank you for your answers!
How wrong I can be with that simple program?
TRISB = 0 ' PORTB is output
PORTB.0 = 1 'enable1 of L293d is always high so input 1 and input 2 are available
start:
PORTB.1 = 1 'input1 of l293d goes high, so output 1 goes high so turns left
PORTB.2 = 0 'input2 of l293d goes low, so output 2 goes low so turns left
pause 2000
PORTB.1 = 0 'the opposite, turns right
PORTB.2 = 1
pause 3000
PORTB.1 = 0 'stop the dc motors
PORTB.2 = 0
goto start 'loop
Bookmarks