• AVR Freaks

Hot!dsPIC33CH basic asm code

New Member
  • Total Posts : 11
  • Reward points : 0
  • Joined: 2013/11/15 05:03:22
  • Location: 0
  • Status: offline
2019/06/26 15:02:19 (permalink)

dsPIC33CH basic asm code

Hi. I am trying programming dsPIC33CH128MP508 in asm, i can select just XC16 compiler. Also no linker and include files in microchip installation folder, just html. I attached asm code, who is sucesfully compiling. But in addition need configuration words, what is their format (directive config not compiling)?

2 Replies Related Threads

    Super Member
    • Total Posts : 3229
    • Reward points : 0
    • Joined: 2007/02/21 23:04:16
    • Location: 0
    • Status: offline
    Re: dsPIC33CH basic asm code 2019/06/26 15:52:43 (permalink)
    Microchip has deprecated all methods of setting the values of the configuration words from assembly language only projects.
    Developers are now required to use at least one C language file to initialize the configuration words.
    Attached is a project template I have been using.
    Super Member
    • Total Posts : 3354
    • Reward points : 0
    • Joined: 2012/07/01 04:19:50
    • Location: Norway
    • Status: online
    Re: dsPIC33CH basic asm code 2019/06/26 15:56:02 (permalink)
    +4 (4)
    For configuration words, the simplest alternative is to write:
    #pragma config  parameter = keyword  // Comment
    statements in a separate  .c  language source file, with no other code.
    This file do not need to be called or included, it need to be part of MPLAB X project, such that it will be compiled and linked.
    MPLAB X may help to generate the #pragma content.
    Also in XC16 installation /docs/config_docs/...   directory,
    there are .html files with documentation of configuration parameters and alternatives,
    for each PIC device type.
    post edited by Mysil - 2019/06/26 15:59:22
    Jump to:
    © 2019 APG vNext Commercial Version 4.5