Questions tagged [pic24]

PIC24 devices are general purpose microcontrollers, manufactured by Microchip Technology.

The PIC24 devices are Microchip's first inherently 16-bit microcontrollers with some significant enhancements such as all registers being 16-bit, 64K data address space, 24 bit wide instructions, hardware support for loop indexing, etc.

76 questions
4
votes
0 answers

PIC24F EDS array causing address trap

Hi I am using the PIC24fj128gc006. I am running out of data memory so I am trying to allocate some of my buffers using the EDS space. Here is my declaration: #define BUF_BASE 0x010000L __eds__ float envelopStaticBuff[envelop_size] __attribute__…
Benjamin Hon
  • 143
  • 1
  • 11
4
votes
3 answers

UART 3 Will Not Accept 5th Byte

The chip in question is PIC24FJ256GB210 It is a 100-Pin TQFP form factor We have an embedded system with two microprocessors. The two microprocessors use a UART to communicate Which is (according to me) mapped to UART #3 on the PIC24. I place 4…
User.1
  • 2,562
  • 3
  • 33
  • 40
3
votes
1 answer

Is this a safe way to disable interrupts on PIC24?

I am working on a project that uses a Microchip PIC24FJ256GA702. For several days I have been looking for an intermittent bug with some UART code. It uses an interrupt service routine (ISR) to transmit a buffer named char txBuff[] and its length int…
James
  • 5,635
  • 2
  • 33
  • 44
3
votes
0 answers

FreeRTOS & PIC24EP & Correct interrupt handling

I've been using FreeRTOS for a while now on my project and I have to say I love it. Tough i'm facing a bug which is killing me. My code contains a large amount of code, about 80 files and use several microchip stack and run about 10 tasks. The…
Damien
  • 1,492
  • 10
  • 32
2
votes
1 answer

How to remove unwanted data padding from custom sections on XC16

I am currently trying to dev a firmware for a PIC24F using the whole microchip stack (xc16, mcc, mplab X IDE, etc ...) (not necessarily relevant but i work on a debian 22) Doesn't really matter why but i want to place some data on a specific section…
gokasor
  • 41
  • 5
2
votes
1 answer

error: invalid operands to binary >> (have 'float' and 'int')

I am trying to cast float to bitwise int in C. Here's my code snippet: write_eeprom(INDEX_CONFIG_TEMPERATURE_OFFSET_HIGH_INT, (unsigned int) (temperature_offset>>16)); write_eeprom(INDEX_CONFIG_TEMPERATURE_OFFSET_LOW_INT, (unsigned int)…
Holebas
  • 21
  • 2
2
votes
0 answers

ACKEN bit on PIC24FJ64GA002 not clearing after acknowledge sequence

uint8_t i2c_read(void) { uint8_t u8_readData; uint8_t u8_ackBit = 0; while(I2C1CON & 0x1F); //wait for idle I2C1CONbits.RCEN = 1; //prepare device to receive while(I2C1CONbits.RCEN); u8_readData =…
CODE_guy
  • 21
  • 2
2
votes
1 answer

How loops are implemented in PIC24F assembly code

Below is the disassembly of following C code: 268: while (Counter < 250) 269: { 270: Counter++; 271: } Disassembly: 268: while (Counter < 250) 001B08 …
M Sharath Hegde
  • 485
  • 1
  • 6
  • 20
2
votes
0 answers

SCPI_ParamString multiple string as input

I am using the SCPI library of commands, namely SCPI_ParamString. The function I am trying to implement takes in 2 strings and an integer as inputs. To verify that my code is reading the inputs correctly, I am having it simply print my inputs back…
2
votes
1 answer

pic24f trailing UART framing error

I'm receiving a framing error after each message I send from my pic24f. It does not matter how long the message, or how many messages I send. After the last character is sent ('\0' or 0x00) in my case, I receive a framing error and I don't know…
jnewt
  • 197
  • 1
  • 3
  • 13
1
vote
0 answers

How can I use the DMA of a PIC24F microcontroller?

I want to use the DMA of a PIC24FJ1024GB610 that I have. Basically, what I want is to read some analog inputs and store them in a memory space that the CPU can access whenever it wants to perform calculations with the measurement. I also want the…
WalterPH
  • 113
  • 2
1
vote
2 answers

How can I return a pointer to registers with different types

I would like to write a function which returns a pointer to either one of two special function registers (SFRs). These SFRs have different types, but their types are identical except for their names: #define SFRxType SFR0Type typedef struct…
abessman
  • 75
  • 6
1
vote
0 answers

Display control PIC24FJ128GC010

I work with the PIC24FJ128GC010 on the MPLAB® Starter Kit for Intelligent.Integrated.Analog with the compiler XC16. I will read the 16-bit-Sigma-Delta ADC and show the result on the LCD-Display. I found some example codes in C for the board but it…
VGDS
  • 11
  • 2
1
vote
2 answers

PWM settings in PIC24FJ64GA002

Good day, I am working with a PIC24FJ64GA002 microcontroller and am struggling to get the PWM working for a servo I want to use. My code is as follows: // PIC24FJ64GA002 Configuration Bit Settings // 'C' source line config statements //…
Bottle
  • 23
  • 4
1
vote
0 answers

MPLAB IDE x 3.55 best way to include files in project

I am compiling a project in which I am using USB as a data logger. The host PIC micro is PIC24FJ, however the compiler is always complaining about NO such file or directory. I have tries the following methods to include those files which the…
Jamal2189
  • 21
  • 2
1
2 3 4 5 6