From a4db90ecf45c86fb67f900226f78c5bc6e67d99e Mon Sep 17 00:00:00 2001 From: Jonathan Wyss Date: Wed, 6 Mar 2024 13:05:14 +0100 Subject: [PATCH] changed frequencies, suspect running 8 times slower than thought --- main.c | 6 +++--- makefile | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/main.c b/main.c index 05fc130..a830f35 100644 --- a/main.c +++ b/main.c @@ -1,4 +1,4 @@ -#define F_CPU 8000000UL +#define F_CPU 1000000UL #include #include #include @@ -22,7 +22,7 @@ void count(void) { //counts=0;//0..65535 counts++; - if(counts>=31) + if(counts>=128) //1m //1ms { counts=0; if(ms<60000)//1 minute @@ -68,7 +68,7 @@ int main (void) { // (2) cli(); //#######Timer0-setup##### |Phase correct pwm TCCR0A = (1< /8 // PLLCSR |= (1 << PLLE) | (1 << PCKE); //######Timer1-setup diff --git a/makefile b/makefile index 0652c03..ebfeda7 100644 --- a/makefile +++ b/makefile @@ -5,7 +5,7 @@ # (GNU make, BSD make, SysV make) -MCU = attiny85 +MCU = attiny45 FORMAT = ihex TARGET = main SRC = $(TARGET).c