dsPIC33FJ32GP302 Configuration Bits

Oct 30, 2010 4 Replies

Hi,



I am trying to program a dsPIC33FJ32GP302 chip with the Pickit 2 programmer and using MPLAB C30 (This chip supports the Pickit 2 as illustrated by the green light on the "select device" window).


I managed to put the chip on a board and connected it to the pickit 2. I built a project in MPLAB and the programmer sends power to the target as expected and it recognizes it.


I imported the header and linker files for this particular target just in case. Now it's time to write the main.c program. This is what I need assistance with.


I need help setting up the initial configuration bits for this device. My goal is to generate a PWM Signal from a single output. That's all I need. I might need help with the code as well.


Can anyone point me in the right direction? I need some help starting this.


Thank you so much!



--------------------------------------- Posted through

formatting link


By the way here is a schematic of my setup

formatting link

--------------------------------------- Posted through

formatting link

formatting link

Simon, grab on of the microchip sample / example programs and start with that. Cut it right back so it does nothing more than say sit in a loop toggling a pin. Move forward from there.

er

e
I

s.

Try the Microchip forums. You will get plenty of help there.

Leon

programmer

the

I

this.

Hi,

What about the config bits? You dont know the syntax? Check the datasheet(Page 299). If there is a problem in downloading the hex file, do it from MPLab, i too had this problem that whenever i downloaded the code using the PICKIT2 downloader it didnt used to write the configuration bits properly.

--------------------------------------- Posted through

formatting link

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required