pm101
  • Member for 4 years, 9 months
  • Last seen more than a month ago
  • United Kingdom
PIC18F26J50: clock issues
2 votes

The delayus() function is flawed. It won't take one instruction to go round the loop, but multiple instructions. In disassembly a call to delayus() is two instructions. Delayus() itself is about 14 ...

View answer
Where to put main code in Mplab Harmony Framework?
2 votes

I understand that Harmony is supposed to make things simpler. It does this well for configuration -- but it does makes a lot more things confusing especially for newcomers. Your main code can go ...

View answer
How to use SYSTEMConfigPerformance on a MPLAB X project
Accepted answer
2 votes

Looks like you need PIC32 Peripheral Library Starting with XC32 V1.40, PIC32MX peripheral support libraries are no longer installed as part of the compiler’s installation. These libraries are ...

View answer
How to read a specific port with ADC in Mplab Harmony?
1 votes

Honestly, I think the Harmony examples for ADC are poor. Harmony automatically adds your channels to the scan list in DRV_ADC_Initialize with the function PLIB_ADC_InputScanMaskAdd so you shouldn't ...

View answer
How to read a port by a label in Mplab Harmony?
Accepted answer
1 votes

If you give the port a name and a function and generate code... example... You'll noticed that in system_config.h harmony only creates the following /*** Functions for MY_TEST_PIN pin ***/ #define ...

View answer
How to toggle a pin in Harmony framework for a pic?
Accepted answer
1 votes

There are two ways of configuring timers in harmony v2. i.e. Static or Dynamic For static timers you need to add your handling code into the system-interrupt.c file timer handler. See here For ...

View answer
MPLAB Harmony Configurator not working
Accepted answer
1 votes

For non v1-2 Harmony you need to download and install the framework yourself see download installer links on https://www.microchip.com/mplab/mplab-harmony/mplab-harmony-1.0 then after installing , ...

View answer
PIC32MX470F512L not appearing on harmony setup?
Accepted answer
1 votes

Seems like MPLAB harmony v3 is a new beast and the PIC32MX470F512L files were only added about a month ago. First make sure you download the latest framework when starting a new project by clicking ...

View answer
What Is the timer period of a timer of a Pic
Accepted answer
1 votes

I'm answering based on the MCC image you posted which relates to PIC16F and not your chosen PIC32MX which may be the source of your confusion. You should run MCC with your PIC of choice to fully ...

View answer
Baud Rate Generator
1 votes

I'm sure you are well aware of common UART baud rates such as 9600 baud, 57600 baud and so on. That means 9600 bits per second and 57600 bits per second respectively. That needs something like an ...

View answer
PIC I2C communication problem with I2C multiplexer
Accepted answer
1 votes

I'm writing as an answer so you can try the following code. Use MFINTOSC for I2C clock and enable clock stretching. I don't know about relying on "Master Data Request", you can try avoiding that. Use ...

View answer
PIC interrupt on change never enters the interrupt routine
1 votes

PPS should not matter for Interrupt on change, especially if the peripheral is disabled. You shouldn't need a pull up as that seems to be done in hardware. You can disable the weak pull up (below) ...

View answer
PIC18F47K42 I2C Slave MCC code incrementing register by accident
Accepted answer
1 votes

The MCC code generates an interrupt function with a rather large else {} statement that it will enter on STOP as well as when BYTE RECEIVED and call WRITE_COMPLETE. The receive code was changed to: ...

View answer
PIC 18F26K83 ADC clock frequency
Accepted answer
1 votes

You shouldn't need to take this into consideration. Fosc is the oscillator frequency (system clock). FCY is the instruction clock which is Fosc/4. The selections for CS in ADCLK refer to Fosc and not ...

View answer
SPI interface returns only ones (0xFF)
1 votes

Ensure clock speed is no faster than 25MHz (from datasheet) and clock polarity and phase is set correctly (CPOL = 0, CPHA = 0)

View answer
UART Tx stops working without UART Rx connected
1 votes

It may be that the RX Interrupt goes into an infinite loop of unhandled interrupts or an overrun or frame error occurs. To protect against that, flush the receive buffer and reset the UART if this ...

View answer
How does line encoding relate to bus protocols like SPI, serial, i2C, ethernet etc
0 votes

Line coding is required if the clock is not or cannot be transmitted separately with the data --- so the data is encoded in such a way that a clock can be recovered or can be synchronized with the ...

View answer
How to do a counting of a timer configured in Mplab Harmony framework?
0 votes

You are probably getting the memory address of the DRV_TMR0_CounterValueGet function rather than the return value because you didn't call the function. You must call the function with () i.e. teste = ...

View answer