Clock Bump / No Flicker

A project log for 7 Segment Hex Module using PIC16F18446

Two digit (8 bit) sevent Hex segment display using a microcontroller

John LonerganJohn Lonergan 05/16/2021 at 19:150 Comments

TL;DR When adjusting parameters in the MPLab IDE's Code Configurator (MCC) then simply saving the settings is not enough, you MUST hit Generate to recreate the generated config files


I my previous videos about this module I'd made a comment about the displays not being that fast however, the 75Hz display refresh rate was irritating me because it flickers in the camera but also because I was frustrated that the numbers I was seeing just didn't add up.

I was convinced that I had the clock set to 4MHz and that should have been plenty fast to avoid flicker but I didn't have the data to prove it. 

Double check ..

.... so I should be seeing sometihng like 1100 loops per second; therefore approx 1100 refreshes per second. 

? 75Hz is a long way off.

I then noticed that the system.h generated file had a "#define SYS_FREQ 250000". 

Putting these numbers back into the equation ...

I checked back on the settings in the MPLab IDE and it was definitely saying 4MHz. .. so confused.

A few hours later, and really annoyed,  I realised that it had been so long since I'd used the IDE that I I'd forgotten that changing the settings in the MPLab Code Configurator (MCC) alone isn't enough to make the MCC settings take effect, and I also had to clock the "Generate" button. My PIC's had been running at 250KHz for weeks and not MHz. Having done the Generate the same file was updated to  "SYS_FREQ 4000000".


 All files pushed to