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

Learning about PICs and CCS together.

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



Joined: 14 Aug 2012
Posts: 16

View user's profile Send private message

Learning about PICs and CCS together.
PostPosted: Wed Oct 31, 2012 1:56 am     Reply with quote

Hello.

Don't know if I'm off topic in this forum but hopefully this thread will also help others.
I'm looking for a good book explaining the basics of the MCUs and programming with the CCS compiler.
The price is not a problem.
Any advices?
Thanks.
dyeatman



Joined: 06 Sep 2003
Posts: 1933
Location: Norman, OK

View user's profile Send private message

PostPosted: Wed Oct 31, 2012 6:07 am     Reply with quote

From the CCS website:
http://www.ccsinfo.com/content.php?page=books
_________________
Google and Forum Search are some of your best tools!!!!
asmboy



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

View user's profile Send private message AIM Address

PostPosted: Wed Oct 31, 2012 7:16 am     Reply with quote

Nigel Gardner book i found very good - back when.

warning:
Except for Easy C -( which is ULTRA SIMPLE and totally minimalist in what it teaches ) the Benson books are ALL .ASM focused and
are of no special use with CCS C that i can see with benefit of hindsight.
Those books were VERY helpful BEFORE i found CCS C, in my pure ASM days.
Mike Walne



Joined: 19 Feb 2004
Posts: 1785
Location: Boston Spa UK

View user's profile Send private message

PostPosted: Wed Oct 31, 2012 12:08 pm     Reply with quote

I don't usually disagree with asmboy, but I could not get on with Nigel Gardner's book.

It may have been re-written since, but I found it full of errors, took too long to get to the point of providing anything useful, and no index.

Just my opinion of course. You can have my copy for free.

Mike
asmboy



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

View user's profile Send private message AIM Address

PostPosted: Wed Oct 31, 2012 6:15 pm     Reply with quote

I guess i should have been more clear:

YES the errors were there- but i forgave them.
YET- The Gardener book is not bad for a VERY new C programmer as it is at least CCS specific, in a general way- and in ways that other C for MCU programming books are not at all.

I have not needed to refer to it in years - but it was helpful in making the ASM-> c transition.

The "EASY" series books were only minimally helpful in the days when i made the leap from 8086 ASM to MCU ASM.

I wish i knew of better books than these -
SO
what do others have to say about their educational texts??
Rob_975



Joined: 14 Aug 2012
Posts: 16

View user's profile Send private message

PostPosted: Thu Nov 01, 2012 11:57 am     Reply with quote

The best would be find a very good book with also advanced features of the PIC like timers, PWM, interrupts explained in depth.
I already know the basics of C but now the problem is the integration of it with the CCS compiler and its PIC specific functions.

The books at http://www.ccsinfo.com/content.php?page=books looks very basical stuff.
Mike Walne



Joined: 19 Feb 2004
Posts: 1785
Location: Boston Spa UK

View user's profile Send private message

PostPosted: Thu Nov 01, 2012 12:04 pm     Reply with quote

Why not simply use the examples which come with the CCS compiler, and play with them.

I.e. learn by experimenting and making mistakes.

The in-depth discussions are in the Microchip data sheets and reference manuals.

Mike
newguy



Joined: 24 Jun 2004
Posts: 1907

View user's profile Send private message

PostPosted: Thu Nov 01, 2012 12:57 pm     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.
gpsmikey



Joined: 16 Nov 2010
Posts: 588
Location: Kirkland, WA

View user's profile Send private message

PostPosted: Thu Nov 01, 2012 3:30 pm     Reply with quote

The bad news is that while it is 500 pages, Amazon shows it for $114 (but it does get good reviews).

mikey
_________________
mikey
-- you can't have too many gadgets or too much disk space !
old engineering saying: 1+1 = 3 for sufficiently large values of 1 or small values of 3
dyeatman



Joined: 06 Sep 2003
Posts: 1933
Location: Norman, OK

View user's profile Send private message

PostPosted: Thu Nov 01, 2012 3:42 pm     Reply with quote

Its only $30 for a Used-very good version including shipping. Very Good is usually like new...
_________________
Google and Forum Search are some of your best tools!!!!
bkamen



Joined: 07 Jan 2004
Posts: 1615
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Fri Nov 02, 2012 1:01 am     Reply with quote

Rob_975 wrote:
The best would be find a very good book with also advanced features of the PIC like timers, PWM, interrupts explained in depth.
I already know the basics of C but now the problem is the integration of it with the CCS compiler and its PIC specific functions.


Have you downloaded and read the datasheet for a device you'd like to use yet?

The problem with the deep level of what you're looking for is that WHOLE books have been dedicated to things like communications (RS232, RS422, RS485, TDM, Sync/Async).. So while the datasheet for the device will tell you reasonably well how it works, the datasheet is going to make the assumption you know about RS232 interfacing (or something similar) already.

So if you're looking for a book that explains in depth all the modules in a PIC, that could be a shelf of books.

Now, it's not anything that Wikipedia couldn't answer either and if you look on MCHP's website, they have a LOT of app notes (some with code examples worth a darn) and really good datasheets.

You can't learn about PIC's reading a programming manual alone.

You *MUST MUST MUST* get used to reading the datasheets and app-notes for the device you want to use. The datasheets alone are hundreds of pages. Hundreds!

I can't stress that enough. I read them, go do something else while the information absorbs, read again, absorb some more and so on.


-Ben
_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
gpsmikey



Joined: 16 Nov 2010
Posts: 588
Location: Kirkland, WA

View user's profile Send private message

PostPosted: Fri Nov 02, 2012 9:53 am     Reply with quote

Good point on the "used" version - I just ordered a copy for myself. Thanks for the pointers (so to speak).

I definitely agree with what others have said about needing to spend the time with the data sheets. I typically don't print out the whole data sheet, but I do print out the sections that are the areas I am working with (A/D etc) and typically mark them up with notes as I figure things out (some things are not "intuitively obvious" as they say and take a bit of reading and going back and forth to different sections/specs before it makes sense. There is no substitute though for spending the time with the data sheet (although they do have a few more pages than the old 7400 quad nand gate in my TI book !! ).

mikey
_________________
mikey
-- you can't have too many gadgets or too much disk space !
old engineering saying: 1+1 = 3 for sufficiently large values of 1 or small values of 3
Ttelmah



Joined: 11 Mar 2010
Posts: 19496

View user's profile Send private message

PostPosted: Fri Nov 02, 2012 10:20 am     Reply with quote

There are a whole sequence of things 'needed', to work with CCS:

1) A book if you are not already a C programmer, and details of some with a bit more 'CCS orientation' have already been given.
2) A copy of K&R. This really is the bible, and 99.5% of things in CCS follow the K&R syntax. Not an easy read, but use it as a reference.
3) The chip's data sheet.
4) The CCS manual.
5) The examples.
6) The .h file for the processor you are using.
7) fuses.txt, readme.txt in the compiler directory.
8) Then _play_ with a chip for real. Sequence, a 'flash LED' program, then a 'Hello world' application.
9) If you have particular problems, first use search, and look in the code library. Something in the order of 99.9% of likely problems have already been covered here.

Hopefully things then start to 'click'.

Best Wishes
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