Commit 55e135f3 authored by yids's avatar yids

- changed some ports

- added uploading to makefile
parent 27cdb574
Pipeline #47 skipped
......@@ -469,6 +469,9 @@ void maintask(void)
//
int main(void)
{
// DDRB |= (1<<PB2);
// PORTB |= (1<<PB2);
DDRB |= (1<<PB5); PORTB |= (1<<PB5); for(;;);
MCUSR &= ~(1 << WDRF); // Disable watchdog if enabled by bootloader/fuses
wdt_disable();
......
......@@ -121,8 +121,8 @@
//-----------------------------------------------------------------------------
//DEFS for LED
#define LED_PORT PORTD // port for the LED
#define LED_DDR DDRD // port for the LED
#define LED_PORT PORTB // port for the LED
#define LED_DDR DDRB // port for the LED
#define LED (1<<6) // pin for LED
......@@ -136,11 +136,11 @@
#define ENC_A_PORT PORTD // PhaseA port register
#define ENC_A_DDR DDRD // PhaseA port direction register
#define ENC_A_PORTIN PIND // PhaseA port input register
#define ENC_A_PIN (1 << 7) // PhaseA port pin
#define ENC_A_PIN (1 << 1) // PhaseA port pin
#define ENC_B_PORT PORTD // PhaseB port register
#define ENC_B_DDR DDRD // PhaseB port direction register
#define ENC_B_PORTIN PIND // PhaseB port input register
#define ENC_B_PIN (1 << 5) // PhaseB port pin
#define ENC_B_PIN (1 << 2) // PhaseB port pin
#define ENC_RES_DIVIDE 1 // Default reduction of the Encoder Resolution
#define ENCODER_DIR_REVERSE 0 // Reverse the direction of the Rotary Encoder
......@@ -150,7 +150,7 @@
#define ENC_PUSHB_PORT PORTD
#define ENC_PUSHB_DDR DDRD
#define ENC_PUSHB_INPORT PIND
#define ENC_PUSHB_PIN (1 << 4) // PD4
#define ENC_PUSHB_PIN (1 << 3) // PD4
#define ENC_PUSHB_MIN 1 // Min pushdown for valid push (x 10ms)
#define ENC_PUSHB_MAX 10 // Min pushdown for memory save (x 10ms)
......
......@@ -48,17 +48,17 @@
#ifdef LCD_PORT_INTERFACE
#ifndef LCD_CTRL_PORT
// port and pins you will use for control lines
#define LCD_CTRL_PORT PORTC
#define LCD_CTRL_DDR DDRC
#define LCD_CTRL_PORT PORTB
#define LCD_CTRL_DDR DDRB
#define LCD_CTRL_RS 0
#define LCD_CTRL_RW 1
#define LCD_CTRL_E 2
#define LCD_CTRL_RW 4
#define LCD_CTRL_E 1
#endif
#ifndef LCD_DATA_POUT
// port you will use for data lines
#define LCD_DATA_POUT PORTC
#define LCD_DATA_PIN PINC
#define LCD_DATA_DDR DDRC
#define LCD_DATA_POUT PORTD
#define LCD_DATA_PIN PIND
#define LCD_DATA_DDR DDRD
// access mode you will use (default is 8bit unless 4bit is selected)
#define LCD_DATA_4BIT
#endif
......
......@@ -15,3 +15,5 @@ ad8307pm: AD8307PM.c
avr-gcc -g -I AVRLIB/ -mmcu=$(MCU) -D$(F_CPU) $(CFLAGS) $(CFILES) $(LIBCFILES) -o $(ELF)
avr-objcopy -j .text -j .data -O ihex $(ELF) $(HEX)
upload:
avrdude -carduino -p atmega328p -P /dev/ttyUSB1 -b57600 -U flash:w:AD8307PM.hex
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment