Commit 3a2252c99c0cefdfad723cadff2f9bd724b55bfe
receivedSat, 17. Aug 2024, 16:47:18 (by user sx)
Sat, 17 Aug 2024 14:47:18 +0000 (16:47 +0200)
authorManfred Steiner <sx@htl-kaindorf.at>
Sat, 17 Aug 2024 14:47:11 +0000 (16:47 +0200)
committerManfred Steiner <sx@htl-kaindorf.at>
Sat, 17 Aug 2024 14:47:11 +0000 (16:47 +0200)
2 files changed:
software/bootloader-arduino/Makefile
software/bootloader-arduino/src/main.c

index 6b30abda4ea835e3518182855fb5cffc9a56919d..00872f0f278f82d1e8aa80e934149db3f0cc7226 100644 (file)
@@ -127,7 +127,11 @@ isp-erase-644p:
  
 isp-fuse-644p:
        #avrdude -c usbasp -p m644p -U lfuse:w:0xFF:m -U hfuse:w:0xD8:m -U efuse:w:0xFF:m -U lock:w:0xFF:m
-       avrdude -c usbasp -p m644p -U lfuse:w:0xFF:m -U hfuse:w:0xD8:m -U efuse:w:0xFE:m -U lock:w:0xEF:m
+       #avrdude -c usbasp -p m644p -U lfuse:w:0xFF:m -U hfuse:w:0xD8:m -U efuse:w:0xFE:m -U lock:w:0xEF:m
+       # LFUSE=0xEE -> startuptime 1K CLOCKS + 0ms -> 83us
+       #avrdude -c usbasp -p m644p -U lfuse:w:0xEE:m -U hfuse:w:0xD8:m -U efuse:w:0xFE:m -U lock:w:0xEF:m
+       # LFUSE=0xE7 -> startuptime 16K CLOCKS + 4.1ms -> 5.4ms
+       avrdude -c usbasp -p m644p -U lfuse:w:0xE7:m -U hfuse:w:0xD8:m -U efuse:w:0xFE:m -U lock:w:0xEF:m
 
 clean:
        @rm -r dist
index 32ccfbd063edbe4fe5d0e52df4a40646bf753f88..3ca14b395f0fcb7aae5a138d5d081f528f1e1831 100644 (file)
@@ -113,9 +113,10 @@ int main () {
                asm volatile("nop\n\t");
        #endif
 
-       // LED ports output and off
-       DDRC = (1 << PC4) | (1 << PC3) |(1 << PC2);
+       // LED ports output and off, ensure that Q1 (battery power) on (PC7)
        PORTC = 0;
+   DDRC = (1 << PC7) | (1 << PC4) | (1 << PC3) |(1 << PC2);
+       
 
        #ifdef DOUBLE_SPEED
                UCSR0A = (1 << U2X0); // Double speed mode USART0