Snippets

Gerad Munsch Programming Atmel 8051 devices with 'avrdude'

Created by Gerad Munsch

# This is supposed to be the "default" STK500 entry.
# Attempts to select the correct firmware version
# by probing for it.  Better use one of the entries
# below instead.
programmer
  id    = "stk500v2";
  desc  = "Atmel STK500 Version 2.x firmware";
  type  = "stk500v2";
  connection_type = serial;
;

programmer
  id    = "stk500";
  desc  = "Atmel STK500";
  type  = "stk500generic";
;

programmer
  id    = "stk500v1";
  desc  = "Atmel STK500 Version 1.x firmware";
  type  = "stk500";
;

programmer
  id    = "avrisp";
  desc  = "Atmel AVR ISP";
  type  = "stk500";
;

programmer
	id		= "arduino";
	desc	= "Arduino";
	type	= "arduino";
;



# ------------------------------------------------------------ #
# AT89S52                                                      #
# ------------------------------------------------------------ #
part
	id					= "at89s52";
	desc				= "AT89S52";
	signature			= 0x1E 0x52 0x06;
	stk500_devcode		= 0xE1;
	chip_erase_delay	= 20000;

	pgm_enable	=	"1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
					"x x x x  x x x x    x x x x  x x x x";

	chip_erase	=	"1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
					"x x x x  x x x x    x x x x  x x x x";

	timeout		= 200;
	stabdelay	= 100;
	cmdexedelay	= 25;
	synchloops	= 32;
	bytedelay	= 0;
	pollindex	= 3;
	pollvalue	= 0x53;
	predelay	= 1;
	postdelay	= 1;
	pollmethod	= 0;

	memory "flash"
		size			= 8192;
		paged			= no;
		min_write_delay	= 4000;
		max_write_delay	= 9000;
		readback_p1		= 0xff;
		readback_p2		= 0xff;

		read	=	"  0   0   1   0    0   0   0   0",
					"  x   x   x a12  a11 a10  a9  a8",
					" a7  a6  a5  a4   a3  a2  a1  a0",
					"  o   o   o   o    o   o   o   o";

		write	=	"  0   1   0   0    0   0   0   0",
					"  x   x   x a12  a11 a10  a9  a8",
					" a7  a6  a5  a4   a3  a2  a1  a0",
					"  i   i   i   i    i   i   i   i";

		mode	= 0x21;
		delay	= 12;
	;

	memory "signature"
		size	= 3;

		read	=	"0  0  1  0   1  0  0  0   x  x  x  0   0  0 a1 a0",
					"0  0  0  0   0  0  0  0   o  o  o  o   o  o  o  o";
	;
; 

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.