Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. MSCOMM1 problem

MSCOMM1 problem

Scheduled Pinned Locked Moved Visual Basic
helphardwaretutorialquestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    areon25
    wrote on last edited by
    #1

    hi all.. i have a problem in communication software to hardware.. actually, i want to know the basic concept how we send the data to the hardware using serial port.. for example, how can i switch on and off the led when i click the button in my vb projects.. can someone please help me.. areon25

    F 1 Reply Last reply
    0
    • A areon25

      hi all.. i have a problem in communication software to hardware.. actually, i want to know the basic concept how we send the data to the hardware using serial port.. for example, how can i switch on and off the led when i click the button in my vb projects.. can someone please help me.. areon25

      F Offline
      F Offline
      fredde_d
      wrote on last edited by
      #2

      Then you must know how the hardware reads the data. Meaning you must know the communication protocol. What type of hardware is it? BR Fredrik

      A 1 Reply Last reply
      0
      • F fredde_d

        Then you must know how the hardware reads the data. Meaning you must know the communication protocol. What type of hardware is it? BR Fredrik

        A Offline
        A Offline
        areon25
        wrote on last edited by
        #3

        thanks for the email.. actually, i just want to switch ON/OFF the LED as i mention before.. areon25

        F 1 Reply Last reply
        0
        • A areon25

          thanks for the email.. actually, i just want to switch ON/OFF the LED as i mention before.. areon25

          F Offline
          F Offline
          fredde_d
          wrote on last edited by
          #4

          And that't when it gets messy! In order to swith on/off the led on the hardware you must send the correct data on your serial port. I have written some protocols before for serial comunication and they all start with a command sequence. In your case I would have had a command LED_CONTROL which would have been the character "L" and then which state to put the led in "0" or "1". By sending "L" on the serial port the hardware knows that next character recieved will contain "0" or "1" and when I send "0" the hardware swithces the led off. Two weeks ago I wrote a program to print stickers with a Intermec PC4 printer. http://www.intermec.com/eprise/main/GSS/Service/Content/Manuals/Show_ManualSearchResults?Product=PRTRPC4&Language=English[^] Take look at the Programmer's Reference Manual. That's why you must know the protocol for the hardware communication. BR Fredrik

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups