Quantcast
Channel: MPLAB XC16
Browsing all 1508 articles
Browse latest View live

Soft swap instruction "bootswp" (Sanguin)

Hello, I'm trying to use the "bootswp" instruction to soft swap from the active to the inactive partition on a dsPIC33EP64GS504 in dual partition mode. The application in my inactive partiton should be...

View Article


UART U1BRG (Elmek)

Hi, I just started on 16bit mcu(PIC24FV16KM202). I set the U1BRG = 3 to get the desired baudrate but when I call putchar first time the U1BRG is set to 0. (view in simulator) Has anyone seen that, and...

View Article


Difference between .shared.dinit and .dinit ? (RichardW)

I did a search on this forum as did not find anything on '.shared.dinit' it is not in the xc16 assembler linker manual as well. So I have a small program that is creating a .shared.dinit section, but I...

View Article

Example code - Reading UART1: Interrupts vs. scanf()/read() (jamisnemo)

So, after digging through the docs and the forums, I finally got UART working on the PIC24F chip I'm playing with. Since I couldn't find any fully working snippets for these, I figured I'd post what I...

View Article

If you use the "MPLAB X IDE" are debugging, it would forcibly stopped...

Use the "MPLAB X IDE" in you are debugging, you in trouble will be forcibly stopped unintentionally. When you kill you will see the following message in the "Debugger Console"....

View Article


XC16 v1.26 build failing -- (944) data conflict at address... (awolfe)

I updated to v1.26. It worked for several compiles... but has now started giving me this error at the end of the compile. "C:\Program Files (x86)\Microchip\xc16\v1.26\bin"\\xc16-bin2hex...

View Article

#pragma config BORV setting on PIC24F using XC16 (dchirgwin)

I have tried to use #pragma config to set BORV, without success. The MPLAB X feature to generate configuration code give me this:// FPOR #pragma config BOREN = BOR3 // Brown-out Reset Enable bits...

View Article

Unable to view disassembly (JPittenger)

I am trying to debug a crash in my program. I have an exception at address 0x000036C4. Since I wrote in C code, this doesn't mean a lot to me. I would like to load the disassembly file to find out what...

View Article


how to normalize the coefficient of PID controller (grchy)

hi, I am working on a frequency tracking system (Software Phase Locked Loop). I plan to use the PID controller from DSP library. But I was noted from the Reference that all the input/output variables...

View Article


gcc optimization and function calls (enricoricci51)

Hi all!I want to post a simple question (maybe), but crucial for an intelligent system like XC16. Why a global function which is not used in the main code is compiled and linked like others? This...

View Article

pps.h and dsPIC33EP512MC504 (elmilenmch)

Hello, I use these XC16 v.1.10 PRO.I try to remapping the pins of the upper dsPIC: // Outputs // ------- // normal PWMs PPSOutput(OUT_FN_PPS_OC1, OUT_PIN_PPS_RP41); // PWM1 PPSOutput(OUT_FN_PPS_OC2,...

View Article

Peripheral Libraries LINKER (elmilenmch)

Use XC16 v.1.10 PRO. I use some Peripheral Libraries in my project: #include #define FCY 62500000ULL #include #include #include #include --- I use the peripherals in code, for example:...

View Article

Placing a function in a particular page (medielectro)

I am using dsPIC33EP64GS506. MPLABx 3.25 and XC16 version 1.25. In my code I want to place a particular function in a desired page of flash memory. What is the method for that. Only that function...

View Article


PIC24FJ1024GA610 family: processor’s .inc files are screwed up (nice)

XC16 V1.26 The .inc files for the aforementioned PIC family contain duplicate .equiv directives for different configuration bit settings. ; eg. p24FJ512GA606.inc;----- FSEC (0x55f00)...

View Article

Dual partition pragma not working (Lazzarini)

Hi, I'm doing a bootloader for a PIC24FJ256GB410 and it is working for a single partition.But when I try to change configuration of BTMODE to DUAL the code can compile and load, but it has an error:...

View Article


Linker "AT" directive - how? (RobPearce)

I'm trying to arrange for a certain group of data in my PIC24 assembler code to live in RAM with a consistent copy in flash, so that I can access both versions using run-time tools. On the PIC18...

View Article

Default value for EEPROM variables (drazen)

Suppose this code: __prog__ char __attribute__ ((space(eedata))) EE_Logs; EE_Logs array is placed in internal EEPROM and is initialized to 0. I know by C standard all variables must be initialized to...

View Article


Logging: replacing standard printf() Flash -> RAM (arigead)

I'm trying to replace my current debug logging code as at present I'm using the inbuilt printf() and it's causing me problems. It seems that the inbuilt printf() turns off interrupts which is effecting...

View Article

Circular buffer of coefficients in Y-space (xjp)

Using DM330011 (dsPIC 33FJ256GP506) + latest MPLAB X + latest XC16 compiler Mixed C and assembler source code. I need a circular buffer of coefficients in Y-space. Bottom line is I can't get addressing...

View Article

Sleep current too high PIC24F16KL402 (k5xh_mark)

PIC24F16KL402MPLABX 3.30XC16 1.26 I have been working with this part trying to get close to the datasheet specification for supply current in the sleep mode. The datasheet says I should see a max...

View Article
Browsing all 1508 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>