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

Specifics for making a directory and files

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
lecutus



Joined: 12 Aug 2009
Posts: 40

View user's profile Send private message

Specifics for making a directory and files
PostPosted: Fri Aug 21, 2009 9:10 am     Reply with quote

Hello to all,

To save everybody a little trouble. I'm asking this rookie question as to spare me from beating my head against the wall.

The question: what are the specifics for making a directory and accompanying files in this particular form of C. I just need a tutorial or website to go to, I can figure out the rest.

I'm trying to diagnose a problem and I need to follow the printf's within in the context of how info is being passed and processed.

I'm using Pcwhd 4.079, pic18f258.

Thanks
L.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Aug 21, 2009 10:39 am     Reply with quote

Always post a description of your project when you ask a question like
this. If you're writing to an SD card, then say it in your post. Also
post the file system that you want to use (FAT16, FAT32, etc.). We
don't remember what your project is about, between different threads.
lecutus



Joined: 12 Aug 2009
Posts: 40

View user's profile Send private message

Redefinition of the question
PostPosted: Fri Aug 21, 2009 12:30 pm     Reply with quote

The project is a frac control system that is to be computer based. It is to have a laptop or pc linked to the actual truck thats doing the pumping on site.

I'm hoping to write the printf's to the computer, the embedded chip is on the truck itself. The two are linked by rs232. I'm trying to diagnose the behaviours of the chip to the truck.

As to the file system fat32 might do. I trying to write from the pc18f258 on the truck across rs232 to the controlling computer. If that's even possible.

I'm hoping it is, I'm already getting some data through the controller program I have on the computer: its own diagnostic file. This file contains a lot other information besides the pc18f258 output.

I'd like to have something similar but just for the pc18f258.

There I hope thats enuff info. If not, I'll send more.

One other question, does the version of C used by CCS differ from standard C.

L.
asmboy



Joined: 20 Nov 2007
Posts: 2128
Location: albany ny

View user's profile Send private message AIM Address

PostPosted: Fri Aug 21, 2009 4:13 pm     Reply with quote

so there is already a PC in the picture ?
well then, let the PC do what it is good at:
there is a fine fully developed file system at your command in the PC already - fast, capacious and easy to use.

Open a file on the PC, using any old serial capture program.

Then catch whatever data you want stored in the PC file system.

Use whatever Printf format your heart desires. ( hint ASCII %G, %Lu , %u %c and so on etc)

when done dumping the data - close the file on the pc

you could even have a minimal C app running on the PC and use escape sequences in the serial stream, to cause file open/create and file closure - all remotely commanded by your PIC program

and with next to NO overhead in the PIC either.

am i making sense to you Sir Lectus ?
lecutus



Joined: 12 Aug 2009
Posts: 40

View user's profile Send private message

If I'm understanding correctly
PostPosted: Mon Aug 24, 2009 8:04 am     Reply with quote

If I'm understanding correctly. Just setup a file, use standard stdio.h, open, write, and close.

Now, I have a program already monitoring and controlling the truckunit/pic chip. So since the rs232 is already open, and being used in a two way fashion already, just pass another set of info, brilliant!

As to the serial capture program, what would you suggest Mr asmboy.

Thanx

L.
asmboy



Joined: 20 Nov 2007
Posts: 2128
Location: albany ny

View user's profile Send private message AIM Address

PostPosted: Mon Aug 24, 2009 9:28 am     Reply with quote

realterm - shareware - free to use

VERY flexible with a simple capture to file option

LOTS of config options

and works with EITHER physical 9 pin RS-232 ports if your PC has them

and virtual USB com ports alal edgeport / FTDI etc etc

type translation drivers

just google :
realterm download

and you are good to go
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
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