corecture F_CPU and osccal, there seems to be a bug only when connected to the pc but not to the wall adapter

This commit is contained in:
2024-03-26 17:35:32 +01:00
parent 6466905783
commit d85647358b
2 changed files with 8 additions and 9 deletions

9
main.c
View File

@@ -48,15 +48,14 @@ else msec=0;
int main (void)
{
int i,i2;
int colorb;
int colora;
//int colorb;
//int colora;
int sum,avg;
char sample[64];
char im[64];
char buff[64];
char temp;
float fac_r=0.5;
float fac_r=0;
float fac_g=0.5;
float fac_b=1;
msec=0;
@@ -65,7 +64,7 @@ int main (void)
setupADC();
setupTimer();
OSCCAL = 250;//overclock!!! to 30MHz
//OSCCAL = 250;//overclock!!! to 30MHz
for(i=0;i<8;i++)
{
led_bar1[i].r=0;