Skip to content

Commit 43e15b0

Browse files
committed
Added Atmega8A signature and info
1 parent 3836e56 commit 43e15b0

File tree

4 files changed

+61
-3
lines changed

4 files changed

+61
-3
lines changed

Atmega_Board_Detector/Atmega_Board_Detector.ino

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// Version 1.4: Output an 8 MHz clock on pin 9
1010
// Version 1.5: Corrected flash size for Atmega1284P.
1111
// Version 1.6: Added signatures for ATtiny2313A, ATtiny4313, ATtiny13
12+
// Version 1.7: Added signature for Atmega8A
1213

1314
/*
1415
@@ -129,6 +130,9 @@ const signatureType signatures [] =
129130
// ATtiny13 family
130131
{ { 0x1E, 0x90, 0x07 }, "ATtiny13A", 1 * kb, 0 },
131132

133+
// Atmega8A family
134+
{ { 0x1E, 0x93, 0x07 }, "ATmega8A", 8 * kb, 256 },
135+
132136
}; // end of signatures
133137

134138
// if signature found in above table, this is its index

Atmega_Board_Programmer/Atmega_Board_Programmer.ino

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Atmega chip programmer
22
// Author: Nick Gammon
33
// Date: 22nd May 2012
4-
// Version: 1.12
4+
// Version: 1.13
55

66
// Version 1.1: Reset foundSig to -1 each time around the loop.
77
// Version 1.2: Put hex bootloader data into separate files
@@ -15,6 +15,7 @@
1515
// Version 1.10: Corrected flash size for Atmega1284P.
1616
// Version 1.11: Added support for Atmega1280. Removed MD5SUM stuff to make room.
1717
// Version 1.12: Added signatures for ATtiny2313A, ATtiny4313, ATtiny13
18+
// Version 1.13: Added signature for Atmega8A
1819

1920
/*
2021
@@ -203,6 +204,10 @@ signatureType signatures [] =
203204
// ATtiny13 family
204205
{ { 0x1E, 0x90, 0x07 }, "ATtiny13A", 1 * kb, 0 },
205206

207+
// Atmega8A family
208+
{ { 0x1E, 0x93, 0x07 }, "ATmega8A", 8 * kb, 256 },
209+
210+
206211
}; // end of signatures
207212

208213
// if signature found in above table, this is its index

Atmega_Fuse_Calculator/Atmega_Fuse_Calculator.ino

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
// Version 1.1: Output an 8 MHz clock on pin 9
77
// Version 1.2: Corrected flash size for Atmega1284P.
88
// Version 1.3: Added signatures for ATtiny2313A, ATtiny4313, ATtiny13
9+
// Version 1.4: Added signature for Atmega8A
10+
// Fixed bug in displaying bootloader size
911

1012
/*
1113
@@ -103,13 +105,16 @@ char PROGMEM descSelfProgrammingEnable [] = "Self Programming Enable";
103105
char PROGMEM descHardwareBootEnable [] = "Hardare Boot Enable";
104106
char PROGMEM descOCDEnable [] = "OCD Enable";
105107
char PROGMEM descJtagEnable [] = "JTAG Enable";
108+
char PROGMEM descOscillatorOptions [] = "Oscillator Options";
109+
char PROGMEM descBrownOutDetectorEnable [] = "Brown out detector enable";
110+
char PROGMEM descBrownOutDetectorLevel [] = "Brown out detector level";
106111

107112
// calculate size of bootloader
108113
void fBootloaderSize (const byte val, const unsigned int bootLoaderSize)
109114
{
110115
Serial.print (F("Bootloader size: "));
111116
unsigned int len = bootLoaderSize;
112-
switch (val >> 1)
117+
switch (val & 3)
113118
{
114119
case 0: len *= 8; break;
115120
case 1: len *= 4; break;
@@ -185,6 +190,23 @@ void fClockSource (const byte val, const unsigned int bootLoaderSize)
185190
} // end of switch
186191

187192
} // end of fClockSource
193+
194+
// work out clock source (Atmega8A)
195+
void fClockSource2 (const byte val, const unsigned int bootLoaderSize)
196+
{
197+
Serial.print (F("Clock source: "));
198+
switch (val)
199+
{
200+
case 0b1010 ... 0b1111: Serial.println (F("low-power crystal.")); break;
201+
case 0b1001 : Serial.println (F("low-frequency crystal.")); break;
202+
case 0b0101 ... 0b1000: Serial.println (F("external RC oscillator.")); break;
203+
case 0b0001 ... 0b0100: Serial.println (F("calibrated internal oscillator.")); break;
204+
case 0b0000: Serial.println (F("external clock.")); break;
205+
default: Serial.println (F("reserved.")); break;
206+
} // end of switch
207+
208+
} // end of fClockSource2
209+
188210

189211
// fuses for various processors
190212

@@ -338,6 +360,26 @@ fuseMeaning PROGMEM ATtiny13_fuses [] =
338360
{ highFuse, 0x06, NULL, fBrownoutDetectorLevel },
339361

340362
}; // end of ATtiny13_fuses
363+
364+
fuseMeaning PROGMEM ATmega8_fuses [] =
365+
{
366+
{ highFuse, 0x80, descExternalResetDisable },
367+
{ highFuse, 0x40, descWatchdogTimerAlwaysOn },
368+
{ highFuse, 0x20, descSelfProgrammingEnable },
369+
{ highFuse, 0x10, descOscillatorOptions },
370+
{ highFuse, 0x80, descEEPROMsave },
371+
{ highFuse, 0x01, descBootIntoBootloader },
372+
373+
{ lowFuse, 0x80, descBrownOutDetectorLevel },
374+
{ lowFuse, 0x40, descBrownOutDetectorEnable },
375+
376+
// special (combined) bits
377+
{ highFuse, 0x06, NULL, fBootloaderSize },
378+
379+
{ lowFuse, 0x30, NULL, fStartUpTime },
380+
{ lowFuse, 0x0F, NULL, fClockSource2 },
381+
382+
}; // end of ATmega8_fuses
341383

342384
// structure for information about a single processor
343385
typedef struct {
@@ -399,6 +441,9 @@ const signatureType signatures [] =
399441
// ATtiny13 family
400442
{ { 0x1E, 0x90, 0x07 }, "ATtiny13A", 1 * kb, 0, ATtiny13_fuses, NUMITEMS (ATtiny13_fuses) },
401443

444+
// Atmega8A family
445+
{ { 0x1E, 0x93, 0x07 }, "ATmega8A", 8 * kb, 256, ATmega8_fuses, NUMITEMS (ATmega8_fuses) },
446+
402447
}; // end of signatures
403448

404449
// if signature found in above table, this is its index

Atmega_Hex_Uploader/Atmega_Hex_Uploader.ino

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
// Version 1.9: Ensure in programming mode before access flash (eg. if reset removed to test)
1717
// Added reading of clock calibration byte (note: this cannot be changed)
1818
// Version 1.10: Added signatures for ATtiny2313A, ATtiny4313, ATtiny13
19+
// Version 1.11: Added signature for Atmega8
1920

2021
/*
2122
@@ -55,7 +56,7 @@
5556

5657
// #include <memdebug.h>
5758

58-
const char Version [] = "1.10";
59+
const char Version [] = "1.11";
5960

6061
// bit banged SPI pins
6162
const byte MSPIM_SCK = 4; // port D bit 4
@@ -196,6 +197,9 @@ const signatureType PROGMEM signatures [] =
196197
// ATtiny13 family
197198
{ { 0x1E, 0x90, 0x07 }, "ATtiny13A", 1 * kb, 0, 32, NO_FUSE },
198199

200+
// Atmega8A family
201+
{ { 0x1E, 0x93, 0x07 }, "ATmega8A", 8 * kb, 256, 64, highFuse },
202+
199203
}; // end of signatures
200204

201205
char name[MAX_FILENAME] = { 0 }; // current file name

0 commit comments

Comments
 (0)