CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Creating an Excel file
Goto page 1, 2  Next
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
pctprogrammer



Joined: 04 Aug 2004
Posts: 6

View user's profile Send private message

Creating an Excel file
PostPosted: Wed Aug 04, 2004 3:04 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Wed Aug 04, 2004 3:31 pm     Reply with quote

You keep referring to "CCP" software.

Are you using the CCS compiler ?
pctprogrammer



Joined: 04 Aug 2004
Posts: 6

View user's profile Send private message

My bad....
PostPosted: Wed Aug 04, 2004 6:16 pm     Reply with quote

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

View user's profile Send private message Send e-mail

PostPosted: Wed Aug 04, 2004 6:58 pm     Reply with quote

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







PostPosted: Wed Aug 04, 2004 6:58 pm     Reply with quote

I too was bewildered by your use of "CCP" and to top it off, how to port your files to Excel. Shocked

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

View user's profile Send private message Send e-mail Yahoo Messenger

PostPosted: Wed Aug 04, 2004 7:03 pm     Reply with quote

(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! Shocked
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Wed Aug 04, 2004 7:09 pm     Reply with quote

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 Wink I think the VB app graphed the data.
pctprogrammer



Joined: 04 Aug 2004
Posts: 6

View user's profile Send private message

Graphing data....
PostPosted: Thu Aug 05, 2004 5:24 am     Reply with quote

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







PostPosted: Thu Aug 05, 2004 5:48 am     Reply with quote

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

View user's profile Send private message Send e-mail

PostPosted: Thu Aug 05, 2004 5:53 am     Reply with quote

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

View user's profile Send private message

Yea....
PostPosted: Thu Aug 05, 2004 7:30 am     Reply with quote

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







PostPosted: Sat Aug 07, 2004 12:31 pm     Reply with quote

Have a look at http://www.control.com/1026194409/index_html
There is some info on how to use Excell to do the job you want.
Rudie
Guest







PostPosted: Sat Aug 07, 2004 12:51 pm     Reply with quote

Here is more information on the serial port, windows and Excel
http://www.thescarms.com/vbasic/CommIO.asp
J.I.L.
Peter273
Guest







PostPosted: Thu Sep 06, 2007 2:02 pm     Reply with quote

Used CommIO, incorporated it this week in a fairly basic terminal upto now. Took me 2 days to get this far already. Razz
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!)

View user's profile Send private message

sending PIC data to directly Excel
PostPosted: Thu Sep 06, 2007 5:12 pm     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group