thibraani
Newbie level 5

pic and uln2804a
I'm doing a school assignment using PIC. I'm programming my microcontroller, the PIC16F877A using C language. I'm stuck on how to assign logic 1 to PORTB?
This is how the system should work:
1. User turn on DIP switch 1
2. The 5V DC motor (located at port B) turn ON
3. User turn on DIP switch 2
4 The motor turn OFF
There's no need a DC motor driver as logic 1 from the microcontroller is already 5V and that should turn on the voltage.
Please, I need your help to provide me the sample code.
Thank you.
I'm doing a school assignment using PIC. I'm programming my microcontroller, the PIC16F877A using C language. I'm stuck on how to assign logic 1 to PORTB?
This is how the system should work:
1. User turn on DIP switch 1
2. The 5V DC motor (located at port B) turn ON
3. User turn on DIP switch 2
4 The motor turn OFF
There's no need a DC motor driver as logic 1 from the microcontroller is already 5V and that should turn on the voltage.
Please, I need your help to provide me the sample code.
Thank you.