Interfacing of stepper motor with LPC 1343

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Interfacing of stepper motor with LPC 1343

1,088 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by sanpai on Thu Oct 25 02:05:16 MST 2012
Hello Xpresso Team,

I'm new to ARM and im trying to interface stepper motor with LPC1343.

The code is building fine and the connections are proper but still we are unable to get the motor run .

The code is written below , please let us know whether the syn taxes and semantics are correct  .

ifdef __USE_CMSIS
#include "LPC13xx.h"
#include "clkconfig.h"
#include "gpio.h"
#include "config.h"
#include "timer32.h"
#endif
 
#include <cr_section_macros.h>
#include <NXP/crp.h>
 
// Variable to store CRP value in. Will be placed automatically
// by the linker when "Enable Code Read Protect" selected.
// See crp.h header for more information
__CRP const unsigned int CRP_WORD = CRP_NO_CRP ;
 
// TODO: insert other include files here
 
// TODO: insert other definitions and declarations here
 
int main(void) {
    
    //considering an stepper motor with an step angle of  1.8 degree
    
    //setting the pins of p2.0 to p2.3 as outputs
 
    LPC_GPIO2->DIR = 0x0F;
 
    enable_timer32(0);//enable timer 0
    
        while(1)//anticlockwise rotation
        {
            LPC_GPIO2->DATA = 0x06;
            delay32Ms(0,100);
            LPC_GPIO2->DATA = 0x03;
            delay32Ms(0,100);
            LPC_GPIO2->DATA = 0x09;
            delay32Ms(0,100);
            LPC_GPIO2->DATA = 0x0C;
            delay32Ms(0,100);
            
         }
        
    return 0 ;
}



I have attached the schematic of our circuit please check and let us know .
0 Kudos
Reply
11 Replies

970 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by serge on Mon Oct 29 01:08:16 MST 2012
1) Did you stop with the stepper motor?:confused:
2) Have you read the manual for connecting the RFID module?:rolleyes:
3) Why two threads for your RFID problem? (This is not at all apreciated):mad:
0 Kudos
Reply

970 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by sanpai on Sun Oct 28 10:39:18 MST 2012
Hello Folks,

are there any programming tutorials for LPC 1343 , im having a hard time figuring out the things .

i have connected the RFID module to the controller's UART pin and i burned the UART code to the controller , im trying to read the tag from the module and im not sure where to see the tag information .

i had worked with 8051 earlier and there used to be a UART window in KIEL IDE , is there a similar UART window in LPC XPRESSO.

Expecting a quick reply from your side .
0 Kudos
Reply

970 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Fri Oct 26 02:48:43 MST 2012

Quote: sanpai
the common terminal to VCC and the motor is still standstill



That's which voltage :confused:

Which voltage does your stepper require :confused:

Did you read it's datasheet :confused:

Did you learn already what a stepper is and how 2 simple wires with correct voltage can spin it :confused:

Perhaps you should ask an adult nearby to help you.
0 Kudos
Reply

970 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by sanpai on Thu Oct 25 21:25:09 MST 2012
Hi Team,

I went through couple of sites and got the right info about the stepper motor . have connected the common terminal to VCC and the motor is still standstill, is the code correct ? .

Please do let me know .
0 Kudos
Reply

970 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Thu Oct 25 08:07:33 MST 2012

Quote: sanpai
...so lemme know the exact connections



:confused:  Look in your stepper datasheet :o
0 Kudos
Reply

970 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by sanpai on Thu Oct 25 07:57:07 MST 2012
Hello Guys ,

I did connect the pin to VCC but it diint work ,so lemme know the exact connections . is there a problem with the code ?? . Im new to programming to .

Need your help on the same.
0 Kudos
Reply

970 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Thu Oct 25 07:44:36 MST 2012

Quote: sanpai
...im very new to hardware stuff.



New to Google, too :confused:    http://homepage.usask.ca/~avl094/Electronics/Stepper/
0 Kudos
Reply

970 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by sanpai on Thu Oct 25 07:35:10 MST 2012
i have connected the 5th pin of the motor to the ground terminal of the ic .

Please lemme know the exact connections
0 Kudos
Reply

970 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by sanpai on Thu Oct 25 07:30:43 MST 2012
Hello PPL ,

Please let me know the appropriate connections , im very new to hardware stuff .

and please do lemme know whether the code is correct
0 Kudos
Reply

970 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by serge on Thu Oct 25 07:03:12 MST 2012
Throw your hardware engineer in the recycling bin :D

If that would work the worlds energy problem would be solved:p
0 Kudos
Reply

970 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ex-kayoda on Thu Oct 25 03:07:09 MST 2012
Did you really connect your stepper to GND and 'open collector' output of ULN2203 :confused:

What do you expect to happen there ;)
0 Kudos
Reply