• AVR Freaks

Hot!dsPIC33 programming

Author
rfjhh
Starting Member
  • Total Posts : 37
  • Reward points : 0
  • Joined: 2012/07/26 09:19:36
  • Location: 0
  • Status: offline
2018/10/20 18:31:45 (permalink)
0

dsPIC33 programming

Hi
 
I'm new in dsPIC33 programming (dsPIC33FJ32MC202). I use MPLAB C30 compiler and I have a lot of doubts (for instance, I can't perform a PORTA digital reading), but I don't find a user manual. Do you know how may I get one? Do you have code examples? I'll appreciate it.
#1

9 Replies Related Threads

    Bob White
    Super Member
    • Total Posts : 256
    • Reward points : 0
    • Joined: 2010/11/06 19:52:38
    • Location: Denver, Colorado
    • Status: offline
    Re: dsPIC33 programming 2018/10/20 22:07:28 (permalink)
    0
    Why are you using the obsolete C30?  XC16 is the current compiler for the 16 bit parts.
     
    https://www.microchip.com/mplab/compilers
     
     
    #2
    MBedder
    Circuit breaker
    • Total Posts : 6767
    • Reward points : 0
    • Joined: 2008/05/30 11:24:01
    • Location: Zelenograd, Russia
    • Status: offline
    Re: dsPIC33 programming 2018/10/21 01:04:50 (permalink)
    5 (1)
    rfjhhI don't find a user manual. Do you know how may I get one?
    I have a spare one. Can sell it to you with a great discount - only $9995.


    #3
    qhb
    Superb Member
    • Total Posts : 9998
    • Reward points : 0
    • Joined: 2016/06/05 14:55:32
    • Location: One step ahead...
    • Status: offline
    Re: dsPIC33 programming 2018/10/21 01:59:48 (permalink)
    0
    rfjhh
    I'm new in dsPIC33 programming (dsPIC33FJ32MC202). I use MPLAB C30 compiler and I have a lot of doubts (for instance, I can't perform a PORTA digital reading

    Why not?
    What did you try?
     
     
    but I don't find a user manual. Do you know how may I get one?

    You already asked this question here https://www.microchip.com/forums/m1071817.aspx
    and received several answers.
    You still have not answered the big question. WHY are you using an obsolete compiler when XC16 is a free download?
     

    Nearly there...
    #4
    rfjhh
    Starting Member
    • Total Posts : 37
    • Reward points : 0
    • Joined: 2012/07/26 09:19:36
    • Location: 0
    • Status: offline
    Re: dsPIC33 programming 2018/10/22 08:34:56 (permalink)
    0
    Hi qhb
     
    Yes, you're right, I already asked but the links shown, are not longer available. On the other hand, I've tried to download the XC compilers series and I've found they aren't for free, I've been asked for a license. I'll try to download it again.
     
    Thanks
    #5
    Aussie Susan
    Super Member
    • Total Posts : 3584
    • Reward points : 0
    • Joined: 2008/08/18 22:20:40
    • Location: Melbourne, Australia
    • Status: offline
    Re: dsPIC33 programming 2018/10/22 18:19:21 (permalink)
    4.75 (4)
    Just downloaded XC16 V1.35 and no hint of a license except the one I click on the  "Accept" radio button. I then select the "Free" version and off it goes.
    Susan
    #6
    rfjhh
    Starting Member
    • Total Posts : 37
    • Reward points : 0
    • Joined: 2012/07/26 09:19:36
    • Location: 0
    • Status: offline
    Re: dsPIC33 programming 2018/10/23 15:09:28 (permalink)
    0
    Susan
     
    Thanks for your advice, I downloaded the version 1.34 and, as you said, it has been installed in free mode and it's working well in MPLAB.
    Now I have to learn how to use it !!!!!
     
    Regards 
     
    Ricardo
    #7
    Zemog Zurc
    New Member
    • Total Posts : 6
    • Reward points : 0
    • Joined: 2014/07/23 09:46:08
    • Location: 0
    • Status: offline
    Re: dsPIC33 programming 2018/12/13 14:18:27 (permalink)
    0
    Hello,
    My advice is to setup your toolchain first
     IDE: MPLAB X
    Compiler: XC16
     
    Second, read the appropriate documentation :
    MCU Datasheet
    Family reference manual Sections: Oscillator, CPU, Interrupts, IO Ports
    XC16 compiler doc.
     
    Third: Code (assuming you have a previous knowledge of C programming.
     
    your code will be something like the following:
     
    #include <xc16.h>
    void main(){
    // Initialize fuses
    //Initialize oscillator
    //Assign PPS is applicable
     
    //Set digital PINS with ANSEL registers
    //Configure input or output pins with TRIS registers
     while(1){
    // Read or write the appropriate pins
    // Perform more awesome tasks
    }
    }
     
    Good luck
     
     
    #8
    qhb
    Superb Member
    • Total Posts : 9998
    • Reward points : 0
    • Joined: 2016/06/05 14:55:32
    • Location: One step ahead...
    • Status: offline
    Re: dsPIC33 programming 2018/12/13 14:38:08 (permalink)
    0
    Zemog Zurc
    ...
    // Initialize fuses

    Should be BEFORE the main() function.
     

    Nearly there...
    #9
    MBedder
    Circuit breaker
    • Total Posts : 6767
    • Reward points : 0
    • Joined: 2008/05/30 11:24:01
    • Location: Zelenograd, Russia
    • Status: offline
    Re: dsPIC33 programming 2018/12/13 15:07:49 (permalink)
    0
    Zemog ZurcMy advice is...
    ...to look into your calendar prior to replying to the ancient posts like this one.


    #10
    Jump to:
    © 2019 APG vNext Commercial Version 4.5