Sample code for PCA9629 operation
You are viewing an older revision! See the latest version
Homepage
What is "PCA9629" ?¶
A Stepper motor controller¶
PCA9629 (x5) demo board: PCA9629, 4x FETs and stepper motor
The PCA9629 is an I2C-bus controlled low-power CMOS device that provides all the logic and control required to drive a four phase stepper motor. PCA9629 is intended to be used with external high current drivers to drive the motor coils. The PCA9629 supports three stepper motor drive formats: one-phase (wave drive), two-phase, and half-step. In addition, when used as inputs, four General Purpose Input/Outputs (GPIOs) allow sensing of logic level output from optical interrupter modules and generate active LOW interrupt signal on the INT pin of PCA9629. This is a useful feature in sensing home position of motor shaft or reference for step pulses. Upon interrupt, the PCA9629 can be programmed to automatically stop the motor or reverse the direction of rotation of motor.
Communicate with mbed through I2C. The motor can be operated by register settings
Output wave train is programmable using control registers. The control registers are programmed via the I2C-bus. Features built into the PCA9629 provide highly flexible control of stepper motor, off-load bus master/micro and significantly reduce I2C-bus traffic. These include control of step size, number of steps per single command, number of full rotations and direction of rotation. A ramp-up on start and/or ramp-down on stop is also provided.
Waveforms: Lower 2 lines are I2C bus. Upper 4 lines are output for motor driver stage
Motor moving 16 steps with acceleration and deceleration after register setting via I2C
The PCA9629 is available in a 16-pin TSSOP package and is specified over the -40 deg-C to +85 deg-C industrial temperature range.
Datasheet is available at next URL.
http://www.nxp.com/documents/data_sheet/PCA9629.pdf
Sample code¶
The PCA9629 operates
Import programPCA9629_Hello
Sample code for PCA9629 operation