Learning Programming: MicroChip, MPLABS X IDE, etc.

  • Context:
  • Thread starter Thread starter KonaGorrila
  • Start date Start date
  • Tags Tags
    Programming
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
4 replies · 1K views
KonaGorrila
Messages
12
Reaction score
0
Aloha guys,

I am a recently graduated physics major going on my next adventure in education. I am trying to teach my self programming through the Micro Chip platform, lucky I have a large learning curve working for my family business.
I was wondering if anyone had insight or any suggestions on the best way to go about teaching myself the layout and the how to on programming micro controllers?
(Classes, books, websites, help chats, etc.)

Mahalo for all the help in advanced you guys always give great advice!
 
Physics news on Phys.org
What is your current level of programming? For instance, do you know how to do hex->dec conversion and vice versa? Do you know about memory addresses, pointers, and the like?

Do you also have experience with analog electronics?
 
  • Like
Likes   Reactions: KonaGorrila
Curiose said:
What is your current level of programming? For instance, do you know how to do hex->dec conversion and vice versa? Do you know about memory addresses, pointers, and the like?

Do you also have experience with analog electronics?
I have very minimal programming knowledge and I am only medium/sufficient MATLAB due to my academic career (Physics/Math/Chem). I do have a good understanding of how the electronics work and have diagnosed and built electronics since I was 15, but have no prior knowledge in embedded C language, C, or C++ and minimal knowledge or at least minimal experience with hexidecimal and boolean algebra.
The platform and Software I am currently using is MPLAB X IDE, ICD3, Explorer 8 development board, PIC18LF25K42. I am programming or at least trying to learn to exploit the PICs touch sensing capabilities via the ADC.
So far I have gotten quite familiar with the inter working of the pic from a physical stand point and feel I am struggling mainly with the language itself, or how to build and write files for import to the PICs .h and .c files.
 
KonaGorrila said:
I have very minimal programming knowledge and I am only medium/sufficient MATLAB due to my academic career (Physics/Math/Chem). I do have a good understanding of how the electronics work and have diagnosed and built electronics since I was 15, but have no prior knowledge in embedded C language, C, or C++ and minimal knowledge or at least minimal experience with hexidecimal and boolean algebra.
The minimal programming background you describe doesn't go far in helping you learn very low-level programming. My recommendation would be to study C first before attempting to program at the register level where assembly languages operate. Matlab is a much higher-level language than C, so it doesn't expose the low-level functionality like bit shifting and bitwise operations that C does.

KonaGorrila said:
So far I have gotten quite familiar with the inter working of the pic from a physical stand point and feel I am struggling mainly with the language itself, or how to build and write files for import to the PICs .h and .c files.
Writing files can probably be done using an ordinary text editor, such as Notepad or the like. Getting some experience with C, as I recommend above, would help you understand what code should go in a .c file and what should go in a header (.h) file. The term "build" usually means "compile and link," but doesn't usually mean the process of actually creating the code files.

As for struggling with the language, you need to become familiar with the Microchip instruction set, the set of commands (instructions) that are available for the processor you're attempting to learn about. To do this, get very familiar with the documentation that Microchip publishes. You also need to know the layout of the CPU, particularly the register set (or register file). Here's a link to a PDF on this processor -- http://ww1.microchip.com/downloads/en/DeviceDoc/31029a.pdf.

You can also do web searches for projects people have done using Microchip processors. Presumably they will include their code, so you can get a chance to see and study some complete applications to help you learn.
 
  • Like
Likes   Reactions: ChrisVer, Curiose and QuantumQuest