So, that was a brief introduction about Stepper Motor and if you wanna read in detail about it then you should read the Wiki Page of Stepper Motor because they have explained each and everything about stepper motor in detail. I would also recommend you to read Stepper Motor Drive Circuit in Proteus ISIS because in this post I have given the basic movement of the stepper motor in detail. Our today's task is stepper motor control using PIC Microcontroller. I have used PIC16F877A for stepper motor control and I have designed the simulation for stepper motor control in Proteus ISIS software. Code written for PIC Microcontroller is designed in MikroC Pro for PIC Compiler. Simulation and Programming code is given below for download but I would recommend you to design it on your own so that you learn most of it. Anyways, let's get started with Stepper Motor Control using PIC Microcontroller.
char uart_rd;
void main()
{
TRISB = 0;
PORTB = 0;
UART1_Init(9600);
Delay_ms(100);
while(1)
{
PORTB.F0 = 1;
Delay_ms(250);
PORTB.F0 = 0;
Delay_ms(250);
if (UART1_Read() == ('e') ) {
PORTB.F2 = 0;
}
else {
PORTB.F2 = 1; }
if (UART1_Read() == ('a') ) {
PORTB.F3 = 1;
}
else {
}
if (UART1_Read() == ('b') ) {
PPORTB.F3 = 0;
}
else {
}
if (UART1_Read() == ('c') ) {
PPORTB.F4 = 0;
}
else {
}
if (UART1_Read() == ('d') ) {
PPORTB.F4 = 1;
}
else {
}
}}
So, that's all about stepper motor control. I hope you have liked it and it will help you in some way. In the coming post, I will share the stepper motor control with the Arduino board. So stay tuned and have fun!!! :)
JLCPCB – Prototype 10 PCBs for $2 (For Any Color)
China’s Largest PCB Prototype Enterprise, 600,000+ Customers & 10,000+ Online Orders Daily
How to Get PCB Cash Coupon from JLCPCB: https://bit.ly/2GMCH9w