View previous topic :: View next topic |
Author |
Message |
Rob_975
Joined: 14 Aug 2012 Posts: 16
|
Learning about PICs and CCS together. |
Posted: Wed Oct 31, 2012 1:56 am |
|
|
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: 1934 Location: Norman, OK
|
|
|
asmboy
Joined: 20 Nov 2007 Posts: 2128 Location: albany ny
|
|
Posted: Wed Oct 31, 2012 7:16 am |
|
|
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
|
|
Posted: Wed Oct 31, 2012 12:08 pm |
|
|
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
|
|
Posted: Wed Oct 31, 2012 6:15 pm |
|
|
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
|
|
Posted: Thu Nov 01, 2012 11:57 am |
|
|
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
|
|
Posted: Thu Nov 01, 2012 12:04 pm |
|
|
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: 1909
|
|
Posted: Thu Nov 01, 2012 12:57 pm |
|
|
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
|
|
Posted: Thu Nov 01, 2012 3:30 pm |
|
|
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: 1934 Location: Norman, OK
|
|
Posted: Thu Nov 01, 2012 3:42 pm |
|
|
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
|
|
Posted: Fri Nov 02, 2012 1:01 am |
|
|
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
|
|
Posted: Fri Nov 02, 2012 9:53 am |
|
|
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: 19537
|
|
Posted: Fri Nov 02, 2012 10:20 am |
|
|
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 |
|
|
|