Difference between revisions of "Prototype RS232 AVR parallel flash programmer"

From Random Projects
Jump to: navigation, search
(Initial create, just the internal pinout from the AVR to flash now)
 
m
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
[[Image:Avr_rs232_programmer.jpg|200px|thumb|right|Prototype RS232 AVR programmer]]
 +
 +
== Hardware description ==
 +
 +
This device is the workbench using which [http://www.flashrom.org 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 ==
 
== AVR to Flash interface pinout ==
  
 
The interface on the AVR side consists of
 
The interface on the AVR side consists of
* 8-bit direct databus
+
* 8-bit direct data bus
 
* 3-bit control bus (CE/OE/WE)
 
* 3-bit control bus (CE/OE/WE)
* 4 line address bus - expands upto 24-bit
+
* 4 line address bus — expands up to 24-bit
  
 
=== Data bus ===
 
=== Data bus ===
 +
 
* data bits 7..2 = PD7 - PD2
 
* data bits 7..2 = PD7 - PD2
 
* data bits 1..0 = PB1 - PB0
 
* data bits 1..0 = PB1 - PB0
  
 
=== Control bus ===
 
=== Control bus ===
 +
 
* !CE = PC3
 
* !CE = PC3
 
* !OE = PC4
 
* !OE = PC4
Line 16: Line 33:
  
 
=== Address bus ===
 
=== 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,
+
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.
8 pulses (maximum) would give A23..A0.
 
  
 
  The shift register that outputs
 
  The shift register that outputs
  A0,3,6,9,12,15... A1,4,7,10,13,16... A2,5,8,11,14,17
+
  A0,3,6,9,12,15... A1,4,7,10,13,16... A2,5,8,11,14,17...
 
  is at
 
  is at
 
  PC1 PC0 PB4
 
  PC1 PC0 PB4
  
The clock line is PB2 - usage is that you set the bit values to "send",
+
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.
then send a pulse (up+down transitions) on the clock line.
 

Latest revision as of 01:52, 22 June 2010

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.