Questions tagged [mplab]

IDE for the Microchip PIC series of microcontrollers.

Integrated Development Environment for the Microchip PIC series of microcontrollers.

614 questions
4
votes
1 answer

What causes this missing whitespace after the macro name error?

I am working on a project in MPLAB X v3.35 for a PIC24F. At some point in the last few weeks the compiler has started giving the following warnings for every line in the compilation. What in the compiler line could be causing this? The column number…
RobbG
  • 371
  • 5
  • 14
4
votes
2 answers

How to avoid stack overflow in my PIC16f877A project that has a float to string conversion?

I am currently working on a traffic monitoring system that require Geological coordinates (that are as float) to be sent a string via a GSM/GPRS module as a text message. I used the following code to convert these float values to strings but in…
TheShark
  • 420
  • 3
  • 6
  • 17
4
votes
1 answer

How to see the whole picture in mplab ipe?

I'm using MPLABX IPE 1.95 on linux. For some reason the programmers decided to make the main window non-resizeable. So it's impossible to see the memory view properly. If the memory view isn't open, I can't even see the bottom of the output…
John La Rooy
  • 295,403
  • 53
  • 369
  • 502
4
votes
1 answer

How to make data bank size more than 256 bytes [Linker File - MPLAB ]

I have PIC18F87J11 FAMILY and I am using MPLAB C18 Compiler. What is the maximum bytes I can give the following variable. I know that I have to modify the linker file to achive more than 256 bytes. #pragma udata CONNECTION_TABLE This is my clean…
cookie monster
  • 77
  • 1
  • 10
3
votes
3 answers

Forcing compiler to make arithmetic calculations during preprocess

Compiler: MPLABX IDE V5.30 Operating system: Windows 10 What i'm trying to do is define some constant values (to make future changes easier) and create some other constants via arithmetic operations during preprocessing. Then use those constants…
kudagaci
  • 33
  • 3
3
votes
1 answer

Error passing argument from pointer to non-enclosed address space

I am using an ATMEGA16M1 microcontroller and the MPLAB IDE. I have following function to write to the ports. void Lcd8_Write_String(char *a) { int i; for(i=0;a[i]!='\0';i++) Lcd8_Write_Char(a[i]); } void Lcd8_Write_Char(char a) { …
Felix Kunz
  • 354
  • 2
  • 15
3
votes
1 answer

How to program the PIC32 in Assembly?

I'm trying to program a PIC32 MM0064GPL028 in Assembly, to do MIPS32 exercises on a real CPU, instead of the simulator that we use in my course (QtSpim), without any success. The only guide I found on the internet is this, but I get an error when I…
Lugerp
  • 31
  • 2
3
votes
2 answers

Cant see printf in mplabX IDE anywhere... Why?

I tried this in a function, but I dont see anywhere the result in MPLAB X IDE. Why? Where I can find the printed result? I am using pic32 Curiosity development board and XC32. int a = 5; int b = 10; printf("a = %d\nb = %d\n", a, b); Any info?…
3
votes
2 answers

How can one create a unique label for each macro call using mips assembly in MPLAB X

I have a macro which performs a comparison, and jumps to the end of the macro if that comparison isn't true. Here is a simplified example: .macro do_work_if_value_not_zero value li s0, value bne s0, zero, exit_label nop // Do…
3
votes
1 answer

Assigning a Variable to Another Variable in a Union in C

I am working on a project in MPLAB X IDE 3.60. There some union/structure definitions in it. They are used to drive 7 segment LCD. I can not pass a variable into another one by using its name. It assigns a random value instead. However, I can assign…
3
votes
1 answer

xc8 : please detailed the (((unsigned)&(REGISTER_NAME))*8) + BIT_NUM

i want defining macros for set pin direction and level.their argumans must be port name and pin number.i dont want use TRIS Register or LAT register name,only port name(PORTA e.g).i do this with pointer and bit mask like: set pin dir: #define…
daryooosh
  • 57
  • 8
3
votes
2 answers

Using splint for static code analysis on windowms with MPLAB how to avoid system file parse errors

I'm using MPLAB X (3.26) with a PIC32 on windows (XC32 v1.40 compiler). I'm trying to use splint to do static code analysis on someones code as part of a review. I've got most of the compiler defines and search paths sorted, but are a bit stumped…
spitz
  • 31
  • 4
3
votes
3 answers

mplab xc8/16 builtin_constant_p

I was searching for this in the mplab compiler users guide but haven't found anything. I am asking it here to confirm that I am not blind or anything: The GCC compiler provides some very interesting and useful built-in functions like…
jwsc
  • 867
  • 8
  • 15
3
votes
2 answers

C: Minimising code duplication using functions in a header file

this is a bit of a strange use case so searching for existing discussion is difficult. I'm programming for embedded systems (Microchip PIC24 using XC16 compiler) and am currently implementing a communication protocol identically across 3 separate…
Zac Soden
  • 31
  • 3
3
votes
2 answers

Receiving "undefined symbols" error with XC8 concerning plib I2C functions

Hey there StackOverflow! My question concerns errors being reporting within the program pasted (far) below. The target device is the PIC12LF1552, it has one serial peripheral on it that I assumed could be used in conjunction with the library…
James Lui
  • 195
  • 1
  • 7
1
2
3
40 41