PDA

View Full Version : Making a .txt from a PIC Microcontroller? (Melanie may help)



hawk72500
- 6th October 2005, 01:52
I use a PIC16F876 to drive a DC motor with PWM.For sending the commands i have a Serial RS-232 connection of my PIC with my computer.If the PIC can compute the Torque and the rpm that motor spins how can i send the back to computer the values and save them to my computer as a text?

e.g in form of

0.000 12.00
1.200 15.00
2.300 5.00

For MELANIE: Melanie once during a discussion inthis forum you referred to something like sending back values from pIC nad making them an Excel file.Can you send me a code or whatever might help me

Thanks very much in advance either if you reply or not

rhino
- 6th October 2005, 04:19
Setup a data packet with the values you want to log, and send them back to the PC over the serial line. Use the PC application to retrieve the data and store it however you need. You will more than likely have to develop a protocol so you can send commands to move the motor or commands to gather the data from the PIC. Sounds like you have half of the work already done. I'm assuming you wrote the PC interface with the PIC. Bruce... no need to pay for advertising... yet another free plug! HERE'S (http://www.rentron.com/VisualBasic.htm) an example of what you could do. Get to know Bruce's site (if you haven't already), there's tons of examples to learn from there. Hope I've helped... Good luck!