Re: [PIC] Learning C
Spehro Pefhany <[email protected]>
| Newsgroups | gmane.comp.hardware.microcontrollers.pic |
|---|---|
| Message-ID | <[email protected]> |
At 01:29 PM 2024-11-10, you wrote: >Although I enjoy programming in Assembler, the fact that so many libraries >abd code examples are in C I think that the time has come for me to learn >that language. > >Any advice on how to do that would be welcomed, be it a book or online >resources. >I am a competent programmer having programmed in with Forth, Fortran. >\Pascal, Visual basic >__________________________________________ I don't think learning C will (necessarily) be the biggest challenge, depending on the kind (and size/complexity) of projects you've worked on and in what kind of development environment. C is a pretty simple language, and not radically different from those other languages, with just a few gotchas. Learning by doing smallish projects is perfectly feasible. It works nicely on modern 32-bit ARM, ESP and RISC-V targets, some of which are incredibly inexpensive. I would not bother with less MCU than those unless you have a strong reason to do so. For me the challenges using large common libraries such as lwip, lvgl and so on are more about getting things to compile and work together, using Cmake and such like. Fortunately, AI helped moi avoid spending too much time reading a 500+ page book on the latter, and still have some hair left. 8-( Some popular processors also have ugly memory models that need attention just when you think you've escaped the resource-starved environment of 8-bit and 16-bit processors. I would say though that knowing C (and, particularly, Python) is almost essential these days. Rust seems very interesting too but I've not 'bit the bullet' in that department. Best regards, Spehro Pefhany