dsPIC33EP64GS502 : Enhanced Master mode SPI always reads 0 (manish.kumar)
I have configured Enhanced master mode (SPI). I am not able to read the data, it always shows 0. I am posting few code snippets. I guess there is something wrong with pin select !!!! **************spi...
View Articlexc16 global register variable (zetharx)
My program doesn't come anywhere near using 14 working registers. I would like to create a global register variable register int foo asm ("w8"); Page 320 of the XC16 Compiler User's Guide states that...
View ArticleDSPIC33 High Speed PWM L outputs going crazy (Pixelle78)
Hello, I’m developing on MPLAB X v3.26 and XC16 v1.26 Free Version. My problem is pretty simple and yet it is driving me crazy.I work on a DSPIC33FJ64GS606, using the High Speed PWM High and Low...
View ArticleUsability of "packed" attribute (AZ1101)
Hi,I am working on a project that communicates with SD Card; the data comes as byte stream and sometime I need to analyze bytes, but sometime they need to be interpreted as WORD or DWORD. Prior to...
View Articlexc16 optimization have to be level 0 in Free edition as of Jan 2017 (biddut)
X16 optimization have to be level 0 in Free edition of xc16 as of Jan 2017, else the device will be programmed, code will be small, but will not run a single step. I just keep forgetting about it when...
View ArticlePIC24FJ128GA202 - "str" fails after updating certain parts of FLASH...
Forum, The PIC24FJ128GA202 has page boundaries is described below. The majority of my code exists below page 40. I purposely placed code via "__attribute__((section("PROM")))" starting on page 83.I am...
View ArticleStack monitoring in run time (JPittenger)
I was reading through this thread:http://www.microchip.com/forums/m827832.aspx And I wanted to do something similar for a PIC24F.Since that code was written for the PIC32, I had to modify it for the...
View ArticleAssigning fixed ram address or fixed register address in function...
Hi, There is a way to assign a fixed ram position to function parameter(s) ? There is a way to assign a register position ( w0 to w15 ) to function parameter(s) ? My concerning is about performance. I...
View ArticledsPIC33EP64GS502: external interrupt (IFS0bits.INT0IF) always shows as 1...
Can anyone explain why INT0IF (IFS0) is always shows as 1? Is it a normal behaviour or something setting this is as 1? What's the use of this external interrupt? Does its has any impact on other...
View ArticleXC16 argument merrata vs chip errata document (js86)
HiUsing XC16 compiler for PIC24F16KA101I would like to know if compiler errata switch is needed if datasheet for particular part does not mention problems related with those switches.For example...
View ArticleXC16 1.30 won't link (Volker)
Hi,i try to compile our project with XC16 V1.30 and the Linker give a lot of messages like this:build/TEST_FW_Pic_V3_8/production/smb.o(.text+0x1a): In function `.L3': : undefined reference to...
View ArticleCompiler does not properly handle the DSRPAG on complex structure? V1.30...
I have a complex structure that should be in the EDS memory:.But on (some) access the compiler does not properly handle the DSRPAG. Program crashes and restarts. // Parameter (label) attributestypedef...
View ArticleCan XC compiler produce PIC24 assembler source code? (gardener)
And if so, is there anything special one has to do in MPLAB X to produce them? I see .hex files and .o files, but not .s, or .asm...
View ArticlePIC24 External interrupt1 got interrupt without giving any interrupt (swatvv)
I using pic24fj256gb106 and xc16 compiler.i paste my testing code below.here i got the problem that while run the program using pickit3 debugger i got interrupt without giving any interrupt to the...
View ArticleUsing libpic30 and makelib.bat - Rebuilding libraries??? (andrew_ar)
Sorry for such a basic question, but I can't find out what I need to know. I would like to use the "Standard C Libraries" with XC16. Specifically, I want to use fixed point maths functions like...
View ArticleDefine a section with a particular length in code (h.mueller)
Hi,is there a preprocessor statement or attribute which I can use to declare a section in code? I use #pragma code bootloaderint __attribute__((section ("mysection"), address(0x1000)))fkt1(void)int...
View ArticleWrite to DSGPR0 and DSGPR1 in C (zetharx)
My datasheet (PIC24F) states that one must write to DSGPR0 twice in a row in order to successfully complete the operation.The page has an assembly example, but when I run inline-assembly in my code,...
View ArticlePIC24 peripheral library for xc16 (Bhavik318)
Hello,i am currently working with pic24 using c30 compiler and also using peripheral library for it.Now, i am migrating from c30 to xc16 for same development. How can i use pic24 peripheral library in...
View ArticleDspic33 and Bluetooth BT121 - Packet struct problem (jmp2612)
Hi, im having a problem integrating the library BGLib from Silicon Labs to my project in MPLAB for the dsPic33EP512MU810. Tthe project is with a BT121 chip a bluetooth chip, the problem is that it does...
View ArticledsPIC33EP64GS502: PWM Generator module control (manish.kumar)
If we set the PTEN bit(shown below), I guess it enables the whole PWM module along with all the 5 PWM generators. PTCONbits.PTEN = 1; My query is: Is there anyway to control the enable/disable the...
View Article