Categories

Site Sponsors

Who's Online

  • 0 Members.
  • 9 Guests.

Down and dirty with FT232R on Arduino Diecimila

7,497 views

To begin, we will first need to find the total number of FTDI chips attached to the system and select one of them.   Next, we open a connection (get a handle) to the desired device, which in our case is the FT232R on the Arduino board.   Continuing, we will configure the device for bit bang mode and set the baud rate..   And finally, we can begin reading and writing to the GPIO pins.

The VB Tool used to Interface the FT232R on the Arduino Board

Fig 2 – Simple VB Tool for Manipulating FT232 Pins on Arduino Board

The simple tool does each of these steps in turn, starting from the top of the window and moving down.   Upon startup, it will automatically seek all the FTDI chips and populate the dropdown box.   If none are found, it will complain and ask you to re-Find.   So plug in your Arduino and hit Find FTDI Interfaces.   The dropdown box will be populated.

Next, the dropdown box can be used to select the FTDI chip you want.   In our case, we only have the Arduino plugged in so there is only one choice – it is automatically selected.

Upon startup, the state of the interface is closed and the indicator on the next line will be shown in red.   Once you’ve selected an interface, Open it, and if all goes well the indicator will turn green, meaning a valid handle to your FT232 device was obtained.

Next, you will need to Do Setup of bit bang mode and baud rate.   This is put into it’s own routine to make it easy to tweak.   At the moment, the example software is using asynchronous bit bang mode – edit that in this routine if you want to work with sync mode.

The next few buttons Read the state of the pins, (all of them, even the ones not connected to the 4-pin header) Set a bit Hi or Lo, and finally Toggle a bit from high to low some number of times.   For all the bit operations (even toggling), the program expects a bit number (0-7) in the text field.   Remember, the Arduino bits are 7, 6, 5, and 3.   By raising, lowering, and toggling these bits you can see the state change with a meter or oscilloscope.

You’ll really need to read the source code to get a good idea of all the individual functions that make up things like Do Setup, but we trust that our readers are at least a little bit code-savvy.   Fire us an email at FT232 at openschemes if you are interested in more detailed explanations of each step, and we’ll try to put together a more detailed tutorial.


Source Code and Executable for the Arduino-FT232R Bit-Bang Example Tool


That’s all for now – hopefully this little tutorial software can enable some of the non-C fellows in developing their own FT232 bit-banged interfaces.   Or at least allow you to have some fun making pins go high and low with USB, simply.   Next time we should be back with some more cool stuff for you to play around with, and we will develop another article on some more advanced techniques.

Pages: 1 2

4 comments to Down and dirty with FT232R on Arduino Diecimila

Leave a Reply

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>