LPC P1343 Device - mschafer/usb-motor-stepper GitHub Wiki

The LPC-P1343 is a low cost ARM Cortex-M3 development board from Olimex that features USB connectivity. The software for the board was developed using Rowley CrossWorks for ARM. The USB driver is derived from the LPC1343CodeBase project.

Table of Contents

Program the firmware onto the device

Windows

The board must be programmed with the firmware before it can be used. There is a file named firmware.bin located in the installation directory which needs to be copied to the onboard flash. Follow these simple steps:

  1. Set the BLD_E jumper on the board
  2. Connect the board via USB to your computer
  3. The board should now show up as a USB mass storage device with a file in it called firmware.bin
  4. Delete the file on the board and replace it with the one from the install directory.
  5. Eject the USB mass storage device.
  6. Remove the jumper and reset the board.

Mac and Linux

Unfortunately the procedure above will not work on Linux or the Mac because those OS's write to USB mass storage devices differently. You will either need software and hardware to program the chip through the SWD port or you can try the information at this link. Note that the checksum is already correct so you can skip that part of the instructions.

Installing the device driver (Windows only)

This step is not necessary on Mac or Linux as they both recognize a virtual com port with no additional drivers.

The device appears to Windows as a virtual COM port (VCOM) so all that is needed is a .inf file to describe it and the generic windows VCOM driver. Copy the file lpc134x-vcom_64.inf from the installation to the Windows\inf folder and then connect the LPC-P1343. Open the Windows device manager and expand the section for Ports (COM & LPT) and you should see a new COM port named LPC134x USB VCom Port (COMn) where n should be a number larger than 2.

If the device does not appear under ports but instead shows up in Other devices with a symbol indicating a problem, then try letting Windows search the internet for the appropriate device driver.

Wiring the device to your stepper motors

The device only provides step and direction digital outputs. Some form of motor driver is needed to convert these signals to the analog power signals that make a stepper move. The table below shows the default pin assignments used for wiring the board to a stepper driver. The 8 step and direction output pins are also connected to the 8 indicator LED's (active low) on the board.

There are also 8 input pins to automatically limit motion in each direction for each axis. These pins have a weak pullup and pins are active low meaning that grounding them will inhibit motion. The motors will operate correctly if the limit pins are left floating.

Pin Assignments
Axis Step Dir Fwd Limit Rev Limit
X P3.0 P3.1 -P2.0 -P2.1
Y P3.2 P3.3 -P2.2 -P2.3
Z P2.4 P2.5 -P2.8 -P2.9
U P2.6 P2.7 -P2.10 -P2.11

Running a script

When the device is connected to your Windows PC via USB, you should see a COM port named LPC134x USB VCom Port (COMn). Use COMn, where n is a single digit number, as the port argument to the stepper program.

stepper -P COM7 triangle.steps

On Mac and Linux, the virtual com port will appear in the /dev directory.

stepper -P /dev/tty.usbmodem411 triangle.steps
⚠️ **GitHub.com Fallback** ⚠️