├── .gitignore ├── DigitalPowerSupply-1.hex ├── LICENSE ├── README.md ├── circuit_diagram_pcb.png ├── circuit_diagram_sch.png ├── code ├── .cproject ├── .project ├── .settings │ └── de.innot.avreclipse.core.prefs ├── Release │ ├── DigitalPowerSupply-1.hex │ └── prog.sh ├── io │ ├── DigitalIn.cpp │ ├── DigitalIn.h │ ├── DigitalOut.cpp │ └── DigitalOut.h ├── lcd │ ├── hd44780.cpp │ └── hd44780.h ├── license.txt ├── main.cpp ├── misc │ ├── aux.cpp │ ├── aux.h │ ├── pwm.cpp │ └── pwm.h ├── sensors │ ├── ds18b20.cpp │ └── ds18b20.h └── timeout.h ├── digital_bench_power_supply_06.jpg ├── digital_supply_v100.pdf ├── gpl_v2_license.txt ├── pcb └── 100 │ ├── digital_supply.brd │ └── digital_supply.sch └── prog.sh /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files 2 | *.slo 3 | *.lo 4 | *.o 5 | *.obj 6 | 7 | # Precompiled Headers 8 | *.gch 9 | *.pch 10 | 11 | # Compiled Dynamic libraries 12 | *.so 13 | *.dylib 14 | *.dll 15 | 16 | # Fortran module files 17 | *.mod 18 | 19 | # Compiled Static libraries 20 | *.lai 21 | *.la 22 | *.a 23 | *.lib 24 | 25 | # Executables 26 | *.exe 27 | *.out 28 | *.app 29 | -------------------------------------------------------------------------------- /DigitalPowerSupply-1.hex: -------------------------------------------------------------------------------- 1 | :1000000093C0ADC0ACC0ABC0AAC0A9C0A8C0A7C0B7 2 | :10001000A6C0A5C0A4C0A3C0A2C0A1C089C89FC0DB 3 | :100020009EC09DC09CC06E616E00696E66000040FF 4 | :100030007A10F35A00A0724E18090010A5D4E800F7 5 | :1000400000E87648170000E40B54020000CA9A3B0F 6 | :10005000000000E1F5050000809698000000404295 7 | :100060000F000000A0860100000010270000000023 8 | :10007000E803000000006400000000000A00000027 9 | :1000800000000100000000002C76D888DC674F08D3 10 | :1000900023DFC1DFAE59E1B1B796E5E3E453C63AD9 11 | :1000A000E651997696E8E6C28426EB898C9B62ED50 12 | :1000B000407C6FFCEFBC9C9F40F2BAA56FA5F4900A 13 | :1000C000055A2AF75C936B6CF9676DC11BFCE0E481 14 | :1000D0000D47FEF520E6B500D0ED902E03009435D7 15 | :1000E00077050080841E080000204E0A000000C82A 16 | :1000F0000C333333330F986E12831141EF8D21147B 17 | :10010000893BE65516CFFEE6DB18D1844B381BF74A 18 | :100110007C1D901DA4BBE424203284725E228100E9 19 | :10012000C9F124ECA1E53D2711241FBECFE5D4E0A1 20 | :10013000DEBFCDBF11E0A0E6B0E0EEE3FFE102C01C 21 | :1001400005900D92A032B107D9F721E0A0E2B1E00D 22 | :1001500001C01D92A837B207E1F709D9EECE50CF02 23 | :10016000A3E1B0E0E5EBF0E0F4CA7C011B016A0119 24 | :10017000FC0117821682838181FF49C3BE016F5F34 25 | :100180007F4F4B01F7019381F10193FD859193FF1F 26 | :1001900081911F01882309F436C3853239F493FD18 27 | :1001A000859193FF81911F01853231F4B70190E071 28 | :1001B0000BDE56016501E6CF10E0512C20E0203225 29 | :1001C000A0F48B3269F030F4803259F0833269F454 30 | :1001D00020612CC08D3239F0803339F4216026C083 31 | :1001E0002260246023C0286021C027FD27C030ED95 32 | :1001F000380F3A3078F426FF06C0FAE01F9F300D22 33 | :100200001124132F13C06AE0569E300D1124532E73 34 | :1002100020620CC08E3221F426FDF5C2206406C097 35 | :100220008C3611F4206802C0883641F4F10193FD48 36 | :10023000859193FF81911F018111C1CF9BEB980F95 37 | :10024000933018F42061805E06C09BE9980F9330CC 38 | :1002500008F09AC12F7E26FF16E02F73722E853686 39 | :1002600021F4F22FF0647F2E08C0863621F4622F2D 40 | :100270006068762E02C01111115077FE07C01C3342 41 | :1002800048F444244394410E27E00BC0183030F466 42 | :10029000212F06C027E04CE3442E03C027E017E0DF 43 | :1002A000412C560174E0A70EB11CF60160817181EA 44 | :1002B00082819381042DA40199DC6C01098100FFE6 45 | :1002C00002C003FF06C071FC07C072FC08C0612CAD 46 | :1002D00008C03DE2632E05C02BE2622E02C090E210 47 | :1002E000692E802F8C7081F1662011F084E001C0AE 48 | :1002F00083E0851510F0512C0AC0581A73FC07C012 49 | :10030000B70180E290E060DD5A94D1F7F4CF662027 50 | :1003100021F0B701862D90E057DD03FD03C00AE20E 51 | :1003200010E002C006E210E0F72DF0717F2EF80118 52 | :100330008491882309F45EC271108052B70190E065 53 | :1003400043DD0F5F1F4FF3CF77FE0FC04C0C04FF50 54 | :1003500004C08A81813309F44A94141474F5F8E0D6 55 | :10036000F41578F588E0482E2CC076FC2AC0812F41 56 | :1003700090E08C159D059CF06CEFC6166FEFD606CD 57 | :1003800074F0772D7068772E0AC0E2E0F0E0EC0F91 58 | :10039000FD1FE10FF11D8081803319F411501111FF 59 | :1003A000F4CF77FE0EC044244394410E812F90E099 60 | :1003B000C816D9062CF41C1904C04424439401C067 61 | :1003C00010E077FE07C01C141D043CF496012F5F5B 62 | :1003D0003F4F05C025E030E002C021E030E066205C 63 | :1003E00011F02F5F3F4F112331F0412F50E04F5F4D 64 | :1003F0005F4F240F351F452D50E02417350714F4A7 65 | :10040000521A01C0512C872D897041F4552031F0CA 66 | :10041000B70180E290E0D8DC5A94F8CF662021F052 67 | :10042000B701862D90E0D0DC73FC08C0552031F078 68 | :10043000B70180E390E0C8DC5A94F8CF77FE5DC046 69 | :100440009C2D8D2DD7FE02C090E080E0692E782E85 70 | :1004500040E050E0C601841991099D878C87960180 71 | :1004600026193709280D391D812F90E0EE27FF2727 72 | :10047000E81BF90BFF87EE87FFEF6F167F0661F42D 73 | :10048000B7018EE290E02B8B3A8B488B598B9CDC2A 74 | :10049000598948893A892B89C614D70454F06C8548 75 | :1004A0007D85661577052CF4F901E40FF51F818130 76 | :1004B00001C080E371E0671A71084F5F5F4FEE85FE 77 | :1004C000FF856E167F0664F0B70190E02B8B3A8BA8 78 | :1004D000488B598B79DC2B893A8948895989CCCF4B 79 | :1004E0006C147D0439F49A81963318F4953311F421 80 | :1004F00004FF81E3B70190E045C08A81813309F0B0 81 | :100500000F7EB70190E060DC111105C074FE16C0CB 82 | :1005100085E490E015C0B7018EE290E055DC82E002 83 | :1005200066246394680EF401E80FF11D8081B70121 84 | :1005300090E04ADC115051F3862DF2CF85E690E031 85 | :10054000B70142DCD7FC05C0C114D10439F404FF63 86 | :1005500005C0D194C194D1088DE201C08BE2B701EE 87 | :1005600090E032DC80E36AE0C616D1042CF08F5FA5 88 | :10057000FAE0CF1AD108F7CFB70190E025DCB70138 89 | :10058000C601C09621DC36C1833631F0833779F05D 90 | :10059000833509F054C020C0560172E0A70EB11C8B 91 | :1005A000F6018081898301E010E0640113C05601E7 92 | :1005B000F2E0AF0EB11CF601C080D18026FF03C06F 93 | :1005C000612F70E002C06FEF7FEFC6012B8BF1DB74 94 | :1005D0008C012B892F7714C05601F2E0AF0EB11CAD 95 | :1005E000F601C080D18026FF03C0612F70E002C0F9 96 | :1005F0006FEF7FEFC6012B8BD1DB8C012B8920683D 97 | :10060000722E23FD18C0852D90E00817190798F465 98 | :10061000B70180E290E0D8DB5A94F5CFF60177FC81 99 | :10062000859177FE81916F01B70190E0CDDB51108C 100 | :100630005A94015011090115110581F7DBC0843668 101 | :1006400011F0893649F5560127FF09C0F4E0AF0ED5 102 | :10065000B11CF60160817181828193810AC0F2E050 103 | :10066000AF0EB11CF60160817181882777FD8095FE 104 | :10067000982F022F0F7697FF08C090958095709560 105 | :1006800061957F4F8F4F9F4F00682AE030E0A401B3 106 | :10069000F6DBC82EC8183DC0022F853721F40F7E27 107 | :1006A0002AE030E01DC0097F8F3691F018F48835BC 108 | :1006B00059F0A9C0803719F0883711F0A4C0006143 109 | :1006C00004FF09C0046007C024FF08C0066006C01C 110 | :1006D00028E030E005C020E130E002C020E132E057 111 | :1006E000560107FF09C0F4E0AF0EB11CF6016081AE 112 | :1006F00071818281938108C0F2E0AF0EB11CF601D6 113 | :100700006081718180E090E0A401B9DBC82EC81837 114 | :100710000F7706FF0BC0202F2E7FC11650F404FF69 115 | :100720000AC002FD08C0202F2E7E05C0DC2C202F21 116 | :1007300003C0DC2C01C0D12E24FF0DC0FE01EC0D46 117 | :10074000F11D8081803311F4297E09C022FF06C08B 118 | :10075000D394D39404C0822F867809F0D39423FDD8 119 | :1007600012C020FF06C01C2DD51418F4150D1D193C 120 | :10077000D52CD51460F4B70180E290E02B8B24DBFC 121 | :10078000D3942B89F6CFD51410F45D1801C0512CE9 122 | :1007900024FF11C0B70180E390E02B8B15DB2B8980 123 | :1007A00022FF16C021FF03C088E590E002C088E761 124 | :1007B00090E0B7010CC0822F867851F021FD02C075 125 | :1007C00080E201C08BE227FD8DE2B70190E0FCDA08 126 | :1007D000C11630F4B70180E390E0F6DA1150F8CF9B 127 | :1007E000CA94F401EC0DF11D8081B70190E0ECDAC0 128 | :1007F000C110F6CF552009F4DDCCB70180E290E0BE 129 | :10080000E3DA5A94F7CFF7018681978102C08FEF20 130 | :100810009FEF6396E2E1B9C7DC01ED91FC9111977E 131 | :10082000408121E030E016960C9002C0220F331F69 132 | :100830000A94E2F72095242320830895DC01ED91AA 133 | :10084000FC911197408121E030E016960C9002C097 134 | :10085000220F331F0A94E2F7422B40830895CF936F 135 | :10086000DF93EC01EBDFEC81FD81208181E090E002 136 | :100870000E8002C0880F991F0A94E2F780958223A8 137 | :1008800080838FE797E00197F1F700C00000CE0169 138 | :10089000C3DFE7E1F1E03197F1F700C00000EA8142 139 | :1008A000FB81808121E030E00E8002C0220F331FE7 140 | :1008B0000A94E2F78223E7E6F6E03197F1F700C009 141 | :1008C0000000DF91CF9108950F931F93CF93DF9393 142 | :1008D0001F92CDB7DEB78C01DC011496ED91FC912F 143 | :1008E0001597208181E090E016960C9002C0880F49 144 | :1008F000991F0A94E2F7809582238083C801698357 145 | :100900009DDFB5E0BA95F1F700006981662311F02B 146 | :10091000C80182DFEFEEF0E03197F1F700C0000090 147 | :10092000C8010F90DF91CF911F910F9175CFCF9399 148 | :10093000DF93EC01EC81FD81208181E090E00E806D 149 | :1009400002C0880F991F0A94E2F780958223808362 150 | :10095000CE0174DF85E08A95F1F70000CE015CDFFF 151 | :100960009AE49A95F1F700C0EA81FB81208181E049 152 | :1009700090E00E8002C0880F991F0A94E2F72823A6 153 | :1009800081E009F480E090EF9A95F1F7DF91CF9143 154 | :100990000895FF920F931F93CF93DF938C01C0E0D4 155 | :1009A000D0E0F12CC801C3DF0C2E01C0880F0A94DF 156 | :1009B000EAF78F29F82E2196C830D10599F7DF91F3 157 | :1009C000CF911F910F91FF900895FF920F931F9366 158 | :1009D000CF93DF938C01F62EC8E0D0E06F2D6170CD 159 | :1009E000C80172DFF69421972097C1F7DF91CF916C 160 | :1009F0001F910F91FF900895CF93DF93EC012FDFAC 161 | :100A0000811118C06CECCE01E0DF6EE4CE01DDDFB9 162 | :100A100060E0CE01DADF60E0CE01D7DF6FE3CE0128 163 | :100A2000D4DFCE011CDF21E090E0811101C020E085 164 | :100A3000822F02C081E090E0DF91CF910895FC0108 165 | :100A4000758364834683CB010197918380836250D1 166 | :100A500071097383628381E08783CF01CDCFAC01BD 167 | :100A6000FC0180E070E09CE89F01241B350B2617F9 168 | :100A70003707A4F42191822728E030E0A82FB0E0C6 169 | :100A8000B595A79580FF03C08A2F892701C08A2FBB 170 | :100A9000215031092115310589F7E6CF08958F924C 171 | :100AA0009F92AF92BF92CF92DF92EF92FF920F93FD 172 | :100AB0001F93CF93DF93CDB7DEB729970FB6F89486 173 | :100AC000DEBF0FBECDBF8C017B01C9DE882319F0CC 174 | :100AD00081E090E051C06CECC80177DF64E4C801AC 175 | :100AE00074DFC801BCDE8111F3CF6CECC8016DDF8F 176 | :100AF0006EEBC8016ADFCE0101966C0189E0F60158 177 | :100B000011928A95E9F756014E01FAE08F0E911C79 178 | :100B1000C8013FDFF50181935F01E815F905C1F7D1 179 | :100B200068E0C6019CDF99858913D2CF6A8170E0A5 180 | :100B3000762F66278981680F711D882777FD80953C 181 | :100B4000982F3DD720E030E040E85DE3ECD7F70197 182 | :100B50006083718382839383F8012781222341F08C 183 | :100B600020E030E04AEA52E490D6882309F4B0CF7E 184 | :100B7000F801178280E090E029960FB6F894DEBF66 185 | :100B80000FBECDBFDF91CF911F910F91FF90EF90DE 186 | :100B9000DF90CF90BF90AF909F908F900895CF92AD 187 | :100BA000DF92EF92FF92CF93DF93EB019B012150F5 188 | :100BB0003109283E3340D8F4FC017183608366B567 189 | :100BC00077B580E090E0F9D66B017C01BE0180E052 190 | :100BD00090E0F3D69B01AC01C701B601A4D720E099 191 | :100BE00030E04AE754E455D6BCD67BBD6ABDDF9100 192 | :100BF000CF91FF90EF90DF90CF9008951FBCB99AEE 193 | :100C000020EA30E037BD26BD27EA30E0FC01318321 194 | :100C1000208366B577B580E090E0CFD620E030E065 195 | :100C200047E253E480D720E030E04AE754E431D68D 196 | :100C300098D67BBD6ABD89E18EBD8FB582688FBDB8 197 | :100C40000895FC01808191810895DC011E963C91FC 198 | :100C50001E971296ED91FC911397208181E090E010 199 | :100C6000032E01C0880F0A94EAF7822B808308952F 200 | :100C7000DC011E963C911E971296ED91FC91139704 201 | :100C8000208181E090E002C0880F991F3A95E2F739 202 | :100C90008095909530E08223932380830895DC0132 203 | :100CA0001F963C911F971496ED91FC91159720810A 204 | :100CB00081E090E0032E01C0880F0A94EAF7822BAE 205 | :100CC00080830895DC011F963C911F971496ED9147 206 | :100CD000FC911597208181E090E002C0880F991F58 207 | :100CE0003A95E2F78095909530E0822393238083B4 208 | :100CF0000895CF93DF93EC01D2DF8AE18A95F1F773 209 | :100D000000C0CE01DF91CF91DDCFCF92DF92EF9285 210 | :100D1000FF921F93CF93DF93EC01162F8FE396E0A2 211 | :100D20000197F1F700C00000CE01442311F08DDFE0 212 | :100D300001C09EDFFE0182E090E061E070E06E01A4 213 | :100D4000C80ED91ED6011E964C91E680F780D701B9 214 | :100D50002C9130E0DB0102C0AA0FBB1F4A95E2F7DD 215 | :100D6000AD014095509524233523D7012C9340E0C5 216 | :100D700050E021E030E07C01B2E0EB1AF1084E15C2 217 | :100D80005F052CF4220F331F4F5F5F4FF8CF229582 218 | :100D9000207F212379F0D6011E962C91A681B78160 219 | :100DA0004C917B0102C0EE0CFF1C2A95E2F79701E3 220 | :100DB000242B2C93019632968630910509F0BFCFF3 221 | :100DC0008FE891E00197F1F700C00000CE0191DFBC 222 | :100DD000FE0182E090E061E070E06E01C80ED91E75 223 | :100DE000D6011E964C91E680F780D7012C9130E019 224 | :100DF000DB0102C0AA0FBB1F4A95E2F7AD01409587 225 | :100E0000509524233523D7012C9340E050E021E076 226 | :100E100030E07C01B2E0EB1AF1084E155F052CF4CE 227 | :100E2000220F331F4F5F5F4FF8CF212379F0D60198 228 | :100E30001E962C91A681B7814C917B0102C0EE0CCD 229 | :100E4000FF1C2A95E2F79701242B2C9301963296EA 230 | :100E50008630910511F68FE891E00197F1F700C017 231 | :100E60000000CE01DF91CF911F91FF90EF90DF90B6 232 | :100E7000CF903FCF40E049CF6F927F928F92AF9259 233 | :100E8000BF92CF92EF92FF920F931F93CF93DF9376 234 | :100E900000D000D0CDB7DEB73C0149830A83CB82B6 235 | :100EA0008C824B895C898E899F89F301738362836D 236 | :100EB00069816687358324832A812787F782E682C2 237 | :100EC0002B81208BB186A0862C81218B5387428772 238 | :100ED0002D89228B95878487888D838B80E090E095 239 | :100EE00041E050E0D301A80FB91F1E962C91A281BA 240 | :100EF000B3816E918A0102C0000F111F2A95E2F79B 241 | :100F00009801262B2C93019632968630910551F745 242 | :100F10001FEF26E781E0115020408040E1F700C03C 243 | :100F2000000060E3C301A6DFC301E3DEEFE1FEE4FE 244 | :100F30003197F1F700C0000060E3C3019BDFC301FC 245 | :100F4000D8DE8FED91E00197F1F700C0000060E37B 246 | :100F5000C30190DFC301CDDEEFEDF1E03197F1F792 247 | :100F600000C0000068E2C30185DFC301C2DE68E0A3 248 | :100F7000C30180DFC301BDDE61E0C3017BDFC301CC 249 | :100F8000B8DE8FE39FE10197F1F700C0000066E053 250 | :100F9000C30170DFC301ADDE6CE0C3016BDFC301D1 251 | :100FA0000F900F900F900F90DF91CF911F910F91A5 252 | :100FB000FF90EF90CF90BF90AF908F907F906F9009 253 | :100FC00098CEEFEFE60FE33028F4F0E0E459FF4F5E 254 | :100FD000408101C040E0262F30E0FC0131832083B6 255 | :100FE00060E8640F47CF6A3051F4FC016081718181 256 | :100FF0006330710514F060E001C06F5FE2CF41E043 257 | :1010000084CE0F931F93CF93DF938C01EB016991F3 258 | :10101000662319F0C801E7DFFACFDF91CF911F9166 259 | :101020000F910895CF93DF93CDB7DEB7DA950FB662 260 | :10103000F894DEBF0FBECDBF9E01275F3E4FC95F54 261 | :10104000DE4F48815981C750D1406FEF70E0CE012B 262 | :101050000196ECD6BE016F5F7F4FCB5FDE4F88817C 263 | :101060009981C550D140CDDFD3950FB6F894DEBF3E 264 | :101070000FBECDBFDF91CF910895CF93DF93EC01E9 265 | :1010800062E0F8DE60E0CE01DF91CF919ACFFC0103 266 | :10109000628373834583FB01229181E090E0042EFB 267 | :1010A00001C0880F0A94EAF780958223808308950F 268 | :1010B000DC011296ED91FC9113973297208130E07C 269 | :1010C00015960C9002C0359527950A94E2F7822F69 270 | :1010D00081700895FC01628373834583FB01229133 271 | :1010E00081E090E0042E01C0880F0A94EAF7282BD3 272 | :1010F00020830895DC0114966C9314971296ED9159 273 | :10110000FC91139715963C91208181E090E0032E8D 274 | :1011100001C0880F0A94EAF7662319F0282B208370 275 | :1011200008958095822380830895FC018481089529 276 | :101130001F920F920FB60F9211248F929F92AF922F 277 | :10114000BF92CF92DF92EF92FF922F933F934F93F4 278 | :101150005F936F937F938F939F93AF93BF93EF931F 279 | :10116000FF9364B185B170E0782B80912B018111E0 280 | :1011700023C080E090E021D420E030E040E85AE352 281 | :10118000D2D4209168003091690040916A0050915A 282 | :101190006B00C9D42FE535E24FE35EE37AD3609369 283 | :1011A0002701709328018093290190932A0181E0FF 284 | :1011B00080932B0184E02AC080912B01882339F190 285 | :1011C00080E090E0FAD320E030E040E85AE3ABD48E 286 | :1011D00027ED33E248ED52E4A6D425E83BEE4DE19D 287 | :1011E00051E457D3209168003091690040916A0022 288 | :1011F00050916B0098D460932301709324018093E5 289 | :1012000025019093260110922B0185E087B98FED7F 290 | :1012100086B9C0902701D0902801E0902901F09074 291 | :101220002A018090600090906100A0906200B090D0 292 | :101230006300609160007091610080916200909104 293 | :10124000630020E030E040E05FE36DD49B01AC013F 294 | :10125000C501B401B6D29B01AC01C701B6015FD490 295 | :1012600018163CF48AE591E0ECDCBC0176956795B4 296 | :101270002FC06091270170912801809129019091E0 297 | :101280002A012091600030916100409162005091EC 298 | :10129000630045D418163CF48AE591E0D2DCBC0129 299 | :1012A0006150710948C020E030E04CE852E46091A0 300 | :1012B0002C0170912D0180912E0190912F012FD43E 301 | :1012C00018166CF48AE591E0BCDCBC016150710930 302 | :1012D0008AE591E064DC81E0809322012FC0609177 303 | :1012E0002301709124018091250190912601209184 304 | :1012F00064003091650040916600509167000FD402 305 | :10130000181654F2609123017091240180912501F7 306 | :101310009091260120916400309165004091660013 307 | :1013200050916700B2D287FF09C08AE591E089DC5D 308 | :10133000BC016F5F7F4F8AE591E031DCFF91EF9157 309 | :10134000BF91AF919F918F917F916F915F914F91DD 310 | :101350003F912F91FF90EF90DF90CF90BF90AF9093 311 | :101360009F908F900F900FBE0F901F901895CF9366 312 | :10137000DF9300D000D0CDB7DEB745E062E370E088 313 | :1013800084E591E0A7DE46E062E370E088E491E066 314 | :10139000A1DE40E068E370E08EE491E09BDE8AE548 315 | :1013A00091E02CDC40E065E370E082E491E06FDEE8 316 | :1013B00041E065E370E08CE391E069DE42E065E3E3 317 | :1013C00070E086E391E063DE43E065E370E080E394 318 | :1013D00091E05DDE47E062E370E08CE591E02FDBB9 319 | :1013E00015E01F931F9288E38F9382E08F931F92E3 320 | :1013F00082E38F9394E0892E28E3A22EB12C33E070 321 | :10140000C32E42E3E42EF12C03E028E330E044E075 322 | :1014100062E370E084E691E02FDD10922B0117B9B2 323 | :101420008FED86B978946BE770E084E691E0E9DDB2 324 | :101430000F900F900F900F900F900F9000ED10E015 325 | :1014400060916400709165008091660090916700E2 326 | :10145000FF24F39420E030E040E451E460D3181618 327 | :101460000CF0F12C6F2D84E591E044DEFF24F39421 328 | :1014700020E030E048E452E460912C0170912D01AD 329 | :1014800080912E0190912F014AD318160CF0F12C67 330 | :101490006F2D88E491E02EDE809120019091210152 331 | :1014A000892B09F078C019821A821B821C82F89459 332 | :1014B000BE016F5F7F4F8CE591E0F1DA892B61F41B 333 | :1014C00089819A81AB81BC8180932C0190932D01FD 334 | :1014D000A0932E01B0932F01789484E691E0CDDDA6 335 | :1014E0008AE591E0AEDB382E292E88E491E01DDEFE 336 | :1014F000882319F02FE630E002C025E730E0409065 337 | :101500002701509028016090290170902A01809055 338 | :10151000230190902401A0902501B0902601C09055 339 | :101520006000D0906100E0906200F0906300409114 340 | :1015300064005091650060916600709167002F9281 341 | :101540003F923F932F937F926F925F924F92BF9201 342 | :10155000AF929F928F9280912F018F9380912E0155 343 | :101560008F9380912D018F9380912C018F93FF9207 344 | :10157000EF92DF92CF927F936F935F934F931F937E 345 | :101580000F9384E691E09F938F934CDD0FB6F89410 346 | :10159000DEBF0FBECDBF8091200190912101019649 347 | :1015A000813127E2920728F4909321018093200152 348 | :1015B00004C0109221011092200180912201882301 349 | :1015C00099F061E08EE491E095DD8FEF96E721E000 350 | :1015D000815090402040E1F700C0000060E08EE4C0 351 | :1015E00091E088DD1092220182E491E061DD8111B9 352 | :1015F00028C06091640070916500809166009091B0 353 | :10160000670020E030E040ED51E43FD187FF15C096 354 | :101610006091640070916500809166009091670010 355 | :101620002DEC3CEC4CEC5DE3CCD06093640070930B 356 | :1016300065008093660090936700109221011092DC 357 | :1016400020018CE391E034DD811128C060916400B9 358 | :101650007091650080916600909167002DEC3CECE4 359 | :101660004CEC5DE35CD21816ACF4609164007091B0 360 | :10167000650080916600909167002DEC3CEC4CEC8D 361 | :101680005DE39ED060936400709365008093660074 362 | :1016900090936700109221011092200186E391E05F 363 | :1016A00007DD811128C06091600070916100809118 364 | :1016B00062009091630020E030E040EA50E4E5D021 365 | :1016C00087FF15C060916000709161008091620099 366 | :1016D000909163002DEC3CEC4CEC5DE372D0609398 367 | :1016E0006000709361008093620090936300109299 368 | :1016F00021011092200180E391E0DADC8111A0CE7B 369 | :10170000609160007091610080916200909163002F 370 | :101710002DEC3CEC4CEC5DE302D21816ACF460917D 371 | :1017200060007091610080916200909163002DECE7 372 | :101730003CEC4CEC5DE344D060936000709361003E 373 | :101740008093620090936300109221011092200117 374 | :1017500077CE2F923F924F925F926F927F928F92AD 375 | :101760009F92AF92BF92CF92DF92EF92FF920F9330 376 | :101770001F93CF93DF93CDB7DEB7CA1BDB0B0FB63A 377 | :10178000F894DEBF0FBECDBF09942A8839884888F7 378 | :101790005F846E847D848C849B84AA84B984C8848D 379 | :1017A000DF80EE80FD800C811B81AA81B981CE0F84 380 | :1017B000D11D0FB6F894DEBF0FBECDBFED01089569 381 | :1017C0005058BB27AA270ED070C161D130F066D126 382 | :1017D00020F031F49F3F11F41EF456C10EF4E09551 383 | :1017E000E7FB4CC1E92F72D180F3BA176207730788 384 | :1017F0008407950718F071F49EF58AC10EF4E09500 385 | :101800000B2EBA2FA02D0B01B90190010C01CA01BA 386 | :10181000A0011124FF27591B99F0593F50F4503E65 387 | :1018200068F11A16F040A22F232F342F4427585F57 388 | :10183000F3CF469537952795A795F0405395C9F76F 389 | :101840007EF41F16BA0B620B730B840BBAF0915027 390 | :10185000A1F0FF0FBB1F661F771F881FC2F70EC0C6 391 | :10186000BA0F621F731F841F48F487957795679599 392 | :10187000B795F7959E3F08F0B3CF9395880F08F082 393 | :101880009927EE0F979587950895D4D008F481E0B5 394 | :1018900008950CD00AC102D140F0F9D030F021F403 395 | :1018A0005F3F19F0EBC0511134C1EEC00FD198F376 396 | :1018B0009923C9F35523B1F3951B550BBB27AA27D1 397 | :1018C00062177307840738F09F5F5F4F220F331F43 398 | :1018D000441FAA1FA9F333D00E2E3AF0E0E830D00F 399 | :1018E00091505040E695001CCAF729D0FE2F27D012 400 | :1018F000660F771F881FBB1F261737074807AB07E0 401 | :10190000B0E809F0BB0B802DBF01FF2793585F4F54 402 | :101910002AF09E3F510568F0B1C0FBC05F3FECF379 403 | :10192000983EDCF3869577956795B795F7959F5F19 404 | :10193000C9F7880F911D9695879597F90895E1E06D 405 | :10194000660F771F881FBB1F621773078407BA07CC 406 | :1019500020F0621B730B840BBA0BEE1F88F7E09527 407 | :101960000895BCD088F09F5790F0B92F9927B751B0 408 | :10197000A0F0D1F0660F771F881F991F1AF0BA9553 409 | :10198000C9F712C0B13081F0C3D0B1E00895C0C032 410 | :10199000672F782F8827B85F39F0B93FCCF3869549 411 | :1019A00077956795B395D9F73EF4909580957095A6 412 | :1019B00061957F4F8F4F9F4F0895E89409C097FB23 413 | :1019C0003EF490958095709561957F4F8F4F9F4F16 414 | :1019D0009923A9F0F92F96E9BB279395F69587955A 415 | :1019E00077956795B795F111F8CFFAF4BB0F11F41D 416 | :1019F00060FF1BC06F5F7F4F8F4F9F4F16C08823C4 417 | :101A000011F096E911C0772321F09EE8872F762FF9 418 | :101A100005C0662371F096E8862F70E060E02AF03A 419 | :101A20009A95660F771F881FDAF7880F9695879526 420 | :101A300097F90895990F0008550FAA0BE0E8FEEFFB 421 | :101A400016161706E807F907C0F012161306E40782 422 | :101A5000F50798F0621B730B840B950B39F40A267B 423 | :101A600061F0232B242B252B21F408950A2609F459 424 | :101A7000A140A6958FEF811D811D089597F99F675D 425 | :101A800080E870E060E008959FEF80EC0895002406 426 | :101A90000A941616170618060906089500240A94D3 427 | :101AA00012161306140605060895092E0394000C59 428 | :101AB00011F4882352F0BB0F40F4BF2B11F460FFE8 429 | :101AC00004C06F5F7F4F8F4F9F4F089557FD905811 430 | :101AD000440F551F59F05F3F71F04795880F97FBF2 431 | :101AE000991F61F09F3F79F08795089512161306AC 432 | :101AF0001406551FF2CF4695F1DF08C016161706DB 433 | :101B00001806991FF1CF869571056105089408950F 434 | :101B1000E894BB2766277727CB0197F908958ADFDA 435 | :101B200008F48FEF08950BD0C0CFB1DF28F0B6DFF7 436 | :101B300018F0952309F0A2CFA7CF1124EACFC6DF72 437 | :101B4000A0F3959FD1F3950F50E0551F629FF001D0 438 | :101B5000729FBB27F00DB11D639FAA27F00DB11D29 439 | :101B6000AA1F649F6627B00DA11D661F829F2227B2 440 | :101B7000B00DA11D621F739FB00DA11D621F839F39 441 | :101B8000A00D611D221F749F3327A00D611D231F0F 442 | :101B9000849F600D211D822F762F6A2F11249F575D 443 | :101BA00050408AF0E1F088234AF0EE0FFF1FBB1F80 444 | :101BB000661F771F881F91505040A9F79E3F51051F 445 | :101BC00070F05CCFA6CF5F3FECF3983EDCF38695D8 446 | :101BD00077956795B795F795E7959F5FC1F7FE2BCA 447 | :101BE000880F911D9695879597F90895283008F0EC 448 | :101BF00027E03327DA01990F311D87FD91600096A8 449 | :101C00006105710539F432602E5F3D9330E32A950A 450 | :101C1000E1F708959F3F30F080387105610509F0C4 451 | :101C20003C5F3C5F3D93913008F08068911DDF93ED 452 | :101C3000CF931F930F93FF92EF92192F987F969552 453 | :101C4000E92F96959695E90FFF27E857FF4F9927BB 454 | :101C50003327EE24FF24A701E70105900894079499 455 | :101C600028F4360FE71EF81E491F511D660F771F17 456 | :101C7000881F991F0694A1F70590079428F4E70E92 457 | :101C8000F81E491F561FC11D770F881F991F661F19 458 | :101C90000694A1F70590079428F4F80E491F561FE3 459 | :101CA000C71FD11D880F991F661F771F0694A1F7C4 460 | :101CB0000590079420F4490F561FC71FD81F990F8E 461 | :101CC000661F771F881F0694A9F7849110951770D7 462 | :101CD00041F0D695C79557954795F794E7941A958F 463 | :101CE000C1F7EEE2F0E06894159015913591659199 464 | :101CF000959105907FE27395E118F10A430B560B1D 465 | :101D0000C90BD009C0F7E10CF11E431F561FC91FB4 466 | :101D1000D01D7EF4703311F48A95E6CFE89401501B 467 | :101D200030F0080F0AF40027021708F4202F23953B 468 | :101D3000022F7A3328F079E37D932A95E9F710C0D2 469 | :101D40007D932A9589F6069497956795379517950B 470 | :101D50001794E118F10A430B560BC90BD00998F000 471 | :101D600023957E9173957A3308F070E37C9320136A 472 | :101D7000B8F77E9170617D9330F0839571E37D9328 473 | :101D800070E32A95E1F71124EF90FF900F911F91D6 474 | :101D9000CF91DF91992787FD90950895FC010590DB 475 | :101DA000615070400110D8F7809590958E0F9F1F5D 476 | :101DB0000895FC016150704001900110D8F78095A2 477 | :101DC00090958E0F9F1F08950F931F93CF93DF93CE 478 | :101DD000182F092FEB018B8181FD03C08FEF9FEF3F 479 | :101DE00020C082FF10C04E815F812C813D8142174F 480 | :101DF00053077CF4E881F9819F012F5F3F4F3983BE 481 | :101E00002883108306C0E885F985812F0995892BE1 482 | :101E100029F72E813F812F5F3F4F3F832E83812FF4 483 | :101E2000902FDF91CF911F910F910895AEE0B0E018 484 | :101E3000EBE1FFE09CCC8C01CA0146E04C831A83A5 485 | :101E4000098377FF02C060E070E8615071097E830A 486 | :101E50006D83A901BC01CE01019682D14D815E81C5 487 | :101E600057FD0AC02F813885421753070CF49A0199 488 | :101E7000F801E20FF31F10822E96E4E094CCFA01F1 489 | :101E8000AA27283051F1203181F1E8946F936E7FB9 490 | :101E90006E5F7F4F8F4F9F4FAF4FB1E03ED0B4E0AA 491 | :101EA0003CD0670F781F891F9A1FA11D680F791FEB 492 | :101EB0008A1F911DA11D6A0F711D811D911DA11DFC 493 | :101EC00020D009F468943F912AE0269F112430190C 494 | :101ED000305D3193DEF6CF010895462F4770405DA7 495 | :101EE0004193B3E00FD0C9F7F6CF462F4F70405D56 496 | :101EF0004A3318F0495D31FD4052419302D0A9F7B1 497 | :101F0000EACFB4E0A6959795879577956795BA95AA 498 | :101F1000C9F700976105710508959B01AC010A2E70 499 | :101F200006945795479537952795BA95C9F7620F47 500 | :0E1F3000731F841F951FA01D0895F894FFCF06 501 | :101F3E000000803F0000A0400000A040401454204C 502 | :101F4E002B46414E002020202020002A2A2A2A2A11 503 | :101F5E002A2A2A2A2A2A2A2A2A2A2A2A2A2A2A0AF3 504 | :101F6E002A4469676974616C2050777220537570CA 505 | :101F7E00706C792A0A2A706F636B65746D6167697C 506 | :101F8E00632E6E65742731352A0A2A2A2A2A2A2AAE 507 | :101F9E002A2A2A2A2A2A2A2A2A2A2A2A2A2A0A00DD 508 | :101FAE00202B5345543A2025352E326656202535A2 509 | :101FBE002E3266410A25352E3166432025352E32C6 510 | :101FCE0066562025352E3266410A257320202020A4 511 | :101FDE0020202050574D3A2534640A3230313520B6 512 | :101FEE00706F636B65746D616769632E6E657400E7 513 | :00000001FF 514 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | {description} 294 | Copyright (C) {year} {fullname} 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | {signature of Ty Coon}, 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | 341 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # digital_bench_power_supply 2 | A new design for a digital bench power supply built using the Atmega8. 3 | 4 | (C) 2015 Radu Motisan, http://www.pocketmagic.net/digital-bench-power-supply/ 5 | radu.motisan@gmail.com 6 | -------------------------------------------------------------------------------- /circuit_diagram_pcb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radhoo/digital_bench_power_supply/1a3af2e5a54f59a9425974670aa89080b0d2ba9c/circuit_diagram_pcb.png -------------------------------------------------------------------------------- /circuit_diagram_sch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radhoo/digital_bench_power_supply/1a3af2e5a54f59a9425974670aa89080b0d2ba9c/circuit_diagram_sch.png -------------------------------------------------------------------------------- /code/.cproject: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /code/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | DigitalPowerSupply-1 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 16 | full,incremental, 17 | 18 | 19 | 20 | 21 | 22 | org.eclipse.cdt.core.cnature 23 | org.eclipse.cdt.core.ccnature 24 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 25 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 26 | de.innot.avreclipse.core.avrnature 27 | 28 | 29 | -------------------------------------------------------------------------------- /code/.settings/de.innot.avreclipse.core.prefs: -------------------------------------------------------------------------------- 1 | avrtarget/ClockFrequency=16000000 2 | avrtarget/ExtRAMSize=0 3 | avrtarget/ExtendedRAM=false 4 | avrtarget/MCUType=atmega8 5 | avrtarget/UseEEPROM=false 6 | avrtarget/UseExtendedRAMforHeap=true 7 | avrtarget/perConfig=false 8 | eclipse.preferences.version=1 9 | -------------------------------------------------------------------------------- /code/Release/DigitalPowerSupply-1.hex: -------------------------------------------------------------------------------- 1 | :1000000093C0ADC0ACC0ABC0AAC0A9C0A8C0A7C0B7 2 | :10001000A6C0A5C0A4C0A3C0A2C0A1C089C89FC0DB 3 | :100020009EC09DC09CC06E616E00696E66000040FF 4 | :100030007A10F35A00A0724E18090010A5D4E800F7 5 | :1000400000E87648170000E40B54020000CA9A3B0F 6 | :10005000000000E1F5050000809698000000404295 7 | :100060000F000000A0860100000010270000000023 8 | :10007000E803000000006400000000000A00000027 9 | :1000800000000100000000002C76D888DC674F08D3 10 | :1000900023DFC1DFAE59E1B1B796E5E3E453C63AD9 11 | :1000A000E651997696E8E6C28426EB898C9B62ED50 12 | :1000B000407C6FFCEFBC9C9F40F2BAA56FA5F4900A 13 | :1000C000055A2AF75C936B6CF9676DC11BFCE0E481 14 | :1000D0000D47FEF520E6B500D0ED902E03009435D7 15 | :1000E00077050080841E080000204E0A000000C82A 16 | :1000F0000C333333330F986E12831141EF8D21147B 17 | :10010000893BE65516CFFEE6DB18D1844B381BF74A 18 | :100110007C1D901DA4BBE424203284725E228100E9 19 | :10012000C9F124ECA1E53D2711241FBECFE5D4E0A1 20 | :10013000DEBFCDBF11E0A0E6B0E0EEE3FFE102C01C 21 | :1001400005900D92A032B107D9F721E0A0E2B1E00D 22 | :1001500001C01D92A837B207E1F709D9EECE50CF02 23 | :10016000A3E1B0E0E5EBF0E0F4CA7C011B016A0119 24 | :10017000FC0117821682838181FF49C3BE016F5F34 25 | :100180007F4F4B01F7019381F10193FD859193FF1F 26 | :1001900081911F01882309F436C3853239F493FD18 27 | :1001A000859193FF81911F01853231F4B70190E071 28 | :1001B0000BDE56016501E6CF10E0512C20E0203225 29 | :1001C000A0F48B3269F030F4803259F0833269F454 30 | :1001D00020612CC08D3239F0803339F4216026C083 31 | :1001E0002260246023C0286021C027FD27C030ED95 32 | :1001F000380F3A3078F426FF06C0FAE01F9F300D22 33 | :100200001124132F13C06AE0569E300D1124532E73 34 | :1002100020620CC08E3221F426FDF5C2206406C097 35 | :100220008C3611F4206802C0883641F4F10193FD48 36 | :10023000859193FF81911F018111C1CF9BEB980F95 37 | :10024000933018F42061805E06C09BE9980F9330CC 38 | :1002500008F09AC12F7E26FF16E02F73722E853686 39 | :1002600021F4F22FF0647F2E08C0863621F4622F2D 40 | :100270006068762E02C01111115077FE07C01C3342 41 | :1002800048F444244394410E27E00BC0183030F466 42 | :10029000212F06C027E04CE3442E03C027E017E0DF 43 | :1002A000412C560174E0A70EB11CF60160817181EA 44 | :1002B00082819381042DA40199DC6C01098100FFE6 45 | :1002C00002C003FF06C071FC07C072FC08C0612CAD 46 | :1002D00008C03DE2632E05C02BE2622E02C090E210 47 | :1002E000692E802F8C7081F1662011F084E001C0AE 48 | :1002F00083E0851510F0512C0AC0581A73FC07C012 49 | :10030000B70180E290E060DD5A94D1F7F4CF662027 50 | :1003100021F0B701862D90E057DD03FD03C00AE20E 51 | :1003200010E002C006E210E0F72DF0717F2EF80118 52 | :100330008491882309F45EC271108052B70190E065 53 | :1003400043DD0F5F1F4FF3CF77FE0FC04C0C04FF50 54 | :1003500004C08A81813309F44A94141474F5F8E0D6 55 | :10036000F41578F588E0482E2CC076FC2AC0812F41 56 | :1003700090E08C159D059CF06CEFC6166FEFD606CD 57 | :1003800074F0772D7068772E0AC0E2E0F0E0EC0F91 58 | :10039000FD1FE10FF11D8081803319F411501111FF 59 | :1003A000F4CF77FE0EC044244394410E812F90E099 60 | :1003B000C816D9062CF41C1904C04424439401C067 61 | :1003C00010E077FE07C01C141D043CF496012F5F5B 62 | :1003D0003F4F05C025E030E002C021E030E066205C 63 | :1003E00011F02F5F3F4F112331F0412F50E04F5F4D 64 | :1003F0005F4F240F351F452D50E02417350714F4A7 65 | :10040000521A01C0512C872D897041F4552031F0CA 66 | :10041000B70180E290E0D8DC5A94F8CF662021F052 67 | :10042000B701862D90E0D0DC73FC08C0552031F078 68 | :10043000B70180E390E0C8DC5A94F8CF77FE5DC046 69 | :100440009C2D8D2DD7FE02C090E080E0692E782E85 70 | :1004500040E050E0C601841991099D878C87960180 71 | :1004600026193709280D391D812F90E0EE27FF2727 72 | :10047000E81BF90BFF87EE87FFEF6F167F0661F42D 73 | :10048000B7018EE290E02B8B3A8B488B598B9CDC2A 74 | :10049000598948893A892B89C614D70454F06C8548 75 | :1004A0007D85661577052CF4F901E40FF51F818130 76 | :1004B00001C080E371E0671A71084F5F5F4FEE85FE 77 | :1004C000FF856E167F0664F0B70190E02B8B3A8BA8 78 | :1004D000488B598B79DC2B893A8948895989CCCF4B 79 | :1004E0006C147D0439F49A81963318F4953311F421 80 | :1004F00004FF81E3B70190E045C08A81813309F0B0 81 | :100500000F7EB70190E060DC111105C074FE16C0CB 82 | :1005100085E490E015C0B7018EE290E055DC82E002 83 | :1005200066246394680EF401E80FF11D8081B70121 84 | :1005300090E04ADC115051F3862DF2CF85E690E031 85 | :10054000B70142DCD7FC05C0C114D10439F404FF63 86 | :1005500005C0D194C194D1088DE201C08BE2B701EE 87 | :1005600090E032DC80E36AE0C616D1042CF08F5FA5 88 | :10057000FAE0CF1AD108F7CFB70190E025DCB70138 89 | :10058000C601C09621DC36C1833631F0833779F05D 90 | :10059000833509F054C020C0560172E0A70EB11C8B 91 | :1005A000F6018081898301E010E0640113C05601E7 92 | :1005B000F2E0AF0EB11CF601C080D18026FF03C06F 93 | :1005C000612F70E002C06FEF7FEFC6012B8BF1DB74 94 | :1005D0008C012B892F7714C05601F2E0AF0EB11CAD 95 | :1005E000F601C080D18026FF03C0612F70E002C0F9 96 | :1005F0006FEF7FEFC6012B8BD1DB8C012B8920683D 97 | :10060000722E23FD18C0852D90E00817190798F465 98 | :10061000B70180E290E0D8DB5A94F5CFF60177FC81 99 | :10062000859177FE81916F01B70190E0CDDB51108C 100 | :100630005A94015011090115110581F7DBC0843668 101 | :1006400011F0893649F5560127FF09C0F4E0AF0ED5 102 | :10065000B11CF60160817181828193810AC0F2E050 103 | :10066000AF0EB11CF60160817181882777FD8095FE 104 | :10067000982F022F0F7697FF08C090958095709560 105 | :1006800061957F4F8F4F9F4F00682AE030E0A401B3 106 | :10069000F6DBC82EC8183DC0022F853721F40F7E27 107 | :1006A0002AE030E01DC0097F8F3691F018F48835BC 108 | :1006B00059F0A9C0803719F0883711F0A4C0006143 109 | :1006C00004FF09C0046007C024FF08C0066006C01C 110 | :1006D00028E030E005C020E130E002C020E132E057 111 | :1006E000560107FF09C0F4E0AF0EB11CF6016081AE 112 | :1006F00071818281938108C0F2E0AF0EB11CF601D6 113 | :100700006081718180E090E0A401B9DBC82EC81837 114 | :100710000F7706FF0BC0202F2E7FC11650F404FF69 115 | :100720000AC002FD08C0202F2E7E05C0DC2C202F21 116 | :1007300003C0DC2C01C0D12E24FF0DC0FE01EC0D46 117 | :10074000F11D8081803311F4297E09C022FF06C08B 118 | :10075000D394D39404C0822F867809F0D39423FDD8 119 | :1007600012C020FF06C01C2DD51418F4150D1D193C 120 | :10077000D52CD51460F4B70180E290E02B8B24DBFC 121 | :10078000D3942B89F6CFD51410F45D1801C0512CE9 122 | :1007900024FF11C0B70180E390E02B8B15DB2B8980 123 | :1007A00022FF16C021FF03C088E590E002C088E761 124 | :1007B00090E0B7010CC0822F867851F021FD02C075 125 | :1007C00080E201C08BE227FD8DE2B70190E0FCDA08 126 | :1007D000C11630F4B70180E390E0F6DA1150F8CF9B 127 | :1007E000CA94F401EC0DF11D8081B70190E0ECDAC0 128 | :1007F000C110F6CF552009F4DDCCB70180E290E0BE 129 | :10080000E3DA5A94F7CFF7018681978102C08FEF20 130 | :100810009FEF6396E2E1B9C7DC01ED91FC9111977E 131 | :10082000408121E030E016960C9002C0220F331F69 132 | :100830000A94E2F72095242320830895DC01ED91AA 133 | :10084000FC911197408121E030E016960C9002C097 134 | :10085000220F331F0A94E2F7422B40830895CF936F 135 | :10086000DF93EC01EBDFEC81FD81208181E090E002 136 | :100870000E8002C0880F991F0A94E2F780958223A8 137 | :1008800080838FE797E00197F1F700C00000CE0169 138 | :10089000C3DFE7E1F1E03197F1F700C00000EA8142 139 | :1008A000FB81808121E030E00E8002C0220F331FE7 140 | :1008B0000A94E2F78223E7E6F6E03197F1F700C009 141 | :1008C0000000DF91CF9108950F931F93CF93DF9393 142 | :1008D0001F92CDB7DEB78C01DC011496ED91FC912F 143 | :1008E0001597208181E090E016960C9002C0880F49 144 | :1008F000991F0A94E2F7809582238083C801698357 145 | :100900009DDFB5E0BA95F1F700006981662311F02B 146 | :10091000C80182DFEFEEF0E03197F1F700C0000090 147 | :10092000C8010F90DF91CF911F910F9175CFCF9399 148 | :10093000DF93EC01EC81FD81208181E090E00E806D 149 | :1009400002C0880F991F0A94E2F780958223808362 150 | :10095000CE0174DF85E08A95F1F70000CE015CDFFF 151 | :100960009AE49A95F1F700C0EA81FB81208181E049 152 | :1009700090E00E8002C0880F991F0A94E2F72823A6 153 | :1009800081E009F480E090EF9A95F1F7DF91CF9143 154 | :100990000895FF920F931F93CF93DF938C01C0E0D4 155 | :1009A000D0E0F12CC801C3DF0C2E01C0880F0A94DF 156 | :1009B000EAF78F29F82E2196C830D10599F7DF91F3 157 | :1009C000CF911F910F91FF900895FF920F931F9366 158 | :1009D000CF93DF938C01F62EC8E0D0E06F2D6170CD 159 | :1009E000C80172DFF69421972097C1F7DF91CF916C 160 | :1009F0001F910F91FF900895CF93DF93EC012FDFAC 161 | :100A0000811118C06CECCE01E0DF6EE4CE01DDDFB9 162 | :100A100060E0CE01DADF60E0CE01D7DF6FE3CE0128 163 | :100A2000D4DFCE011CDF21E090E0811101C020E085 164 | :100A3000822F02C081E090E0DF91CF910895FC0108 165 | :100A4000758364834683CB010197918380836250D1 166 | :100A500071097383628381E08783CF01CDCFAC01BD 167 | :100A6000FC0180E070E09CE89F01241B350B2617F9 168 | :100A70003707A4F42191822728E030E0A82FB0E0C6 169 | :100A8000B595A79580FF03C08A2F892701C08A2FBB 170 | :100A9000215031092115310589F7E6CF08958F924C 171 | :100AA0009F92AF92BF92CF92DF92EF92FF920F93FD 172 | :100AB0001F93CF93DF93CDB7DEB729970FB6F89486 173 | :100AC000DEBF0FBECDBF8C017B01C9DE882319F0CC 174 | :100AD00081E090E051C06CECC80177DF64E4C801AC 175 | :100AE00074DFC801BCDE8111F3CF6CECC8016DDF8F 176 | :100AF0006EEBC8016ADFCE0101966C0189E0F60158 177 | :100B000011928A95E9F756014E01FAE08F0E911C79 178 | :100B1000C8013FDFF50181935F01E815F905C1F7D1 179 | :100B200068E0C6019CDF99858913D2CF6A8170E0A5 180 | :100B3000762F66278981680F711D882777FD80953C 181 | :100B4000982F3DD720E030E040E85DE3ECD7F70197 182 | :100B50006083718382839383F8012781222341F08C 183 | :100B600020E030E04AEA52E490D6882309F4B0CF7E 184 | :100B7000F801178280E090E029960FB6F894DEBF66 185 | :100B80000FBECDBFDF91CF911F910F91FF90EF90DE 186 | :100B9000DF90CF90BF90AF909F908F900895CF92AD 187 | :100BA000DF92EF92FF92CF93DF93EB019B012150F5 188 | :100BB0003109283E3340D8F4FC017183608366B567 189 | :100BC00077B580E090E0F9D66B017C01BE0180E052 190 | :100BD00090E0F3D69B01AC01C701B601A4D720E099 191 | :100BE00030E04AE754E455D6BCD67BBD6ABDDF9100 192 | :100BF000CF91FF90EF90DF90CF9008951FBCB99AEE 193 | :100C000020EA30E037BD26BD27EA30E0FC01318321 194 | :100C1000208366B577B580E090E0CFD620E030E065 195 | :100C200047E253E480D720E030E04AE754E431D68D 196 | :100C300098D67BBD6ABD89E18EBD8FB582688FBDB8 197 | :100C40000895FC01808191810895DC011E963C91FC 198 | :100C50001E971296ED91FC911397208181E090E010 199 | :100C6000032E01C0880F0A94EAF7822B808308952F 200 | :100C7000DC011E963C911E971296ED91FC91139704 201 | :100C8000208181E090E002C0880F991F3A95E2F739 202 | :100C90008095909530E08223932380830895DC0132 203 | :100CA0001F963C911F971496ED91FC91159720810A 204 | :100CB00081E090E0032E01C0880F0A94EAF7822BAE 205 | :100CC00080830895DC011F963C911F971496ED9147 206 | :100CD000FC911597208181E090E002C0880F991F58 207 | :100CE0003A95E2F78095909530E0822393238083B4 208 | :100CF0000895CF93DF93EC01D2DF8AE18A95F1F773 209 | :100D000000C0CE01DF91CF91DDCFCF92DF92EF9285 210 | :100D1000FF921F93CF93DF93EC01162F8FE396E0A2 211 | :100D20000197F1F700C00000CE01442311F08DDFE0 212 | :100D300001C09EDFFE0182E090E061E070E06E01A4 213 | :100D4000C80ED91ED6011E964C91E680F780D701B9 214 | :100D50002C9130E0DB0102C0AA0FBB1F4A95E2F7DD 215 | :100D6000AD014095509524233523D7012C9340E0C5 216 | :100D700050E021E030E07C01B2E0EB1AF1084E15C2 217 | :100D80005F052CF4220F331F4F5F5F4FF8CF229582 218 | :100D9000207F212379F0D6011E962C91A681B78160 219 | :100DA0004C917B0102C0EE0CFF1C2A95E2F79701E3 220 | :100DB000242B2C93019632968630910509F0BFCFF3 221 | :100DC0008FE891E00197F1F700C00000CE0191DFBC 222 | :100DD000FE0182E090E061E070E06E01C80ED91E75 223 | :100DE000D6011E964C91E680F780D7012C9130E019 224 | :100DF000DB0102C0AA0FBB1F4A95E2F7AD01409587 225 | :100E0000509524233523D7012C9340E050E021E076 226 | :100E100030E07C01B2E0EB1AF1084E155F052CF4CE 227 | :100E2000220F331F4F5F5F4FF8CF212379F0D60198 228 | :100E30001E962C91A681B7814C917B0102C0EE0CCD 229 | :100E4000FF1C2A95E2F79701242B2C9301963296EA 230 | :100E50008630910511F68FE891E00197F1F700C017 231 | :100E60000000CE01DF91CF911F91FF90EF90DF90B6 232 | :100E7000CF903FCF40E049CF6F927F928F92AF9259 233 | :100E8000BF92CF92EF92FF920F931F93CF93DF9376 234 | :100E900000D000D0CDB7DEB73C0149830A83CB82B6 235 | :100EA0008C824B895C898E899F89F301738362836D 236 | :100EB00069816687358324832A812787F782E682C2 237 | :100EC0002B81208BB186A0862C81218B5387428772 238 | :100ED0002D89228B95878487888D838B80E090E095 239 | :100EE00041E050E0D301A80FB91F1E962C91A281BA 240 | :100EF000B3816E918A0102C0000F111F2A95E2F79B 241 | :100F00009801262B2C93019632968630910551F745 242 | :100F10001FEF26E781E0115020408040E1F700C03C 243 | :100F2000000060E3C301A6DFC301E3DEEFE1FEE4FE 244 | :100F30003197F1F700C0000060E3C3019BDFC301FC 245 | :100F4000D8DE8FED91E00197F1F700C0000060E37B 246 | :100F5000C30190DFC301CDDEEFEDF1E03197F1F792 247 | :100F600000C0000068E2C30185DFC301C2DE68E0A3 248 | :100F7000C30180DFC301BDDE61E0C3017BDFC301CC 249 | :100F8000B8DE8FE39FE10197F1F700C0000066E053 250 | :100F9000C30170DFC301ADDE6CE0C3016BDFC301D1 251 | :100FA0000F900F900F900F90DF91CF911F910F91A5 252 | :100FB000FF90EF90CF90BF90AF908F907F906F9009 253 | :100FC00098CEEFEFE60FE33028F4F0E0E459FF4F5E 254 | :100FD000408101C040E0262F30E0FC0131832083B6 255 | :100FE00060E8640F47CF6A3051F4FC016081718181 256 | :100FF0006330710514F060E001C06F5FE2CF41E043 257 | :1010000084CE0F931F93CF93DF938C01EB016991F3 258 | :10101000662319F0C801E7DFFACFDF91CF911F9166 259 | :101020000F910895CF93DF93CDB7DEB7DA950FB662 260 | :10103000F894DEBF0FBECDBF9E01275F3E4FC95F54 261 | :10104000DE4F48815981C750D1406FEF70E0CE012B 262 | :101050000196ECD6BE016F5F7F4FCB5FDE4F88817C 263 | :101060009981C550D140CDDFD3950FB6F894DEBF3E 264 | :101070000FBECDBFDF91CF910895CF93DF93EC01E9 265 | :1010800062E0F8DE60E0CE01DF91CF919ACFFC0103 266 | :10109000628373834583FB01229181E090E0042EFB 267 | :1010A00001C0880F0A94EAF780958223808308950F 268 | :1010B000DC011296ED91FC9113973297208130E07C 269 | :1010C00015960C9002C0359527950A94E2F7822F69 270 | :1010D00081700895FC01628373834583FB01229133 271 | :1010E00081E090E0042E01C0880F0A94EAF7282BD3 272 | :1010F00020830895DC0114966C9314971296ED9159 273 | :10110000FC91139715963C91208181E090E0032E8D 274 | :1011100001C0880F0A94EAF7662319F0282B208370 275 | :1011200008958095822380830895FC018481089529 276 | :101130001F920F920FB60F9211248F929F92AF922F 277 | :10114000BF92CF92DF92EF92FF922F933F934F93F4 278 | :101150005F936F937F938F939F93AF93BF93EF931F 279 | :10116000FF9364B185B170E0782B80912B018111E0 280 | :1011700023C080E090E021D420E030E040E85AE352 281 | :10118000D2D4209168003091690040916A0050915A 282 | :101190006B00C9D42FE535E24FE35EE37AD3609369 283 | :1011A0002701709328018093290190932A0181E0FF 284 | :1011B00080932B0184E02AC080912B01882339F190 285 | :1011C00080E090E0FAD320E030E040E85AE3ABD48E 286 | :1011D00027ED33E248ED52E4A6D425E83BEE4DE19D 287 | :1011E00051E457D3209168003091690040916A0022 288 | :1011F00050916B0098D460932301709324018093E5 289 | :1012000025019093260110922B0185E087B98FED7F 290 | :1012100086B9C0902701D0902801E0902901F09074 291 | :101220002A018090600090906100A0906200B090D0 292 | :101230006300609160007091610080916200909104 293 | :10124000630020E030E040E05FE36DD49B01AC013F 294 | :10125000C501B401B6D29B01AC01C701B6015FD490 295 | :1012600018163CF48AE591E0ECDCBC0176956795B4 296 | :101270002FC06091270170912801809129019091E0 297 | :101280002A012091600030916100409162005091EC 298 | :10129000630045D418163CF48AE591E0D2DCBC0129 299 | :1012A0006150710948C020E030E04CE852E46091A0 300 | :1012B0002C0170912D0180912E0190912F012FD43E 301 | :1012C00018166CF48AE591E0BCDCBC016150710930 302 | :1012D0008AE591E064DC81E0809322012FC0609177 303 | :1012E0002301709124018091250190912601209184 304 | :1012F00064003091650040916600509167000FD402 305 | :10130000181654F2609123017091240180912501F7 306 | :101310009091260120916400309165004091660013 307 | :1013200050916700B2D287FF09C08AE591E089DC5D 308 | :10133000BC016F5F7F4F8AE591E031DCFF91EF9157 309 | :10134000BF91AF919F918F917F916F915F914F91DD 310 | :101350003F912F91FF90EF90DF90CF90BF90AF9093 311 | :101360009F908F900F900FBE0F901F901895CF9366 312 | :10137000DF9300D000D0CDB7DEB745E062E370E088 313 | :1013800084E591E0A7DE46E062E370E088E491E066 314 | :10139000A1DE40E068E370E08EE491E09BDE8AE548 315 | :1013A00091E02CDC40E065E370E082E491E06FDEE8 316 | :1013B00041E065E370E08CE391E069DE42E065E3E3 317 | :1013C00070E086E391E063DE43E065E370E080E394 318 | :1013D00091E05DDE47E062E370E08CE591E02FDBB9 319 | :1013E00015E01F931F9288E38F9382E08F931F92E3 320 | :1013F00082E38F9394E0892E28E3A22EB12C33E070 321 | :10140000C32E42E3E42EF12C03E028E330E044E075 322 | :1014100062E370E084E691E02FDD10922B0117B9B2 323 | :101420008FED86B978946BE770E084E691E0E9DDB2 324 | :101430000F900F900F900F900F900F9000ED10E015 325 | :1014400060916400709165008091660090916700E2 326 | :10145000FF24F39420E030E040E451E460D3181618 327 | :101460000CF0F12C6F2D84E591E044DEFF24F39421 328 | :1014700020E030E048E452E460912C0170912D01AD 329 | :1014800080912E0190912F014AD318160CF0F12C67 330 | :101490006F2D88E491E02EDE809120019091210152 331 | :1014A000892B09F078C019821A821B821C82F89459 332 | :1014B000BE016F5F7F4F8CE591E0F1DA892B61F41B 333 | :1014C00089819A81AB81BC8180932C0190932D01FD 334 | :1014D000A0932E01B0932F01789484E691E0CDDDA6 335 | :1014E0008AE591E0AEDB382E292E88E491E01DDEFE 336 | :1014F000882319F02FE630E002C025E730E0409065 337 | :101500002701509028016090290170902A01809055 338 | :10151000230190902401A0902501B0902601C09055 339 | :101520006000D0906100E0906200F0906300409114 340 | :1015300064005091650060916600709167002F9281 341 | :101540003F923F932F937F926F925F924F92BF9201 342 | :10155000AF929F928F9280912F018F9380912E0155 343 | :101560008F9380912D018F9380912C018F93FF9207 344 | :10157000EF92DF92CF927F936F935F934F931F937E 345 | :101580000F9384E691E09F938F934CDD0FB6F89410 346 | :10159000DEBF0FBECDBF8091200190912101019649 347 | :1015A000813127E2920728F4909321018093200152 348 | :1015B00004C0109221011092200180912201882301 349 | :1015C00099F061E08EE491E095DD8FEF96E721E000 350 | :1015D000815090402040E1F700C0000060E08EE4C0 351 | :1015E00091E088DD1092220182E491E061DD8111B9 352 | :1015F00028C06091640070916500809166009091B0 353 | :10160000670020E030E040ED51E43FD187FF15C096 354 | :101610006091640070916500809166009091670010 355 | :101620002DEC3CEC4CEC5DE3CCD06093640070930B 356 | :1016300065008093660090936700109221011092DC 357 | :1016400020018CE391E034DD811128C060916400B9 358 | :101650007091650080916600909167002DEC3CECE4 359 | :101660004CEC5DE35CD21816ACF4609164007091B0 360 | :10167000650080916600909167002DEC3CEC4CEC8D 361 | :101680005DE39ED060936400709365008093660074 362 | :1016900090936700109221011092200186E391E05F 363 | :1016A00007DD811128C06091600070916100809118 364 | :1016B00062009091630020E030E040EA50E4E5D021 365 | :1016C00087FF15C060916000709161008091620099 366 | :1016D000909163002DEC3CEC4CEC5DE372D0609398 367 | :1016E0006000709361008093620090936300109299 368 | :1016F00021011092200180E391E0DADC8111A0CE7B 369 | :10170000609160007091610080916200909163002F 370 | :101710002DEC3CEC4CEC5DE302D21816ACF460917D 371 | :1017200060007091610080916200909163002DECE7 372 | :101730003CEC4CEC5DE344D060936000709361003E 373 | :101740008093620090936300109221011092200117 374 | :1017500077CE2F923F924F925F926F927F928F92AD 375 | :101760009F92AF92BF92CF92DF92EF92FF920F9330 376 | :101770001F93CF93DF93CDB7DEB7CA1BDB0B0FB63A 377 | :10178000F894DEBF0FBECDBF09942A8839884888F7 378 | :101790005F846E847D848C849B84AA84B984C8848D 379 | :1017A000DF80EE80FD800C811B81AA81B981CE0F84 380 | :1017B000D11D0FB6F894DEBF0FBECDBFED01089569 381 | :1017C0005058BB27AA270ED070C161D130F066D126 382 | :1017D00020F031F49F3F11F41EF456C10EF4E09551 383 | :1017E000E7FB4CC1E92F72D180F3BA176207730788 384 | :1017F0008407950718F071F49EF58AC10EF4E09500 385 | :101800000B2EBA2FA02D0B01B90190010C01CA01BA 386 | :10181000A0011124FF27591B99F0593F50F4503E65 387 | :1018200068F11A16F040A22F232F342F4427585F57 388 | :10183000F3CF469537952795A795F0405395C9F76F 389 | :101840007EF41F16BA0B620B730B840BBAF0915027 390 | :10185000A1F0FF0FBB1F661F771F881FC2F70EC0C6 391 | :10186000BA0F621F731F841F48F487957795679599 392 | :10187000B795F7959E3F08F0B3CF9395880F08F082 393 | :101880009927EE0F979587950895D4D008F481E0B5 394 | :1018900008950CD00AC102D140F0F9D030F021F403 395 | :1018A0005F3F19F0EBC0511134C1EEC00FD198F376 396 | :1018B0009923C9F35523B1F3951B550BBB27AA27D1 397 | :1018C00062177307840738F09F5F5F4F220F331F43 398 | :1018D000441FAA1FA9F333D00E2E3AF0E0E830D00F 399 | :1018E00091505040E695001CCAF729D0FE2F27D012 400 | :1018F000660F771F881FBB1F261737074807AB07E0 401 | :10190000B0E809F0BB0B802DBF01FF2793585F4F54 402 | :101910002AF09E3F510568F0B1C0FBC05F3FECF379 403 | :10192000983EDCF3869577956795B795F7959F5F19 404 | :10193000C9F7880F911D9695879597F90895E1E06D 405 | :10194000660F771F881FBB1F621773078407BA07CC 406 | :1019500020F0621B730B840BBA0BEE1F88F7E09527 407 | :101960000895BCD088F09F5790F0B92F9927B751B0 408 | :10197000A0F0D1F0660F771F881F991F1AF0BA9553 409 | :10198000C9F712C0B13081F0C3D0B1E00895C0C032 410 | :10199000672F782F8827B85F39F0B93FCCF3869549 411 | :1019A00077956795B395D9F73EF4909580957095A6 412 | :1019B00061957F4F8F4F9F4F0895E89409C097FB23 413 | :1019C0003EF490958095709561957F4F8F4F9F4F16 414 | :1019D0009923A9F0F92F96E9BB279395F69587955A 415 | :1019E00077956795B795F111F8CFFAF4BB0F11F41D 416 | :1019F00060FF1BC06F5F7F4F8F4F9F4F16C08823C4 417 | :101A000011F096E911C0772321F09EE8872F762FF9 418 | :101A100005C0662371F096E8862F70E060E02AF03A 419 | :101A20009A95660F771F881FDAF7880F9695879526 420 | :101A300097F90895990F0008550FAA0BE0E8FEEFFB 421 | :101A400016161706E807F907C0F012161306E40782 422 | :101A5000F50798F0621B730B840B950B39F40A267B 423 | :101A600061F0232B242B252B21F408950A2609F459 424 | :101A7000A140A6958FEF811D811D089597F99F675D 425 | :101A800080E870E060E008959FEF80EC0895002406 426 | :101A90000A941616170618060906089500240A94D3 427 | :101AA00012161306140605060895092E0394000C59 428 | :101AB00011F4882352F0BB0F40F4BF2B11F460FFE8 429 | :101AC00004C06F5F7F4F8F4F9F4F089557FD905811 430 | :101AD000440F551F59F05F3F71F04795880F97FBF2 431 | :101AE000991F61F09F3F79F08795089512161306AC 432 | :101AF0001406551FF2CF4695F1DF08C016161706DB 433 | :101B00001806991FF1CF869571056105089408950F 434 | :101B1000E894BB2766277727CB0197F908958ADFDA 435 | :101B200008F48FEF08950BD0C0CFB1DF28F0B6DFF7 436 | :101B300018F0952309F0A2CFA7CF1124EACFC6DF72 437 | :101B4000A0F3959FD1F3950F50E0551F629FF001D0 438 | :101B5000729FBB27F00DB11D639FAA27F00DB11D29 439 | :101B6000AA1F649F6627B00DA11D661F829F2227B2 440 | :101B7000B00DA11D621F739FB00DA11D621F839F39 441 | :101B8000A00D611D221F749F3327A00D611D231F0F 442 | :101B9000849F600D211D822F762F6A2F11249F575D 443 | :101BA00050408AF0E1F088234AF0EE0FFF1FBB1F80 444 | :101BB000661F771F881F91505040A9F79E3F51051F 445 | :101BC00070F05CCFA6CF5F3FECF3983EDCF38695D8 446 | :101BD00077956795B795F795E7959F5FC1F7FE2BCA 447 | :101BE000880F911D9695879597F90895283008F0EC 448 | :101BF00027E03327DA01990F311D87FD91600096A8 449 | :101C00006105710539F432602E5F3D9330E32A950A 450 | :101C1000E1F708959F3F30F080387105610509F0C4 451 | :101C20003C5F3C5F3D93913008F08068911DDF93ED 452 | :101C3000CF931F930F93FF92EF92192F987F969552 453 | :101C4000E92F96959695E90FFF27E857FF4F9927BB 454 | :101C50003327EE24FF24A701E70105900894079499 455 | :101C600028F4360FE71EF81E491F511D660F771F17 456 | :101C7000881F991F0694A1F70590079428F4E70E92 457 | :101C8000F81E491F561FC11D770F881F991F661F19 458 | :101C90000694A1F70590079428F4F80E491F561FE3 459 | :101CA000C71FD11D880F991F661F771F0694A1F7C4 460 | :101CB0000590079420F4490F561FC71FD81F990F8E 461 | :101CC000661F771F881F0694A9F7849110951770D7 462 | :101CD00041F0D695C79557954795F794E7941A958F 463 | :101CE000C1F7EEE2F0E06894159015913591659199 464 | :101CF000959105907FE27395E118F10A430B560B1D 465 | :101D0000C90BD009C0F7E10CF11E431F561FC91FB4 466 | :101D1000D01D7EF4703311F48A95E6CFE89401501B 467 | :101D200030F0080F0AF40027021708F4202F23953B 468 | :101D3000022F7A3328F079E37D932A95E9F710C0D2 469 | :101D40007D932A9589F6069497956795379517950B 470 | :101D50001794E118F10A430B560BC90BD00998F000 471 | :101D600023957E9173957A3308F070E37C9320136A 472 | :101D7000B8F77E9170617D9330F0839571E37D9328 473 | :101D800070E32A95E1F71124EF90FF900F911F91D6 474 | :101D9000CF91DF91992787FD90950895FC010590DB 475 | :101DA000615070400110D8F7809590958E0F9F1F5D 476 | :101DB0000895FC016150704001900110D8F78095A2 477 | :101DC00090958E0F9F1F08950F931F93CF93DF93CE 478 | :101DD000182F092FEB018B8181FD03C08FEF9FEF3F 479 | :101DE00020C082FF10C04E815F812C813D8142174F 480 | :101DF00053077CF4E881F9819F012F5F3F4F3983BE 481 | :101E00002883108306C0E885F985812F0995892BE1 482 | :101E100029F72E813F812F5F3F4F3F832E83812FF4 483 | :101E2000902FDF91CF911F910F910895AEE0B0E018 484 | :101E3000EBE1FFE09CCC8C01CA0146E04C831A83A5 485 | :101E4000098377FF02C060E070E8615071097E830A 486 | :101E50006D83A901BC01CE01019682D14D815E81C5 487 | :101E600057FD0AC02F813885421753070CF49A0199 488 | :101E7000F801E20FF31F10822E96E4E094CCFA01F1 489 | :101E8000AA27283051F1203181F1E8946F936E7FB9 490 | :101E90006E5F7F4F8F4F9F4FAF4FB1E03ED0B4E0AA 491 | :101EA0003CD0670F781F891F9A1FA11D680F791FEB 492 | :101EB0008A1F911DA11D6A0F711D811D911DA11DFC 493 | :101EC00020D009F468943F912AE0269F112430190C 494 | :101ED000305D3193DEF6CF010895462F4770405DA7 495 | :101EE0004193B3E00FD0C9F7F6CF462F4F70405D56 496 | :101EF0004A3318F0495D31FD4052419302D0A9F7B1 497 | :101F0000EACFB4E0A6959795879577956795BA95AA 498 | :101F1000C9F700976105710508959B01AC010A2E70 499 | :101F200006945795479537952795BA95C9F7620F47 500 | :0E1F3000731F841F951FA01D0895F894FFCF06 501 | :101F3E000000803F0000A0400000A040401454204C 502 | :101F4E002B46414E002020202020002A2A2A2A2A11 503 | :101F5E002A2A2A2A2A2A2A2A2A2A2A2A2A2A2A0AF3 504 | :101F6E002A4469676974616C2050777220537570CA 505 | :101F7E00706C792A0A2A706F636B65746D6167697C 506 | :101F8E00632E6E65742731352A0A2A2A2A2A2A2AAE 507 | :101F9E002A2A2A2A2A2A2A2A2A2A2A2A2A2A0A00DD 508 | :101FAE00202B5345543A2025352E326656202535A2 509 | :101FBE002E3266410A25352E3166432025352E32C6 510 | :101FCE0066562025352E3266410A257320202020A4 511 | :101FDE0020202050574D3A2534640A3230313520B6 512 | :101FEE00706F636B65746D616769632E6E657400E7 513 | :00000001FF 514 | -------------------------------------------------------------------------------- /code/Release/prog.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | echo "*** writing fuses for 8MHz(dc+df)/16MHz(de+df) external crystal" 3 | avrdude -p atmega8 -c usbasp -U lfuse:w:0xde:m -U hfuse:w:0xdf:m 4 | echo "*** writting flash" 5 | avrdude -p atmega8 -c usbasp -U flash:w:DigitalPowerSupply-1.hex:i 6 | -------------------------------------------------------------------------------- /code/io/DigitalIn.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | File: DigitalIn.cpp 3 | Version: 0.1.0 4 | Date: Feb. 21, 2013 5 | License: GPL v2 6 | 7 | I/O pins 8 | 9 | **************************************************************************** 10 | Copyright (C) 2013 Radu Motisan 11 | 12 | http://www.pocketmagic.net 13 | 14 | This program is free software; you can redistribute it and/or modify 15 | it under the terms of the GNU General Public License as published by 16 | the Free Software Foundation; either version 2 of the License, or 17 | (at your option) any later version. 18 | 19 | This program is distributed in the hope that it will be useful, 20 | but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 | GNU General Public License for more details. 23 | 24 | You should have received a copy of the GNU General Public License 25 | along with this program; if not, write to the Free Software 26 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 27 | **************************************************************************** 28 | */ 29 | 30 | 31 | 32 | #include "DigitalIn.h" 33 | 34 | void DigitalIn::init( volatile uint8_t *port, uint8_t dq) { 35 | // save globals 36 | m_pport = port; 37 | m_dq = dq; 38 | // set for input 39 | *Port2DDR(m_pport) &= ~(1< 11 | 12 | http://www.pocketmagic.net 13 | 14 | This program is free software; you can redistribute it and/or modify 15 | it under the terms of the GNU General Public License as published by 16 | the Free Software Foundation; either version 2 of the License, or 17 | (at your option) any later version. 18 | 19 | This program is distributed in the hope that it will be useful, 20 | but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 | GNU General Public License for more details. 23 | 24 | You should have received a copy of the GNU General Public License 25 | along with this program; if not, write to the Free Software 26 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 27 | **************************************************************************** 28 | */ 29 | 30 | 31 | #pragma once 32 | 33 | #include 34 | 35 | class DigitalIn { 36 | volatile uint8_t *m_pddr, 37 | *m_pport; 38 | uint8_t m_ledstate, m_dq; 39 | 40 | volatile uint8_t* Port2DDR(volatile uint8_t *port) { 41 | return port - 1; 42 | } 43 | 44 | volatile uint8_t* Port2PIN(volatile uint8_t *port) { 45 | return port - 2; 46 | } 47 | 48 | public: 49 | /************************************************************************/ 50 | /* Set DDR for output and save globals */ 51 | /************************************************************************/ 52 | void init( volatile uint8_t *port, uint8_t dq) ; 53 | /************************************************************************/ 54 | /* returns true is button is pressed */ 55 | /************************************************************************/ 56 | bool get(); 57 | }; 58 | -------------------------------------------------------------------------------- /code/io/DigitalOut.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | File: DigitalOut.cpp 3 | Version: 0.1.0 4 | Date: Feb. 21, 2013 5 | License: GPL v2 6 | 7 | simple use of leds controlled directly by I/O pins 8 | 9 | **************************************************************************** 10 | Copyright (C) 2013 Radu Motisan 11 | 12 | http://www.pocketmagic.net 13 | 14 | This program is free software; you can redistribute it and/or modify 15 | it under the terms of the GNU General Public License as published by 16 | the Free Software Foundation; either version 2 of the License, or 17 | (at your option) any later version. 18 | 19 | This program is distributed in the hope that it will be useful, 20 | but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 | GNU General Public License for more details. 23 | 24 | You should have received a copy of the GNU General Public License 25 | along with this program; if not, write to the Free Software 26 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 27 | **************************************************************************** 28 | */ 29 | 30 | 31 | 32 | #include "DigitalOut.h" 33 | 34 | void DigitalOut::init( volatile uint8_t *port, uint8_t dq) { 35 | // save globals 36 | m_pport = port; 37 | m_dq = dq; 38 | // set for output 39 | *Port2DDR(m_pport) |= (1< 11 | 12 | http://www.pocketmagic.net 13 | 14 | This program is free software; you can redistribute it and/or modify 15 | it under the terms of the GNU General Public License as published by 16 | the Free Software Foundation; either version 2 of the License, or 17 | (at your option) any later version. 18 | 19 | This program is distributed in the hope that it will be useful, 20 | but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 | GNU General Public License for more details. 23 | 24 | You should have received a copy of the GNU General Public License 25 | along with this program; if not, write to the Free Software 26 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 27 | **************************************************************************** 28 | */ 29 | 30 | 31 | #pragma once 32 | 33 | #include 34 | 35 | class DigitalOut { 36 | volatile uint8_t *m_pddr, 37 | *m_pport; 38 | uint8_t m_ledstate, m_dq; 39 | 40 | volatile uint8_t* Port2DDR(volatile uint8_t *port) { 41 | return port - 1; 42 | } 43 | public: 44 | /************************************************************************/ 45 | /* Set DDR for output and save globals */ 46 | /************************************************************************/ 47 | void init( volatile uint8_t *port, uint8_t dq) ; 48 | /************************************************************************/ 49 | /* Set turns led on (st=1) or off (st=0) */ 50 | /************************************************************************/ 51 | void set(uint8_t st); 52 | uint8_t get(); 53 | /************************************************************************/ 54 | /* Toggle led from current state to the opposite */ 55 | /************************************************************************/ 56 | void toggle(); 57 | }; 58 | -------------------------------------------------------------------------------- /code/lcd/hd44780.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | File: HD44780.cpp 3 | Version: 0.1.0 4 | Date: Feb. 21, 2013 5 | License: GPL v2 6 | 7 | HD44780 LCD 4-bit IO mode Driver 8 | 9 | **************************************************************************** 10 | Copyright (C) 2013 Radu Motisan 11 | 12 | http://www.pocketmagic.net 13 | 14 | This program is free software; you can redistribute it and/or modify 15 | it under the terms of the GNU General Public License as published by 16 | the Free Software Foundation; either version 2 of the License, or 17 | (at your option) any later version. 18 | 19 | This program is distributed in the hope that it will be useful, 20 | but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 | GNU General Public License for more details. 23 | 24 | You should have received a copy of the GNU General Public License 25 | along with this program; if not, write to the Free Software 26 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 27 | **************************************************************************** 28 | */ 29 | 30 | #include 31 | #include "hd44780.h" 32 | 33 | // index 0 is pin rs 34 | void HD44780::lcd_rs_high(){ 35 | *m_pPorts[0] |= (1<= LCD_LINES - 1) 170 | setline(0); 171 | else 172 | setline(g_nCurrentLine+1); 173 | } 174 | else 175 | lcd_write(data,1); 176 | } 177 | 178 | 179 | 180 | 181 | // send a null terminated string to the LCD eg. char x[10]="hello!"; 182 | void HD44780::sendstring(char *text) 183 | { 184 | char c; 185 | while ( (c = *text++) ) sendchar(c); 186 | } 187 | 188 | void HD44780::sendstringformat(char *szFormat, ...) 189 | { 190 | char szBuffer[256]; //in this buffer we form the message 191 | int NUMCHARS = sizeof(szBuffer) / sizeof(szBuffer[0]); 192 | int LASTCHAR = NUMCHARS - 1; 193 | va_list pArgs; 194 | va_start(pArgs, szFormat); 195 | vsnprintf(szBuffer, NUMCHARS - 1, szFormat, pArgs); 196 | va_end(pArgs); 197 | 198 | sendstring(szBuffer); 199 | } 200 | // Set cursor to specified position 201 | // Input: x horizontal position (0: left most position) 202 | // y vertical position (0: first line) 203 | void HD44780::gotoxy(uint8_t x, uint8_t y) 204 | { 205 | if (LCD_LINES==1) { 206 | lcd_instr((1< 11 | 12 | http://www.pocketmagic.net 13 | 14 | This program is free software; you can redistribute it and/or modify 15 | it under the terms of the GNU General Public License as published by 16 | the Free Software Foundation; either version 2 of the License, or 17 | (at your option) any later version. 18 | 19 | This program is distributed in the hope that it will be useful, 20 | but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 | GNU General Public License for more details. 23 | 24 | You should have received a copy of the GNU General Public License 25 | along with this program; if not, write to the Free Software 26 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 27 | **************************************************************************** 28 | */ 29 | 30 | #pragma once 31 | #include 32 | #include "../timeout.h" 33 | 34 | 35 | 36 | 37 | class HD44780 { 38 | private: 39 | static const int LCD_LINES = 4; // number of visible lines of the display 40 | static const int LCD_DISP_LENGTH = 20; // visibles characters per line of the display 41 | static const int LCD_START_LINE1 = 0x00; // DDRAM address of first char of line 1 42 | static const int LCD_START_LINE2 = 0x40; // DDRAM address of first char of line 2 43 | static const int LCD_START_LINE3 = 0x14; // DDRAM address of first char of line 3 44 | static const int LCD_START_LINE4 = 0x54; // DDRAM address of first char of line 4 45 | static const int LCD_CGRAM = 0x6; // DB6: set CG RAM address 46 | static const int LCD_DDRAM = 0x7; // DB7: set DD RAM address 47 | 48 | // instruction register bit positions, see HD44780U data sheet 49 | static const int LCD_CMD_HOME = 0x02; // cursor home 50 | static const int LCD_CMD_ENTRY_DEC = 0x04; // decrement, no shift 51 | static const int LCD_CMD_ENTRY_DEC_SHIFT = 0x05; // decrement with shift 52 | static const int LCD_CMD_ENTRY_INC = 0x06; // increment, no shift 53 | static const int LCD_CMD_ENTRY_INC_SHIFT = 0x07; // increment with shift 54 | static const int LCD_CMD_CLEAR = 0x01; // clear, cursor home 55 | static const int LCD_CMD_OFF = 0x08; // display off 56 | static const int LCD_CMD_ON = 0x0C; // display on, cursor off 57 | static const int LCD_CMD_ON_BLINK = 0x0D; // display on, cursor off, blink char 58 | static const int LCD_CMD_ON_CURSOR = 0x0E; // display on, cursor on 59 | static const int LCD_CMD_ON_CURSOR_BLINK = 0x0F; // display on, cursor on, blink char 60 | static const int LCD_CMD_CURSOR_LEFT = 0x10; // decrement cursor (left) 61 | static const int LCD_CMD_CURSOR_RIGHT = 0x14; // increment cursor (right) 62 | static const int LCD_CMD_SHIFT_LEFT = 0x18; // shift (left) 63 | static const int LCD_CMD_SHIFT_RIGHT = 0x1C; // shift (right) 64 | // function set: set interface data length and number of display lines 65 | static const int LCD_FUNCTION_4BIT_1LINE = 0x20; // 4-bit interface, single line, 5x7 dots 66 | static const int LCD_FUNCTION_4BIT_2LINE = 0x28; // 4-bit interface, dual line, 5x7 dots 67 | static const int LCD_FUNCTION_8BIT_1LINE = 0x30; // 8-bit interface, single line, 5x7 dots 68 | static const int LCD_FUNCTION_8BIT_2LINE = 0x38; // 8-bit interface, dual line, 5x7 dots 69 | 70 | 71 | 72 | int g_nCurrentLine; 73 | volatile uint8_t *m_pPorts[6],//RS, E, D4, D5, D6, D7 74 | m_pDqs[6]; 75 | 76 | void lcd_e_high(); 77 | void lcd_e_low(); 78 | void lcd_rs_high(); 79 | void lcd_rs_low(); 80 | 81 | // flush channel E 82 | void lcd_toggle_e(void); 83 | // send a character or an instruction to the LCD 84 | void lcd_write(uint8_t data,uint8_t rs) ; 85 | // send an instruction to the LCD 86 | void lcd_instr(uint8_t instr); 87 | // 88 | volatile uint8_t* Port2DDR(volatile uint8_t *port) { 89 | return port - 1; 90 | } 91 | public: 92 | // Initialize LCD to 4 bit I/O mode, using the given connections, in order 93 | // RS, E, D4, D5, D6, D7 94 | void init(volatile uint8_t *port_rs, volatile uint8_t dq_rs, 95 | volatile uint8_t *port_e, volatile uint8_t dq_e, 96 | volatile uint8_t *port_d4, volatile uint8_t dq_d4, 97 | volatile uint8_t *port_d5, volatile uint8_t dq_d5, 98 | volatile uint8_t *port_d6, volatile uint8_t dq_d6, 99 | volatile uint8_t *port_d7, volatile uint8_t dq_d7); 100 | // send a character to the LCD 101 | void sendchar(uint8_t data); 102 | // send a null terminated string to the LCD eg. char x[10]="hello!"; 103 | void sendstring(char *text); 104 | void sendstringformat(char *szFormat, ...); 105 | // Set cursor to specified position 106 | // Input: x horizontal position (0: left most position) 107 | // y vertical position (0: first line) 108 | void gotoxy(uint8_t x, uint8_t y); 109 | // Move cursor on specified line 110 | void setline(uint8_t line); 111 | // Clear display and set cursor to home position 112 | void clrscr(void); 113 | // FUNCTION: lcd_home 114 | // Set cursor to home position 115 | void cursorhome(void); 116 | }; 117 | 118 | -------------------------------------------------------------------------------- /code/license.txt: -------------------------------------------------------------------------------- 1 | 2 | File: digital bench power supply 3 | Version: 1.0 4 | Date: Apr 27, 2015 5 | License: GPL v2 6 | Url: http://www.pocketmagic.net/digital-bench-power-supply/ 7 | 8 | for atmega8 9 | 10 | **************************************************************************** 11 | Copyright (C) 2012-2015 Radu Motisan 12 | 13 | http://www.pocketmagic.net 14 | 15 | This program is free software; you can redistribute it and/or modify 16 | it under the terms of the GNU General Public License as published by 17 | the Free Software Foundation; either version 2 of the License, or 18 | (at your option) any later version. 19 | 20 | This program is distributed in the hope that it will be useful, 21 | but WITHOUT ANY WARRANTY; without even the implied warranty of 22 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 23 | GNU General Public License for more details. 24 | 25 | You should have received a copy of the GNU General Public License 26 | along with this program; if not, write to the Free Software 27 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 28 | **************************************************************************** 29 | -------------------------------------------------------------------------------- /code/main.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | File: main.cpp 3 | Version: 1.0 - first version 4 | Date: April 7, 2015 5 | License: GPL v2 6 | 7 | Digital Bench Power supply 8 | http://www.pocketmagic.net/digital-bench-power-supply/ 9 | 10 | **************************************************************************** 11 | Copyright (C) 2015 Radu Motisan 12 | 13 | http://www.pocketmagic.net 14 | 15 | This program is free software; you can redistribute it and/or modify 16 | it under the terms of the GNU General Public License as published by 17 | the Free Software Foundation; either version 2 of the License, or 18 | (at your option) any later version. 19 | 20 | This program is distributed in the hope that it will be useful, 21 | but WITHOUT ANY WARRANTY; without even the implied warranty of 22 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 23 | GNU General Public License for more details. 24 | 25 | You should have received a copy of the GNU General Public License 26 | along with this program; if not, write to the Free Software 27 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 28 | **************************************************************************** 29 | */ 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include "timeout.h" 36 | #include "io/DigitalIn.h" 37 | #include "io/DigitalOut.h" 38 | #include "sensors/ds18b20.h" 39 | #include "lcd/hd44780.h" 40 | #include "misc/aux.h" 41 | #include "misc/pwm.h" 42 | 43 | 44 | /************************************************************************************************************************************************/ 45 | /* Main entry point */ 46 | /************************************************************************************************************************************************/ 47 | HD44780 lcd; 48 | DS18B20 ds18b20; 49 | PWM pwm; 50 | DigitalOut relay, 51 | speaker, 52 | fan; 53 | DigitalIn but1, // v+ 54 | but2, // v- 55 | but3, // i+ 56 | but4; // i- 57 | float tempval = 0; 58 | float vref = 5.0; 59 | 60 | /* power control modes */ 61 | #define MODE_MEASURE_CURRENT 0 62 | #define MODE_MEASURE_VOLTAGE 1 63 | volatile bool adc_mode = MODE_MEASURE_CURRENT; 64 | volatile float current = 0, voltage = 0; 65 | 66 | /* my power supply after rectifier shows 16.1V on the center tap and 33.8V on full secondary 67 | * opamp will introduce some upper voltage limitations. Currently using TL082 and we can reach close to 26V maximum 68 | */ 69 | #define VOLTAGE_LIMIT 26 70 | #define CURRENT_LIMIT 5 71 | #define TEMPERATURE_STARTFAN 50 // if 40degrees celsius are reached, we will start the fan 72 | #define TEMPERATURE_SHUTDOWN 70 // if 80degrees celsius are reached, we will reduce the power until the unit cools down 73 | 74 | 75 | /* set default values: later save/load them to/from EEPROM */ 76 | volatile float targetVol = 5.0, targetCur = 1; 77 | 78 | volatile bool alarm = false; 79 | uint16_t cycles = 0; 80 | 81 | 82 | // Interrupt service routine for the ADC completion 83 | // we measure the current (PC5) and the voltage (PC4) alternatively 84 | ISR(ADC_vect){ 85 | uint16_t analogVal = ADCL | (ADCH << 8); 86 | if (adc_mode == MODE_MEASURE_CURRENT) { 87 | current = (analogVal / 1024.0 * vref) / 0.186666; // the output power resistor measures 0.55Ohm 88 | // alternate mode 89 | adc_mode = MODE_MEASURE_VOLTAGE; 90 | ADMUX = PC4; // next time we will do ADC on PC4, to get the voltage 91 | } else if (adc_mode == MODE_MEASURE_VOLTAGE) { 92 | // the actual R13 and R14 resistors can be measured using a multimeter for better accuracy 93 | float R14 = 9.87, /*10k*/ R13 = 98.2; /*100K */ 94 | voltage = analogVal / 1024.0 * (R13 + R14) / R14 * vref; 95 | // alternate mode 96 | adc_mode = MODE_MEASURE_CURRENT; 97 | ADMUX = PC5; // next time we will do ADC on PC5, to get the current 98 | } 99 | 100 | // If free-running mode is enabled (ADFR), we don't need to restart conversion 101 | // But we can't use ADFR as we want to monitor two separate ADC channels alternatively 102 | 103 | // start another ADC conversion 104 | ADCSRA = (1< targetCur + targetCur / 2) { 112 | pwm.setDuty(pwm.getDuty() / 2); 113 | alarm = true; // will sound alarm in main thread 114 | } 115 | // 2.act on over current 116 | // decrease slowly on higher current 117 | else if (current > targetCur) { 118 | pwm.setDuty(pwm.getDuty() - 1); 119 | } 120 | // 3.act on over temperature 121 | else if (tempval > TEMPERATURE_SHUTDOWN) { 122 | pwm.setDuty(pwm.getDuty() - 1); 123 | alarm = true; 124 | } 125 | // 4. act on over voltage 126 | // take care of voltage with lower priority 127 | else if (voltage > targetVol) pwm.setDuty(pwm.getDuty() - 1); 128 | // 5. act on under voltage 129 | else if (voltage < targetVol) pwm.setDuty(pwm.getDuty() + 1); 130 | } 131 | 132 | int main(void) { 133 | // setup everything 134 | relay.init(&PORTD, PD5); 135 | fan.init(&PORTD, PD6); 136 | speaker.init(&PORTB, PB0); 137 | pwm.initPWM(); 138 | 139 | but1.init(&PORTC, PC0); 140 | but2.init(&PORTC, PC1); 141 | but3.init(&PORTC, PC2); 142 | but4.init(&PORTC, PC3); 143 | 144 | 145 | ds18b20.init(&PORTD, PD7); 146 | lcd.init(&PORTD, PD4, &PORTB, PB3, &PORTD, PD3, &PORTB, PB4, &PORTD, PD2, &PORTB, PB5); //RS, E, D4, D5, D6, D7 147 | 148 | // setup ADC to measure as interrupt: go for current first 149 | adc_mode = MODE_MEASURE_CURRENT; 150 | ADMUX = PC5; 151 | ADCSRA = (1< 12); 169 | // engage fan is temperature is above threshold 170 | fan.set(tempval > TEMPERATURE_STARTFAN); 171 | 172 | // limit the frequency for some ops including display and temperature reading 173 | if (cycles == 0) { 174 | float temp = 0; 175 | cli(); 176 | if (ds18b20.readTemperature(&temp) == THERM_OK) 177 | tempval = temp; 178 | sei(); 179 | 180 | lcd.cursorhome(); 181 | lcd.sendstringformat( 182 | " +SET: %5.2fV %5.2fA\n"\ 183 | "%5.1fC %5.2fV %5.2fA\n"\ 184 | "%s PWM:%4d\n" 185 | "2015 pocketmagic.net", 186 | targetVol, targetCur, 187 | tempval, voltage, current, 188 | fan.get()?" +FAN":" ", 189 | pwm.getDuty() 190 | ); 191 | } 192 | cycles ++; 193 | if (cycles > 10000) cycles = 0; 194 | 195 | 196 | // sound alarm 197 | if (alarm) { 198 | speaker.set(1); 199 | _delay_ms(30); 200 | speaker.set(0); 201 | // stop alarm 202 | alarm = false; 203 | } 204 | 205 | // act on buttons 206 | if (but1.get() == 0) { 207 | if (targetVol < VOLTAGE_LIMIT) targetVol += 0.1; 208 | cycles = 0; // force lcd refresh 209 | } 210 | if (but2.get() == 0) { 211 | if (targetVol > 0.1) targetVol -= 0.1; 212 | cycles = 0; // force lcd refresh 213 | } 214 | if (but3.get() == 0) { 215 | if (targetCur < CURRENT_LIMIT) targetCur += 0.1; 216 | cycles = 0; // force lcd refresh 217 | } 218 | if (but4.get() == 0) { 219 | if (targetCur > 0.1) targetCur -= 0.1; 220 | cycles = 0; // force lcd refresh 221 | } 222 | 223 | 224 | 225 | } 226 | 227 | } 228 | 229 | 230 | -------------------------------------------------------------------------------- /code/misc/aux.cpp: -------------------------------------------------------------------------------- 1 | #include "aux.h" 2 | 3 | // Reset the microcontroller 4 | void aux_softwarereset() { 5 | //asm ("JMP 0"); 6 | // http://forum.arduino.cc/index.php?topic=78020.0 7 | } 8 | 9 | // Proper reset using the watchdog: untested 10 | void aux_wdreset() { 11 | wdt_enable(WDTO_15MS); 12 | while(1); 13 | } 14 | 15 | // Reads the ADC port specified by i 16 | uint16_t aux_ADCRead(uint8_t i) { 17 | ADMUX = i; 18 | _delay_ms(1); //very important! 19 | ADCSRA = (1< 4 | #include 5 | #include 6 | #include "../timeout.h" 7 | 8 | //#define ADFR 0x5 // adc free mode 9 | 10 | // Reset the microcontroller 11 | void aux_softwarereset(); 12 | 13 | // Proper reset using the watchdog: untested 14 | void aux_wdreset() ; 15 | 16 | // Reads the ADC port specified by i 17 | uint16_t aux_ADCRead(uint8_t i); 18 | 19 | void aux_ADCReadIntr(uint8_t i); 20 | 21 | // return ADC port voltage computed against given VRef, with resistive divider 22 | float aux_readDivVoltage(float vref, uint16_t divider_R1, uint16_t divider_R2, uint8_t i); 23 | 24 | -------------------------------------------------------------------------------- /code/misc/pwm.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | File: pwm.cpp 3 | Version: 0.1.0 4 | Date: July 10, 2013 5 | License: GPL v2 6 | 7 | handle the PWM generator the easy way 8 | 9 | **************************************************************************** 10 | Copyright (C) 2013 Radu Motisan 11 | 12 | http://www.pocketmagic.net 13 | 14 | This program is free software; you can redistribute it and/or modify 15 | it under the terms of the GNU General Public License as published by 16 | the Free Software Foundation; either version 2 of the License, or 17 | (at your option) any later version. 18 | 19 | This program is distributed in the hope that it will be useful, 20 | but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 | GNU General Public License for more details. 23 | 24 | You should have received a copy of the GNU General Public License 25 | along with this program; if not, write to the Free Software 26 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 27 | **************************************************************************** 28 | */ 29 | 30 | #include "../timeout.h" 31 | #include "pwm.h" 32 | #include 33 | #include 34 | 35 | void PWM::setDuty(uint16_t d) { 36 | if (d >= INVERTER_DUTY_MIN && d <= INVERTER_DUTY_MAX) { 37 | duty = d; 38 | OCR1A = (uint16_t)( (float)ICR1 * (float) duty / 1000.0); 39 | } 40 | } 41 | 42 | void PWM::initPWM() { 43 | TCCR1A = 0; // disable all PWM on Timer1 whilst we set it up 44 | DDRB |= _BV(PB1); // Set PB1 as output (PB1 is OC1A) 45 | ICR1 = F_CPU / INVERTER_FREQUENCY; // set the frequency FCPU/(ICR1 * PRESCALLING) Hz . Prescalling set to 1X 46 | setDuty(INVERTER_DEFAULT_DUTY); 47 | TCCR1B = (1 << WGM13) | (1< 9 | 10 | http://www.pocketmagic.net 11 | 12 | This program is free software; you can redistribute it and/or modify 13 | it under the terms of the GNU General Public License as published by 14 | the Free Software Foundation; either version 2 of the License, or 15 | (at your option) any later version. 16 | 17 | This program is distributed in the hope that it will be useful, 18 | but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | GNU General Public License for more details. 21 | 22 | You should have received a copy of the GNU General Public License 23 | along with this program; if not, write to the Free Software 24 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 25 | **************************************************************************** 26 | */ 27 | 28 | #pragma once 29 | 30 | // This class assumes the inverter signal is connected to pin PB1 on an ATmega uC 31 | 32 | /************************************************************************/ 33 | /* Configuration */ 34 | /************************************************************************/ 35 | 36 | #define INVERTER_DEFAULT_DUTY 167 // start with low duty to allow powering the unit from higher voltages as well 37 | #define INVERTER_DUTY_MIN 1 // 0.1% 38 | #define INVERTER_DUTY_MAX 1000 // 100% 39 | #define INVERTER_FREQUENCY 100000UL // inverter frequency in Hertz 40 | 41 | class PWM { 42 | uint16_t duty; // used to set the duty cycle to adjust the output voltage 43 | 44 | public: 45 | 46 | void initPWM(); 47 | 48 | void setDuty(uint16_t d); 49 | 50 | uint16_t getDuty(); 51 | }; 52 | -------------------------------------------------------------------------------- /code/sensors/ds18b20.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012 - 2015, Radu Motisan , radu.motisan@gmail.com 3 | * 4 | * http://www.pocketmagic.net 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * 18 | * 19 | * @purpose DS18B20 Temperature Sensor Minimal interface for Atmega microcontrollers 20 | * http://www.pocketmagic.net/ 21 | */ 22 | 23 | #include "ds18b20.h" 24 | 25 | 26 | void DS18B20::init(volatile uint8_t *port, uint8_t dq) { 27 | // save globals 28 | m_pport = port; 29 | m_dq = dq; 30 | m_pddr = Port2DDR(m_pport); 31 | m_ppin = Port2PIN(m_pport); 32 | 33 | powerup = true; 34 | 35 | setConfig(); 36 | } 37 | 38 | void DS18B20::pinInput() { 39 | *m_pddr &= ~(1 << m_dq); //set for input 40 | } 41 | 42 | uint8_t DS18B20::pinGet() { 43 | return (*m_ppin & (1 << m_dq)); 44 | } 45 | 46 | void DS18B20::pinOutput() { 47 | *m_pddr |= (1 << m_dq); // set for output 48 | } 49 | 50 | void DS18B20::pinSet(uint8_t state) { 51 | if (state) 52 | *m_pport |= (1 << m_dq); 53 | else 54 | *m_pport &= ~(1 << m_dq); 55 | } 56 | 57 | 58 | uint8_t DS18B20::reset() { 59 | /*pinSet(0); //1. 60 | pinOutput();//2. 61 | _delay_us(480);//480 62 | pinInput(); 63 | _delay_us(60);//60 64 | uint8_t i = pinGet(); 65 | _delay_us(480);//480 66 | //Return the value read from the presence pulse (0=OK, 1=WRONG) 67 | return i; // DS18B20 responds with presence pulse. 68 | */ 69 | pinOutput();//2. 70 | pinSet(0); //1. 71 | 72 | _delay_us(480);//480 73 | pinInput(); 74 | _delay_us(70); 75 | uint8_t i = pinGet(); 76 | _delay_us(410);//60 77 | return i; 78 | } 79 | 80 | void DS18B20::writeBit(uint8_t bit) { 81 | pinSet(0); //1. 82 | pinOutput();//2. these two lines are reversed on purpose! 83 | _delay_us(1); 84 | if (bit) pinInput(); 85 | _delay_us(60); 86 | pinInput(); 87 | } 88 | 89 | uint8_t DS18B20::readBit(void) { 90 | uint8_t bit = 0; 91 | pinSet(0); //1. 92 | pinOutput();//2. these two lines are reversed on purpose! 93 | _delay_us(1); 94 | pinInput(); 95 | _delay_us(14); 96 | if (pinGet()) bit = 1; 97 | _delay_us(45); 98 | return bit; 99 | } 100 | 101 | 102 | uint8_t DS18B20::readByte(void) { 103 | uint8_t byte = 0; 104 | for (unsigned bit = 0; bit < 8; ++bit) { 105 | byte |= (readBit() << bit); // Reads lsb to msb 106 | } 107 | return byte; 108 | } 109 | 110 | uint16_t DS18B20::readWord(void) { 111 | uint16_t word = 0; 112 | for (unsigned bit = 0; bit < 16; ++bit) { 113 | word |= (readBit() << bit); // Reads lsb to msb 114 | } 115 | return word; 116 | } 117 | 118 | void DS18B20::writeByte(uint8_t byte) { 119 | for (unsigned bit = 0; bit < 8; ++bit) { 120 | writeBit(byte & 0x01); // lsb to msb 121 | byte >>= 1; // right shift by 1-bit 122 | } 123 | } 124 | 125 | int DS18B20::setConfig() { 126 | //Reset, skip ROM and start temperature conversion 127 | if (THERM_OK != reset()) return THERM_ERR; 128 | writeByte(CMD_SKIPROM); 129 | writeByte(CMD_WSCRATCHPAD); 130 | // send Th, Tl, config 131 | writeByte(0x0); // Th / alarm not used 132 | writeByte(0x0); // Tl / alarm not used 133 | //writeByte(0x1F); // config: 9bit resolution: 0.5degrees steps 134 | writeByte(0x3F); // config: 10bit resolution: 0.25degrees steps 135 | //writeByte(0x5F); // config: 11bit resolution: 0.125degrees steps 136 | //writeByte(0x7F); // config: 12bit resolution: 0.0625degrees steps 137 | 138 | if (THERM_OK != reset()) return THERM_ERR; 139 | 140 | return THERM_OK; 141 | } 142 | 143 | //CRC-8 - based on the CRC8 formulas by Dallas/Maxim 144 | uint8_t crc8(const uint8_t *buffer, uint8_t length) { 145 | uint8_t crc = 0x00; 146 | for (int i=0;i> 1) ^ 0x8C; 151 | else 152 | crc = crc >> 1; 153 | } 154 | } 155 | return crc; // not-complemented! 156 | } 157 | 158 | /* 16bits answer, temperature range -55 .. +125 *C */ 159 | int DS18B20::readTemperature(float *temp) { 160 | //Reset, skip ROM and start temperature conversion 161 | if (THERM_OK != reset()) return THERM_ERR; 162 | writeByte(CMD_SKIPROM); 163 | writeByte(CMD_CONVERTTEMP); 164 | 165 | //Reset, skip ROM and send command to read Scratchpad 166 | if (THERM_OK != reset()) return THERM_ERR; 167 | writeByte(CMD_SKIPROM); 168 | writeByte(CMD_RSCRATCHPAD); 169 | 170 | // Read 9 bytes memory 171 | uint8_t mem[9] = {0}; 172 | for (unsigned i = 0; i<9; i++) { 173 | mem[i] = readByte(); 174 | } 175 | 176 | // compute CRC and fail if CRC is not valid 177 | if (crc8(mem, 8) != mem[8]) return THERM_ERR; 178 | 179 | // compute temperature readings 180 | int16_t sword = (mem[1] << 8) + mem[0]; 181 | *temp = ((float)sword) * 0.0625; 182 | 183 | // drop initial 85 powerup readings 184 | if (powerup && *temp == 85) return THERM_ERR; 185 | 186 | //if (THERM_OK != reset()) return THERM_ERR; 187 | 188 | powerup = false; 189 | 190 | return THERM_OK; 191 | 192 | } 193 | -------------------------------------------------------------------------------- /code/sensors/ds18b20.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012 - 2015, Radu Motisan , radu.motisan@gmail.com 3 | * 4 | * http://www.pocketmagic.net 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * 18 | * 19 | * @purpose DS18B20 Temperature Sensor Minimal interface for Atmega microcontrollers 20 | * http://www.pocketmagic.net/ 21 | * The accuracy of the DS18B20 is �0.5�C over the range of -10�C to +85�C 22 | */ 23 | 24 | /********************************************* 25 | * CONFIGURE THE WORKING PIN 26 | *********************************************/ 27 | 28 | #pragma once 29 | 30 | #include 31 | #include 32 | #include "../timeout.h" 33 | 34 | /* list of these commands translated into C defines:*/ 35 | #define CMD_CONVERTTEMP 0x44 36 | #define CMD_RSCRATCHPAD 0xbe 37 | #define CMD_WSCRATCHPAD 0x4e 38 | #define CMD_CPYSCRATCHPAD 0x48 39 | #define CMD_RECEEPROM 0xb8 40 | #define CMD_RPWRSUPPLY 0xb4 41 | #define CMD_SEARCHROM 0xf0 42 | #define CMD_READROM 0x33 43 | #define CMD_MATCHROM 0x55 44 | #define CMD_SKIPROM 0xcc 45 | #define CMD_ALARMSEARCH 0xec 46 | 47 | #define THERM_OK 0 48 | #define THERM_ERR 1 49 | 50 | /* constants */ 51 | #define DECIMAL_STEPS_12BIT 625 //.0625 52 | 53 | class DS18B20 { 54 | volatile uint8_t *m_pddr, *m_ppin, *m_pport; 55 | uint8_t m_dq; 56 | bool powerup; 57 | 58 | volatile uint8_t* Port2DDR(volatile uint8_t *port) { 59 | return port - 1; 60 | } 61 | volatile uint8_t* Port2PIN(volatile uint8_t *port) { 62 | return port - 2; 63 | } 64 | 65 | inline void pinInput(); 66 | inline uint8_t pinGet(); 67 | inline void pinOutput(); 68 | inline void pinSet(uint8_t state); 69 | 70 | 71 | int setConfig(); 72 | 73 | uint8_t reset(); 74 | 75 | void writeBit(uint8_t bit); 76 | uint8_t readBit(void); 77 | uint8_t readByte(void); 78 | uint16_t readWord(void); 79 | void writeByte(uint8_t byte); 80 | 81 | public: 82 | void init( volatile uint8_t *port, uint8_t dq) ; 83 | int readTemperature(float *temp) ; 84 | }; 85 | -------------------------------------------------------------------------------- /code/timeout.h: -------------------------------------------------------------------------------- 1 | /* 2 | File: timeout.h 3 | Version: 0.1.0 4 | Date: Feb. 21, 2013 5 | License: GPL v2 6 | 7 | define the F_CPU and includes the delay.h headers, to provide easy access 8 | to delay functions _delay_ms and _delay_us 9 | change F_CPU to match your configuration 10 | 11 | **************************************************************************** 12 | Copyright (C) 2013 Radu Motisan 13 | 14 | http://www.pocketmagic.net 15 | 16 | This program is free software; you can redistribute it and/or modify 17 | it under the terms of the GNU General Public License as published by 18 | the Free Software Foundation; either version 2 of the License, or 19 | (at your option) any later version. 20 | 21 | This program is distributed in the hope that it will be useful, 22 | but WITHOUT ANY WARRANTY; without even the implied warranty of 23 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 24 | GNU General Public License for more details. 25 | 26 | You should have received a copy of the GNU General Public License 27 | along with this program; if not, write to the Free Software 28 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 29 | **************************************************************************** 30 | */ 31 | 32 | 33 | // Change to match your board! // 34 | #define F_CPU 16000000UL 35 | 36 | 37 | #ifndef ALIBC_OLD 38 | #include 39 | #else 40 | #include 41 | #endif 42 | 43 | -------------------------------------------------------------------------------- /digital_bench_power_supply_06.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radhoo/digital_bench_power_supply/1a3af2e5a54f59a9425974670aa89080b0d2ba9c/digital_bench_power_supply_06.jpg -------------------------------------------------------------------------------- /digital_supply_v100.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radhoo/digital_bench_power_supply/1a3af2e5a54f59a9425974670aa89080b0d2ba9c/digital_supply_v100.pdf -------------------------------------------------------------------------------- /gpl_v2_license.txt: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | {description} 294 | Copyright (C) {year} {fullname} 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | {signature of Ty Coon}, 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | 341 | -------------------------------------------------------------------------------- /prog.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | echo "*** writing fuses for 8MHz(dc+df)/16MHz(de+df) external crystal" 3 | avrdude -p atmega8 -c usbasp -U lfuse:w:0xde:m -U hfuse:w:0xdf:m 4 | echo "*** writting flash" 5 | avrdude -p atmega8 -c usbasp -U flash:w:DigitalPowerSupply-1.hex:i 6 | --------------------------------------------------------------------------------