Not a PIC guy but trying to get this sorted.
https://ww1.microchip.com/downloads/en/devicedoc/40001723d.pdfI'm playing with a Tritiled (
https://github.com/tedyapo/tritiled ) and I'm getting flickering in the bottom half of the brightness levels.
I'm fumbling in the dark here, but I think I want to increase the clock speed from the 31kHz (lowest for power no doubt) to something a bit higher which will hopefully let me drive it faster?
I'm trying to put this in the first line of setup()
OSCCON = 0b00100000;
That should set it to 62.5kHz?
This is in addition to the code (
https://github.com/tedyapo/tritiled/blob/master/software/tritiled30/src/tritiled_v30_selectable_runtime.c ) having
// CONFIG1
#pragma config FOSC = INTOSC // (INTOSC oscillator; I/O function on CLKIN pin)
#pragma config WDTE = ON // Watchdog Timer Enable (WDT enabled)
#pragma config PWRTE = OFF // Power-up Timer Enable (PWRT disabled)
#pragma config MCLRE = OFF // MCLR Pin Function Select (MCLR/VPP pin function is digital input)
#pragma config CP = OFF // Flash Program Memory Code Protection (Program memory code protection is disabled)
#pragma config BOREN = OFF // Brown-out Reset Enable (Brown-out Reset disabled)
#pragma config CLKOUTEN = OFF // Clock Out Enable (CLKOUT function is disabled. I/O or oscillator function on the CLKOUT pin)
// CONFIG2
#pragma config WRT = HALF // Flash Memory Self-Write Protection (000h to 1FFh write protected, 200h to 3FFh may be modified by EECON control)
#pragma config PLLEN = OFF // PLL Enable (4x PLL disabled)
#pragma config STVREN = ON // Stack Overflow/Underflow Reset Enable (Stack Overflow or Underflow will cause a Reset)
#pragma config BORV = LO // Brown-out Reset Voltage Selection (Brown-out Reset Voltage (Vbor), low trip point selected.)
#pragma config LPBOREN = OFF // Low Power Brown-out Reset enable bit (LPBOR is disabled)
#pragma config LVP = OFF // Low-Voltage Programming Enable (High-voltage on MCLR/VPP must be used for programming)
Can anyone let me know if I'm on the right track?