dsPIC33FJ32GP302 Configuration Bits

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

Reply to
embcontrol
Loading thread data ...

By the way here is a schematic of my setup

formatting link

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

formatting link

Reply to
embcontrol

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.

Reply to
Dennis

er

e
I

s.

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

Leon

Reply to
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

Reply to
guyelectronics

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.