commit d26d65337f5043218befa25e7eb3084d3ac7cc41 parent 5485b4fa2178e65a72246e6a59065a2ca12fe5b0 Author: Luxferre <lux@ferre> Date: Sat, 23 Nov 2024 14:57:55 +0200 set nano pins Diffstat:
M | Makefile | | | 19 | +++++++++++++------ |
M | aaio.h | | | 16 | +++++++--------- |
2 files changed, 20 insertions(+), 15 deletions(-)
diff --git a/Makefile b/Makefile @@ -1,14 +1,21 @@ PROGRAM_NAME = example_blonk BUILD_DIR = build -MCU = atmega2560 -MCUSHORT = m2560 -MCUDEFS = -DF_CPU=16000000UL -DAAIO_MEGA2560 -PROG_PARAMS = -c wiring -P /dev/ttyUSB0 +SERIALDEV = /dev/ttyUSB0 +#MCU = atmega2560 +#MCUSHORT = m2560 +#MCUDEFS = -DF_CPU=16000000UL -DAAIO_MEGA2560 +#PROG_PARAMS = -c wiring -P $(SERIALDEV) -D #MCU = atmega328p #MCUSHORT = m328p #MCUDEFS = -DF_CPU=8000000UL -DAAIO_NANO -#PROG_PARAMS = -c wiring -P /dev/ttyUSB0 +#PROG_PARAMS = -c wiring -P $(SERIALDEV) -D + +MCU = atmega168pa +MCUSHORT = m168pa +MCUDEFS = -DF_CPU=16000000UL -DAAIO_NANO +PROG_PARAMS = -c urclock -P $(SERIALDEV) -D +#PROG_PARAMS = -c usbasp SUDOCMD = doas @@ -22,7 +29,7 @@ $(PROGRAM_NAME): $(BUILD_DIR) avr-objcopy -j .text -j .data -O ihex $(BUILD_DIR)/$(PROGRAM_NAME).elf $(BUILD_DIR)/$(PROGRAM_NAME).hex upload: $(PROGRAM_NAME) - $(SUDOCMD) avrdude -p $(MCUSHORT) $(PROG_PARAMS) -D -U flash:w:$(BUILD_DIR)/$(PROGRAM_NAME).hex:i + $(SUDOCMD) avrdude -p $(MCUSHORT) $(PROG_PARAMS) -U flash:w:$(BUILD_DIR)/$(PROGRAM_NAME).hex:i clean: rm -rf $(BUILD_DIR) diff --git a/aaio.h b/aaio.h @@ -49,34 +49,32 @@ #define AAIO_KEYPAD_PIN PIND #endif -/* TODO: change default LCD values for Nano! */ - #ifndef AAIO_LCD_PORT -#define AAIO_LCD_PORT PORTL +#define AAIO_LCD_PORT PORTC #endif #ifndef AAIO_LCD_DDR -#define AAIO_LCD_DDR DDRL +#define AAIO_LCD_DDR DDRC #endif #ifndef AAIO_LCD_SCE -#define AAIO_LCD_SCE PL4 +#define AAIO_LCD_SCE PC4 #endif #ifndef AAIO_LCD_RST -#define AAIO_LCD_RST PL3 +#define AAIO_LCD_RST PC3 #endif #ifndef AAIO_LCD_DC -#define AAIO_LCD_DC PL2 +#define AAIO_LCD_DC PC2 #endif #ifndef AAIO_LCD_DIN -#define AAIO_LCD_DIN PL1 +#define AAIO_LCD_DIN PC1 #endif #ifndef AAIO_LCD_CLK -#define AAIO_LCD_CLK PL0 +#define AAIO_LCD_CLK PC0 #endif #endif