Professional Documents
Culture Documents
26-stepper_motor_interfacing_with_arm7_slicker
26-stepper_motor_interfacing_with_arm7_slicker
Interfacing Stepper
Motor with LPC2148
Contents at a Glance
ARM7 LPC2148 Slicker Board ...........................................3
Stepper Motor .................................................................3
Interfacing Stepper Motor ...............................................4
Interfacing Stepper Motor with LPC2148 ..........................5
Pin Assignment with LPC2148 ..........................................5
Circuit Diagram to Interface Stepper Motor with LPC2148..
......................................................................... …………….6
Source Code ....................................................................6
C Program to control stepper motor using LPC2148 ..........7
Testing the Stepper Motor with LPC2148 .........................9
General Information ...................................................... 10
Stepper Motor
STEPPER
COIL-A 1
VS
VSS
EN1
COIL-C P1.18 EN2
5V
1
3.3V
R51
10K-SIL
63
51
43
23
7
U16
9
8
7
6
5
4
3
2
VDD1
VDD2
VDD3
VDDA
VREF
6 JP8
18 VSS1 U12
25 VSS2 16 1 18 STM_A 1
42 VSS3 P1.16 12 2 I1 O1 17 STM_B 2
50 VSS4 P1.17 8 3 I2 O2 16 ULN_PWR 3
59 VSS5 P1.18 4 4 I3 O3 15 STM_C 4
VSSA P1.19 48 5 I4 O4 14 5
LPC2148 P1.20 44 6 I5 O5 13 STM_D 6
P1.21 7 I6 O6 12
8 I7 O7 11
9 I8 O8 10
GND COMM HEADER 6
ULN2803A
XTAL2
XTAL1
STEPPER MOTOR
61
62
12MHz
22pf 22pf
Source Code
#define COIL_A 16
void motor_ccw(void);
void delay(int);
void main(void)
unsigned char i = 0;
while(1)
int i,j;
for(i=0;i<n;i++)
for(j=0;j<0x3FF0;j++) {;}
void motor_ccw(void)
delay(1);
delay(1);
i++;
General Information