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.

microcontroller interface with PC !!!

Status
Not open for further replies.

dahroug

Member level 2
Member level 2
Joined
Mar 20, 2010
Messages
48
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,541
How to build a hardware to display signal of Flow sensor by microcontroller in PC?
Is the best interface method serial or parallel or USB?
How can we make an XLS file of sampled signal values to be displayed by matlab ?
 

Hi,
You can use USB HID and there are examples for nearly all microcontrollers,but i don't know about Matlab.
 

Is the best interface method serial or parallel or USB?
Easiest method is serial, quickest is USB. What is your sample rate?

How can we make an XLS file of sampled signal values to be displayed by matlab ?
You can copy data from serial terminal to txt file and convert txt to xls file
 

about 20 sample per second

---------- Post added at 08:21 ---------- Previous post was at 08:16 ----------

Easiest method is serial, quickest is USB. What is your sample rate?


You can copy data from serial terminal to txt file and convert txt to xls file

PLz i need more details about how to make this text file.
 

PLz i need more details about how to make this text file.
You must create a MCU system which converts Flow sensor signal to serial port byte stream.
For example, **broken link removed** can digitize six analog inputs and transmit data to computer over RS-232 serial protocol.
 

ok that is very good.
i am using PIC with its internal ADC, but what is the function of these components ADM232AARM and RS232 and ISP ??
and thank you so much
 

thanks a lot it is very good details
do u think that i can use serial-USB converter to connect to computers which hav't serial port?
Is this suitable configuration?

finally ,which is responsible for sampling Matlab or Mikroc
 

Yes. I also use the usb-to-serial cable, and it works well. You may set the same baud rate for the PC and MCU.
 

How can I set the baud rate?


and thanks you so much for your help
 

How wonderful you are thanks so so much
but now i need more details about a small point; How can I copy data from serial terminal to txt file?
 

Why write it to a file, unless you want to log the data for later use. You first have to retrieve the data from the serial port using Matlab's fscanf (serial) command. You can load the data in to an array, process, and finally log it into a file using Matlab's **broken link removed** commands. There are plenty of examples and syntax guides on the site provided.

Good Luck
 

ok,but i think it is more easy to capture values into a XLS file and plot it by matlab than ploting at real time .or what do u think?
 

Either way. But at 20 samples a second, in one minute you'll have plenty of data to graph! I always try and automate things as much as possible. However, like you mentioned, you can write the data to a file when you collect enough data points to satisfy your requirements you have your Matlab program plot the data. It's have a dozen, one or the other.

Good Luck with your project.
 

thanks a lot .Could you post me circuit diagram for this project?
Is buffer needed???
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top