>> $(MAKEFILE); \
$(CC) -M -mmcu=$(MCU) $(CDEFS) $(CINCS) $(SRC) $(ASRC) >> $(MAKEFILE)
-.PHONY: all build elf hex eep lss sym program coff extcoff clean depend program_bootloader program_arduino
+.PHONY: all build elf hex eep lss sym program coff extcoff clean depend program_bootloader program_arduino program_leo
program_bootloader: all
dfu-programmer $(MCU) erase && dfu-programmer $(MCU) flash $(TARGET).hex && dfu-programmer $(MCU) start
-program_arduino: all
- avrdude -patmega32u4 -cavr109 -P$(PORT) -b57600 -D -Uflash:w:$(TARGET).hex:i
+# program_arduino: all
+# avrdude -patmega32u4 -cavr109 -P$(PORT) -b 57600 -D -Uflash:w:$(TARGET).hex:i
+
+program_leo: all
+ avrdude -patmega32u4 -cavr109 -P/dev/ttyACM0 -b57600 -D -Uflash:w:$(TARGET).hex:i
\ No newline at end of file
--- /dev/null
+avrdude -p atmega32u4 -c avrisp2 -P usb -U lfuse:w:0x5e:m -U hfuse:w:0xd9:m -U efuse:w:0xf3:m
+
+(contains following features)
+ Divide clock by 8 internally; [CKDIV8=0]
+ Serial program downloading (SPI) enabled; [SPIEN=0]
+ Hardware Boot Enable; [HWBE=0]
+
+ DISABLED JTAG!
\ No newline at end of file
#define LCD_USE_CHIPSELECT 1
//CD Port
-#define PORT_DC PORTB
-#define DDR_DC DDRB
-#define PIN_DC 6
+#define PORT_DC PORTF
+#define DDR_DC DDRF
+#define PIN_DC 7
//Reset Port
-#define PORT_RST PORTB
-#define DDR_RST DDRB
-#define PIN_RST 4
+#define PORT_RST PORTF
+#define DDR_RST DDRF
+#define PIN_RST 5
//Chip select
#if LCD_USE_CHIPSELECT == 1
- #define PORT_CS PORTB
- #define DDR_CS DDRB
- #define PIN_CS 5
+ #define PORT_CS PORTF
+ #define DDR_CS DDRF
+ #define PIN_CS 6
#endif
//SPI routines
#arduino #atmega #function
7 PE6 1-wire
-8 PB4 Reset
-9 PB5 CS
-10 PB6 D/C
+A2 PF5 Reset
+A1 PF6 CS
+A0 PF7 D/C
16 PB2(MOSI) SDI
15 PB1(SCK) SCK
-
-A0 PF7 TDI
-A1 PF6 TDO
-A2 PF5 TMS
-A3 PF4 TCK
+
+
+ignore jtag
+#A0 PF7 TDI
+#A1 PF6 TDO
+#A2 PF5 TMS
+#A3 PF4 TCK
+
2 PD1 Down Key
3 PD0 Up Key
-5 PC6(OC3A) Peltier Power PWM
\ No newline at end of file
+5 PC6(OC3A) Peltier Power PWM (cooling)
+6 PD7(OC4D) Peltier Power PWM (heating)
\ No newline at end of file