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

XC16 RTCC Peripheral Library and 24FJ16MC102 (tlg94)

Hello all, I am actually a college student working on a project for my own amusement and was running into some trouble. I am in my first microcontroller class currently, but I wanted to get into a...

View Article


Const data in Program memory (elmilenmch)

I have this C language, two dimensional array with constant data and variable length of the second dim. (this is only very shortened sample of whole data): const unsigned int * const s[] = { (const...

View Article


XC16 Stack Corruption Problem! (ashesman)

Hi there,When using 's' optimisation I get stack corruption. See the mismatched push/pop instructions below: !void __attribute__((boot)) CAN_Init(void) !{ 0x6E8: PUSH DSRPAG 0x6EA: PUSH DSWPAG 0x6EC:...

View Article

How to NOT locate code in boot area? (ashesman)

Hi,I want to have my main application located entirely outside my boot area. Eg the boot area currently occupies 0-0x2000, so I want my main code to start above 0x2000. This is easily done by altering...

View Article

write to Flash memory (zzxxzxz)

Hi all,I'm using dsPIC33EP32MC202 and trying to write a few words in the flash memory, but having some trouble with the testing. int __attribute__((space(prog),aligned(_FLASH_PAGE)))dat;unsigned short...

View Article


adc strange problem (seyyah)

Since i cannot post most of the forums i've posted here:I have four analog signals entering into pic adc inputs which I manually select, sample and convert. Mcu is dspic33ep64mc202. But some strange...

View Article

problem with SPI (chiaraelife)

Good evening, I am using C30 compiler and dsPIC33EP128MC506. My SPI functions are the following: //SPI transmission void wspi(unsigned char data){ unsigned char temp; temp = SPI1BUF; SPI1BUF = data;...

View Article

XC16 segfaults on install (g8jvm)

Hi GuysRecently installed MPLABX on Linux Mint 17.3 x86_64 something very strange , I installed xc8 and xc32 without any problembut running the installer, exactly the same way as on the xc8 and xc32...

View Article


Example programs for PIC-WEB-EK (dambrose)

Hello, I have a LOGIFIND PIC-WEB-EK learning board.PIC-WEB-EK Development / learning BoardIt has a PIC18F97J60 microcontroller with LEDs, buttons and other things like RS232 and Ethernet. I'm looking...

View Article


Problem Compiling due to ISR (tlg94)

Hey everyone, I am having trouble getting my code to compile; the problem is the ISR, and I think it may possibly be due to not having the sys/attribs.h file. If I comment out my entire ISR, the code...

View Article

MRF24J40 receive interrupt issue (chiaraelife)

Good evening, I have a problem using MRF24J40 and its receive interrupt: after some time, it can't receive anymore because it doesn't raise INT signal anymore! From now on, INT signal remains always...

View Article

Compiler specific definitions (dambrose)

Hello, I'm writing C code that will be compiled on different tool chain compilers. Both 16 and 8 bit. In other words it will be compiled using C16 and C8. I want conditional compilation based on which...

View Article

XC16 Linker not respecting region boundary for data objects placed in flash...

I've run into an odd issue with the linker where it seems to allocate data outside of the region that an output section was assigned to. This occurs (maybe only?) when the contents of that section are...

View Article


Compiler managed access to program flash (BHeyneman)

Is there any way to get the compiler managed access to program flash to read the upper MSB of flash through the use of the __psv__ or __prog__ variable qualifiers? XC16 v1.23, dsPIC33EP512GM310 /*...

View Article

Configuration bits- Generate Source code to output not working (Rakesh H)

Hey, I am using XC16 v1.24 and MPLABX v2.30. I created a new project today (after 20-25 days) for some reason I am not able to get the "Generate Source Code to ouput" button to work. It had worked for...

View Article


xc16 and EDS pointers (mike_a)

I am amazed with the problems I have found with EDS pointers. I found several cases of incorrect code generation, one of them I submitted a couple 2+ years ago and it's still in V1.25.I'm about to...

View Article

Converting USB data to parallel and some timing outputs (PICHANK)

I only have experience with 8 bit Microchips. I now have a task that may need a 16 bit chip. Here is the issue. Data needs to arrive into the PIC from the USB port. The PIC will need to take two bytes...

View Article


MPLAB X IDE v3.20 compiler reports errors with wrong line number reference...

Hi, I'm using XC16 and writing in assembly, so when there's an error in my code during compilation the compiler reports the error at the wrong line. For example, I make an error at line 1439 of the...

View Article

Move register w0 in assembler to a C variable (MicroStef)

HiI want do I move the w0 register in assemble to a variable (my_data1) declared in C.Is the following a correct way to do it or is there a better way ? unsigned int TestF(uint16_t wordPairToTest) {

View Article

Using linker line macros in a customized linker script (MicroStef)

Hi MPLAB 3.15XC1624FJ256GB108 1)I have defined a global macro for my build, this macro appear on the linker line like this......\xc16\v1.25\bin\xc16-gcc.exe" ....... -DVERSION_BCD=0x0000 .... I want to...

View Article
Browsing all 1508 articles
Browse latest View live


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