Programming PICs in C: Resource Guide

  • Thread starter Jammin_James
  • Start date
  • Tags
    Programming
In summary, the conversation discusses the challenges of learning assembly language for a PIC16F690 microcontroller and the desire to use C instead. The person asks for recommendations for free resources for programming PICs in C or assembly language, and someone suggests downloading necessary software from the Microchip website. They also recommend purchasing a programmer and mention a specific compiler for PIC 16F chips. The conversation then veers to discussing in-circuit programming and a question about inverting matrices in microC software for a DSPIC. Finally, someone mentions that Atmel chips may be easier to program in assembly due to the number of freely usable registers, while the PIC 16 series may only have one general purpose register.
  • #1
Jammin_James
49
0
Hey all!

So I recently purchased a PIC16F690 for a project and I've been trying to learn the assembly language for it and it's turning into a somewhat daunting task. I've programmed in assembly before but it was with an ATMEL chip. This was about two years ago, so everything is kinda fuzzy. I've decided to try to apply what I've learned in C to this project now, since I assume it's a more general language I can use in any microcontroller project.

Is there a good, free resource I can look at to get started programming PICs in C? Maybe even a good resource of programming PICs in their assembly language.

Thanks guys!
 
Engineering news on Phys.org
  • #2
Go to the Microchip web-site and download everything you need. You will need to purchase a programmer. A PicKit isn't too expensive.
 
  • #3
I don't remember why but I settled on CC5X http://www.bknd.com/cc5x/ for the PIC 16F's.
Free for the basic version and seems to work fine. Microchip may have something better for the 16's -- I use their free 18F compiler -- but I ignored it.

If you are doing in-circuit programming see Microchip's PICkit's or look at sparkfun.com for some other options ICSP and not.
 
  • #4
Hi all.
Iam trying to write extended kalman filter algorithm in microC (dspic) software.
My question is how to invert a matrix in that software? I have read the manual but could'nt find any command for matrix inversion.pls check out the attachment.
can anyone help me out...!
thanks in advance.
 
  • #5
Hmm this is vaguely on topic but I remember the Atmel chips were easier to program in asm because of the number of registers which were freely usable.

Do the PIC 16 series only have 1 general purpose register?
 

1. What is a PIC and why is it used for programming?

A PIC, or Programmable Integrated Circuit, is a type of microcontroller commonly used in embedded systems. It is used for programming because it is a small and cost-effective solution for controlling simple electronic devices.

2. What is the difference between programming a PIC in C compared to other languages?

The main difference is that C is a low-level language, meaning it is closer to the machine code and allows for more direct control over the hardware. This makes it a popular choice for programming PICs since they are often used for controlling hardware devices.

3. Do I need any special software or tools to program a PIC in C?

Yes, you will need a text editor to write your code and a C compiler specifically designed for PICs. Some popular options include MPLAB X IDE and CCS C Compiler.

4. Can I use C++ instead of C to program a PIC?

Yes, some C++ compilers are specifically designed for PICs and can be used for programming. However, keep in mind that C++ is a higher-level language compared to C, so it may not provide as much direct control over the hardware.

5. Are there any online resources or tutorials available for learning how to program PICs in C?

Yes, there are many online resources and tutorials available for learning how to program PICs in C. Some popular options include Microchip's website, which offers tutorials and sample codes, and various YouTube channels with instructional videos.

Similar threads

  • Electrical Engineering
Replies
5
Views
2K
  • Electrical Engineering
Replies
4
Views
5K
  • Electrical Engineering
Replies
10
Views
2K
  • Programming and Computer Science
Replies
1
Views
2K
  • Electrical Engineering
Replies
5
Views
2K
  • Electrical Engineering
Replies
2
Views
1K
Replies
40
Views
2K
Replies
1
Views
2K
  • Electrical Engineering
Replies
6
Views
1K
  • Electrical Engineering
Replies
1
Views
5K
Back
Top