View previous topic :: View next topic |
Author |
Message |
pctprogrammer
Joined: 04 Aug 2004 Posts: 6
|
Creating an Excel file |
Posted: Wed Aug 04, 2004 3:04 pm |
|
|
Question: Is there any way that I am able to use the CCP software to write an array of values to a file that is usuable for of lets say....Excel?(*.txt file) This can be done using Visal C++ but is tehre a way to do it using this software?
Thanks. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Wed Aug 04, 2004 3:31 pm |
|
|
You keep referring to "CCP" software.
Are you using the CCS compiler ? |
|
|
pctprogrammer
Joined: 04 Aug 2004 Posts: 6
|
My bad.... |
Posted: Wed Aug 04, 2004 6:16 pm |
|
|
Yes, I am using the CCS C complier. For some reason I had the letters CCP in my head...sorry..... |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Wed Aug 04, 2004 6:58 pm |
|
|
You are aware that the code runs in one of those tiny little black chips called a PIC. Right? How are you planning on putting that in a file and how are you planning to get in out of the chip?
Or
Do you mean that you want to communicate between the PIC and a Computer to stream data and have the Computer generate the file?
I hope the ladder, it is much simpler and you should take a look at RS232 communication. |
|
|
valemike Guest
|
|
Posted: Wed Aug 04, 2004 6:58 pm |
|
|
I too was bewildered by your use of "CCP" and to top it off, how to port your files to Excel.
I don't see how you can port your output to Excel. Unless your using Borland or Visual C/C++, you can save values to a file in your Windows application, but I don't see how a PIC is even suitable for any of that. Heck, you need an OS/RTOS which has a file system to be able to save to a "file".
The closest thing I can think of is for your PIC to do a bunch of printf()'s to Hyperterminal via RS232, you save your Hyperterminal dump, and then you port that to Excel. Is that your goal? |
|
|
MikeValencia
Joined: 04 Aug 2004 Posts: 238 Location: Chicago
|
|
Posted: Wed Aug 04, 2004 7:03 pm |
|
|
(I figure i'll make a username so i stop showing up as "Guest" "valemike" since i forgot my password to that username as well as the email address associated with that username)
Wow, at 6:58pm, Mark and I were thinking of the exact same thing: "How do you save a file on a PIC??? Are you really thinking of how to stream it to RS232?"
What a coincidence - two overlapping afterhours posts thinking the exact same thing! |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Wed Aug 04, 2004 7:09 pm |
|
|
You know, he could hook up a HDD or SD or MMC storage media and actually write a file with the PIC. I just think it is a bit much for a newbie. If I were doing it, I would write a VB app to talk to a PIC. The VB app would then create a Access database or Excel worksheet. Wait, I already did this I think the VB app graphed the data. |
|
|
pctprogrammer
Joined: 04 Aug 2004 Posts: 6
|
Graphing data.... |
Posted: Thu Aug 05, 2004 5:24 am |
|
|
First of all, I am only a newbie with this particular software, not with programming and microcontrollers. I know how to do this application with other software/hardware combinations. What I am creating is a network of PIC's that are storing values. I then want to combine these into 2 arrays of data (Ive done that) and send it over the RS-232 line. This is where my question comes in. Is there a way I can use the CCS software to setup a file on the computer or will I need some other software on the other end of the line? Once I have that file I am golden, but I need to have a way to save the data I am writing. Just sending it to the serial port window is not enough......
Thanks |
|
|
Sherpa Doug Guest
|
|
Posted: Thu Aug 05, 2004 5:48 am |
|
|
Code compiled with CCS wont run on a PC. Are you running Excel on a PC or trying to run it on a PIC?
You could use any terminal program on a PC such as Procomm to capture ascii text from a serial port to a file, then import the file to Excel. |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Thu Aug 05, 2004 5:53 am |
|
|
For a non newbie with programming and microcontrollers, you should realize that the CCS software is a C compiler for the Microchip PIC and not you PC. You will need to write and application in VB, VC, Delphi or something to get the data. Now you could make the PIC send the data formated to a terminal program and do a capture to file to get the data. |
|
|
pctprogrammer
Joined: 04 Aug 2004 Posts: 6
|
Yea.... |
Posted: Thu Aug 05, 2004 7:30 am |
|
|
Thanks guys,
Thats what I figured I would have to do. The problem was created because I do not have any of this software avaiable for me at work unlike I do at home and I was wondering if there was a way to program this in the CCS C language and compiling system. I am not tryin to run Excel on the PIC for all those who think I am. I am using 3 PICs in series and to put it into technical terms "I want to capture the ascii data coming from the serial port and store that into a file that Excel can read." Thanks and anyone with any other suggestions tehy are welcome because I have 1 wk to get this done.....and limited to what software I am able to use for this application....... |
|
|
Guest Guest
|
|
|
Rudie Guest
|
|
|
Peter273 Guest
|
|
Posted: Thu Sep 06, 2007 2:02 pm |
|
|
Used CommIO, incorporated it this week in a fairly basic terminal upto now. Took me 2 days to get this far already.
From here on I can try "interpreting" the pic replies, and create me some buttons in excel sending the necessary commands to the pic for presets, returning of captured data and exchange of operational values.
CommIO really works, it's just some figuring out what does exactly what in the VB code and building in interface layer above it. |
|
|
PicFan
Joined: 01 Jan 2004 Posts: 11 Location: Indianapolis (Go Colts!)
|
sending PIC data to directly Excel |
Posted: Thu Sep 06, 2007 5:12 pm |
|
|
pctprogrammer,
I think what you want to do can be accomplished by a freebie download from Parallax. In the past they had a freely available software product called Stamp-DAQ that would store 12 data columns in Excel and it worked great. They now they have PLX-DAQ (free download) that will save up to 26 columns of data.
This product provides you a lightweight serial protocol for your micro that will directly populate an Excel Spreadsheet with your data. Very handy...
URL: http://www.parallax.com/html_pages/downloads/software/software_plxdaq.asp
Best Regards,
PicFan |
|
|
|