Jump to content


Submitter

File Information

  • Submitted: Jul 14 2011 02:24 AM
  • Last Updated: Jul 14 2011 02:24 AM
  • File Size: 1.55KB
  • Views: 13401
  • Downloads: 3,572
  • Approved by: Nathan House
  • Approved on: 14 July 2011 - 02:25 AM

Download dsPIC30F4011 - Motor Control PWM (MCPWM)

- - - - -



Very basic: Configures the dsPIC30F Motor Control PWM Module. (Read the tutorial).




Hello everyone ,
I m working on my senior project and I m in real need for help with programming dspic30f4011. I need to know how do I write a code for capturing volatge ands current from battery of 12 V.

I have already deisgn the circuitry to sense battery voltage and Current

My circuit has 2 output sugnals (current and voltage) which connect to the ADC channels of DSPIC ..

I also need to set the duty cycle and the output should be at PWM port of DSPIC which inturn is connected to the Mosfet gate driver..

If any one has feed backs or sample code to start with I would highly appreciate the effort ..

Thank You
An engineer in Need !!!
    • 0
  • Report
Hi robotics guy,

I tried to debug and simulate your code of MCPWM for dsPIC30F4011 in MPLAB-X. But the PTMR register is not at all incrementing and PWM pins in logic analyzer also not showing any PWM signals.

please help me how to debug your code.
    • 0
  • Report
Hi Balaji,

I would guess this is an issue with the microcontroller configuration. Note that this code was written for use with an external 10MHz oscillator; do you have an external 10MHz oscillator connected to your dsPIC30F4011? If not, try adjusting any necessary configuration bits under "Configure Fuses" and also make changes in the "Oscillator Calculations" section.

I would also try doing something basic like blinking an LED to make sure the configuration is correct.

Let me know what happens!
    • 0
  • Report
Hi Robotics Guy,

I tried with LED blinking program, i guess the configuration settings are correct because that code works fine. I dont know where is the problem. please help me.
    • 0
  • Report



3 user(s) are online (in the past 15 minutes)

0 members, 3 guests, 0 anonymous users