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 CCS Technical Support

command set program architecture - recommendations

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








command set program architecture - recommendations
PostPosted: Tue Oct 14, 2008 3:15 pm     Reply with quote

Hello,

I've found some topics on this item, but nothing that has been conclusive. I am working on a new project which will buffer commands from the serial lines and control the code accordingly.

Most of my projects in the past have been pretty basic and run in one large loop just checking for flags. I'm not sure if I want to this on this project, as it will probably be a little more complex.

I'm wondering if any of you can recommend some good books that cover the software architecture methods that address some of these things. A book that uses CCS would obviously be the best, but most importantly the architectures, when to use them and when not to.

Thanks for the help
newguy



Joined: 24 Jun 2004
Posts: 1908

View user's profile Send private message

PostPosted: Tue Oct 14, 2008 4:51 pm     Reply with quote

If I understand your problem, there's no reason to change your tried & true "loop & look for a flag to be set" methodology. Start by examining the EX_SISR.c and EX_STISR.c examples that come with the compiler.

I've coded a lot of interrupt-driven serial receive and transmit stuff, some of it VERY time critical, and I've never run into any limitations. I keep my ISRs very short - in the receive ISR I simply look for the end of a complete incoming message, then I set a flag. My main() routine just looks for that flag to be set, then proceeds with an in-depth analysis of what just came in.

Is that what you're after?
fvnktion



Joined: 27 Jun 2006
Posts: 39

View user's profile Send private message

PostPosted: Wed Oct 15, 2008 8:20 am     Reply with quote

Thanks for the info newguy. Yes that is quite helpful.

Further I'm curious what some of your favorite documented resources might be? Books and so forth. I don't feel like I have a good set of hard resources for much of the stuff that I run into. I think it would be great to hear from some of you experts as to what are your favorite resources.

It seems like so many of the question that are asked can be resolved by some of these.

Thanks
newguy



Joined: 24 Jun 2004
Posts: 1908

View user's profile Send private message

PostPosted: Wed Oct 15, 2008 8:56 am     Reply with quote

The best book I've ever read that covers the CCS compiler with some practical coding examples is Embedded C Programming and the Microchip PIC by Barnett, Cox and O'Cull. It's well worth having on your shelf.
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