kuistocke
Posts: 12
Joined: Sun Feb 14, 2021 2:51 pm

Recommended PIC programming books?

Tue May 04, 2021 1:58 am

I'm wondering if anyone has any book recommendations for PIC microcontroller programming that may be helpful in (c) programming with RP2040 based boards? Specifically on issues related to timing. I'm trying how to grasp running multiple types of work in a timer (like doing blink with a set sleep in seconds, while also powering a 7 segment led display which requires multiplexing.)

User avatar
rpdom
Posts: 18867
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Recommended PIC programming books?

Tue May 04, 2021 6:36 am

Are you planning to use a PIC microcontroller with your Pico or other RP2040 board?

If not, then a book on PIC programming won't be useful. The whole design and control of the chips is very different.
Unreadable squiggle

fdufnews
Posts: 343
Joined: Fri Oct 07, 2011 5:37 pm

Re: Recommended PIC programming books?

Tue May 04, 2021 7:28 am

I'm wondering if anyone has any book recommendations for PIC microcontroller programming
Do you mean PIC or PICO?

kuistocke
Posts: 12
Joined: Sun Feb 14, 2021 2:51 pm

Re: Recommended PIC programming books?

Tue May 04, 2021 12:33 pm

rpdom wrote:
Tue May 04, 2021 6:36 am
Are you planning to use a PIC microcontroller with your Pico or other RP2040 board?

If not, then a book on PIC programming won't be useful. The whole design and control of the chips is very different.
I think I'm looking for books that are about embedded programming, something more general that can be applied to embedded systems.

dbrion06
Posts: 510
Joined: Tue May 28, 2019 11:57 am

Re: Recommended PIC programming books?

Wed May 12, 2021 7:29 am

Well, (I bet there are typos in your topic title), picoPi already has some good documenentation, links can be found in the sticky part of this forum, or, when you plug a picopi card into a RPi (I tested) or a PC, in the file manager which automagically opens.

If you want a good book about emebdded programming, I read Geoffrey Brown "discovering the STM32 controller" book:
https://legacy.cs.indiana.edu/~geobrown/book.pdf
. Its audience is CS students (one must be at least able to understand a C program); some parts are outdated (how to configure gdb and linker, graphical screen is difficult to wire and to find -newer ones suchch as SSD1306 are simpler) ) and processor specific, but many notions are explained in detail (DMA, I2C/TWI, SPI, UART, ring buffers : all these parts are ... wikipedia keywords : if you want to have different explanations, wikipedia has made huge efforts in computer science and electronics -among other topics-).

I assumed you know and are interested in C/C++: RPipico SDK has everything you need to start with (maybe you need a cmake tutorial, too, to unederstand how it works).
If you are interested in Python, micropython has good documentation, too (and there are tons of books for non embedded python: maybe, within 10 years, difference between embeded and classical will fade)

User avatar
DougieLawson
Posts: 41441
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Recommended PIC programming books?

Wed May 12, 2021 8:53 am

kuistocke wrote:
Tue May 04, 2021 12:33 pm
rpdom wrote:
Tue May 04, 2021 6:36 am
Are you planning to use a PIC microcontroller with your Pico or other RP2040 board?

If not, then a book on PIC programming won't be useful. The whole design and control of the chips is very different.
I think I'm looking for books that are about embedded programming, something more general that can be applied to embedded systems.
You're wrong. The two are heterogenous. Programming a PIC has very little that overlaps with programming a Pico (other than the basics of C/C++).

You'd be much better looking for books on Arduinos (ATMEL 328P) as there is good support for the Raspberry Pico (RP2040) as part of the Arduino empire and infrastructure. https://blog.arduino.cc/2021/04/27/ardu ... 40-boards/
Any language using left-hand whitespace for syntax is ridiculous

Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.

Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

dbrion06
Posts: 510
Joined: Tue May 28, 2019 11:57 am

Re: Recommended PIC programming books?

Wed May 12, 2021 12:36 pm

You're wrong.
Maybe. Or OP made a typ/typo
The two are heterogenous. Programming a PIC has very little that overlaps with programming a Pico (other than the basics of C/C++).
I agree to some extent. in the free world, only sdcc (can be installed from packages) can generate code for some microdevice PICs -else, one has to buy a SDK-
And there is **no** sdccplus, AFAIK (arduino's c++ has no standard c++ library, though there is an avr-c++ compiler: this not the best way of teaching oneself C++)
You'd be much better looking for books on Arduinos (ATMEL 328P) as there is good support for the Raspberry Pico (RP2040) as part of the Arduino empire and infrastructure. https://blog.arduino.cc/2021/04/27/ardu ... 40-boards/]
I would wait for good support for RP2040 in the Arduino world: I tried to compile the example "blink without delay" in the Arduino world for RP2040: it generated code for I2C, SPI, .... which did not seem useful -then, it worked: but biany seemed huge-. I tried the same thing with RPI SDK... Both code worked, but the second was shorter (it is important in the embedded world, IMO)

Are there good books for Arduino? The question seems stupid, but, as Arduino is popular, many bad books can exist (to make a little money, one copies examples from Arduino IDE -some are excellent. RP2040 examples are excellent, too- and sometimes add bugs and typos.
I decided to boycott ENI -a friech book publisher: books are not proof checked...-
ex: https://www.framboise314.fr/deux-livres ... advertises fror twobooks.
In the very fist line of the 1 st book, I see:
int capteurHumidite = A0;
I would have written it
const int capteurHumidité = A0; // const protects against typos and wild ideas : there is no need to have it varying.

Other lines are flawed, too.
No one can be intersted in a book with unsure code (arduino examples are safe!AFAIK: why downgrade good work?): a beginner will get bad habits, without being aware of it (and compiler cannot check any bad practices). A experiences student will be aware -s-he has wasted money..
This I have found a BAD arduino book -thanx heaven, it is in French: hope it wonot be translated.

Is there a GOOD Arduino book ?

(Hackable Magazine made a special issue about Arduino, which was excellemnt. Alas:
it is in French
they forget to make a pdf out of it and the paper version were all sold)

Return to “SDK”