From cd89b3b3f30bdd98b725de0ea565f45fb4d9567c Mon Sep 17 00:00:00 2001 From: Nao Pross Date: Thu, 7 Sep 2017 14:25:39 +0200 Subject: minor bug fix for ROM programmer --- sw/programmer/avr/main.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'sw/programmer/avr') 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 -- cgit v1.2.1