misc avr fixes
authorErik Andresen <erik@vontaene.de>
Sun, 5 Nov 2017 20:02:46 +0000 (21:02 +0100)
committerErik Andresen <erik@vontaene.de>
Sun, 5 Nov 2017 20:02:46 +0000 (21:02 +0100)
avr/motor_ctrl/main.c
avr/nano/Makefile
avr/nano/main.c
avr/nano/main.hex
avr/nano/uart.c

index d751375..ec9965f 100644 (file)
@@ -382,7 +382,7 @@ ISR(TWI_vect)
                                default:
                                        TWI_NAK;
                        }
-                       ireg++;
+                       if (ireg < 0xff) ireg++;
                        break;
                case TW_ST_SLA_ACK: // start read
                case TW_ST_DATA_ACK: // read
index f8864cc..1587f45 100644 (file)
@@ -134,7 +134,7 @@ PRINTF_LIB_MIN = -Wl,-u,vfprintf -lprintf_min
 # Floating point printf version (requires MATH_LIB = -lm below)\r
 PRINTF_LIB_FLOAT = -Wl,-u,vfprintf -lprintf_flt -lm\r
 \r
-PRINTF_LIB = \r
+PRINTF_LIB = $(PRINTF_LIB_MIN)\r
 \r
 # Minimalistic scanf version\r
 SCANF_LIB_MIN = -Wl,-u,vfscanf -lscanf_min\r
@@ -144,7 +144,7 @@ SCANF_LIB_FLOAT = -Wl,-u,vfscanf -lscanf_flt
 \r
 SCANF_LIB = \r
 \r
-MATH_LIB = -lm\r
+MATH_LIB = #-lm\r
 \r
 # External memory options\r
 \r
@@ -164,7 +164,7 @@ EXTMEMOPTS =
 #    --cref:    add cross reference to  map file\r
 LDFLAGS = -Wl,-Map=$(TARGET).map,--cref\r
 LDFLAGS += $(EXTMEMOPTS)\r
-LDFLAGS += $(PRINTF_LIB_MIN) $(SCANF_LIB) $(MATH_LIB)\r
+LDFLAGS += $(PRINTF_LIB) $(SCANF_LIB) $(MATH_LIB)\r
 \r
 \r
 \r
index 16a316c..7b62c80 100644 (file)
@@ -8,6 +8,7 @@
 #include <util/twi.h>
 #include <avr/eeprom.h>
 #include <avr/wdt.h>
+#include <avr/pgmspace.h>
 #include "uart.h"
 
 /*
@@ -81,7 +82,7 @@ ISR(TWI_vect)
                                default:
                                        TWI_NAK;
                        }
-                       ireg++;
+                       if (ireg < 0xff) ireg++;
                        break;
                case TW_ST_SLA_ACK: // start read
                case TW_ST_DATA_ACK: // read
@@ -305,7 +306,7 @@ int main(void) {
        EICRA = (1 << ISC10) | (1 << ISC00);
        PCICR = (1 << PCIE2);
 
-       printf("\r\nStart\r\n");
+       printf_P(PSTR("\r\nStart\r\n"));
 
        set_sleep_mode(SLEEP_MODE_IDLE);
        sei();
index 7f1bb78..3f3fa6b 100644 (file)
-:100000000C945A000C944E010C9498010C947700B7\r
-:100010000C9477000C94E2010C9477000C94770018\r
-:100020000C9477000C9477000C9477000C94770074\r
-:100030000C9477000C9477000C9477000C94770064\r
-:100040000C9477000C9477000C9443020C94770086\r
-:100050000C9477000C9477000C9477000C94770044\r
-:100060000C9479000C947700D300F700D800F700C7\r
-:10007000E800F700ED00F700E300F700F200F700FA\r
-:10008000FD00FD00FD00FD00FD00FD00FD00FD0088\r
-:10009000E800F700ED00F700F200F700454647657D\r
-:1000A000666700202B2D2E30313233343536373809\r
-:1000B0003968000011241FBECFEFD8E0DEBFCDBFEE\r
-:1000C00011E0A0E0B1E0ECE9F3E102C005900D928F\r
-:1000D000A031B107D9F721E0A0E1B1E001C01D9244\r
-:1000E000AF39B207E1F70E944D030C94CC090C9490\r
-:1000F00000001F920F920FB60F9211248F939F93BF\r
-:10010000AF93BF93EF93FF938091B900887F803ABC\r
-:1001100009F47EC028F4803641F0803861F07AC05E\r
-:10012000883AA1F1883B91F175C085EC8093BC00C1\r
-:100130001092290172C080912901882341F08F3FDC\r
-:1001400009F05DC08091BB008093280158C0809168\r
-:10015000BB008093290180912901853019F481E049\r
-:1001600080931D0180912901873019F481E08093EB\r
-:100170001B01809129018B3019F481E080931C01CF\r
-:100180008091290181508093290135C0E091290196\r
-:100190008E2F90E0FC013197EA31F10570F5EC5CAF\r
-:1001A000FF4F0C94F306809126019091270104C023\r
-:1001B000809124019091250180931601909317015D\r
-:1001C0009093BB0018C08091190190911A01F4CF4F\r
-:1001D0008091220190912301EFCF80911E01909197\r
-:1001E0001F01EACF8091200190912101E5CF8091FC\r
-:1001F00016018093BB0085EC03C01092BB0085E81C\r
-:100200008093BC00809129018F5F8093290105C0F4\r
-:1002100085EC01C085ED8093BC00FF91EF91BF910B\r
-:10022000AF919F918F910F900FBE0F901F901895D7\r
-:1002300093E890937A0080937C0080917C008064A6\r
-:1002400080937C0080917A00806480937A00809112\r
-:100250007A0086FDFCCF809178009091790025E0AE\r
-:1002600080E090E030917A00306430937A003091F1\r
-:100270007A0036FDFCCF4091780050917900840FD0\r
-:10028000951F215079F720917A002F7720937A00DB\r
-:1002900065E070E00E94C006CB0108951F920F92A6\r
-:1002A0000FB60F9211242F933F934F935F936F9349\r
-:1002B0007F938F939F93AF93BF93EF93FF9360913F\r
-:1002C0008400709185004A9B05C07093150160936E\r
-:1002D00014011DC08091140190911501681B790BC8\r
-:1002E00080E090E00E94C50527EE3CE840E350E442\r
-:1002F0000E94530620E030E040E05FE30E942A05C0\r
-:100300000E9496057093230160932201E898FF9163\r
-:10031000EF91BF91AF919F918F917F916F915F917D\r
-:100320004F913F912F910F900FBE0F901F901895F6\r
-:100330001F920F920FB60F9211242F933F934F935A\r
-:100340005F936F937F938F939F93AF93BF93EF933D\r
-:10035000FF9360918400709185004B9B05C0709362\r
-:100360001301609312011DC080911201909113013D\r
-:10037000681B790B80E090E00E94C50527EE3CE801\r
-:1003800040E350E40E94530620E030E040E05FE3A9\r
-:100390000E942A050E94960570931F0160931E011A\r
-:1003A000E998FF91EF91BF91AF919F918F917F91CC\r
-:1003B0006F915F914F913F912F910F900FBE0F90D2\r
-:1003C0001F9018951F920F920FB60F9211242F9322\r
-:1003D0003F934F935F936F937F938F939F93AF93CD\r
-:1003E000BF93EF93FF93CF93DF931F92CDB7DEB709\r
-:1003F00089B1898390911801892784FF2DC060916C\r
-:10040000840070918500898184FF05C0709311017B\r
-:100410006093100121C08091100190911101681B1F\r
-:10042000790B80E090E00E94C50527EE3CE840E3B0\r
-:1004300050E40E94530620E030E040E05FE30E9479\r
-:100440002A050E94960570932101609320018091F6\r
-:100450006D008F7E80936D008981809318010F90CD\r
-:10046000DF91CF91FF91EF91BF91AF919F918F91CC\r
-:100470007F916F915F914F913F912F910F900FBEA0\r
-:100480000F901F9018951F920F920FB60F92112484\r
-:100490008F939F93EF93FF938091C00087FF17C0C6\r
-:1004A000E0912C01F0912D018091C600808381E0C4\r
-:1004B000E139F80730F43196F0932D01E0932C01E7\r
-:1004C00006C08EE291E090932D0180932C01FF9164\r
-:1004D000EF919F918F910F900FBE0F901F901895E5\r
-:1004E0009C01E1ECF0E080818861808380818068FC\r
-:1004F0008083E2ECF0E0808186608083C901A0E027\r
-:10050000B0E09C01AD0184E0220F331F441F551F52\r
-:100510008A95D1F760E074E284EF90E00E94D406FF\r
-:10052000DA01C9010197A109B109892F9A2FAB2FCF\r
-:10053000BB27A7FDBA958093C50021502093C40026\r
-:100540008EE291E090932B0180932A0190932D01EC\r
-:1005500080932C0108952091C00025FFFCCFFC0161\r
-:1005600080818093C6000895CF93DF931F92CDB70B\r
-:10057000DEB78983CE0101960E94AB0280E090E055\r
-:100580000F90DF91CF910895CF93DF93EC01CE01CF\r
-:100590002196FC012081222319F00E94AB02F7CFA3\r
-:1005A000DF91CF9108958091C00087FFFCCF8091AB\r
-:1005B000C60090E008950C94D3026BED72E084EBDA\r
-:1005C00092E00C945D07CF93DF93FC01E253FF4F61\r
-:1005D000A081B181EC01C453DF4F28813981A2177A\r
-:1005E000B307B9F02091C00025FF13C02C912093D0\r
-:1005F000C60020813181AC0145535F4F2417350778\r
-:1006000018F42F5F3F4F03C09C0128593F4F31839F\r
-:100610002083E0912A01F0912B0120912C0130914F\r
-:100620002D012E173F07B1F1EC01CC59DF4FA88106\r
-:10063000B98120812C93688179819C012B523F4F95\r
-:10064000D9013C91DB012C91321307C0AC014C5213\r
-:100650005F4FDA012C912F5F2C939C012D593F4F56\r
-:100660006217730728F4DB011196B983A88302C0CF\r
-:1006700099838883B1E0E139FB0730F43196F09338\r
-:100680002B01E0932A0106C08EE291E090932B01AA\r
-:1006900080932A01DF91CF9108951092280180E87C\r
-:1006A00095E20E9470020E94DD0282E58093BA000A\r
-:1006B00085EC8093BC001092800084E080938100E0\r
-:1006C00095E0909369008093680086E091E00E9435\r
-:1006D000E00783B7817F83BF7894C8E1D8E0809139\r
-:1006E0002901833089F058F4813009F03EC080E060\r
-:1006F0000E941801909327018093260136C089300B\r
-:1007000059F08F3FF1F031C081E00E9418019093C1\r
-:1007100025018093240129C082E00E941801BC01B8\r
-:1007200080E090E00E94C50528E431EE4AEB5FE3EB\r
-:100730000E9453060E94960570931A016093190156\r
-:1007400014C080912801853A81F4F8946BE780E029\r
-:1007500090E00E94BE09F999FECF0FB6F894A895D3\r
-:10076000C09360000FBED093600080911D0188236C\r
-:1007700091F010921D011092230110922201529AC1\r
-:100780005A9A85E38A95F1F700005A9852988CB3EB\r
-:1007900081708CBBE89A80911B01882391F01092A4\r
-:1007A0001B0110921F0110921E01539A5B9A85E360\r
-:1007B0008A95F1F700005B9853988CB382708CBBDC\r
-:1007C000E99A80911C018823B1F010921C011092CB\r
-:1007D000210110922001549A5C9A85E38A95F1F7E1\r
-:1007E00000005C98549889B18093180180916D0045\r
-:1007F000806180936D0083B7816083BF889583B7E4\r
-:100800008E7F83BF6CCFACE0B0E0E9E0F4E00C9405\r
-:10081000FD066C015B017A01FC011782168283815F\r
-:1008200081FF0EC1CE0101964C01F6010381F50155\r
-:1008300003FD159103FF11915F01112309F4FCC021\r
-:10084000153249F403FD159103FF11915F01153233\r
-:1008500011F020E01BC0B601812F90E00E94A80794\r
-:1008600037017301E2CF112309F4E6C0612F70E074\r
-:1008700083EA90E02C870E9452072C85892B49F04F\r
-:10088000F50103FD159103FF11915F0127FFEBCFE8\r
-:1008900009C0133229F01C3609F0D5C02068F0CF0A\r
-:1008A00020E1EECF022F112309F4C6C0612F70E0C2\r
-:1008B0008CE990E02C870E9452072C85892B41F00F\r
-:1008C0003701F4E06F0E711CB6018FE390E011C0A8\r
-:1008D000133639F0133781F0133519F5022F016003\r
-:1008E0000BC0370182E0680E711CB601F7018081F0\r
-:1008F00091810E94A807B5CF3701F2E06F0E711CFD\r
-:10090000F701E080F180F70100FD859100FF819102\r
-:100910007F01882309F4A5CFB60190E00E94A807C3\r
-:10092000F2CF143611F0193629F5370127FF09C027\r
-:10093000F4E06F0E711CF7016081718182819381F7\r
-:100940000AC0F2E06F0E711CF70160817181072E01\r
-:10095000000C880B990B022F0F7E97FF08C0909513\r
-:100960008095709561957F4F8F4F9F4F00642AE06F\r
-:1009700030E033C0103799F040F41835B1F01F362D\r
-:1009800009F05AC028E030E014C0153719F01837C4\r
-:1009900041F052C0022F0F7E2AE030E00AC0022F41\r
-:1009A0000061046220E130E004C0022F046020E115\r
-:1009B00032E0370107FF09C0F4E06F0E711CF70148\r
-:1009C000608171818281938108C0F2E06F0E711C99\r
-:1009D000F7016081718180E090E0A4010E9410081D\r
-:1009E000182F181906FF05C0B6018DE290E00E948D\r
-:1009F000A80704FF15C0FE01E10FF11D80818033BF\r
-:100A000079F0B60180E390E00E94A80702FF08C0D9\r
-:100A10000072802F90E0B601885A9F4F0E94A8076D\r
-:100A20001150F401E10FF11D8081B60190E00E94A8\r
-:100A3000A8071111F5CF15CFF6018681978105C062\r
-:100A40008FEF9FEF02C0022F31CF2C96EEE00C9477\r
-:100A500019075058BB27AA270E9441050C94190674\r
-:100A60000E940B0638F00E94120620F039F49F3FD6\r
-:100A700019F426F40C9408060EF4E095E7FB0C94A8\r
-:100A80000206E92F0E942A0658F3BA176207730775\r
-:100A90008407950720F079F4A6F50C944C060EF423\r
-:100AA000E0950B2EBA2FA02D0B01B90190010C017E\r
-:100AB000CA01A0011124FF27591B99F0593F50F496\r
-:100AC000503E68F11A16F040A22F232F342F4427EE\r
-:100AD000585FF3CF469537952795A795F0405395E6\r
-:100AE000C9F77EF41F16BA0B620B730B840BBAF0B6\r
-:100AF0009150A1F0FF0FBB1F661F771F881FC2F721\r
-:100B00000EC0BA0F621F731F841F48F48795779534\r
-:100B10006795B795F7959E3F08F0B0CF9395880FEE\r
-:100B200008F09927EE0F9795879508950E94320651\r
-:100B300088F09F5798F0B92F9927B751B0F0E1F09E\r
-:100B4000660F771F881F991F1AF0BA95C9F714C04E\r
-:100B5000B13091F00E944C06B1E008950C944C061F\r
-:100B6000672F782F8827B85F39F0B93FCCF3869587\r
-:100B700077956795B395D9F73EF4909580957095E4\r
-:100B800061957F4F8F4F9F4F0895E89409C097FB61\r
-:100B90003EF490958095709561957F4F8F4F9F4F54\r
-:100BA0009923A9F0F92F96E9BB279395F695879598\r
-:100BB00077956795B795F111F8CFFAF4BB0F11F45B\r
-:100BC00060FF1BC06F5F7F4F8F4F9F4F16C0882302\r
-:100BD00011F096E911C0772321F09EE8872F762F38\r
-:100BE00005C0662371F096E8862F70E060E02AF079\r
-:100BF0009A95660F771F881FDAF7880F9695879565\r
-:100C000097F9089597F99F6780E870E060E008958C\r
-:100C10009FEF80EC089500240A9416161706180614\r
-:100C20000906089500240A941216130614060506F0\r
-:100C30000895092E0394000C11F4882352F0BB0F81\r
-:100C400040F4BF2B11F460FF04C06F5F7F4F8F4FE4\r
-:100C50009F4F089557FD9058440F551F59F05F3F1F\r
-:100C600071F04795880F97FB991F61F09F3F79F0CE\r
-:100C700087950895121613061406551FF2CF469550\r
-:100C8000F1DF08C0161617061806991FF1CF8695D2\r
-:100C90007105610508940895E894BB2766277727B6\r
-:100CA000CB0197F908950E9466060C9419060E94DC\r
-:100CB0000B0638F00E94120620F0952311F00C94D8\r
-:100CC00002060C94080611240C944D060E942A0674\r
-:100CD00070F3959FC1F3950F50E0551F629FF0018F\r
-:100CE000729FBB27F00DB11D639FAA27F00DB11DA8\r
-:100CF000AA1F649F6627B00DA11D661F829F222731\r
-:100D0000B00DA11D621F739FB00DA11D621F839FB7\r
-:100D1000A00D611D221F749F3327A00D611D231F8D\r
-:100D2000849F600D211D822F762F6A2F11249F57DB\r
-:100D300050409AF0F1F088234AF0EE0FFF1FBB1FDE\r
-:100D4000661F771F881F91505040A9F79E3F51059D\r
-:100D500080F00C9402060C944D065F3FE4F3983E3D\r
-:100D6000D4F3869577956795B795F795E7959F5F47\r
-:100D7000C1F7FE2B880F911D9695879597F90895D9\r
-:100D8000AA1BBB1B51E107C0AA1FBB1FA617B707B1\r
-:100D900010F0A61BB70B881F991F5A95A9F78095CD\r
-:100DA0009095BC01CD010895052E97FB1EF400948B\r
-:100DB0000E94EB0657FD07D00E94300707FC03D0C6\r
-:100DC0004EF40C94EB0650954095309521953F4F8D\r
-:100DD0004F4F5F4F089590958095709561957F4F27\r
-:100DE0008F4F9F4F0895EE0FFF1F0590F491E02D58\r
-:100DF00009942F923F924F925F926F927F928F92BF\r
-:100E00009F92AF92BF92CF92DF92EF92FF920F9399\r
-:100E10001F93CF93DF93CDB7DEB7CA1BDB0B0FB6A3\r
-:100E2000F894DEBF0FBECDBF09942A883988488860\r
-:100E30005F846E847D848C849B84AA84B984C884F6\r
-:100E4000DF80EE80FD800C811B81AA81B981CE0FED\r
-:100E5000D11D0FB6F894DEBF0FBECDBFED010895D2\r
-:100E6000A1E21A2EAA1BBB1BFD010DC0AA1FBB1FAE\r
-:100E7000EE1FFF1FA217B307E407F50720F0A21B20\r
-:100E8000B30BE40BF50B661F771F881F991F1A948D\r
-:100E900069F760957095809590959B01AC01BD01B7\r
-:100EA000CF010895FC010590061621F00020D9F726\r
+:100000000C945F000C945B010C94A5010C947C0093\r
+:100010000C947C000C94EF010C947C000C947C00FC\r
+:100020000C947C000C947C000C947C000C947C0060\r
+:100030000C947C000C947C000C947C000C947C0050\r
+:100040000C947C000C947C000C9450020C947C006A\r
+:100050000C947C000C947C000C947C000C947C0030\r
+:100060000C947E000C947C00E0000401E500040187\r
+:10007000F5000401FA000401F0000401FF0004018E\r
+:100080000A010A010A010A010A010A010A010A0118\r
+:10009000F5000401FA000401FF0004010D0A537485\r
+:1000A0006172740D0A0045464765666700202B2D76\r
+:1000B0002E30313233343536373839680000112468\r
+:1000C0001FBECFEFD8E0DEBFCDBF21E0A6E0B1E09C\r
+:1000D00001C01D92A539B207E1F711E0A0E0B1E03F\r
+:1000E000E8E7F3E102C005900D92A630B107D9F719\r
+:1000F0000E9457030C94BA090C9400001F920F92AF\r
+:100100000FB60F9211248F939F93AF93BF93EF93EA\r
+:10011000FF938091B900887F803A09F486C028F463\r
+:10012000803641F0803861F082C0883AE1F1883B46\r
+:10013000D1F17DC085EC8093BC0010921F017AC084\r
+:1001400080911F01882339F08F3F29F58091BB00F2\r
+:1001500080931E0120C08091BB0080931F0180917D\r
+:100160001F01853019F481E08093130180911F01F4\r
+:10017000873019F481E08093110180911F018B3049\r
+:1001800019F481E08093120180911F0181508093C6\r
+:100190001F0185EC01C085E88093BC0080911F01A0\r
+:1001A0008F3FE9F547C0E0911F018E2F90E0FC01E1\r
+:1001B0003197EA31F10570F5EC5CFF4F0C945C056A\r
+:1001C00080911C0190911D0104C080911A019091B1\r
+:1001D0001B0180930C0190930D019093BB0018C0FC\r
+:1001E00080910F0190911001F4CF809118019091AE\r
+:1001F0001901EFCF8091140190911501EACF809100\r
+:10020000160190911701E5CF80910C018093BB00FE\r
+:1002100085EC03C01092BB0085E88093BC00809100\r
+:100220001F018F5F80931F0105C085EC01C085ED24\r
+:100230008093BC00FF91EF91BF91AF919F918F91FF\r
+:100240000F900FBE0F901F90189593E890937A002F\r
+:1002500080937C0080917C00806480937C008091FE\r
+:100260007A00806480937A0080917A0086FDFCCFCA\r
+:10027000809178009091790025E080E090E03091C5\r
+:100280007A00306430937A0030917A0036FDFCCFEA\r
+:100290004091780050917900840F951F215079F793\r
+:1002A00020917A002F7720937A0065E070E00E9419\r
+:1002B0002905CB0108951F920F920FB60F921124BA\r
+:1002C0002F933F934F935F936F937F938F939F935E\r
+:1002D000AF93BF93EF93FF9360918400709185007B\r
+:1002E0004A9B05C070930B0160930A011DC0809169\r
+:1002F0000A0190910B01681B790B80E090E00E944D\r
+:10030000570627EE3CE840E350E40E94E50620E073\r
+:1003100030E040E05FE30E94BC050E942806709335\r
+:10032000190160931801E898FF91EF91BF91AF9187\r
+:100330009F918F917F916F915F914F913F912F91FD\r
+:100340000F900FBE0F901F9018951F920F920FB62F\r
+:100350000F9211242F933F934F935F936F937F934B\r
+:100360008F939F93AF93BF93EF93FF93609184001C\r
+:10037000709185004B9B05C0709309016093080143\r
+:100380001DC08091080190910901681B790B80E0E4\r
+:1003900090E00E94570627EE3CE840E350E40E94BC\r
+:1003A000E50620E030E040E05FE30E94BC050E94EB\r
+:1003B00028067093150160931401E998FF91EF915D\r
+:1003C000BF91AF919F918F917F916F915F914F916D\r
+:1003D0003F912F910F900FBE0F901F9018951F9275\r
+:1003E0000F920FB60F9211242F933F934F935F9369\r
+:1003F0006F937F938F939F93AF93BF93EF93FF93ED\r
+:10040000CF93DF931F92CDB7DEB799B199838091D7\r
+:100410000E01892784FF2DC06091840070918500B2\r
+:10042000898184FF05C0709307016093060121C094\r
+:100430008091060190910701681B790B80E090E0A4\r
+:100440000E94570627EE3CE840E350E40E94E50690\r
+:1004500020E030E040E05FE30E94BC050E942806F7\r
+:10046000709317016093160180916D008F7E8093C9\r
+:100470006D00898180930E010F90DF91CF91FF91E4\r
+:10048000EF91BF91AF919F918F917F916F915F910C\r
+:100490004F913F912F910F900FBE0F901F90189585\r
+:1004A0001F920F920FB60F9211248F939F93EF9389\r
+:1004B000FF938091C00087FF17C0E0912201F09167\r
+:1004C00023018091C600808381E0E738F80730F48B\r
+:1004D0003196F0932301E093220106C084E291E07B\r
+:1004E0009093230180932201FF91EF919F918F912F\r
+:1004F0000F900FBE0F901F9018959C01E1ECF0E05B\r
+:1005000088E1808380818068808386E08093C20058\r
+:10051000C901A0E0B0E09C01AD0184E0220F331FCF\r
+:10052000441F551F8A95D1F760E074E284EF90E094\r
+:100530000E943D05DA01C9010197A109B109892F7E\r
+:100540009A2FAB2FBB27A7FDBA958093C5002150EA\r
+:100550002093C40084E291E09093210180932001D4\r
+:10056000909323018093220108952091C00025FFDC\r
+:10057000FCCFFC0180818093C6000895CF93DF9368\r
+:100580001F92CDB7DEB78983CE0101960E94B502D6\r
+:1005900080E090E00F90DF91CF910895CF93DF93AB\r
+:1005A000EC01CE012196FC012081222319F00E944A\r
+:1005B000B502F7CFDF91CF9108958091C00087FFFA\r
+:1005C000FCCF8091C60090E008950C94DD0265EEAA\r
+:1005D00072E08EEB92E00C945D07CF93DF93FC0109\r
+:1005E000E253FF4FA081B181EC01C453DF4F28815A\r
+:1005F0003981A217B307B9F02091C00025FF13C0BD\r
+:100600002C912093C60020813181AC0145535F4F6E\r
+:100610002417350718F42F5F3F4F03C09C0128595A\r
+:100620003F4F31832083E0912001F09121012091FF\r
+:100630002201309123012E173F07B1F1EC01CC5973\r
+:10064000DF4FA881B98120812C93688179819C0139\r
+:100650002B523F4FD9013C91DB012C91321307C043\r
+:10066000AC014C525F4FDA012C912F5F2C939C010F\r
+:100670002D593F4F6217730728F4DB011196B98398\r
+:10068000A88302C099838883B1E0E738FB0730F480\r
+:100690003196F0932101E093200106C084E291E0BD\r
+:1006A0009093210180932001DF91CF9108951092C2\r
+:1006B0001E0180E895E20E947D020E94E70282E529\r
+:1006C0008093BA0085EC8093BC001092800084E097\r
+:1006D0008093810095E090936900809368008CE995\r
+:1006E00090E09F938F930E94E40783B7817F83BF3D\r
+:1006F00078940F900F90C8E1D8E080911F0183306B\r
+:1007000089F058F4813009F03EC080E00E94250154\r
+:1007100090931D0180931C0136C0893059F08F3FA2\r
+:10072000F1F031C081E00E94250190931B0180937C\r
+:100730001A0129C082E00E942501BC0180E090E0FE\r
+:100740000E94570628E431EE4AEB5FE30E94E5067B\r
+:100750000E9428067093100160930F0114C08091CD\r
+:100760001E01853A81F4F8946BE780E090E00E94E6\r
+:10077000AC09F999FECF0FB6F894A895C093600024\r
+:100780000FBED093600080911301882391F01092E6\r
+:1007900013011092190110921801529A5A9A85E386\r
+:1007A0008A95F1F700005A9852988CB381708CBBEF\r
+:1007B000E89A80911101882391F010921101109212\r
+:1007C000150110921401539A5B9A85E38A95F1F70B\r
+:1007D00000005B9853988CB382708CBBE99A80912F\r
+:1007E00012018823B1F01092120110921701109299\r
+:1007F0001601549A5C9A85E38A95F1F700005C989B\r
+:10080000549889B180930E0180916D00806180932E\r
+:100810006D0083B7816083BF889583B78E7F83BF68\r
+:100820006CCFABE0B0E0E7E1F4E00C9466056C015E\r
+:100830007B013A01FC0117821682838181FF03C18B\r
+:10084000CE0101964C01F601B380F701B3FC05918E\r
+:10085000B3FE01917F01002309F4F1C0053249F490\r
+:10086000B3FC0591B3FE01917F01053211F010E058\r
+:1008700019C0B601802F90E00E94A80753013501EE\r
+:10088000E2CF002309F4DBC0602F70E08DEA90E036\r
+:100890000E945207892B49F0F701B3FC0591B3FE82\r
+:1008A00001917F0117FFEDCF04C0033239F00C3600\r
+:1008B00019F0011105C0C3C01068EECF10E1ECCFF4\r
+:1008C000602F70E086EA90E00E945207892B41F089\r
+:1008D0005301F4E0AF0EB11CB6018FE390E010C0FD\r
+:1008E000033631F0033779F0033511F511600BC091\r
+:1008F000530182E0A80EB11CB601F3018081918101\r
+:100900000E94A807BCCF5301F2E0AF0EB11CF30167\r
+:1009100060807180F30110FD859110FF81913F018E\r
+:10092000882309F4ACCFB60190E00E94A807F2CF6B\r
+:10093000043611F0093621F5530117FF09C0F4E020\r
+:10094000AF0EB11CF30160817181828193810AC075\r
+:10095000F2E0AF0EB11CF30160817181072E000C33\r
+:10096000880B990B1F7E97FF08C090958095709516\r
+:1009700061957F4F8F4F9F4F10642AE030E030C069\r
+:10098000003791F040F40835A1F00F3609F057C058\r
+:1009900028E030E011C0053719F0083731F04FC0BA\r
+:1009A0001F7E2AE030E008C01061146220E130E0D0\r
+:1009B00003C0146020E132E0530117FF09C0F4E0E6\r
+:1009C000AF0EB11CF301608171818281938108C0F7\r
+:1009D000F2E0AF0EB11CF3016081718180E090E024\r
+:1009E000A4010E940A08082F081916FF05C0B601C5\r
+:1009F0008DE290E00E94A80714FF15C0FE01E00FF1\r
+:100A0000F11D8081803379F0B60180E390E00E948F\r
+:100A1000A80712FF08C01072812F90E0B601885A13\r
+:100A20009F4F0E94A8070150F401E00FF11D808143\r
+:100A3000B60190E00E94A8070111F5CF20CFF60182\r
+:100A40008681978102C08FEF9FEF2B96EEE00C948A\r
+:100A50008205AA1BBB1B51E107C0AA1FBB1FA6171B\r
+:100A6000B70710F0A61BB70B881F991F5A95A9F757\r
+:100A700080959095BC01CD010895052E97FB1EF43D\r
+:100A800000940E94540557FD07D00E94990507FC69\r
+:100A900003D04EF40C945405509540953095219513\r
+:100AA0003F4F4F4F5F4F089590958095709561959A\r
+:100AB0007F4F8F4F9F4F0895EE0FFF1F0590F491CA\r
+:100AC000E02D09942F923F924F925F926F927F9206\r
+:100AD0008F929F92AF92BF92CF92DF92EF92FF924E\r
+:100AE0000F931F93CF93DF93CDB7DEB7CA1BDB0BFA\r
+:100AF0000FB6F894DEBF0FBECDBF09942A8839889F\r
+:100B000048885F846E847D848C849B84AA84B984A5\r
+:100B1000C884DF80EE80FD800C811B81AA81B981B1\r
+:100B2000CE0FD11D0FB6F894DEBF0FBECDBFED01C5\r
+:100B30000895A1E21A2EAA1BBB1BFD010DC0AA1F1E\r
+:100B4000BB1FEE1FFF1FA217B307E407F50720F036\r
+:100B5000A21BB30BE40BF50B661F771F881F991FB1\r
+:100B60001A9469F760957095809590959B01AC01FA\r
+:100B7000BD01CF0108955058BB27AA270E94D30575\r
+:100B80000C94AB060E949D0638F00E94A40620F04B\r
+:100B900039F49F3F19F426F40C949A060EF4E0956C\r
+:100BA000E7FB0C949406E92F0E94BC0658F3BA1791\r
+:100BB000620773078407950720F079F4A6F50C9473\r
+:100BC000DE060EF4E0950B2EBA2FA02D0B01B90115\r
+:100BD00090010C01CA01A0011124FF27591B99F0B3\r
+:100BE000593F50F4503E68F11A16F040A22F232FBF\r
+:100BF000342F4427585FF3CF469537952795A7950F\r
+:100C0000F0405395C9F77EF41F16BA0B620B730BB5\r
+:100C1000840BBAF09150A1F0FF0FBB1F661F771F26\r
+:100C2000881FC2F70EC0BA0F621F731F841F48F4DB\r
+:100C3000879577956795B795F7959E3F08F0B0CF64\r
+:100C40009395880F08F09927EE0F9795879508954B\r
+:100C50000E94C40688F09F5798F0B92F9927B75182\r
+:100C6000B0F0E1F0660F771F881F991F1AF0BA9550\r
+:100C7000C9F714C0B13091F00E94DE06B1E00895CA\r
+:100C80000C94DE06672F782F8827B85F39F0B93FBC\r
+:100C9000CCF3869577956795B395D9F73EF4909503\r
+:100CA0008095709561957F4F8F4F9F4F0895E89481\r
+:100CB00009C097FB3EF490958095709561957F4FA4\r
+:100CC0008F4F9F4F9923A9F0F92F96E9BB27939552\r
+:100CD000F695879577956795B795F111F8CFFAF462\r
+:100CE000BB0F11F460FF1BC06F5F7F4F8F4F9F4F93\r
+:100CF00016C0882311F096E911C0772321F09EE8F1\r
+:100D0000872F762F05C0662371F096E8862F70E056\r
+:100D100060E02AF09A95660F771F881FDAF7880F30\r
+:100D20009695879597F9089597F99F6780E870E001\r
+:100D300060E008959FEF80EC089500240A94161651\r
+:100D4000170618060906089500240A9412161306B9\r
+:100D5000140605060895092E0394000C11F4882347\r
+:100D600052F0BB0F40F4BF2B11F460FF04C06F5F63\r
+:100D70007F4F8F4F9F4F089557FD9058440F551F39\r
+:100D800059F05F3F71F04795880F97FB991F61F00D\r
+:100D90009F3F79F087950895121613061406551F84\r
+:100DA000F2CF4695F1DF08C0161617061806991FF0\r
+:100DB000F1CF86957105610508940895E894BB27E5\r
+:100DC00066277727CB0197F908950E94F8060C94BF\r
+:100DD000AB060E949D0638F00E94A40620F09523E1\r
+:100DE00011F00C9494060C949A0611240C94DF06CE\r
+:100DF0000E94BC0670F3959FC1F3950F50E0551FFC\r
+:100E0000629FF001729FBB27F00DB11D639FAA275F\r
+:100E1000F00DB11DAA1F649F6627B00DA11D661FAE\r
+:100E2000829F2227B00DA11D621F739FB00DA11DCF\r
+:100E3000621F839FA00D611D221F749F3327A00D89\r
+:100E4000611D231F849F600D211D822F762F6A2F25\r
+:100E500011249F5750409AF0F1F088234AF0EE0F8A\r
+:100E6000FF1FBB1F661F771F881F91505040A9F7B7\r
+:100E70009E3F510580F00C9494060C94DF065F3F72\r
+:100E8000E4F3983ED4F3869577956795B795F795F3\r
+:100E9000E7959F5FC1F7FE2B880F911D969587956B\r
+:100EA00097F90895FC010590061621F00020D9F766\r
 :100EB000C00108953197CF0108950F931F93CF93E9\r
 :100EC000DF93009731F46115710519F480E090E02B\r
 :100ED0003AC08B01EC016EE070E081E090E00E948E\r
-:100EE0006E08FC01892B91F380E8838301151105BD\r
-:100EF00071F01387028781E8838380919501909137\r
-:100F00009601892B21F4F0939601E09395012097A7\r
-:100F1000C9F0D187C08783818260838380919701E4\r
-:100F200090919801892B71F4F0939801E0939701C7\r
-:100F30008091990190919A01892B21F4F0939A0163\r
-:100F4000E0939901CF01DF91CF911F910F91089507\r
+:100EE0006808FC01892B91F380E8838301151105C3\r
+:100EF00071F01387028781E8838380918B01909141\r
+:100F00008C01892B21F4F0938C01E0938B012097C5\r
+:100F1000C9F0D187C08783818260838380918D01EE\r
+:100F200090918E01892B71F4F0938E01E0938D01E5\r
+:100F300080918F0190919001892B21F4F093900181\r
+:100F4000E0938F01CF01DF91CF911F910F91089511\r
 :100F50000F931F93CF93DF93FB01238121FD03C0E8\r
-:100F60008FEF9FEF28C022FF16C046815781248152\r
+:100F60008FEF9FEF2CC022FF16C04681578124814E\r
 :100F700035814217530744F4A081B1819D012F5F51\r
 :100F80003F4F318320838C93268137812F5F3F4FE2\r
-:100F90003783268310C0EB01092F182F0084F185B9\r
-:100FA000E02D0995892BE1F68E819F8101969F8323\r
-:100FB0008E83812F902FDF91CF911F910F910895F4\r
-:100FC0000F931F93CF93DF93E0919701F0919801D6\r
-:100FD000238121FF1BC08C01D0E0C0E0F80181918A\r
-:100FE0008F016091970170919801DB011896ED9146\r
-:100FF000FC911997882331F00995892B79F3DFEF5C\r
-:10100000CFEFECCF8AE00995892B19F08FEF9FEF96\r
-:1010100002C08D2F9C2FDF91CF911F910F910895CA\r
-:10102000FA01AA27283051F1203181F1E8946F9319\r
-:101030006E7F6E5F7F4F8F4F9F4FAF4FB1E03ED0BF\r
-:10104000B4E03CD0670F781F891F9A1FA11D680F5D\r
-:10105000791F8A1F911DA11D6A0F711D811D911D90\r
-:10106000A11D20D009F468943F912AE0269F112405\r
-:101070003019305D3193DEF6CF010895462F477069\r
-:10108000405D4193B3E00FD0C9F7F6CF462F4F70C4\r
-:10109000405D4A3318F0495D31FD4052419302D022\r
-:1010A000A9F7EACFB4E0A6959795879577956795C8\r
-:1010B000BA95C9F700976105710508959B01AC01C8\r
-:1010C0000A2E06945795479537952795BA95C9F7EF\r
-:1010D000620F731F841F951FA01D08950F931F9308\r
-:1010E000CF93DF93869F8001879F100D969F100DF1\r
-:1010F0001124C8010E948A08EC01009729F0A80178\r
-:1011000060E070E00E94B709CE01DF91CF911F919E\r
-:101110000F910895CF93DF938230910510F482E010\r
-:1011200090E0E0919D01F0919E0120E030E0C0E070\r
-:10113000D0E0309711F14081518148175907C0F034\r
-:101140004817590761F482819381209719F09B8396\r
-:101150008A832BC090939E0180939D0126C0211508\r
-:10116000310519F04217530718F49A01BE01DF0147\r
-:10117000EF010280F381E02DDCCF2115310509F16B\r
-:10118000281B390B2430310590F412968D919C91D7\r
-:1011900013976115710521F0FB019383828304C0CD\r
-:1011A00090939E0180939D01FD01329644C0FD0104\r
-:1011B000E20FF31F81939193225031092D933C93B9\r
-:1011C0003AC020919B0130919C01232B41F4209146\r
-:1011D00002013091030130939C0120939B012091E7\r
-:1011E0000001309101012115310541F42DB73EB7C1\r
-:1011F0004091040150910501241B350BE0919B01A6\r
-:10120000F0919C01E217F307A0F42E1B3F0B281767\r
-:10121000390778F0AC014E5F5F4F2417350748F06F\r
-:101220004E0F5F1F50939C0140939B0181939193BC\r
-:1012300002C0E0E0F0E0CF01DF91CF9108950F937D\r
-:101240001F93CF93DF93009709F48CC0FC01329772\r
-:101250001382128200919D0110919E0101151105CA\r
-:1012600081F420813181820F931F20919B01309165\r
-:101270009C012817390779F5F0939C01E0939B01B5\r
-:1012800071C0D80140E050E0AE17BF0750F412968D\r
-:101290002D913C911397AD012115310509F1D9012B\r
-:1012A000F3CF9D01DA013383228360817181860F40\r
-:1012B000971F8217930769F4EC0128813981260F63\r
-:1012C000371F2E5F3F4F318320838A819B81938319\r
-:1012D0008283452B29F4F0939E01E0939D0142C047\r
-:1012E0001396FC93EE931297ED01499159919E014B\r
-:1012F000240F351FE217F30771F480819181840F69\r
-:10130000951F029611969C938E93828193811396DA\r
-:101310009C938E931297E0E0F0E0D80112968D91A5\r
-:101320009C911397009719F0F8018C01F6CF8D91DD\r
-:101330009C9198012E5F3F4F820F931F20919B013C\r
-:1013400030919C012817390769F4309729F41092DD\r
-:101350009E0110929D0102C01382128210939C0183\r
-:1013600000939B01DF91CF911F910F910895DC01B4\r
-:1013700001C06D9341505040E0F70895262FF99930\r
-:10138000FECF1FBA92BD81BD20BD0FB6F894FA9A68\r
-:0C139000F99A0FBE01960895F894FFCF63\r
-:10139C0000009F0120000D0A53746172740D00004F\r
+:100F90003783268314C08B01EC01FB010084F185AB\r
+:100FA000E02D0995892BE1F6D80116968D919C913B\r
+:100FB0001797019617969C938E931697CE01DF9103\r
+:100FC000CF911F910F910895A0E0B0E0EAEEF7E015\r
+:100FD0000C947005AE01495F5F4FDA016D917D9110\r
+:100FE000AD010BE811E0F80182819381DC011396D9\r
+:100FF0002C911397286013962C930E941104D8010A\r
+:101000001296ED91FC9113972381277F2383E4E0CF\r
+:101010000C948C05FA01AA27283051F1203181F176\r
+:10102000E8946F936E7F6E5F7F4F8F4F9F4FAF4FF0\r
+:10103000B1E03ED0B4E03CD0670F781F891F9A1F03\r
+:10104000A11D680F791F8A1F911DA11D6A0F711DB7\r
+:10105000811D911DA11D20D009F468943F912AE0C3\r
+:10106000269F11243019305D3193DEF6CF010895AB\r
+:10107000462F4770405D4193B3E00FD0C9F7F6CFDC\r
+:10108000462F4F70405D4A3318F0495D31FD4052A4\r
+:10109000419302D0A9F7EACFB4E0A695979587953A\r
+:1010A00077956795BA95C9F7009761057105089519\r
+:1010B0009B01AC010A2E06945795479537952795C5\r
+:1010C000BA95C9F7620F731F841F951FA01D08955D\r
+:1010D0000F931F93CF93DF93869F8001879F100DFF\r
+:1010E000969F100D1124C8010E948408EC010097FE\r
+:1010F00029F0A80160E070E00E94A509CE01DF910F\r
+:10110000CF911F910F9108950F931F93CF93DF936A\r
+:101110008230910510F482E090E0E0919301F0912B\r
+:10112000940120E030E0A0E0B0E0309719F1408178\r
+:1011300051810281138148175907C8F08417950718\r
+:1011400069F4109731F012960C93129713961C9332\r
+:1011500027C0009393011093940122C021153105FB\r
+:1011600019F04217530718F49A01BD01EF01DF018E\r
+:10117000F801DBCF21153105F9F0281B390B24309C\r
+:10118000310580F48A819B816115710521F0FB0195\r
+:101190009383828304C09093940180939301FE0112\r
+:1011A000329644C0FE01E20FF31F819391932250C7\r
+:1011B0003109398328833AC02091910130919201FD\r
+:1011C000232B41F4209102013091030130939201CD\r
+:1011D00020939101209100013091010121153105E9\r
+:1011E00041F42DB73EB74091040150910501241BF5\r
+:1011F000350BE0919101F0919201E217F307A0F411\r
+:101200002E1B3F0B2817390778F0AC014E5F5F4F5C\r
+:101210002417350748F04E0F5F1F509392014093FB\r
+:1012200091018193919302C0E0E0F0E0CF01DF9162\r
+:10123000CF911F910F910895CF93DF93009709F4F9\r
+:1012400081C0FC01329713821282A0919301B09168\r
+:101250009401109781F420813181820F931F209196\r
+:101260009101309192012817390751F5F0939201BD\r
+:10127000E093910167C0ED0120E030E0CE17DF0779\r
+:1012800040F44A815B819E0141155105F1F0EA016C\r
+:10129000F5CFD383C28340815181840F951FC81736\r
+:1012A000D90759F488819981840F951F02969183FB\r
+:1012B00080838A819B81938382832115310529F460\r
+:1012C000F0939401E09393013DC0E901FB83EA832D\r
+:1012D00049915991C40FD51FEC17FD0761F4808126\r
+:1012E0009181840F951F0296E901998388838281F9\r
+:1012F00093819B838A83E0E0F0E012968D919C912C\r
+:101300001397009719F0FD01DC01F7CF8D919C91A7\r
+:1013100011979D012E5F3F4F820F931F20919101E6\r
+:10132000309192012817390769F4309729F4109207\r
+:1013300094011092930102C013821282B093920121\r
+:10134000A0939101DF91CF910895DC0101C06D93CD\r
+:1013500041505040E0F70895262FF999FECF1FBA6B\r
+:1013600092BD81BD20BD0FB6F894FA9AF99A0FBECE\r
+:0813700001960895F894FFCFE7\r
+:06137800000095012000B9\r
 :00000001FF\r
index 1a3707a..6fb768f 100644 (file)
@@ -20,9 +20,9 @@ ISR(USART_RX_vect) {
 
 
 void setup_uart(unsigned int rate) {
-       UCSR0B |= (1<<TXEN0) | (1<<RXEN0); // UART TX & RX
+       UCSR0B = (1<<TXEN0) | (1<<RXEN0); // UART TX & RX
        UCSR0B |= (1<<RXCIE0);          // RX Interrupt
-       UCSR0C |= (3<<UCSZ00); // Asynchron 8N1
+       UCSR0C = (3<<UCSZ00); // Asynchron 8N1
 
        UBRR0H = (uint8_t)(UART_UBRR_CALC(rate, F_CPU) >> 8);
        UBRR0L = (uint8_t)UART_UBRR_CALC(rate, F_CPU);