XC16 delay issue (Dukenukem)
Hi everybody,Since the __delay32(); function causes a temporary shut down of the pwm output generated by the output compare module, what is the correct way to generate a delay (needed for example by...
View ArticleHow do I generate an assembly listing of my c code? (monzie)
I am using MPLAB X and XC16. How do I generate an assembler listing file?..
View ArticlePoor performance XC16? (gobytob)
What am I doing wrong. I compile this with compiler optimization set to speed: if(timersFlags.timeout1ms){ ...} The XC16 compiler creates this (sucks):MOV #0x83C, W4MOV.B , W4AND.B W4, #0x1, W4BRA Z,...
View ArticleLong to string conversion question (rbuck)
I have a project designed using a PIC24FV16KA302. It is a DDS unit that uses an encoder, keyboard, and LCD display. I am using a 32 step optical encoder to change frequency and display it on the LCD. I...
View Articlefixed point integer (salish maharjan)
How can I enable fixed point integer in XC16 compiler. I read through the XC16 compiler reference manual but not clear. Please help me for this. thanks in advance..
View ArticleXC16 builtin functions (balecsa)
Hello! I want to use the builtin functions to access the DSP accumulators and perform DSP operations (especially 32 bit shift and 32 bit add with saturation). I get a compiler warning when I use the...
View Articlexc16 strlen bug (Maxime Vincent)
Using the strlen function of the mplab provided C-lib, I think I came across a bug: strlen is defined in include/string.h as:extern size_t strlen(const char *); and size_t is typedef'ed to...
View ArticleCan I use XC16 with MPLAB8? (BobAGI)
I need to stay on MPLAB-8 for a number of reasons but I also need support for new chip types...So is it possible to use XC16 for PIC24 projects in MPLAB 8.8x??If so, how should I go about it?..
View ArticleCompiler throws error on dsp code part (Daimonion)
Hi I'm trying to compile a math library which was developed under c30 v3.30. One function works with some dsp function like __builtin_sac,__builtin_mac, etc. The function defines at the top a variable...
View ArticleWarning about Invalid Interrupt Vector names for device (jmag99)
I upgraded from C30 V3.30 to XC16 V1.21 and am getting a slew of these errors: ../ir.c:204:1: warning: Invalid interrupt vector names for device '24FJ256GA106' are:_T2Interrupt The code does operate...
View ArticleXC16 Installation Error (radajan)
Hi, have a similar problem too.I am unable to even install XC16 compiler. While XC8 compiler installs all right, XC16 flags the following message.Neither of v1.20 or 1.21 versions I tested,...
View ArticleWhere is the source code? (Fernan82)
I'm trying to find the XC16 and MPLABX source code archives. I've downloaded it before but I cant find it anymore. Thank you...
View Articleundefined reference to `UART2PrintString' (wilkie)
I'm trying to debug USB Host MSD and so I enabled the DEBUG_MODE in the host_usb_msd.c file. #define DEBUG_MODE #ifdef DEBUG_MODE #include "uart2.h" #endifNow the code wont compile. I get undefined...
View ArticleDivision/shift for negative numbers (Dukenukem)
Hi everyone, Since everything could work faster making "power of 2" divisions by shifting bits i would like to talk about negative numbers (int or long) and shifting for division. Here i understand...
View ArticleProblem with optimizations and UART... (balmerjd)
I've recently come across an unusual situation with my current project. I have a completed working system that runs with effectively no errors (two small and minor bugs have been found that are very...
View ArticleBest way to swap a bit (Dukenukem)
Hi everyone,I am trying to make a C function that swaps one random bit (set to 1 if it is 0 and vice versa) of a int variable named "chr". This is the code i wrote so far srand(buf); //casual...
View ArticleBug in ..\xc16\v1.21\support\peripheral_30F_24H_33F\pps.h file? (ShamilaBW)
Hi, In the ..\xc16\v1.21\support\peripheral_30F_24H_33F\pps.h file line 245 to line 273. (See below for code extract) when _PPI_PPS_V2 is defined IN_PIN_PPS_RPIxx will try to use the definition...
View ArticleBUG: XC16 V1.21 dsPIC33E/PIC24E PPS.H (Richard ST)
There appears to be a bug in the dsPIC33E/PIC24E pps.h and/or peripheralversion.h for (at least) the dsPIC33EP512GM604. The peripheralversion.h header defines _PPI_PPS_V3 and _C5EVT for this chip.This...
View ArticleCompiler settings set in C code? (dt99idr)
Is it possible to set the Compiler command line settings from within a C file? I'm writing some code which needs to function across several different PICs, and was wondering if I can tell the compiler...
View Articletrap error writing to flash (kholmz)
When I do a _write_flash16 command I get a CORE-E0011: Trap due to unimplemented RAM or PSV memory access error on the simulator and the hardware is resetting. It works fine with the C30 compiler, but...
View Article