Learning Programming: MicroChip, MPLABS X IDE, etc.

  • Thread starter Thread starter KonaGorrila
  • Start date Start date
  • Tags Tags
    Programming
AI Thread Summary
A recent physics graduate is seeking guidance on self-teaching programming for microcontrollers using the Microchip platform, specifically the PIC18LF25K42. With minimal programming experience primarily in MATLAB and a solid background in electronics, the individual is struggling with the C language and file management for programming. Recommendations include starting with C to grasp low-level programming concepts, understanding the Microchip instruction set, and familiarizing oneself with the processor's documentation. Utilizing ordinary text editors for file creation and exploring online resources for existing projects can also aid in learning. The importance of mastering the layout of the CPU and its register set is emphasized for effective programming.
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!
 
Technology 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 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 ChrisVer, Curiose and QuantumQuest
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.

Similar threads

Back
Top