Any sample FTDI FT232RL or FT232BM code?


Closed Thread
Results 1 to 7 of 7
  1. #1
    Join Date
    Apr 2006
    Posts
    92

    Default Any sample FTDI FT232RL or FT232BM code?

    Hi,

    Was wondering if anyone can share some simple, test code for operating the FTDI FT232BM, or the FT232RL (The break out board from SparkFun).

    Thanks,
    Tony
    Last edited by TonyA; - 23rd April 2007 at 17:14.

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by TonyA View Post
    Hi,

    Was wondering if anyone can share some simple, test code for operating the FTDI FT232BM, or the FT232RL (The break out board from SparkFun).

    Thanks,
    Tony
    The FT232xx is a USB-Serial adapter chip. Plug it into the USB port of the PC and it becomes a virtual com port, so you use Hyperterminal (or whatever) on the PC like you would a normal serial port.
    At the PIC's end, the FT232xx turns the USB into a serial port. Some PICs have serial ports. All programs for PICs compiled by PBP have the ability to either use the hardware serial port or to 'bit-bang' a serial port on almost any available pin.
    It couldn't be any simplier. But, we don't know what kind of PIC you're using, we don't know what kind of hardware you have built up, we don't know what kind of test code you want to use (loopback, read a button, light an LED), we don't know anything!

  3. #3
    Join Date
    Apr 2006
    Posts
    92


    Did you find this post helpful? Yes | No

    Default

    Hi,

    Thanks.

    I haven't chosen a PIC to use for this yet, any recommendations?

    I was just looking for some PBP code to get me started. I have a very simple program written in Python that sends serial data. I just want to light up an LED attached to my pic to get started.

    PC ---> Serial out via FTDI chip ----> PIC = light up an LED when serial data received.

    After that I'll go the other way, receiving data to my PC from the PIC

    (Just very, very simple to get started.)

    The FT232RL (The break out board from SparkFun) looks really nice and inexpensive.

    Thanks again,
    Tony

  4. #4
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by TonyA View Post
    I haven't chosen a PIC to use for this yet, any recommendations?
    Any PIC you have available...


    serial_input_pin var whateverpinyouwanttouse
    input_data var byte
    led var whateverpinyouwanttouse

    Main:
    serin serial_input_pin,t2400,input_data
    if input_data="1" then led = 1
    if input_data="0" then led = 0
    goto main

  5. #5
    Join Date
    Apr 2006
    Posts
    92


    Did you find this post helpful? Yes | No

    Default

    Hi,

    Thanks again.

    So, it would be exactly as if it were just plain serial input?

    I thought maybe there were some other things needed to do in dealing with the bridge chip. (Is there any "handshaking" or clock data that needs to be sent/received between the Pic and the FT232XX?)

    (Sorry in advance if I'm causing any confusion, etc. I'm just now starting to learn about rs232 and FTDI)

    Thanks again,

    Tony

  6. #6
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by TonyA View Post
    Hi, Thanks again.
    So, it would be exactly as if it were just plain serial input?
    I thought maybe there were some other things needed to do in dealing with the bridge chip. (Is there any "handshaking" or clock data that needs to be sent/received between the Pic and the FT232XX?)
    (Sorry in advance if I'm causing any confusion, etc. I'm just now starting to learn about rs232 and FTDI)
    Thanks again,
    Tony
    The basic operation is just as simple as that. CTS/RTS are optional, programmable. The biggest pain (if you can call it that, 'cause it's all handled by Windows) is getting the thing recognized by Windows. If you don't mess with the drivers and install them correctly, no problem.

  7. #7
    Join Date
    Apr 2006
    Posts
    92


    Did you find this post helpful? Yes | No

    Default

    Hi,

    I see... Thanks for clearing this up for me.

    Tony

Similar Threads

  1. HARDWARE I2C SAMPLE CODE question
    By Michael Wakileh in forum Code Examples
    Replies: 2
    Last Post: - 16th June 2009, 22:07
  2. How much code space do PBP statements use.
    By Darrel Taylor in forum Code Examples
    Replies: 5
    Last Post: - 13th February 2009, 22:31
  3. Loop with two motor and 2 sensors
    By MrRoboto in forum mel PIC BASIC
    Replies: 4
    Last Post: - 9th December 2008, 00:40
  4. Making Program Code Space your playground...
    By Melanie in forum Code Examples
    Replies: 15
    Last Post: - 19th July 2008, 09:26
  5. 18F8722 sample code
    By George in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 19th June 2008, 14:42

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts