Showing posts with label FTDI. Show all posts
Showing posts with label FTDI. Show all posts

Saturday, July 27, 2013

OpenOCD FT2232H based JTAG Adapter(s) with UART

USB to JTAG, and JTAG to JTAG adapters
JTAG adapters are commonly used to program and debug microcontrollers and microprocessors.  This circuit is a prototype of one that is compatible with OpenOCD which is an open source JTAG program and set of drivers.  The board and circuit presented here is simply a set of connections, jumpers, and sockets that leverage the FT2232H Mini Module as a USB to JTAG adapter. 

Four JTAG and/or SWD ports are provided for compatibility with a variety of development boards: 6-pin ST-LINK, 8-pin LPC-Link, 10-pin JTAG, 20-pin JTAG. 

Using one of two plug in modules, the 10-pin is either 0.05" pitch or 0.1" pitch. I plan to include both 10-pin formats on any revisions to this JTAG board so I can easily adapt between the formats.

When used as a USB JTAG adapter, only one of the JTAG or SWD ports is used.  Note that pin 1 is consistently in the upper left on this board.  Ribbon cables or socket cables are used to connect to the target board.  It is useful to have sets of cables that support all these pin-out formats.  Cables are quicker and easier than single conductor jumpers between individual connector pins.

An alternate use is to adapt from one pin-out to another when using other JTAG and/or SWD programmers.  In this case the mini module can be removed or simply disconnect the USB cable from the computer.  The board is only being used to convert pin-outs.  For example, I can use a 6-conductor socket to socket cable to connect the ST-LINK port to the ST-LINK socket on my STM32F4Discovery board, and then connect the LPC-Link socket via an appropriate cable to an LPCxpresso board.  I have used this method to program and debug my LPCxpresso board for LPC1343 with CooCox IDE.

Multiple JTAG adaptions are possible
  • ST-LINK to LPC-Link
  • ST-LINK to 10-pin
  • ST-LINK to 20-pin
  • LPC-Link to 10-pin
  • LPC-Link to 20-pin
  • 10-pin to 20-pin
  • 10-pin (1.27mm) to 10-pin (2.54mm) in future revision

Boards I was able to communicate with either with OpenOCD, ST-LINK, or CoLinkEx using the JTAG adapter(s) board include:

Caveats and Warnings.  Note that I did not do extensive testing.  I am not sure the RESET and RTCK lines are working.  Some boards I could only connect to using SWD instead of JTAG.  Driver installation and basic use of OpenOCD is not described in this post, so see Getting Started with OpenOCD.

Inspiration and References.  Most of the JTAG circuit is gleaned from multiple FTDI specifications regarding the FT2232H, Mini Module, and related MPSSE Basics Application Note AN_135.  And the circuit is very similar to the FLOSS-JTAG one shown here.


Under belly of the JTAG board
 

JTAG Schematic

Friday, December 2, 2011

USB PIC24 and PIC32 SPDIP Arduino

PIC24FJ64GB002 shown
Microchip has just released a SPDIP-28 PIC32.  This chip is pin compatible with the PIC24 which I have been developing for, and my latest toying has been with Arduino style boards, so I was determined to combine the two.

In the last week I have developed a prototype USB Arduino format board using a PIC24 or PIC32 as its CPU.  The Arduino format consists of the standardized 8 and 6 pin headers for I/O and power.  This was accomplished starting with an empty Arduino shield prototype board and building up as a PIC single board computer instead of a shield.  Now standard shields can be attached to this board.

The two CPUs I am targeting to support with this board are PIC24FJ64GB002 and the recently released PIC32MX220F032B.

The power circuit, ICSP (on left), and USB have been tested.  The PIC24 running a CDC (Serial over USB) project is recognized by the host PC.  Next step is to test the FTDI serial connector (on right), and all the analog/digital pins.  Following that is to add a crystal and capacitors to get USB support for the PIC32 (I wonder if I can do that on a shield?). All pins are exposed via the Arduino shield interface, so it is super expandable.  The red LED is for 5V power, and the green LED is for 3V3 power.  The button is the reset switch.  No user I/O are provided, must be accomplished by add ons.

The missing piece is the Arduino development environment support for PIC24 and this low end PIC32 chip.  That's a pretty big missing piece.  For now I can develop using Microchip's MPLAB 8 and MPLAB X.  I am hoping to use the chipKIT Arduino Development Environment for this board soon as it would be nice to program with Arduino sketches and C++. 
PIC32MX220F032B shown
Underbelly

Wednesday, July 27, 2011

FTDI USB to Serial module

This FT232RL is a popular chip used for converting TTL level serial lines to/from USB serial.  You can find it used with Arduino micro cpus and similar.  The chip supports any voltage logic.  Here it is using 3.3V or 5V logic depending on the jumper setting.  A 3.3V regulator is included on chip.

I used a breakout board from SparkFun to adapt the 28-pin SSOP to 0.1" pitch headers.  This was my first attempt at soldering a surface mount chip.  I was successful soldering the important pins.  Using dual row header sockets, I was able to construct this as a prototype module, making all pins available for use.  LEDs are present for power, RX, and TX.   Sample circuits are available in FTDI's datasheet.