Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

adc conversion and send data to pc

Status
Not open for further replies.

nishat anjum khan

Member level 2
Member level 2
Joined
Aug 4, 2012
Messages
44
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Visit site
Activity points
1,562
for my project i have to see the voltage and current of variable load..i have to sample it and then send to pc..where by matlab i have to plot the variation of load voltage and current...which will be the best solution for sending data to pc? should i use usb or serial port?
 

Serial port (meaning something like RS-232) is a LOT easier to implement and debug than USB. However, very few computers nowadays have serial ports. Alas. You CAN purchase add-in cards with serial ports for not a lot of money. Or you can use a serial-to-USB adapter. If your goal is just to send data from your board to your PC, and you don't want to spend a good portion of your life debugging a USB interface, I would try to avoid it.
 

You can use RS232 if your PC has COM port or if you have RS232 to USB adapter. If you use mikroC Compiler then USB HID communication is very easy. If you want to receive USB data at PC using a VC# or VB.Net app then you have to use mcHID.dll from helmpcb.org which works with VB.Net or easyUSBHIDNetClass.dll from easyUSBHIDNetClass.org which works with VC# and VB.Net.
 

Implementing a USB Communications Device Class (CDC) Serial COM Port Emulation, is certainly one of simplest and straight forward ways to utilize USB.

USB CDC Serial COM Port Emulation utilizes existing device drivers found in most OSs, including Windows.

It does NOT require any special libraries or APIs, as it emulates a Serial COM Port, just write and read the device as if it were a RS-232/UART Serial Device.

Allows the legacy applications which support serial devices, like MATLAB, Mathematica, etc to write and read the USB CDC device directly.

Most manufactures of microcontrollers which offer the USB interface, support CDC Serial COM Port Emulation, including, Microchip, NXP, TI, Atmel, etc.


API coding on the microcontroller side resembles that of simple UART coding, write, read, etc.

Microchip Example:

AN956 - Migrating Applications to USB from RS-232 UART with Minimal Impact on PC Software

Most microcontroller manufactures offer similar appnotes, APIs, etc.


BigDog
 

Implementing a USB Communications Device Class (CDC) Serial COM Port Emulation, is certainly one of simplest and straight forward ways to utilize USB.

Although I haven't actually done this myself, I have talked to several (good) programmers and they tell me it was rather difficult to get everything working. Since the main task here is to get the data from point A to point B, I would opt for the serial-to-USB convertor.
 

thank you everybody..i want to use pic microcontroller and mikroc compiler... and after sending data to pc and some processing i have to send it back to microcontroller..this is a two way communication..so what will be easier for me?
 

if i use USB adapter then will i have to use any application or software to receive data at pc?...can i directly use data for other processing in matlab?
 

Utilizing an FTDI FT232RL, FT232H or similar USB to Serial Bridge Chip:

Breakout Board for FT232RL USB to Serial

They can be found on eBay for less than $5 shipping included.

These device not only offer a virtual COM port to send data through the USB to a TTL UART, they also offer several TTL I/O lines which can be controlled by software on the PC.

They have been successfully used as programmers, USB to Serial converters, JTAG, etc.

The often require the installation of a specific driver, however once the driver is installed these devices typical appear as Virtual Serial COM Port and can be accessed as such by applications like MATLAB.

BigDog
 

If you just want to plot graph pf voltage and current then use excel + charting. Send your data through USB and write a VC# or VB.Net app to save the data as a .csv file. Later you can open this in excel and plot the values.
 

hello,

Simplest way is to use Bluetooth SPP link..
direct connection to your MCU in TTL level
BT dongle on the PC side with Virtual com port.
example: BlueSoleil
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top