thibraani
Newbie level 5
2n2222 motor
Hallo all..
I'm doing an assignment which requires me to turn on and off a DC motor (showed in the photo attached) using PIC16F877A as the microcontroller. This motor is connected to PORTB (PB0) and it is controlled by a DIP switch, connected to PORTD as input.
Toggle switch 1 (SW1) will result the motor to turn ON while switch 2 (SW2) will make the motor turn OFF.
This motor operates using 5V. I suppose the output of the PIC (its logic HIGH) is +5V. By right, if I assign logic HIGH to PB0, the motor is supplied with +5V, which is supposed to turn ON the motor. Hence, I connect the motor DIRECTLY to PORTB (without any resistor or driver), but NOTHING happen when I toggle SW1.
I hope anybody can give comment on my design and suggest any improvements to be done to enable the motor to turn ON and OFF.
Thank you.
Hallo all..
I'm doing an assignment which requires me to turn on and off a DC motor (showed in the photo attached) using PIC16F877A as the microcontroller. This motor is connected to PORTB (PB0) and it is controlled by a DIP switch, connected to PORTD as input.
Toggle switch 1 (SW1) will result the motor to turn ON while switch 2 (SW2) will make the motor turn OFF.
This motor operates using 5V. I suppose the output of the PIC (its logic HIGH) is +5V. By right, if I assign logic HIGH to PB0, the motor is supplied with +5V, which is supposed to turn ON the motor. Hence, I connect the motor DIRECTLY to PORTB (without any resistor or driver), but NOTHING happen when I toggle SW1.
I hope anybody can give comment on my design and suggest any improvements to be done to enable the motor to turn ON and OFF.
Thank you.