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. Serial Communication

Serial Communication

Scheduled Pinned Locked Moved C / C++ / MFC
c++hardwarehelptutoriallearning
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.
  • D Offline
    D Offline
    Deepa Gopal
    wrote on last edited by
    #1

    Hello, I am a beginner in Embedded VC++ programming and am confronted with a problem : I have a desktop connected to a PDA.I have to write a program to send data from the desktop which would be read and displayed by the PDA.Any suggestions on how to proceed with this is most welcome. Thanks, Deepa.

    A 1 Reply Last reply
    0
    • D Deepa Gopal

      Hello, I am a beginner in Embedded VC++ programming and am confronted with a problem : I have a desktop connected to a PDA.I have to write a program to send data from the desktop which would be read and displayed by the PDA.Any suggestions on how to proceed with this is most welcome. Thanks, Deepa.

      A Offline
      A Offline
      Antti Keskinen
      wrote on last edited by
      #2

      On the platform end (Windows), the software opens a port, sets the port settings, writes data and closes the port. On the receiving end (PDA), the program must first open the port, then create a listener for incoming data, and when the listener fires an event, read data from the port and close the connection. Here is a lengthy article digging into the aspects of serial communication quite in-depth. It might be helpful to you: http://www.codeproject.com/system/serial_com.asp[^] Here is a link to MSDN dictating the Serial Communication on WinCE[^]. I don't know what OS your PDA uses, but perhaps reading it will be helpful. -Antti Keskinen ---------------------------------------------- The definition of impossible is strictly dependant on what we think is possible.

      D 1 Reply Last reply
      0
      • A Antti Keskinen

        On the platform end (Windows), the software opens a port, sets the port settings, writes data and closes the port. On the receiving end (PDA), the program must first open the port, then create a listener for incoming data, and when the listener fires an event, read data from the port and close the connection. Here is a lengthy article digging into the aspects of serial communication quite in-depth. It might be helpful to you: http://www.codeproject.com/system/serial_com.asp[^] Here is a link to MSDN dictating the Serial Communication on WinCE[^]. I don't know what OS your PDA uses, but perhaps reading it will be helpful. -Antti Keskinen ---------------------------------------------- The definition of impossible is strictly dependant on what we think is possible.

        D Offline
        D Offline
        Deepa Gopal
        wrote on last edited by
        #3

        Hello Antti, Thank you for your kind response.My PDA uses Win CE.I have written a program in EVC++ to write a few characters to the COM1 port.Now I have no idea how to implement the read program in the PDA so that it can read the data being sent. Thanks Deepa.

        A 1 Reply Last reply
        0
        • D Deepa Gopal

          Hello Antti, Thank you for your kind response.My PDA uses Win CE.I have written a program in EVC++ to write a few characters to the COM1 port.Now I have no idea how to implement the read program in the PDA so that it can read the data being sent. Thanks Deepa.

          A Offline
          A Offline
          Antti Keskinen
          wrote on last edited by
          #4

          Just follow the implementation guide from Microsoft for Windows CE to develop the application. You must have the port settings made similar. If you readed the first article I posted, a data structure is mentioned there with which you can set the port settings in the Windows end. See the Microsoft WinCE documentation for a respective setting on the PDA end. I think versions of WinCE sport some type of MFC support, and thus you can use much of the same code to implement port reading on the PDA end. For this purpose, you would need to consult the PDA documentation and/or files to see what version of MFC it supports. The most effective way is to use the Microsoft-provided WinCE emulator. This allows you to develop and test code on an emulator before sending it to the actual device. I think eVC++ supports on-device debugging through a serial connection. This is not very viable in your case, as you need the serial connection yourself. So use the emulator. For an example, create the WinCE build, run it in the emulator, then start the Windows-end program, write data into the port and attempt to read it through the emulator. For an extremely effective method, if your computer supports two COM ports, you can write to the first using the Windows-program, then read from the second using the emulator-driven build. Just get a cross-connected serial cable (or build one yourself) to inter-connect the two ports. Also, you should post this question into the Embedded / Mobile area, as most of the users who develop WinCE software tend to hang around there, and thus you might get more knowledgeable answers. -Antti Keskinen ---------------------------------------------- The definition of impossible is strictly dependant on what we think is possible.

          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