arunb
Joined: 08 Sep 2003 Posts: 492 Location: India
|
RE: |
Posted: Sun Aug 14, 2011 10:09 pm |
|
|
Quote: | How i can create connection between serial port (COM port) and MS Excel. Is there a easy way to do it. To display data in real-time for analysis and better understanding purposes. |
You can do this using VBA (Visual Basic for Applications) quite easily.
Make a VB application that interfaces to the hardware, use the MSCOMM serial port control for this. Establish communication with your hardware, acquire real-time data from the device. Use DDE technique to establish communication with MS Excel.
The MSDN help pages contain excellent tutorials and example codes that demonstrate DDE and MSCOMM control usage.
I made a similar project in Microsoft Visual Basic 6.0 using the above mentioned techniques.
A VB 6.0 application communicated with the hardware device (an ADC card, that consisted of a 16F628 PIC and a MCP 3208 ADC) using the serial port of the computer. The same application interfaced with Excel using DDE.
The system was designed to run on Windows XP/2000, and worked very well, I could plot the acquired in real-time on an Excel chart just like an oscilloscope.
I am not sure if DDE is supported in Windows 7 or Vista you have to check this out.
thanks
a |
|