controlling stepper motor using serial communication with computer
TRANSCRIPT
Project Title:
TO CONTROL STEPPER MOTOR WITH COMPUTER
USING SERIAL PORT COMMUNICATION OF MICROCONTROLLER
STEPPER MOTORSTEPPER MOTOR
Difference b/w Rotor & Stator of Stepper & other Motors
Understanding Stepper Motor
Understanding Stepper Motor
Understanding Stepper Motor
CONNECTIONS AND STEP SEQUENCES
SERIAL SERIAL COMMUNICATIONCOMMUNICATION
Serial communication uses 2 methods
• Synchronous method transfers a block of data at a time.
• Asynchronous method transfers a single byte at a time.
Asynchronous serial datacommunication
• A protocol is a set of rules agreed by both the sender and receiver on
• How the data is packed.
• How many bits are for data.
• When the data begins and ends.
Asynchronous
• RS323
• STANDARD
• TTL
• STANDARD
Timers of 8051
• TMOD Register
• TMOD=0x20; //use Timer 1, mode 2
• TH1=0xFA; //4800 baud rate
• TR1=1; //start timer
SCON=0x50;
MOVEMENT,DELAY B/W EACH STEP OF STEPPER MOTORvoid MSDelay(unsigned int);void MSDelay(unsigned int itime){unsigned int i,j;for (i=0;i<itime;i++)for (j=0;j<1275;j++);}P2=0xCC;P2=P2<<1;