Search code examples
serial-portmicrocontroller

Reading Data from Machine to computer


I am starting a NEW project into this complete new segment of microcontroller, so my questions may sound simple but I need your help here

I have a Micro-controller based machine which does some counting and timer related activities. This machine is connected to PC using serial port.

I want to read the data from the machine.

For this what are the things that I need to know like

  1. Port No?
  2. Baud Rate?
  3. Any encoding/decoding?

I can see the data on the machine display but then I have to manually enter it into system so I want to automate this process.

Client had a software which was working previously but now they want me to upgrade it. Machine vendor/ old software vendor are out of reach to ask them any details.

No documentation is present.

So I want to know whether this is feasible or not?


Solution

  • You can find data on accessing the serial port from a .NET managed language program here:

    http://msmvps.com/blogs/coad/archive/2005/03/23/SerialPort-_2800_RS_2D00_232-Serial-COM-Port_2900_-in-C_2300_-.NET.aspx

    As for com port numbers, baud rates and encoding the ONLY thing that will be able to answer that will be your micro-controllers manual.

    PC Serial port hardware can cover a huge amount of different configurations, and it would be impossible to know without reading the micro-controller documentation exactly what the settings should be.

    From experience however, 4800 & 9600 tend to be fairly standard speeds, every device Iv'e ever used has been 1 stop bit, 8 data bits and no parity and the com port has always been visible by a little bit of detective work with a serial terminal program (Putty will do the job just fine here) and the device manager.