Professional Documents
Culture Documents
Ex No 1A: Stepper Motor Control in Arm Processor
Ex No 1A: Stepper Motor Control in Arm Processor
Aim : To verify and Validate the stepper motor control by using open source software Embest IDE and Flash magic in ARM Processor.
THEORY : The ARM TDMI processor is a member of the ARM family of general purpose 32 bit microprocessor. The ARM family offers high Performance for low power Consumption. The ARM Architecture is based on RISC Principles. Its instruction set and related decode mechanism are much simpler than CISC design. This simplicity gives
A High instruction throughput. An excellent real time interrupt response. A small & cost effective Procedure : Type the program in notepad and save it in the folder along with the including files. Open the software Embest IDE and select the new workspace in file menu. Select add files to folder and open the program and save it. All the settings should be changed in the project dialog box. Switch on the kit and rebuild the program. Open the software Flash Magic and Browse the Program and click start. Change the Switch position and reset button. The output will be analyzed in the kit.
#include "LPC214X.H"
void InitializeIO(void);
int main (void) { unsigned char a; unsigned int b; long c,d; InitializeIO(); while(1) { //Initialize the I/O lines
for(d=0;d<100;d++) { // Rotate clock wise b=0x6666; for(a=0;a<4;a++) { IOPIN1 = (b & 0xff00) << 8 ; IOCLR0 = 0x00400000; // Clear A3
} } for(d=0;d<100;d++) { // Rotate counter clock wise b=0x6666; for(a=0;a<4;a++) { IOPIN1 = (b & 0xff00) << 8 ; IOCLR0 = 0x00400000; IOSET0 = 0x00400000; for(c=0;c<0xa000;c++); b = b >> 1; side one } } } } // Clear A3 // Set A3 // Delay // Shift right
void InitializeIO(void)
void __gccmain() {
Result : Thus the Stepper motor has been verified and validated by using open source software Embest IDE and magic in ARM processor.