Questions tagged [mplab-x]
26 questions
2
votes
1 answer
Initial EEPROM contents in Atmega644
I am working on a project using a Atmega644 and want to include EEPROM data in the initial programming.
I am using MPLAB X and the XC8 compiler (version 2.31) and for programming I am using a PICkit4.
I know that the xc8 compiler for PIC MCUs has…

XPModder
- 303
- 4
- 16
2
votes
0 answers
can data from a sensor be read in a function
I am using the icm 20948 sensor, programming on MPLABx running harmonyV3.i2c is communication mode. Can I read and write in a function, does it have to be in a while loop?
For example would:
while(SERCOM1_I2C_IsBusy())…

Oluwatoni Bodunrin
- 21
- 1
1
vote
1 answer
Problem with PIC18F45K50's ANSELE register
I am trying to make a code for PIC18F45K50, I am trying to use PORTE as digital input, that means I have to clear ANSELE register which controls this pin behavior
Working on MPLABX 3.30 i tried this line of code:
clrf ANSELE
to clear the register,…
1
vote
2 answers
MPLABX XC8 Compiler - implicit signed to unsigned conversion?
Why am I getting :
(373)implicit signed to unsigned conversion
by doing:
fan_on_hh = hh + fan_hh_increment
All fan_on_hh, hh and fan_hh_increment are unsigned char.
This post suggests to do this:
fan_on_hh = (unsigned char) hh +…

Andras
- 401
- 2
- 15
1
vote
2 answers
MPLAB X IDE - Script Engine is not Supported
In using the Pickit4 for flashing the code.
When I first open the MPLAB X IDE and use the Make and Flash button to flash the MCU, it works fine.
But the next time in the same session, the Make and Flash button goes grey and does not do anything and…

mrs15
- 15
- 5
1
vote
0 answers
Communication between SAME54 dev board and CH340
I would like to communicate string messages between a microcontroller SAME54 and another item that has a CH340 serial adapter. I would like to connect my development board SAME54 explained with another unit that has a CH340 serial adapter.
Can I…

Daniele
- 668
- 2
- 10
- 25
1
vote
1 answer
is there a way to wait for something without interrupt the execution of other code?
i have to write a function that, by calling it only a single time, have to:
turn on an output pin
the pin stays high for 200mS
at the end of the timer the pin need to be low again.
the pin stays low for 200mS
at the end of the timer the…

cparu
- 57
- 5
1
vote
2 answers
Why can't I use a global bool variable whose value depends on interrupt flags?
I'm trying to wait for an interrupt to continue with the execution of the code, something like this:
bool flag = false;
void interrupt_handler (uintptr_t context)
{
flag = true;
}
void main()
{
CallbackRegister(event,…

Jairo Macías
- 13
- 3
1
vote
0 answers
How to apply driverless device into harmony v3
I would like to apply HM628128 and MX25L800 to File System of MPLAB® Harmony v3.
But, the file system (MEMORY driver) of harmony v3 with default condition can be only applicatable to RAM/ROM listed below.
AT24
AT25
AT25DF
SST26
NVM
RAM
Does…

TRI
- 33
- 2
1
vote
0 answers
XC16 - How do I prevent a parameter const array body to be copied to RAM?
I know const variables are copied to RAM so they can be referenced, but if I declare a const array body as a parameter in a function call, is it copied to RAM every time I do the call?
printf("Mode: %s",((__attribute__((space(prog))) const…

Max Kielland
- 5,627
- 9
- 60
- 95
0
votes
0 answers
Harmony bootloader on SAME70 - no UART communication, debug not working
I'm experiencing difficulties with Harmony bootloader on SAME70N20B chip. I want to build simple bootloader to be able to flash firmware via UART4. I'm not able to use integrated SAMBA bootloader, because it operates on UART0 (maybe not UART0, not…

Thugmek
- 43
- 8
0
votes
0 answers
How do I continue to show changes (via sidebar color bars) in MPLAB X IDE after git commit?
How can I set MPLAB X to continue to show the colored change bars that appear on the main editor sidebar (furthest right, next to the vertical scrollbar) after a git commit? I would like to be able to toggle this on/off (i.e., select no diff branch,…

The_Ders
- 137
- 9
0
votes
1 answer
If condition does not work in Microchip MPLAB IDE XC8 compiler
/*
* File: proje_6.c
* Author: ayanoglu
*
* Created on 08 Nisan 2023 Cumartesi, 12:14
*/
#include
void delayFunction(unsigned int);
#define Button PORTBbits.RB0 //RB0 button
#define Led PORTBbits.RB1 //RB1 led
char…

izmirlikezzap
- 23
- 6
0
votes
0 answers
Assembly code for interfacing pic18 with ultrasonic snesor
I am writing an assembly code for measuring the distance using ultrasonic sensor and pic18 the problem is I can't get the result to get displayed on the lcd and I don’t know if the steps to measure the distance are correct .
I tried this…
0
votes
1 answer
Program compiles but doesn't do anything
I've recently started exploring and reading about Microchip's PIC32 MCUs, most specifically for motor control. I had some job done over the years but was a long while and haven't used the IDE with evaluation board since university years. Been using…

Iliyan Tomov
- 3
- 2