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. C / C++ / MFC
  4. Simple Serial port programming in VC++

Simple Serial port programming in VC++

Scheduled Pinned Locked Moved C / C++ / MFC
c++databasecomquestion
5 Posts 3 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.
  • P Offline
    P Offline
    pavanbabut
    wrote on last edited by
    #1

    Hi, I would like to program a serial port in my VC++ program. All I want to do is whenever I had a mouse click event, I would like to send a positive trigger (sort of a TTL) signal over the com port (so that I can analyse the signal over an oscilloscope for furthur analysis). Is there any simple way of doing this?? thanks, -Pavan

    N F 2 Replies Last reply
    0
    • P pavanbabut

      Hi, I would like to program a serial port in my VC++ program. All I want to do is whenever I had a mouse click event, I would like to send a positive trigger (sort of a TTL) signal over the com port (so that I can analyse the signal over an oscilloscope for furthur analysis). Is there any simple way of doing this?? thanks, -Pavan

      N Offline
      N Offline
      NiceNaidu fo
      wrote on last edited by
      #2

      1)Open Port 2)Write Port 3)Close Port on the button event. have a look http://www.ontrak.net/mfc.htm

      Appu.. "If you judge people, you have no time to love them."

      1 Reply Last reply
      0
      • P pavanbabut

        Hi, I would like to program a serial port in my VC++ program. All I want to do is whenever I had a mouse click event, I would like to send a positive trigger (sort of a TTL) signal over the com port (so that I can analyse the signal over an oscilloscope for furthur analysis). Is there any simple way of doing this?? thanks, -Pavan

        F Offline
        F Offline
        flippydeflippydebop
        wrote on last edited by
        #3

        for anything to do with serial ports you have to check out the CSerial library found right here on codeproject. Ive used it many atime and quite frankly its the bomb! http://www.codeproject.com/system/serial.asp

        P 2 Replies Last reply
        0
        • F flippydeflippydebop

          for anything to do with serial ports you have to check out the CSerial library found right here on codeproject. Ive used it many atime and quite frankly its the bomb! http://www.codeproject.com/system/serial.asp

          P Offline
          P Offline
          pavanbabut
          wrote on last edited by
          #4

          Thanks for the link... that library seems great to work with Serial communication. But how can I send data over a single pin on a com port?? Like say, I want to send a 5V signal over pin1 of a serial port on an event in my program, how can I do that?? My program is not an MFC based program, its a pure C++ program written in VC++, to say its actually a DLL I use to interact with from matlab. -Pavan

          1 Reply Last reply
          0
          • F flippydeflippydebop

            for anything to do with serial ports you have to check out the CSerial library found right here on codeproject. Ive used it many atime and quite frankly its the bomb! http://www.codeproject.com/system/serial.asp

            P Offline
            P Offline
            pavanbabut
            wrote on last edited by
            #5

            Hi... I managed to use the library provided over here. Thanks for that great library... -Pavan

            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