summaryrefslogtreecommitdiffstats
path: root/sw/programmer/avr
diff options
context:
space:
mode:
Diffstat (limited to 'sw/programmer/avr')
-rw-r--r--sw/programmer/avr/main.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sw/programmer/avr/main.c b/sw/programmer/avr/main.c
index 9cdc35d..4f39100 100644
--- a/sw/programmer/avr/main.c
+++ b/sw/programmer/avr/main.c
@@ -98,16 +98,21 @@ void eeprom_write(uint16_t addr, uint8_t byte)
/* set data */
EEPROMDR = byte;
+
+ // because EEPROMDR0 and EEPROMDR1 are used by Tx and Rx
+ EEPROMCR = (PINC & 0x07) | (byte & 0x03)<<3;
EEPROMCR &= ~(_BV(ADDR_EH) | _BV(ADDR_EL));
/* write eeprom */
EEPROMCR &= ~_BV(EEPROM_WR);
- eeprom_tick();
+
+ // eeprom_tick();
EEPROMCR |= _BV(EEPROM_WR);
EEPROMCR |= _BV(ADDR_EH) | _BV(ADDR_EL);
}
+#if 0
/* pulse the clock line for the eeprom */
void eeprom_tick()
{
@@ -116,4 +121,4 @@ void eeprom_tick()
EEPROMCR &= ~_BV(EEPROM_CLK);
_delay_ms(EEPROM_TICK_MS);
}
-
+#endif \ No newline at end of file