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
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I had a Microsoft Technical interview this past Friday, the question I was asked was this : How do you find the middle value for a dataset that is too big to fit in RAM? I was not able to figure this out during the interview, but I have been look in this all weekend and I read something online that said it can be done at O(N) using something called the counting sort histogram algorithm ( I did not learn that in my advanced data structures and algorithms class). I have watched some youtube...

Similar threads

Back
Top