Adding ATmega328 bootloader for the Pro and Pro Mini running at 8 MHz (3.3V). Uses the USART0 double speed mode, which according to Nathan from Sparkfun, is necessary to achieve reliable communication at 57600 baud.
This commit is contained in:
parent
3531cb49f4
commit
9858f5294b
|
@ -370,8 +370,16 @@ int main(void)
|
|||
UCSRA = 0x00;
|
||||
UCSRB = _BV(TXEN)|_BV(RXEN);
|
||||
#elif defined(__AVR_ATmega168__) || defined(__AVR_ATmega328P__)
|
||||
|
||||
#ifdef DOUBLE_SPEED
|
||||
UCSR0A = (1<<U2X0); //Double speed mode USART0
|
||||
UBRR0L = (uint8_t)(F_CPU/(BAUD_RATE*8L)-1);
|
||||
UBRR0H = (F_CPU/(BAUD_RATE*8L)-1) >> 8;
|
||||
#else
|
||||
UBRR0L = (uint8_t)(F_CPU/(BAUD_RATE*16L)-1);
|
||||
UBRR0H = (F_CPU/(BAUD_RATE*16L)-1) >> 8;
|
||||
#endif
|
||||
|
||||
UCSR0B = (1<<RXEN0) | (1<<TXEN0);
|
||||
UCSR0C = (1<<UCSZ00) | (1<<UCSZ01);
|
||||
|
||||
|
|
|
@ -0,0 +1,124 @@
|
|||
:107800000C94343C0C94513C0C94513C0C94513CE1
|
||||
:107810000C94513C0C94513C0C94513C0C94513CB4
|
||||
:107820000C94513C0C94513C0C94513C0C94513CA4
|
||||
:107830000C94513C0C94513C0C94513C0C94513C94
|
||||
:107840000C94513C0C94513C0C94513C0C94513C84
|
||||
:107850000C94513C0C94513C0C94513C0C94513C74
|
||||
:107860000C94513C0C94513C11241FBECFEFD8E036
|
||||
:10787000DEBFCDBF11E0A0E0B1E0EAE8FFE702C063
|
||||
:1078800005900D92A230B107D9F712E0A2E0B1E065
|
||||
:1078900001C01D92AD30B107E1F70E942D3D0C945F
|
||||
:1078A000C33F0C94003C982F95959595959595958B
|
||||
:1078B000905D8F708A307CF0282F295A8091C0000B
|
||||
:1078C00085FFFCCF9093C6008091C00085FFFCCF60
|
||||
:1078D0002093C6000895282F205DF0CF982F809127
|
||||
:1078E000C00085FFFCCF9093C6000895EF92FF92F1
|
||||
:1078F0000F931F93EE24FF2487018091C00087FD22
|
||||
:1079000017C00894E11CF11C011D111D81E2E8164D
|
||||
:1079100081EAF80687E0080780E0180770F3E09135
|
||||
:107920000401F091050109958091C00087FFE9CF1E
|
||||
:107930008091C6001F910F91FF90EF9008950E94D3
|
||||
:10794000763C982F8091C00085FFFCCF9093C600B5
|
||||
:1079500091362CF490330CF09053892F089597555D
|
||||
:10796000892F08951F930E949F3C182F0E949F3CCF
|
||||
:107970001295107F810F1F9108951F93182F882350
|
||||
:1079800021F00E94763C1150E1F71F9108951F935A
|
||||
:10799000182F0E94763C803249F0809103018F5F5E
|
||||
:1079A000809303018530C1F01F9108958091C0003C
|
||||
:1079B00085FFFCCF84E18093C6008091C00085FFE5
|
||||
:1079C000FCCF1093C6008091C00085FFFCCF80E102
|
||||
:1079D0008093C6001F910895E0910401F091050184
|
||||
:1079E00009951F9108950E94763C803241F0809164
|
||||
:1079F00003018F5F80930301853081F008958091AA
|
||||
:107A0000C00085FFFCCF84E18093C6008091C00058
|
||||
:107A100085FFFCCF80E18093C6000895E0910401CA
|
||||
:107A2000F09105010995089548EC50E08823A1F0F4
|
||||
:107A30002D9A28EE33E0FA013197F1F721503040CA
|
||||
:107A4000D1F72D9828EE33E0FA013197F1F7215064
|
||||
:107A50003040D1F7815061F708953F924F925F9285
|
||||
:107A60006F927F928F929F92AF92BF92CF92DF924E
|
||||
:107A7000EF92FF920F931F93CF93DF93000082E06A
|
||||
:107A80008093C00080E18093C4001092C50088E11B
|
||||
:107A90008093C10086E08093C2005098589A259A3E
|
||||
:107AA00081E00E94143D24E1F22E9EE1E92E85E959
|
||||
:107AB000D82E0FE0C02E10E1B12EAA24A394B1E479
|
||||
:107AC0009B2EA6E58A2EF2E57F2EE0E26E2E79E46B
|
||||
:107AD000572E63E5462E50E5352E0E94763C8033C6
|
||||
:107AE000B1F18133B9F1803409F46FC0813409F404
|
||||
:107AF00076C0823409F485C0853409F488C08035A5
|
||||
:107B000031F1823521F1813511F1853509F485C0D6
|
||||
:107B1000863509F48DC0843609F496C0843709F49B
|
||||
:107B200003C1853709F472C1863709F466C08091B4
|
||||
:107B300003018F5F80930301853079F6E0910401A2
|
||||
:107B4000F091050109950E94763C803351F60E9420
|
||||
:107B5000F33CC3CF0E94763C803249F78091C0004D
|
||||
:107B600085FFFCCFF092C6008091C00085FFFCCF5E
|
||||
:107B70009092C6008091C00085FFFCCF8092C60025
|
||||
:107B80008091C00085FFFCCF7092C6008091C0003C
|
||||
:107B900085FFFCCF6092C6008091C00085FFFCCFBE
|
||||
:107BA0005092C6008091C00085FFFCCF4092C60075
|
||||
:107BB0008091C00085FFFCCF3092C6008091C0004C
|
||||
:107BC00085FFFCCFB092C60088CF0E94763C8638F5
|
||||
:107BD00008F4BDCF0E94763C0E94F33C7ECF0E9409
|
||||
:107BE000763C803809F49CC0813809F40BC1823896
|
||||
:107BF00009F430C1883909F48FC080E00E94C73C85
|
||||
:107C00006CCF84E10E94BD3C0E94F33C66CF85E0CE
|
||||
:107C10000E94BD3C0E94F33C60CF0E94763C809362
|
||||
:107C200006010E94763C809307010E94F33C55CFE9
|
||||
:107C30000E94763C803309F411C183E00E94BD3C70
|
||||
:107C400080E00E94C73C49CF0E94763C80930902A5
|
||||
:107C50000E94763C8093080280910C028E7F809374
|
||||
:107C60000C020E94763C853409F409C18091080217
|
||||
:107C700090910902892B89F000E010E00E94763C87
|
||||
:107C8000F801E85FFE4F80830F5F1F4F809108026D
|
||||
:107C9000909109020817190788F30E94763C8032F8
|
||||
:107CA00009F045CF80910C0280FFF5C0609106017C
|
||||
:107CB00070910701660F771F7093070160930601AB
|
||||
:107CC000A0910802B09109021097C9F0E8E0F1E034
|
||||
:107CD0009B01AD014E0F5F1FF999FECF32BD21BD53
|
||||
:107CE000819180BDFA9AF99A2F5F3F4FE417F5070B
|
||||
:107CF00099F76A0F7B1F70930701609306018091CB
|
||||
:107D0000C00085FFFCCFF092C6008091C00085FFC7
|
||||
:107D1000FCCFB092C600E1CE83E00E94C73CDDCE2E
|
||||
:107D200082E00E94C73CD9CE0E94763C8093090233
|
||||
:107D30000E94763C80930802809106019091070191
|
||||
:107D4000880F991F90930701809306010E94763C4B
|
||||
:107D5000853409F49AC080910C028E7F80930C02C6
|
||||
:107D60000E94763C803209F0B8CE8091C00085FF39
|
||||
:107D7000FCCFF092C600A0910802B09109021097C2
|
||||
:107D8000C1F180910C02082F0170182F1695117007
|
||||
:107D9000E0910601F0910701AF014F5F5F4FBA011B
|
||||
:107DA00020E030E00023B1F4112339F49491809164
|
||||
:107DB000C00085FFFCCF9093C6002F5F3F4FCB01E3
|
||||
:107DC0000196FA012A173B0780F4BC014F5F5F4F11
|
||||
:107DD000002351F3F999FECFF2BDE1BDF89A90B5B9
|
||||
:107DE0008091C00085FFFCCFE6CF709307016093C0
|
||||
:107DF00006018091C00085FDE5CE8091C00085FF21
|
||||
:107E0000F8CFE0CE81E00E94C73C67CE0E94763C6E
|
||||
:107E1000803209F08CCE8091C00085FFFCCFF092BB
|
||||
:107E2000C6008091C00085FFFCCFE092C600809123
|
||||
:107E3000C00085FFFCCFD092C6008091C00085FFB6
|
||||
:107E4000FCCFC092C6008091C00085FFFCCFB092ED
|
||||
:107E5000C60043CE80E10E94C73C3FCE0E94763CE4
|
||||
:107E60000E94763C182F0E94763C112309F483C0AF
|
||||
:107E7000113009F484C08FE00E94C73C2ECE80915F
|
||||
:107E80000C02816080930C02F1CE80910C02816023
|
||||
:107E900080930C0265CF809107018823880F880B9F
|
||||
:107EA0008A2180930B028091060190910701880F2F
|
||||
:107EB000991F90930701809306018091080280FF2B
|
||||
:107EC00009C08091080290910902019690930902DD
|
||||
:107ED00080930802F894F999FECF1127E0910601EA
|
||||
:107EE000F0910701C8E0D1E0809108029091090269
|
||||
:107EF000103091F40091570001700130D9F303E084
|
||||
:107F000000935700E8950091570001700130D9F3B4
|
||||
:107F100001E100935700E8950990199000915700EE
|
||||
:107F200001700130D9F301E000935700E8951395F3
|
||||
:107F3000103498F011270091570001700130D9F3E7
|
||||
:107F400005E000935700E89500915700017001305B
|
||||
:107F5000D9F301E100935700E8953296029709F0B2
|
||||
:107F6000C7CF103011F00296E5CF11248091C000E8
|
||||
:107F700085FFC5CEC8CE8EE10E94C73CAECD85E957
|
||||
:0A7F80000E94C73CAACDF894FFCF81
|
||||
:027F8A00800075
|
||||
:040000030000780081
|
||||
:00000001FF
|
|
@ -166,6 +166,21 @@ atmega328_isp: LFUSE = FF
|
|||
atmega328_isp: EFUSE = 05
|
||||
atmega328_isp: isp
|
||||
|
||||
atmega328_pro8: TARGET = atmega328_pro_8MHz
|
||||
atmega328_pro8: MCU_TARGET = atmega328p
|
||||
atmega328_pro8: CFLAGS += '-DMAX_TIME_COUNT=F_CPU>>4' '-DNUM_LED_FLASHES=1' -DBAUD_RATE=57600 -DDOUBLE_SPEED
|
||||
atmega328_pro8: AVR_FREQ = 8000000L
|
||||
atmega328_pro8: LDSECTION = --section-start=.text=0x7800
|
||||
atmega328_pro8: $(PROGRAM)_atmega328_pro_8MHz.hex
|
||||
|
||||
atmega328_pro8_isp: atmega328_pro8
|
||||
atmega328_pro8_isp: TARGET = atmega328_pro_8MHz
|
||||
atmega328_pro8_isp: MCU_TARGET = atmega328p
|
||||
atmega328_pro8_isp: HFUSE = DA
|
||||
atmega328_pro8_isp: LFUSE = FF
|
||||
atmega328_pro8_isp: EFUSE = 05
|
||||
atmega328_pro8_isp: isp
|
||||
|
||||
mega: TARGET = atmega1280
|
||||
mega: MCU_TARGET = atmega1280
|
||||
mega: CFLAGS += '-DMAX_TIME_COUNT=F_CPU>>4' '-DNUM_LED_FLASHES=0' -DBAUD_RATE=57600
|
||||
|
|
Loading…
Reference in New Issue