Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

VB and serial port

  • 24-06-2003 05:51PM
    #1
    Registered Users, Registered Users 2 Posts: 1,368 ✭✭✭


    Hi,
    I need to learn how to control a piece of hardware using the serial interface. The hardware in question has a serial interface, and has its own protocol for interfacing with the PC. E.G I must output 01hex in order to set the device into read mode, etc.
    Does anyone know of any good tutorials or books which deal with the topic??
    thanks


Comments

  • Registered Users, Registered Users 2 Posts: 21,264 ✭✭✭✭Hobbes


    I did this years ago and found that VB (Well I think it was VB Professional 3? Been so long) they had basically screwed up the Comm widget and it was by no means realible.

    I just ended up doing the stuff in DOS, which was a lot easier.

    Before you start communicating with the machine you need to find out a couple of things on how the device communicates (eg. XON/OFF/DSR/Speed/Parity) and some devices use cross over cables and others use straight through.

    For starters try messing around with a Telnet connected to COM1: (whatever) and see if you can get feedback sending the information in that way.

    Looking around for anything that may help.

    http://www.taltech.com/TALtech_web/resources/intro-sc.html#232c

    http://www.pcplus.co.uk/media/pcplus/pdf/191/191.programmers%20world.vb.pdf


  • Registered Users, Registered Users 2 Posts: 629 ✭✭✭str8_away


    Hi there

    If you are using VB6 you could simply use comm control.
    MSCOMM32.cox

    I have used it to create a program to talk to my PDA and modem and it works fine.

    just do a search on "VB COMM" you will get lots of info.


Advertisement