Serial data to USB


Closed Thread
Results 1 to 19 of 19

Hybrid View

  1. #1
    Join Date
    May 2005
    Location
    Minnesota
    Posts
    31

    Default Serial data to USB

    I have good working code to transmit serial data to and from a PIC 16F628A and a VB6 application. Now the request for a USB connection has come up. Has anyone played with a serial to USB converter? The board with the PIC has been made, I'm stuck with serial in, serial out, and ground for data transfer. The data is transfered at a blistering 4800bps, but for the small amount of data it's just fine.
    Two bytes are first sent from the VB application to the PIC. The PIC acknowledges with a byte, then transfers less than 50 bytes and it's over.
    Soooo, anyway, has anyone played with a serial to USB converter? I have seen one or two that are built into a cable, which would be sweet if that worked out.
    Thanks to all.

    Brad

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924

    Default

    Quote Originally Posted by cooksydesign View Post
    I have good working code to transmit serial data to and from a PIC 16F628A and a VB6 application. Now the request for a USB connection has come up. Has anyone played with a serial to USB converter? The board with the PIC has been made, I'm stuck with serial in, serial out, and ground for data transfer. The data is transfered at a blistering 4800bps, but for the small amount of data it's just fine.
    Two bytes are first sent from the VB application to the PIC. The PIC acknowledges with a byte, then transfers less than 50 bytes and it's over.
    Soooo, anyway, has anyone played with a serial to USB converter? I have seen one or two that are built into a cable, which would be sweet if that worked out.
    Thanks to all.

    Brad
    I have good luck with a Belkin F5U409.

    http://catalog.belkin.com/IWCatProdu...duct_Id=459431
    Last edited by mackrackit; - 28th October 2008 at 20:56.
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898

    Default

    I'd never ever had any kind of problem 'till now. BUUUUUUUUT, most USB-2-serial may access COM up to 255/255. VB6 original component is usually able to work within COM1:COM15 range. With VB6, So the only kind of limitation is if you can't modify the COM port that your converter use.

    You could find some info over the net to modify the VB6 control, or, i'll suggest you to move on newer .Net version (express work great).

    In .NET you also could build a list of available COM port in 2-3 code lines.

    Now, i use PIC with USB.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  4. #4
    Join Date
    May 2005
    Location
    Minnesota
    Posts
    31

    Default

    Mackrackit, what kind of handshaking is required with the Belkin cable?

    My '628A PIC is surface mount, the boards have been made. I think the boards were done before the PIC came out with USB, yep, a few years and I still have some stock.

    Many thanks.

    Brad

  5. #5
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898

    Default

    I'm not Mackrackit, but handshaking is really up to you. You could have DTR line connected to the MCLR and play with it in VB, so your PIC fall in a SerialCom Test or Bootloading procedure for XYZ delay.

    I usually use USART interrupt without MCLR.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  6. #6
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924

    Default

    What he said and..

    When the serial/usb converter is installed on XP/Vista, you will have a virtual com port number ?? in device manager.

    This virtual com port will have all of the settings of a regular com port.
    Dave
    Always wear safety glasses while programming.

  7. #7
    Join Date
    Aug 2005
    Posts
    57

    Default

    This demo was created for the serial to usb port selection problem.
    http://www.picbasic.co.uk/forum/showthread.php?t=7372

  8. #8
    Join Date
    Dec 2005
    Posts
    1,073

    Default

    The simplest solution is to keep your PIC application as RS232 and tell those who need USB to buy this http://www.byterunner.com/byterunner...ct_match=exact. It's inexpensive, it works and it eliminates the need for you to rewrite your PIC application, learning to use USB, .NET, etc.

  9. #9
    Join Date
    Oct 2008
    Posts
    14

    Default

    I'm using 18f2550, PBP and Visual Basic Express 2008 without any problem... With the usage of bootloader you can also programm your pic in a few seconds on your circuit over USB...

Similar Threads

  1. Using Nokia LCD
    By BobP in forum mel PIC BASIC Pro
    Replies: 300
    Last Post: - 3rd May 2018, 04:47
  2. Data EEPROM gets clobbered during programming
    By BrianT in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 18th July 2008, 02:46
  3. Big characters on HD44780 4x20
    By erpalma in forum mel PIC BASIC Pro
    Replies: 23
    Last Post: - 7th January 2007, 02:21
  4. LCD + bar graph
    By DynamoBen in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 5th October 2005, 14:50
  5. Sinus calculating !
    By Don Mario in forum mel PIC BASIC Pro
    Replies: 29
    Last Post: - 28th November 2004, 23:56

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