Prototype RS232 AVR parallel flash programmer

From Random Projects
Jump to: navigation, search
Prototype RS232 AVR programmer

Hardware description

This device is the workbench using which flashrom's generic serial external programmer protocol code was and will be tested.

The hardware can be used together with the serprog programmer code integrated into recent flashrom versions.

Short hardware listing:

  • An ATmega88/168 development board (RS232 level converter, 5V regulator)
  • ATmega168 (18.432MHz, 16k program memory, 1k SRAM)
  • 3 74HC164N shift registers for the address bus
  • DIL40 socket for flash to be programmed
    • I just happened to have DIL40 socket instead of a DIL32 (it's wired for 32).

AVR to Flash interface pinout

The interface on the AVR side consists of

  • 8-bit direct data bus
  • 3-bit control bus (CE/OE/WE)
  • 4 line address bus — expands up to 24-bit

Data bus

  • data bits 7..2 = PD7 - PD2
  • data bits 1..0 = PB1 - PB0

Control bus

  •  !CE = PC3
  •  !OE = PC4
  •  !WE = PC5

Address bus

The address bus consists of 3 shift registers (74HC164N) with common clock signal and outputs arranged so that with 1 clock pulse one can set A2..A0 — so with 6 pulses (12 toggles) one can set A17..A0, 8 pulses (maximum) would give A23..A0.

The shift register that outputs
A0,3,6,9,12,15...	A1,4,7,10,13,16...	A2,5,8,11,14,17...
is at				
PC1			PC0			PB4

The clock line is PB2 — usage is that you set the bit values to "send", then send a pulse (up + down transitions) on the clock line.