Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 340 → Rev 341

/MikroBlink/Blitzdings/analog.c
File deleted
/MikroBlink/Blitzdings/analog.h
File deleted
/MikroBlink/Blitzdings/Hexfiles/Blitzdings_MEGA8.hex
1,95 → 1,93
:100000004EC068C07DC066C065C064C063C062C0C9
:1000100061C0C3C15FC05EC05DC05CC05BC05AC090
:1000200059C058C057C01AC11BC11CC11DC11EC137
:100030001FC120C121C122C10FC12AC12BC12CC1A6
:100040002DC12EC12FC130C131C132C11FC191C1DB
:100050008DC191C190C18FC18EC18DC184C18BC131
:100060008AC189C188C187C186C185C179C183C15F
:1000700082C181C172C16EC17EC17DC17CC17BC1A3
:1000800066C179C178C160C176C175C174C173C1DF
:1000900072C171C170C16FC16EC16DC152C11124F5
:100000004EC067C07CC065C064C063C062C061C0D0
:1000100060C0CCC15EC05DC05CC05BC05AC059C08E
:1000200058C057C056C027C128C129C12AC12BC1F9
:100030002CC12DC12EC12FC11CC13BC13CC13DC132
:100040003EC13FC140C141C142C143C130C1A2C153
:100050009FC1A2C1A1C1A0C19FC19EC196C19CC1A7
:100060009BC19AC199C198C197C196C18CC194C1D5
:1000700093C192C186C183C18FC18EC18DC18CC114
:100080007CC18AC189C177C187C186C185C184C14C
:1000900083C182C181C180C17FC17EC169C1112478
:1000A0001FBECFE5D4E0DEBFCDBF11E0A0E6B0E0DB
:1000B000E6EBF4E002C005900D92AA37B107D9F73C
:1000B000EEE9F4E002C005900D92AA37B107D9F736
:1000C00011E0AAE7B1E001C01D92AA3AB107E1F739
:1000D0003AD0F0C195CF80917A0190917B01019641
:1000E00063E070E0D3D1FC0190937B0180937A01AF
:1000F000EE0FFF1FED58FE4F80819181DBD00895F8
:100100001F920F920FB60F9211242F933F934F938C
:100110005F936F937F938F939F93AF93BF93EF936F
:10012000FF93D9DFFF91EF91BF91AF919F918F9195
:100130007F916F915F914F913F912F910F900FBEE3
:100140000F901F901895AF92BF92CF92DF92EF92CF
:10015000FF920F931F93CF93DF9385E087BB8EE3CE
:1001600084BB80EF81BB939A80E88BBF84E085BF1E
:10017000C29885B385BB82B382BBC0984DD1E09154
:100180007A01F0917B01EE0FFF1FED58FE4F808149
:10019000918190D080E197E245D17C0188EB9BE092
:1001A00041D18C0188EE93E03DD1EC0178942FE1B0
:1001B000A22E21E0B22E8091A8019091A901892B55
:1001C000F1F4CE0138D1882319F5C80134D1882340
:1001D00041F084EBC816D10454F588EB9BE022D1A2
:1001E0008C01C70128D1882331F380E197E21AD12D
:1001F0007C018091A8019091A901892B11F31092A3
:10020000A9011092A8016DD0CE0115D18823E9F281
:100210002DD16C0184EBC816D104ACF088B391E009
:10022000892788BB88EE93E0FDD0EC01CECFE0912A
:100230007A01F0917B01EE0FFF1FED58FE4F808198
:10024000918138D0CACFC50135D0E8CFFC010A97DB
:1002500020F4ED5EFF4F0994979A0895C29A08958D
:10026000A99A0895AA9A0895AB9A0895AC9A089508
:10027000AD9A0895949A0895959A0895969A089536
:10028000FC010A9720F4E35EFF4F099497980895C4
:10029000C2980895A9980895AA980895AB980895CA
:1002A000AC980895AD9808959498089595980895F8
:1002B00096980895CF93DF93009781F0ECE7F1E0F3
:1002C000DC01EF016496108212868D919D918993D5
:1002D0009993319681E0E638F807A9F7DF91CF913D
:1002E0000895EF92FF920F931F93CF93DF93CCE784
:1002F000D1E084E1E82EF12CEC0EFD1E00E010E0D0
:1003000003C08150888337C088818823D1F7F701E3
:10031000A081B1818A85FD01E80FF11DE0818F5F29
:100320008A87A80FB11D8C91882309F41A868E2F15
:1003300090E0FC01FA97E832F105E8F4E95DFF4F3F
:100340000994C8019DDF17C081E3888314C083E648
:10035000888311C083E188830EC08DE188830BC040
:1003600089E0888308C0C80171DF05C084E0888304
:1003700002C081E088830F5F1F4F219682E090E0EA
:10038000E80EF91E0A30110509F0BECFDF91CF91BA
:100390001F910F91FF90EF9008951F920F920FB64B
:1003A0000F9211245F936F937F938F939F93AF93DB
:1003B000BF938091A7018F5F8093A7018091A601D1
:1003C00081508093A6018F3FD9F483E08093A601EA
:1003D0008091A4019091A50101969093A50180932D
:1003E000A4018091A4019091A5016AE070E04ED033
:1003F000892B31F481E090E09093A9018093A801CA
:10040000BF91AF919F918F917F916F915F910F906D
:100410000FBE0F901F90189582E083BF89B781604F
:1004200089BF08952091A4013091A5012150304049
:10043000820F931F08952091A4013091A501821B82
:10044000930B892F9927807890E00895CF93DF93BD
:10045000E9DFEC01CE01EFDF8823E1F3DF91CF91FB
:10046000089586EA86B917B8369A089590EC97B938
:1004700010BE83ED86B9349A97B9369A349BFECF75
:1004800016B888E080BF84B195B10895AA1BBB1B44
:1004900051E107C0AA1FBB1FA617B70710F0A61B84
:1004A000B70B881F991F5A95A9F780959095BC01A5
:0604B000CD010895FFCF0D
:1004B60041006100413A6149413A6149413A61531B
:1004C60056002E004E4E61494153534E4E4E004E3D
:1004D60061494153534E4E4E4E004E413A61494199
:1004E6003A6149413A614D530061494153534E4E79
:1004F6004E4E4E004E4E4E61494153534E4E006491
:10050600007200740072007F008A00720099007207
:1005160000A400410064007200C3007200C3008A98
:10052600007200C3007200C30062006200620062D3
:1005360000620062006200620062006200600060A9
:1005460000600060006000600060006000600060A5
:1005560000614D414D00010101010101010101014F
:100566000101010101010101010161494149001A2D
:10057600011A011A011A011A011A011A011A011A9D
:10058600011A01612E412E00613A413A00613B4158
:100596003B00614E414E00614D49414D4900615657
:1005A6004156006156494156490061534153003353
:1005B6000138013D011A014201010147014E015373
:0A05C600015A01C500ED00D9000044
:1000D00039C096CF80917A0190917B01019663E0BF
:1000E00070E0C9D1FC0190937B0180937A01E80F05
:1000F000F91FE05AFF4F80819181EDD008951F9242
:100100000F920FB60F9211242F933F934F935F934B
:100110006F937F938F939F93AF93BF93EF93FF93CF
:10012000D9DFFF91EF91BF91AF919F918F917F9117
:100130006F915F914F913F912F910F900FBE0F9054
:100140001F901895CFE5D4E0DEBFCDBFAA24BB2415
:1001500010BE83ED86B985E087BB8EE384BB80EF5C
:1001600081BB939A80E88BBF84E085BFC29885B33A
:1001700085BB82B382BBC09859D1E0917A01F091DE
:100180007B01EE0FFF1FE05AFF4F80819181A3D0CA
:1001900080E197E251D18C0188EB9BE04DD17C014D
:1001A00088EE93E049D1EC0178948091A801909178
:1001B000A901892B79F5CE0148D18823C9F0349B58
:1001C00006C083ED86B9C4B0D5B0AA24BB2484EBA5
:1001D000C816D1040CF43FC084EBC816D1047CF5DA
:1001E00088B391E0892788BB88EE93E025D1EC01A4
:1001F000C7012BD18823F1F4C80127D18823A9F2A4
:1002000080E197E219D18C018091A8019091A90118
:10021000892B89F21092A9011092A80174D0A1141F
:10022000B10449F680EC87B9349A369A0894A11C37
:10023000B11CC1CF88EB9BE0FFD07C01DDCFE0910A
:100240007A01F0917B01EE0FFF1FE05AFF4F808192
:10025000918141D0C5CF80EB90E03DD0BDCFAA27A2
:1002600097FDA095BA2FFC010A9720F4ED5EFF4F91
:100270000994979A0895C29A0895A99A0895AA9AF6
:100280000895AB9A0895AC9A0895AD9A0895949AFA
:100290000895959A0895969A0895AA2797FDA0958E
:1002A000BA2FFC010A9720F4E35EFF4F0994979858
:1002B0000895C2980895A9980895AA980895AB98AA
:1002C0000895AC980895AD980895949808959598D8
:1002D000089596980895CF93DF93009789F0A0E949
:1002E000B1E0EC01FD017497108212868991999119
:1002F0008D939D93319681E0A23AB807A9F3A4F3B8
:10030000DF91CF9108950F931F93CF93DF9300E078
:1003100010E0E801C458DE4F8881882349F08150FD
:1003200088833AC0E801C458DE4F88818823B9F732
:10033000F801E00FF11FE458FE4F8A85A489B589C2
:10034000FD01E80FF11DE0818F5F8A87A80FB11DC5
:10035000AC91AA2309F4AA878E2F9927AA27BB2735
:10036000FC01FA97E832F105B8F4E95DFF4F099412
:10037000C80193DF11C081E3D3CF83E6D1CF83E1FE
:10038000CFCF8DE1CDCF89E0CBCFC80168DF04C0EE
:1003900084E0C6CF81E0C4CF0F5F1F4F0A30110544
:1003A0000CF2DF91CF911F910F9108951F920F9240
:1003B0000FB60F9211245F936F937F938F939F9348
:1003C000AF93BF938091A7018F5F8093A701809126
:1003D000A60181508F3F19F08093A6011BC083E0D6
:1003E0008093A6018091A4019091A501019690931C
:1003F000A5018093A4018091A4019091A5016AE0D8
:1004000070E039D0892B31F481E090E09093A9011C
:100410008093A801BF91AF919F918F917F916F9130
:100420005F910F900FBE0F901F90189582E083BFD1
:1004300089B7816089BF08952091A4013091A501F9
:10044000280F391FC901019708952091A401309107
:10045000A501821B930B892F9927807899270895EE
:10046000CF93DF93E9DFEC01CE01EFDF8823E1F3E7
:10047000DF91CF910895AA1BBB1B51E107C0AA1FB2
:10048000BB1FA617B70710F0A61BB70B881F991F35
:0E0490005A95A9F780959095BC01CD0108956D
:10049E001F01D800EC00612E412E00613A413A0056
:1004AE00613B413B006149414900614E414E006153
:1004BE004D414D00614D49414D4900615641560037
:1004CE0061564941564900615341530066006B0025
:1004DE00700075007A007F0084008B0090009700FA
:1004EE007500750075007500750075007500750056
:1004FE00750075007F007F007F007F007F007F000A
:10050E007F007F007F007F00770177017701770101
:10051E007701770177017701770177017501750111
:10052E00750175017501750175017501750175010D
:10053E004100413A6149413A6149413A615356009D
:10054E004E413A6149413A6149413A614D53000089
:10055E000100010001000102011001000100010073
:10056E000100012E004E4E61494153534E4E4E0036
:10057E004E61494153534E4E4E4E006149415353C5
:10058E004E4E4E4E4E004E4E4E61494153534E4EC0
:10059E000002013301350133014001100133014BDB
:0A05AE000133015601610041000015
:00000001FF
/MikroBlink/Blitzdings/Blitzdings.pnproj
1,0 → 0,0
<Project name="Blitzdings"><File path="lprg.c"></File><File path="makefile"></File><File path="timer.c"></File><File path="timer.h"></File><File path="main.h"></File><File path="main.c"></File><File path="lprg.h"></File><File path="analog.c"></File><File path="analog.h"></File></Project>
<Project name="Blitzdings"><File path="lprg.c"></File><File path="makefile"></File><File path="timer.c"></File><File path="timer.h"></File><File path="main.h"></File><File path="main.c"></File><File path="lprg.h"></File></Project>
/MikroBlink/Blitzdings/lprg.h
14,6 → 14,6
 
 
extern void lprg_init(char *code[]);
extern void lprg_step();
extern void lprg_step(void);
 
 
/MikroBlink/Blitzdings/main.c
53,15 → 53,15
 
// dasselbe, nur sind w/b dauer-an
char *led_posflash[] = {
"A:aIA:aIA:aSV", // LED #1 rot
".", // LED #2
"A", // LED #1 rot
"A", // LED #2
"A", // LED #3 blau
".", // LED #4
"A", // LED #5 weiss
"A", // LED #4
"A:aIA:aIA:aSV", // LED #5 weiss
"NA:aIA:aIA:aMS", // LED #6 grün
".", // LED #7
"A", // LED #7
"A", // LED #8 weiss
".", // LED #9
"A", // LED #9
"A" // LED #10 blau
};
 
138,9 → 138,10
// Hier die zu verwendenden LichtProgramme einfach eintragen.
 
int current = 0;
 
void *modes[]= { led_posflash, led_an, led_aus };
 
void nextMode() {
void nextMode(void) {
current = ++current % (sizeof(modes)/sizeof(void *));
lprg_init(modes[current]);
155,12 → 156,14
}
 
 
int main(void) {
 
int main() {
 
int tim1s, tim3s, tim10s;
int tim1s, tim3s, tim10s, analog_state=0;
int Vcurr;
SFIOR = 0x00; // Analog Comperator aus
ADCSRA = 0xD3; // Converter ein, single
// Ports einstellen
// Pin B |7|6|5|4|3|2|1|0
// Binär:|0|0|0|0|0|1|0|1 (b) => #05 (h)
200,16 → 203,31
while (1) {
 
if(flag10ms) { // every 10ms
flag10ms = 0;
lprg_step(); // next step in light prog
flag10ms = 0;
lprg_step(); // next step in light prog
 
if(!analog_state) { // Sampling der SPannung starten
ADMUX = 0 | 0xC0; // Kanal 0, interne Referenz
ADCSRA |= 0x10; // Ready löschen
ADCSRA |= 0x40; // Start
analog_state++; // erst wieder sampeln, wenn der Wert ausgelesen wurde
}
}
 
// 1s-Task: Status-LED toggeln, Spannung checken
if(CheckDelay(tim1s)) {
Vcurr = getVcurr();
if (ADCSRA & 0x10) { // Spannungs-Messung beendet?
ADCSRA = 0xD3;
Vcurr = ADCW; // Wert merken
analog_state = 0;
}
if(Vcurr < 180) {
lprg_init(led_lowVolt);
lprg_init(led_lowVolt);
}
if(Vcurr>=180) {
lprg_init(modes[current]);
}
STATUS_TOGGLE;
tim1s = SetDelay(1000);
}
216,9 → 234,7
 
// 3s-Task: Unterspannungswarnung ggf. zurücknehmen
if(CheckDelay(tim3s)) {
if(Vcurr>=180) {
lprg_init(modes[current]);
}
 
tim3s = SetDelay(3000);
}
 
/MikroBlink/Blitzdings/makefile
59,7 → 59,7
 
# If there is more than one source file, append them above, or modify and
# uncomment the following:
SRC = main.c lprg.c timer.c analog.c
SRC = main.c lprg.c timer.c