Did I get the right device? USB-Serial


Closed Thread
Results 1 to 10 of 10

Hybrid View

  1. #1
    Join Date
    Dec 2012
    Location
    Tennessee
    Posts
    262


    Did you find this post helpful? Yes | No

    Default Re: Did I get the right device? USB-Serial

    thanks, i will be using VB.net to build the interface program, but I was wondering just to test it out.. I remember back in the days of DOS, you could do a command like

    c:\12345678 >com1 ???
    or
    c:\copy test.txt >com1

    something like that, I cant remember it exactly, but you could send a text string or file directly to a com port or lpt port. can you still do that?

    also is it possible to send a large number of bits, say 32,48,64 and have it store them in a set of variables, for example

    Code:
    MYBYTE0 VAR BYTE
    MYBYTE1 VAR BYTE
    MYWORD0 VAR WORD
    MYWORD1 VAR WORD
    
    LOOPME:
    SerialIN????
    code to break up string in pieces and store in variables
    GOTO LOOPME
    my textbox on PC has 48 "1 & 0's" no spaces to be sent as an example
    Chris


    Any man who has accomplished anything in electronics at one time or another has said... " STOP! WAIT! NOOO! Dangit.... Oh Well, Time to start over..."

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,624


    Did you find this post helpful? Yes | No

    Default Re: Did I get the right device? USB-Serial

    Hi Chris,
    Can't help with the command line interface to the COM-port, never seen that before. Doing serial coms in VB.net using the supplied serial port object is quite easy though. Just beware that Microsoft removed the serial port object from VB when they introduced .net and put it back in some later version. I believe all the Express versions have it if that's what you're using. It's been a long time since I played with VB.

    On the PIC side there's no problem to receive "any" number of bytes. HSERIN can split the bytes up properly as it receives them or, if you're using an interrupt driven routine you can store the data in an array and split them up when everything is in. It all depends on how the data is formated, high or low byte first etc.

    /Henrik.

Similar Threads

  1. Replies: 1
    Last Post: - 5th October 2011, 09:59
  2. USB Device Communication
    By Pesticida in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 19th January 2008, 22:22
  3. usb - device not recognised
    By mpardinho in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 8th January 2007, 18:47
  4. USB device
    By Haitham Rifai in forum USB
    Replies: 2
    Last Post: - 5th December 2005, 10:07
  5. usb device not recognized
    By NL2TTL in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 2nd June 2005, 06:22

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