Serial data to USB


Closed Thread
Results 1 to 19 of 19

Hybrid View

  1. #1
    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.

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

    Default

    It has occured to me that VB6 does not support USB ports, right?
    .NET does?
    The PIC end of this has a three pin, 0.100 centers, header; Gnd, transmit, and receive. The end I need to mess with is the PC/VB side.

    Thanks again all.

    B

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

    Default

    All language support USB, but there's no easy lunch

    If you have MicroCodeStudio, you should have a plug-in called EasyHID, this will create your code template for VB6. It will also give you a .DLL called mchid.dll or something like that, which is the core of the template.

    A while back, i've posted an example somewhere her called USBDemo. sure enough you will have everything to get you started with it.

    I also published here a Template to use VB.NET. Another guy on the net also used it, modified it a little bit and placed it on his website ( http://www.helmpcb.com/Software/USBHIDVB/USBHIDVB.aspx )


    I really suggest you to forget the outdated (but still usefull and workable) VB6, move on .NET. VBExpress is free to use.

    Jan Axelson's website also have tons of ressource and code template to work with HID devices.
    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

    Red face

    First, thanks for the responses. Very informative.

    So, just so I have it straight, I should download MicroCodeStudio for the template for VB6. I also need to get MicroCodeStudio Plus for the 16F628A PIC, the MicroCodeStudio free version only cover 16F628. Is that correct?
    I don't think 628A has USB capabilities.

    I have a copy of .NET, I looked into the MSCOM part of it once and decided to stay with what I knew for rapid deployment. Now I'm paying for it. I will take your advice to move to .NET under consideration.

    I wonder, if plugging in the Belkin cable Mack mentioned earlier, helps the situation at all. Mack??

    Regards.

    B

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

    Default

    All the Belkin serial to USB does is turn a USB port on the PC into a serial port (virtually)

    All communications are serial type. RS232 (sort of).

    Straight USB is a different thing altogether.

    The free version of MCS 3.0 does the 16F628A.

    What version of PBP and MCS are you using?
    Dave
    Always wear safety glasses while programming.

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

    Default

    In .NET you want to use SerialPort component instead, it's a Mscomm but with more rich feature.

    To start, simple serial com is probably the best way to go, the 16F628A is a good choice.
    Last edited by mister_e; - 29th October 2008 at 03:24.
    Steve

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

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

    Default

    Quote Originally Posted by mackrackit View Post
    All the Belkin serial to USB does is turn a USB port on the PC into a serial port (virtually)

    All communications are serial type. RS232 (sort of).

    Straight USB is a different thing altogether.

    The free version of MCS 3.0 does the 16F628A.

    What version of PBP and MCS are you using?
    Does this mean then in VB6 I can select a USB port just the same as a "normal" comm port?

    B

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

    Default

    Quote Originally Posted by cooksydesign View Post
    Does this mean then in VB6 I can select a USB port just the same as a "normal" comm port?

    B
    I do not use VB or .NET
    In other languages when using on of these converters, it is treated as a serial port.

    For example. One of my machines that does not have a serial port, only USB, add a hub and four serial to USB converters, device manager shows com 2 through 5. If I use hyperterminal, I pick one of these just as I would a real serial port. The same goes for Python and Liberty Basic (the two I use).

    So I would guess in VB you would do the same because the OS sees these converters as a serial port.
    Dave
    Always wear safety glasses while programming.

  9. #9
    skimask's Avatar
    skimask Guest

    Default

    Quote Originally Posted by cooksydesign View Post
    It has occured to me that VB6 does not support USB ports, right?
    .NET does?
    The PIC end of this has a three pin, 0.100 centers, header; Gnd, transmit, and receive. The end I need to mess with is the PC/VB side.
    Thanks again all.
    B
    Ya could go with a CP2102/CP2103 type chip...
    http://www.sparkfun.com/commerce/pro...roducts_id=309
    Serial in one side, USB out the other side, virtual COM port on the PC.

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

    Default

    I am using PIC Basic Pro, version I am unsure of. It does have USBIN, USBOUT, USBINIT, and USBSERVICES.

    I will investigate all your suggestions. Thanks again to all.

    B

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

    Default

    Quote Originally Posted by cooksydesign View Post
    I am using PIC Basic Pro, version I am unsure of. It does have USBIN, USBOUT, USBINIT, and USBSERVICES.

    I will investigate all your suggestions. Thanks again to all.

    B
    Check the Read me file in the PBP directory.
    Dave
    Always wear safety glasses while programming.

Similar Threads

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