Hi all,
I'm building a white-line follower based on a PIC16F628A and a L293D IC.
My idea, before connecting the sensors stuff, was testing some movement sequences (PORTB = X, delay t seconds, PORTB = Y, delay t seconds...) but it's not working: the L293D looks like it can only run on the first value assigned to PORTB, I mean, it's X all the time, like if there was an infinite loop after the first PORTB = X.
I've tried it separately controlling the L293D with an Arduino and it worked like a charm, and I've tried to remove the L293D and attached some LEDs and the LEDs work as the L293D should.
The setup is really simple: B0 and B1 control right DC motor, B2 and B3 control left DC motor. L293D is always enabled with Ven attached to 5V all the time.
I've tried programming it in C (CCS compiler) and in ASM (MPLAB's default) and the behaviour is the same.
Any idea? Should I add any other component? (capacitors, resistors...)
Thanks in advance.
I'm building a white-line follower based on a PIC16F628A and a L293D IC.
My idea, before connecting the sensors stuff, was testing some movement sequences (PORTB = X, delay t seconds, PORTB = Y, delay t seconds...) but it's not working: the L293D looks like it can only run on the first value assigned to PORTB, I mean, it's X all the time, like if there was an infinite loop after the first PORTB = X.
I've tried it separately controlling the L293D with an Arduino and it worked like a charm, and I've tried to remove the L293D and attached some LEDs and the LEDs work as the L293D should.
The setup is really simple: B0 and B1 control right DC motor, B2 and B3 control left DC motor. L293D is always enabled with Ven attached to 5V all the time.
I've tried programming it in C (CCS compiler) and in ASM (MPLAB's default) and the behaviour is the same.
Any idea? Should I add any other component? (capacitors, resistors...)
Thanks in advance.