Subversion Repositories svnkaklik

Compare Revisions

No changes between revisions

Regard whitespace Rev 3 → Rev 4

/roboti/tank/main.tre
File deleted
/roboti/tank/prg.bat
File deleted
\ No newline at end of file
/roboti/tank/vssver.scc
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Deleted: svn:mime-type
-application/octet-stream
\ No newline at end of property
/roboti/tank/main.PJT
File deleted
/roboti/tank/main.c
File deleted
/roboti/tank/main.LST
File deleted
/roboti/tank/main.HEX
File deleted
/roboti/tank/main.cod
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Deleted: svn:mime-type
-application/octet-stream
\ No newline at end of property
/roboti/tank/Kopie - main.c
File deleted
/roboti/tank/main.h
File deleted
/roboti/tank/main.sta
File deleted
/roboti/tank/main.err
File deleted
/roboti/tank/main.SYM
File deleted
/roboti/istrobot/tank/Kopie - main.c
0,0 → 1,247
#include "D:\@KAKLIK\programy\PIC_C\robot\tank\main.h"
 
//motory
#define FR output_high(PIN_B4);output_low(PIN_B5) // Vpred
#define FL output_high(PIN_B6);output_low(PIN_B7)
#define BR output_high(PIN_B5);output_low(PIN_B4) // Vzad
#define BL output_high(PIN_B7);output_low(PIN_B6)
#define STOPR output_low(PIN_B4);output_low(PIN_B5)
#define STOPL output_low(PIN_B6);output_low(PIN_B7)
 
//cidla
#define RSENSOR 1 // Senzory na caru
#define LSENSOR 0
//#define BUMPER SENSOR_2 // Senzor na cihlu
 
//human interface
#DEFINE LED PIN_A2
#DEFINE SOUND_HI PIN_B2
#DEFINE SOUND_LO PIN_B3
#include "sound.c"
 
//program
#define MEZERA 38 // jak se muze jet dlouho bez cary
#define COUVEJ 700 // kolik se ma couvat po detekci diry
#define CIKCAK 40 // kolik se ma jet cik/cak
#define PRES_DIRU 350 // jak predpokladame velkou diru
#define TRESHOLD 50
 
#define L 0 // left
#define R 1 // right
#define S 2 // straight
 
int movement; // smer minuleho pohybu
int line; // na ktere strane byla detekovana cara
int dira; // pocitadlo pro nalezeni preruseni cary
int n; // pomocna promena pro cyklus FOR
 
void cik_cak() // Hledani cary
{
n=CIKCAK/2; // poprve hned zatoc opacne, nez se jelo pred detekci diry
switch(movement) // zmenime smer zataceni
{
case L:
FL;STOPR; // doprava
movement=R; // poznamenej kam jedem
line=L; // kdyz prejedem, tak bude cara vlevo
break;
case R:
FR;STOPL; // doleva
movement=L; // poznamenej kam jedem
line=R; // kdyz prejedem, tak bude cara vpravo
break;
}
 
while(true) // jed cik-cak, dokud nenajdes caru
{
set_adc_channel(RSENSOR);
if (TRESHOLD > read_adc()) // je cara ?
{
STOPL;
STOPR;
break;
};
if (CIKCAK < n++) // Jedeme uz dost dlouho cik? Pak jed cak.
{
n=0;
STOPL;
STOPR;
switch(movement) // zmenime smer zataceni
{
case L:
FL; // doprava
movement=R; // poznamenej kam jedem
line=L; // kdyz prejedem, tak bude cara vlevo
break;
case R:
FR; // doleva
movement=L; // poznamenej kam jedem
line=R; // kdyz prejedem, tak bude cara vpravo
break;
}
}
}
}
void diagnostika()
{
STOPL; //zastav vse
STOPR;
 
FR; //pravy pas
Delay_ms(1000);
STOPR;
Delay_ms(1000);
BR;
Delay_ms(1000);
STOPR;
Delay_ms(1000);
 
FL; //levy pas
Delay_ms(1000);
STOPL;
Delay_ms(1000);
BL;
Delay_ms(1000);
STOPL;
Delay_ms(1000);
 
FL; //oba pasy
FR;
Delay_ms(1000);
STOPL;
STOPR;
Delay_ms(1000);
BL;
BR;
Delay_ms(1000);
STOPL;
STOPR;
Delay_ms(1000);
 
}
 
void main()
{
SoundBeep(640,200); //beep
Delay_ms(50);
SoundBeep(640,200);
 
setup_adc_ports(RA0_RA1_RA3_ANALOG);
setup_adc(ADC_CLOCK_DIV_2);
Delay_ms(1000); // 1s
 
movement=R;
line=S;
dira=0;
 
//cik_cak(); // toc se, abys nasel caru
FL; FR; // vpred
 
// Sledovani cary
while(true)
{
snimani:
set_adc_channel(RSENSOR);
Delay_us(10);
if (TRESHOLD > read_adc()) // Cara pod pravym senzorem
{
dira=0; // nuluj pocitadlo diry, protoze jsme videli caru
line=R; // zaznamenej, kdes videl caru
FL;FR;
goto snimani;
}
 
set_adc_channel(LSENSOR);
Delay_us(10);
if (TRESHOLD > read_adc()) // Cara pod levym senzorem
{
dira=0; // nuluj pocitadlo diry, protoze jsme videli caru
line=L; // zaznamenej, kdes videl caru
FL;FR;
goto snimani;
}
 
// oba senzory mimo caru
if (0==dira) // v prvnim cyklu po ztrate cary zacneme zahybat
// v ostatnich cyklech nedelame nic (pro urychleni snimani)
{
STOPL;
STOPR;
Delay_ms(100);
// kdyz nevidis caru, tak jed tam, kdes ji videl naposled
if(line==L)
{
// doleva
FR;
movement=L; // poznamenej kam jedes
}
if(line==R)
{
// doprava
FL;
movement=R; // poznamenej kam jedes
}
dira++; // zvets pocitadlo diry, aby to pristi cyklus tudy neslo
goto snimani; // co nejrychleji se vrat na snimani cary
}
 
/*if (MEZERA < dira++) // nejedeme uz moc dlouho bez cary?
{
dira=0;
switch(movement) // kam se jelo ?
{
case L:
BR; // couvej doprava
Delay_ms(COUVEJ);
movement=R;
break;
case R:
BL; // couvej doleva
Delay_ms(COUVEJ);
movement=L;
break;
}
STOP(); // konec couvani
FL; FR; // rovne pres diru
Delay_ms(PRES_DIRU);
STOP();
cik_cak(); // najdi caru
FR; FL; // vpred
} // dira*/
 
} // while(true)
 
}
 
/*void objizdka()
{
BL; BR; // zacouvej
Delay_ms(150);
STOP();
 
cik_cak(); // vyrovnej se na caru
cik_cak(); // radeji 3x, aby se vyrovnaly setrvacne sily
cik_cak();
 
BL; FR; Delay_ms(220); // vlevo
STOP();
FL; FR; Delay_ms(650); // rovne
STOP();
FL; BR; Delay_ms(220); // vpravo
STOP();
FL; FR; Delay_ms(770); // rovne
STOP();
FL; BR; Delay_ms(210); // vpravo
STOP();
FL; FR;
Delay_ms(200); // kousek rovne
// rovne, dokud nenarazis na caru
while(input(RSENSOR)); // pravej senzor, protoze cihla je vpravo
STOP();
BL; FR; // toc se doleva, dokud nenarazis na caru
while(input(LSENSOR)); // levej senzor, protoze cara je urcite vlevo
STOP();
line=R; // caru predpokladame vpravo, kdybysme ji prejeli
dira=0;
FL; FR; // vpred
}*/
/roboti/istrobot/tank/main.HEX
0,0 → 1,116
:1000000000308A00CB2A0000A001A101A201A301B7
:100010008316A001A101A201A30183127D087C0423
:100020007B047A040319622820308316A40003108D
:100030008312F60DF70DF80DF90D8316A00DA10D25
:10004000A20DA30D83127D0883162302031D3828F9
:1000500083127C0883162202031D382883127B0832
:1000600083162102031D382883127A088316200282
:10007000031C592883127A088316A00283127B0876
:10008000031C7B0F442847288316A10283127C0897
:10009000031C7C0F4C284F288316A20283127D0874
:1000A000031C7D0F542857288316A30283120314C0
:1000B00083168312A00DA10DA20DA30D8316A40B10
:1000C000172883120000A0308400003420308316EB
:1000D000A400A001A101A201A30183127908A30039
:1000E0007808A2007708A1007608A0000310201C61
:1000F00095287A088316A00783127B0803187B0FC4
:10010000822885288316A10783127C0803187C0F98
:100110008A288D288316A20783127D0803187D0F75
:10012000922895288316A30783128316A30CA20C8A
:10013000A10CA00C8312A30CA20CA10CA00C831682
:10014000A40BA328A5288312762883128A1180295C
:100150007330840000080319BC280130A100A001FD
:10016000A00BB028A10BAF284A30A000A00BB628E6
:0A01700000000000800BAD280034F1
:100200000130A3000A30FE0023088A007B08073A69
:100210000739820700000000000000000000000015
:1002200000000000FC0CFB0CFC0CFB0CFC0CFB0CA1
:100230001F30FC057C08FD00FB0A0319FC0AFD0ABF
:10024000000000000000FB0B2629FD0B20290034D4
:0E025200F208031D4029F308031D4029F4089B
:10026000031D3529F50803193F290330FC00E83048
:10027000FB00002174080319F503F4032F29C92991
:10028000F9010730F800A130F7002030F600FD0139
:10029000FC017308FB007208FA0004202308F9002F
:1002A0002208F8002108F7002008F60048307602FE
:1002B000A9007708AA000030031C0130AA027808C0
:1002C000AB000030031C0130AB027908AC000030F9
:1002D000031C0130AC02A801A7017508A600740830
:1002E000A5002808F9002708F8002608F7002508C7
:1002F000F600FD01FC017308FB007208FA00662895
:100300002308A8002208A7002108A6002008A500AD
:100310002808F9002708F8002608F7002508F60045
:10032000FD01FC010130FB00F430FA000420230839
:10033000A8002208A7002108A6002008A50026087A
:10034000F8002508F700F708031DA929F808031984
:10035000C9297618AD290611AE290615831606118E
:100360008312761CB5298611B62986158316861147
:1003700001308312F6062A08FA002908F9002A0833
:10038000FC002908FB00002177080319F803F70394
:10039000A329003444164408831687008312071EDD
:1003A000C92AF430F100F3017108F200F50132308E
:1003B000F40029216430F107D3290430F200FA3027
:1003C000F300A820F20BDF2983160613831206130D
:1003D000831686138312861383160612831206125F
:1003E000831686128312861283160612831206164D
:1003F00083168612831286120430F200FA30F3005C
:10040000A820F20BFE298316061283120612831609
:100410008612831286120430F200FA30F300A8200C
:10042000F20B0D2A83168612831286168316061285
:10043000831206120430F200FA30F300A820F20B07
:100440001C2A831606128312061283168612831242
:1004500086120430F200FA30F300A820F20B2B2AA7
:1004600083160613831206178316861383128613C8
:100470000430F200FA30F300A820F20B3A2A831677
:100480000613831206138316861383128613043011
:10049000F200FA30F300A820F20B492A83168613E3
:1004A0008312861783160613831206130430F20094
:1004B000FA30F300A820F20B582A83160613831291
:1004C000061383168613831286130430F200FA3063
:1004D000F300A820F20B672A83160613831206176F
:1004E000831686138312861383160612831206164A
:1004F00083168612831286120430F200FA30F3005B
:10050000A820F20B7E2A8316061383120613831685
:10051000861383128613831606128312061283161D
:100520008612831286120430F200FA30F300A820FB
:10053000F20B952A831686138312861783160613E9
:1005400083120613831686128312861683160612EA
:10055000831206120430F200FA30F300A820F20BE6
:10056000AC2A83160613831206138316861383128E
:1005700086138316061283120612831686128312BE
:1005800086120430F200FA30F300A820F20BC32ADE
:10059000CA298A11F02A84011F3083050730831687
:1005A0009F0082308312AD009830AE00AF00403023
:1005B000B000B100B2006030B3008630B400B43097
:1005C000B5006030B600A430B700B800B9006130A3
:1005D000BA000330BB00F030BC00FF30C400CA29B1
:1005E0000230F3008030F200F501C830F400292118
:1005F0003230F300A8200230F3008030F200F50121
:10060000C830F4002921043083169F0083121F088C
:10061000383901389F000430F100FA30F300A82087
:10062000F10B0D2B0130ED000230EE00EF018316CF
:1006300006138312061783168613831286138316F6
:10064000061283120616831686128312861208304B
:10065000A1001F08C73921049F00000000001F15DA
:100660001F19302B1E08313C031C4A2BEF010130AF
:10067000EE00831606138312061783168613831261
:1006800086138316061283120616831686128312A9
:100690008612272B0030A1001F08C73921049F00B4
:1006A000000000001F151F19532B1E08313C031CAE
:1006B0006C2BEF01EE0183160613831206178316C7
:1006C0008613831286138316061283120616831668
:1006D000861283128612272BEF08031DBF2B831669
:1006E000061383120613831686138312861383164A
:1006F000061283120612831686128312861283163E
:100700008613831286178316061383120613831625
:10071000861283128616831606128312061214306E
:10072000F300A8208316061383120613831686137C
:1007300083128613831606128312061283168612FC
:1007400083128612C830F300A820EE08031DB12BD7
:1007500083160612831206168316861283128612D9
:10076000ED016E0BBD2B831606138312061783163D
:100770008613831286130130ED00EF0A272B272BF7
:02078000630014
:02400E00793FF8
:00000001FF
;PIC16F873
/roboti/istrobot/tank/main.LST
0,0 → 1,1381
CCS PCW C Compiler, Version 3.110, 15448
 
Filename: d:\kaklik\programy\pic_c\robot\tank\main.LST
 
ROM used: 893 (22%)
Largest free fragment is 2048
RAM used: 82 (43%) at main() level
101 (53%) worst case
Stack: 3 locations
 
*
0000: MOVLW 00
0001: MOVWF 0A
0002: GOTO 2CB
0003: NOP
.................... #include "D:\@KAKLIK\programy\PIC_C\robot\tank\main.h"
.................... #include <16F873.h>
.................... //////// Standard Header file for the PIC16F873 device ////////////////
.................... #device PIC16F873
.................... #list
....................
.................... #use delay(clock=4000000)
00A8: MOVLW 73
00A9: MOVWF 04
00AA: MOVF 00,W
00AB: BTFSC 03.2
00AC: GOTO 0BC
00AD: MOVLW 01
00AE: MOVWF 21
00AF: CLRF 20
00B0: DECFSZ 20,F
00B1: GOTO 0B0
00B2: DECFSZ 21,F
00B3: GOTO 0AF
00B4: MOVLW 4A
00B5: MOVWF 20
00B6: DECFSZ 20,F
00B7: GOTO 0B6
00B8: NOP
00B9: NOP
00BA: DECFSZ 00,F
00BB: GOTO 0AD
00BC: RETLW 00
.................... #fuses XT,NOWDT,NOLVP
....................
....................
....................
.................... //motory
.................... #define FR output_high(PIN_B4);output_low(PIN_B5) // Vpred
.................... #define FL output_high(PIN_B6);output_low(PIN_B7)
.................... #define BR output_high(PIN_B5);output_low(PIN_B4) // Vzad
.................... #define BL output_high(PIN_B7);output_low(PIN_B6)
.................... #define STOPR output_low(PIN_B4);output_low(PIN_B5)
.................... #define STOPL output_low(PIN_B6);output_low(PIN_B7)
....................
.................... //cidla
.................... #define RSENSOR 1 // Senzory na caru
.................... #define LSENSOR 0
.................... //#define BUMPER SENSOR_2 // Senzor na cihlu
....................
.................... //human interface
.................... #DEFINE LED PIN_A2
....................
.................... #DEFINE SOUND_HI PIN_B2
.................... #DEFINE SOUND_LO PIN_B3
.................... #include "sound.c"
.................... // Knihovna pro generovani hudebnich zvuku dane frekvence a delky nebo
.................... // dane noty temperovaneho ladeni a delky.
.................... //
.................... // Pro gnerovani nepouziva zadnou podporu HW, vse se generuje ciste SW.
.................... //
.................... // (c)miho 2003
.................... //
.................... // Historie
.................... // 1.00 Uvodni verze
.................... //
....................
....................
.................... // Konfiguracni parametry
.................... //#define SOUND_HI PIN_xx // Pozitivni vystup
.................... //#define SOUND_LO PIN_xx // Komplementarni vystup
.................... #ifndef SOUND_REZIE
.................... #define SOUND_REZIE 72 // Piskvorcova konstanta zahrnuje celkovou rezii ve smycce
.................... #endif
.................... #ifndef SOUND_CLOCK
.................... #define SOUND_CLOCK 4000000 // Frelvence krystalu v Hz
.................... #endif
....................
....................
.................... // Definice hudebnich tonu (not) pro proceduru SoundNote()
.................... #define SOUND_C 0
.................... #define SOUND_Cis 1
.................... #define SOUND_D 2
.................... #define SOUND_Dis 3
.................... #define SOUND_E 4
.................... #define SOUND_F 5
.................... #define SOUND_Fis 6
.................... #define SOUND_G 7
.................... #define SOUND_Gis 8
.................... #define SOUND_A 9
.................... #define SOUND_Ais 10
.................... #define SOUND_H 11
.................... #define SOUND_Space 12 // Pomlka
....................
....................
.................... // Prototypy verejnych procedur
....................
.................... void SoundBeep(unsigned int16 Frequency, unsigned int16 Duration);
.................... // Predava se frekvence v Hz a doba trvani v ms (0 znamena ticho)
....................
.................... void SoundNote(unsigned int8 Note, Octave, unsigned int16 Duration);
.................... // Predava se cislo noty (0 je C), posunuti v oktavach (0 nejnizsi ton,
.................... // SOUND_Space je ticho), doba trvani v ms
....................
.................... // Alternativni makra pro generovani konstatnich tonu
.................... // SoundBeepMacro(Frequency, Duration) - frekvence nesmi byt 0
.................... // SoundNoteMacro(Note, Octave, Duration) - nepodporuje SOUND_Space
.................... // SoundSpaceMacro(Duration) - hraje ticho
....................
.................... // Privatni cast
....................
....................
.................... #ORG 0x100, 0x128 // Aby skok nebyl pres hranici 0x100
.................... void DelaySpecial(unsigned int16 Time)
.................... // Pomocna procedura pro mereni spozdeni s granularitou 1 instrukcni takt
.................... // Cas v instrukcnich cyklech, skutecny cas je vetsi o _konstantni_ rezii
.................... // Maximalni cas je 65536 us
.................... {
.................... unsigned int8 TimeHi; // Pro pristup k horni casti Time
....................
.................... *0x0A = LABEL_ADDRESS(Next)>>8; // Nastav PCLATH
*
0100: MOVLW 01
0101: MOVWF 23
0102: MOVLW 0A
0103: MOVWF 7E
0104: MOVF 23,W
0105: MOVWF 0A
.................... #asm
.................... movf Time,w // Zpracuj nejnizsi 3 bity
0106: MOVF 7B,W
.................... xorlw 7 // Pro hodnotu 0 skakej pres vsechny nopy
0107: XORLW 07
.................... andlw 7 // Ber jen spodni 3 bity
0108: ANDLW 07
.................... addwf 2,f // Preskoc zadny az vsech 8 nopu (2 je PCL)
0109: ADDWF 02,F
.................... Next:
.................... nop // Spozdeni s granularitou 1 takt
010A: NOP
.................... nop
010B: NOP
.................... nop
010C: NOP
.................... nop
010D: NOP
.................... nop
010E: NOP
.................... nop
010F: NOP
.................... nop
0110: NOP
.................... nop
.................... #endasm
0111: NOP
.................... Time = Time >> 3; // Zahod spodni 3 bity
0112: RRF 7C,F
0113: RRF 7B,F
0114: RRF 7C,F
0115: RRF 7B,F
0116: RRF 7C,F
0117: RRF 7B,F
0118: MOVLW 1F
0119: ANDWF 7C,F
.................... TimeHi=Time>>8; // Oddel horni cast citace
011A: MOVF 7C,W
011B: MOVWF 7D
.................... Time++; // Korekce na casovani typu dcfsz
011C: INCF 7B,F
011D: BTFSC 03.2
011E: INCF 7C,F
.................... TimeHi++;
011F: INCF 7D,F
.................... #asm
.................... Loop:
.................... nop // Smycka musi trvat 8 taktu
0120: NOP
.................... nop // a ma 16 bitu dlouhy citac
0121: NOP
.................... nop
0122: NOP
.................... decfsz Time
0123: DECFSZ 7B,F
.................... goto Next1
0124: GOTO 126
.................... decfsz TimeHi
0125: DECFSZ 7D,F
.................... Next1:
.................... goto Loop
.................... #endasm
0126: GOTO 120
0127: RETLW 00
....................
.................... }
....................
....................
.................... unsigned int32 SoundCount; // Pocet pulperid geneovaneho signalu
.................... unsigned int32 SoundPeriod; // Delka pulperiody v us (zmensene o SOUND_REZIE)
....................
....................
.................... void SoundLoop()
.................... // Pomocna funkce - hlavni zvukova smycka
.................... {
.................... int1 Data;
.................... unsigned int16 i;
....................
.................... for(i=SoundCount;i>0;i--) // Pocet pulperiod
*
019F: MOVF 26,W
01A0: MOVWF 78
01A1: MOVF 25,W
01A2: MOVWF 77
01A3: MOVF 77,F
01A4: BTFSS 03.2
01A5: GOTO 1A9
01A6: MOVF 78,F
01A7: BTFSC 03.2
01A8: GOTO 1C9
.................... {
.................... output_bit(SOUND_HI,Data); // Nastav vystup
01A9: BTFSC 76.0
01AA: GOTO 1AD
01AB: BCF 06.2
01AC: GOTO 1AE
01AD: BSF 06.2
01AE: BSF 03.5
01AF: BCF 06.2
.................... output_bit(SOUND_LO,~Data);
01B0: BCF 03.5
01B1: BTFSS 76.0
01B2: GOTO 1B5
01B3: BCF 06.3
01B4: GOTO 1B6
01B5: BSF 06.3
01B6: BSF 03.5
01B7: BCF 06.3
.................... Data=~Data; // Otoc stav vystupu
01B8: MOVLW 01
01B9: BCF 03.5
01BA: XORWF 76,F
.................... DelaySpecial(SoundPeriod); // Pockej po dobu plperiody
01BB: MOVF 2A,W
01BC: MOVWF 7A
01BD: MOVF 29,W
01BE: MOVWF 79
01BF: MOVF 2A,W
01C0: MOVWF 7C
01C1: MOVF 29,W
01C2: MOVWF 7B
01C3: CALL 100
.................... }
01C4: MOVF 77,W
01C5: BTFSC 03.2
01C6: DECF 78,F
01C7: DECF 77,F
01C8: GOTO 1A3
.................... }
....................
....................
.................... void SoundBeep(unsigned int16 Frequency, unsigned int16 Duration)
.................... // Predava se frekvence v Hz a doba trvani v ms (0 znamena ticho)
.................... // Rozumne frekvence jsou v rozsahu cca 10Hz az 5000Hz pro krystal 4MHz,
.................... // cas do cca 5s (2*Cas/1000*Freq musi byt < nez 65536)
.................... {
.................... if (Frequency==0)
*
0129: MOVF 72,F
012A: BTFSS 03.2
012B: GOTO 140
012C: MOVF 73,F
012D: BTFSS 03.2
012E: GOTO 140
.................... {
.................... for(;Duration>0;Duration--)
012F: MOVF 74,F
0130: BTFSS 03.2
0131: GOTO 135
0132: MOVF 75,F
0133: BTFSC 03.2
0134: GOTO 13F
.................... {
.................... DelaySpecial(1000); // Zhruba 1ms
0135: MOVLW 03
0136: MOVWF 7C
0137: MOVLW E8
0138: MOVWF 7B
0139: CALL 100
.................... }
013A: MOVF 74,W
013B: BTFSC 03.2
013C: DECF 75,F
013D: DECF 74,F
013E: GOTO 12F
.................... return;
013F: GOTO 1C9
.................... }
....................
.................... SoundPeriod=(SOUND_CLOCK/4/2)/Frequency-SOUND_REZIE;
0140: CLRF 79
0141: MOVLW 07
0142: MOVWF 78
0143: MOVLW A1
0144: MOVWF 77
0145: MOVLW 20
0146: MOVWF 76
0147: CLRF 7D
0148: CLRF 7C
0149: MOVF 73,W
014A: MOVWF 7B
014B: MOVF 72,W
014C: MOVWF 7A
014D: CALL 004
014E: MOVF 23,W
014F: MOVWF 79
0150: MOVF 22,W
0151: MOVWF 78
0152: MOVF 21,W
0153: MOVWF 77
0154: MOVF 20,W
0155: MOVWF 76
0156: MOVLW 48
0157: SUBWF 76,W
0158: MOVWF 29
0159: MOVF 77,W
015A: MOVWF 2A
015B: MOVLW 00
015C: BTFSS 03.0
015D: MOVLW 01
015E: SUBWF 2A,F
015F: MOVF 78,W
0160: MOVWF 2B
0161: MOVLW 00
0162: BTFSS 03.0
0163: MOVLW 01
0164: SUBWF 2B,F
0165: MOVF 79,W
0166: MOVWF 2C
0167: MOVLW 00
0168: BTFSS 03.0
0169: MOVLW 01
016A: SUBWF 2C,F
....................
.................... SoundCount=Duration; // Vypocet poctu pulperiod signalu Duration*Frequency*2/1000
016B: CLRF 28
016C: CLRF 27
016D: MOVF 75,W
016E: MOVWF 26
016F: MOVF 74,W
0170: MOVWF 25
.................... SoundCount*=Frequency;
0171: MOVF 28,W
0172: MOVWF 79
0173: MOVF 27,W
0174: MOVWF 78
0175: MOVF 26,W
0176: MOVWF 77
0177: MOVF 25,W
0178: MOVWF 76
0179: CLRF 7D
017A: CLRF 7C
017B: MOVF 73,W
017C: MOVWF 7B
017D: MOVF 72,W
017E: MOVWF 7A
017F: GOTO 066
0180: MOVF 23,W
0181: MOVWF 28
0182: MOVF 22,W
0183: MOVWF 27
0184: MOVF 21,W
0185: MOVWF 26
0186: MOVF 20,W
0187: MOVWF 25
.................... SoundCount/=500;
0188: MOVF 28,W
0189: MOVWF 79
018A: MOVF 27,W
018B: MOVWF 78
018C: MOVF 26,W
018D: MOVWF 77
018E: MOVF 25,W
018F: MOVWF 76
0190: CLRF 7D
0191: CLRF 7C
0192: MOVLW 01
0193: MOVWF 7B
0194: MOVLW F4
0195: MOVWF 7A
0196: CALL 004
0197: MOVF 23,W
0198: MOVWF 28
0199: MOVF 22,W
019A: MOVWF 27
019B: MOVF 21,W
019C: MOVWF 26
019D: MOVF 20,W
019E: MOVWF 25
....................
.................... SoundLoop(); // Pozor pouzivaji se globalni parametry
*
01C9: RETLW 00
.................... }
....................
.................... // Definice casu pulperody pro nejnizsi oktavu, v mikrosekundach
.................... // Periody tonu v dalsich oktavach se ziskavaji rotaci vpravo
.................... #define SOUND_Peri_C (30578*(SOUND_CLOCK/1000)/1000/4/2) // Perioda 30578us
.................... #define SOUND_Peri_Cis (28862*(SOUND_CLOCK/1000)/1000/4/2) // Perioda 28862us
.................... #define SOUND_Peri_D (27242*(SOUND_CLOCK/1000)/1000/4/2) // Perioda 27242us
.................... #define SOUND_Peri_Dis (25713*(SOUND_CLOCK/1000)/1000/4/2) // Perioda 25713us
.................... #define SOUND_Peri_E (24270*(SOUND_CLOCK/1000)/1000/4/2) // Perioda 24270us
.................... #define SOUND_Peri_F (22908*(SOUND_CLOCK/1000)/1000/4/2) // Perioda 22908us
.................... #define SOUND_Peri_Fis (21622*(SOUND_CLOCK/1000)/1000/4/2) // Perioda 21622us
.................... #define SOUND_Peri_G (20408*(SOUND_CLOCK/1000)/1000/4/2) // Perioda 20408us
.................... #define SOUND_Peri_Gis (19263*(SOUND_CLOCK/1000)/1000/4/2) // Perioda 19263us
.................... #define SOUND_Peri_A (18182*(SOUND_CLOCK/1000)/1000/4/2) // Perioda 18182us
.................... #define SOUND_Peri_Ais (17161*(SOUND_CLOCK/1000)/1000/4/2) // Perioda 17161us
.................... #define SOUND_Peri_H (16198*(SOUND_CLOCK/1000)/1000/4/2) // Perioda 16198us
....................
.................... #if SOUND_Peri_C > 65535
.................... #error "Sound Clock too high (Note C requires delay > 65535 cycles)"
.................... #endif
....................
.................... const int16 Table[12] = SOUND_Peri_C, SOUND_Peri_Cis, SOUND_Peri_D, SOUND_Peri_Dis,
.................... SOUND_Peri_E, SOUND_Peri_F, SOUND_Peri_Fis, SOUND_Peri_G,
.................... SOUND_Peri_Gis, SOUND_Peri_A, SOUND_Peri_Ais, SOUND_Peri_H;
....................
.................... void SoundNote(unsigned int8 Note, Octave, unsigned int16 Duration)
.................... // Predava se cislo noty (0 je C), posunuti v oktavach (0 nejnizsi ton)
.................... // doba trvani v ms (0 znamena ticho)
.................... // Zahraje zadanou notu v zadane oktave dane delky
.................... {
....................
.................... if (Note==SOUND_Space)
.................... {
.................... for(;Duration>0;Duration--)
.................... DelaySpecial(1000); // Zhruba 1ms
.................... return;
.................... }
....................
.................... SoundPeriod=(Table[Note]>>Octave)-0; // Zde je chyba prekladace, nula musi zusat
....................
.................... SoundCount=Duration;
.................... SoundCount*=1000;
.................... SoundCount/=SoundPeriod;
....................
.................... SoundPeriod=SoundPeriod-SOUND_REZIE;
....................
.................... SoundLoop(); // Pozor pouzivaji se globalni parametry
.................... }
....................
....................
.................... // Sada maker, ktera neobsahuji slozity vypocet a jsou
.................... // tedy vhodna pro jednoduche pipnuti. Parametry jsou stejne
.................... // jako o funkci.
.................... #define SoundBeepMacro(F,D) \
.................... SoundPeriod=SOUND_CLOCK/4/2/F-SOUND_REZIE; \
.................... SoundCount=D*F/500; \
.................... SoundLoop();
....................
.................... #define SoundNoteMacro(N,O,D) \
.................... SoundPeriod=(Table[N]>>O)-SOUND_REZIE; \
.................... SoundCount=D*1000/(Table[N]>>O); \
.................... SoundLoop();
....................
.................... #define SoundPauseMacro(D) \
.................... { \
.................... #if D>255 \
.................... unsigned int16 i=D; \
.................... #else \
.................... unsigned int8 i=D; \
.................... #endif \
.................... for(;i>0;i--) \
.................... { \
.................... DelaySpecial(1000); \
.................... } \
.................... }
....................
....................
.................... #DEFINE TXo PIN_C0 // Vysilac
.................... #include "C:\library\kaklik\CCS\AX25.c" // Podprogram pro prenos telemetrie
.................... //#define PTT PIN_A2 // PTT control
.................... //#define TXo PIN_C0 // To the transmitter modulator
.................... #define PERIODAH delay_us(222) // Halfperiod H 222;78/1200 500;430/500
.................... #define TAILH delay_us(78)
.................... #define PERIODAL delay_us(412) // Halfperiod L 412;345/1200 1000;880/500
.................... #define TAILL delay_us(345)
.................... #byte STATUS = 3 // CPUs status register
....................
.................... byte SendData[16] = {'A'<<1, 'L'<<1, 'L'<<1, ' '<<1, ' '<<1, ' '<<1, 0x60,
.................... 'C'<<1, 'Z'<<1, '0'<<1, 'R'<<1, 'R'<<1, 'R'<<1, 0x61,
.................... 0x03, 0xF0};
....................
.................... boolean bit;
.................... int fcslo, fcshi; // variabloes for calculating FCS (CRC)
.................... int stuff; // stuff counter for extra 0
.................... int flag_flag; // if it is sending flag (7E)
.................... int fcs_flag; // if it is sending Frame Check Sequence
.................... int i; // for for
....................
.................... void flipout() //flips the state of output pin a_1
.................... {
.................... stuff = 0; //since this is a 0, reset the stuff counter
.................... if (bit)
.................... {
.................... bit=FALSE; //if the state of the pin was low, make it high.
.................... }
.................... else
.................... {
.................... bit=TRUE; //if the state of the pin was high make it low
.................... }
.................... }
....................
.................... void fcsbit(byte tbyte)
.................... {
.................... #asm
.................... BCF STATUS,0
.................... RRF fcshi,F // rotates the entire 16 bits
.................... RRF fcslo,F // to the right
.................... #endasm
.................... if (((STATUS & 0x01)^(tbyte)) ==0x01)
.................... {
.................... fcshi = fcshi^0x84;
.................... fcslo = fcslo^0x08;
.................... }
.................... }
....................
.................... void SendBit ()
.................... {
.................... if (bit)
.................... {
.................... output_high(TXo);
.................... PERIODAH;
.................... output_low(TXo);
.................... PERIODAH;
.................... output_high(TXo);
.................... PERIODAH;
.................... output_low(TXo);
.................... TAILH;
.................... }
.................... else
.................... {
.................... output_high(TXo);
.................... PERIODAL;
.................... output_low(TXo);
.................... TAILL;
.................... };
.................... }
....................
.................... void SendByte (byte inbyte)
.................... {
.................... int k, bt;
....................
.................... for (k=0;k<8;k++) //do the following for each of the 8 bits in the byte
.................... {
.................... bt = inbyte & 0x01; //strip off the rightmost bit of the byte to be sent (inbyte)
.................... if ((fcs_flag == FALSE) & (flag_flag == FALSE)) fcsbit(bt); //do FCS calc, but only if this
.................... //is not a flag or fcs byte
.................... if (bt == 0)
.................... {
.................... flipout();
.................... } // if this bit is a zero, flip the output state
.................... else
.................... { //otherwise if it is a 1, do the following:
.................... if (flag_flag == FALSE) stuff++; //increment the count of consequtive 1's
.................... if ((flag_flag == FALSE) & (stuff == 5))
.................... { //stuff an extra 0, if 5 1's in a row
.................... SendBit();
.................... flipout(); //flip the output state to stuff a 0
.................... }//end of if
.................... }//end of else
.................... // delay_us(850); //introduces a delay that creates 1200 baud
.................... SendBit();
.................... inbyte = inbyte>>1; //go to the next bit in the byte
.................... }//end of for
.................... }//end of SendByte
....................
.................... void SendPacket(char *data)
.................... {
.................... bit=FALSE;
....................
.................... fcslo=fcshi=0xFF; //The 2 FCS Bytes are initialized to FF
.................... stuff = 0; //The variable stuff counts the number of 1's in a row. When it gets to 5
.................... // it is time to stuff a 0.
....................
.................... // output_low(PTT); // Blinking LED
.................... // delay_ms(1000);
.................... // output_high(PTT);
....................
.................... flag_flag = TRUE; //The variable flag is true if you are transmitted flags (7E's) false otherwise.
.................... fcs_flag = FALSE; //The variable fcsflag is true if you are transmitting FCS bytes, false otherwise.
....................
.................... for(i=0; i<10; i++) SendByte(0x7E); //Sends flag bytes. Adjust length for txdelay
.................... //each flag takes approx 6.7 ms
.................... flag_flag = FALSE; //done sending flags
....................
.................... for(i=0; i<16; i++) SendByte(SendData[i]); //send the packet bytes
....................
.................... for(i=0; 0 != *data; i++)
.................... {
.................... SendByte(*data); //send the packet bytes
.................... data++;
.................... };
....................
.................... fcs_flag = TRUE; //about to send the FCS bytes
.................... fcslo =fcslo^0xff; //must XOR them with FF before sending
.................... fcshi = fcshi^0xff;
.................... SendByte(fcslo); //send the low byte of fcs
.................... SendByte(fcshi); //send the high byte of fcs
.................... fcs_flag = FALSE; //done sending FCS
.................... flag_flag = TRUE; //about to send flags
.................... SendByte(0x7e); // Send a flag to end packet
.................... }
....................
....................
....................
....................
....................
.................... //program
.................... #define MEZERA 38 // jak se muze jet dlouho bez cary
.................... #define COUVEJ 700 // kolik se ma couvat po detekci diry
.................... #define CIKCAK 40 // kolik se ma jet cik/cak
.................... #define PRES_DIRU 350 // jak predpokladame velkou diru
.................... #define TRESHOLD 50
....................
.................... #define L 0 // left
.................... #define R 1 // right
.................... #define S 2 // straight
....................
.................... char AXstring[40]; // Buffer pro prenos telemetrie
....................
.................... int movement; // smer minuleho pohybu
.................... int line; // na ktere strane byla detekovana cara
.................... int dira; // pocitadlo pro nalezeni preruseni cary
.................... int n; // pomocna promena pro cyklus FOR
....................
.................... void cik_cak() // Hledani cary
.................... {
.................... n=CIKCAK/2; // poprve hned zatoc opacne, nez se jelo pred detekci diry
.................... switch(movement) // zmenime smer zataceni
.................... {
.................... case L:
.................... FL;STOPR; // doprava
.................... movement=R; // poznamenej kam jedem
.................... line=L; // kdyz prejedem, tak bude cara vlevo
.................... break;
.................... case R:
.................... FR;STOPL; // doleva
.................... movement=L; // poznamenej kam jedem
.................... line=R; // kdyz prejedem, tak bude cara vpravo
.................... break;
.................... }
....................
.................... while(true) // jed cik-cak, dokud nenajdes caru
.................... {
.................... set_adc_channel(RSENSOR);
.................... if (TRESHOLD > read_adc()) // je cara ??
.................... {
.................... STOPL;
.................... STOPR;
.................... break;
.................... };
.................... if (CIKCAK < n++) // Jedeme uz dost dlouho cik??Pak jed cak.
.................... {
.................... n=0;
.................... STOPL;
.................... STOPR;
.................... switch(movement) // zmenime smer zataceni
.................... {
.................... case L:
.................... FL; // doprava
.................... movement=R; // poznamenej kam jedem
.................... line=L; // kdyz prejedem, tak bude cara vlevo
.................... break;
.................... case R:
.................... FR; // doleva
.................... movement=L; // poznamenej kam jedem
.................... line=R; // kdyz prejedem, tak bude cara vpravo
.................... break;
.................... }
.................... }
.................... }
.................... }
....................
....................
.................... void diagnostika()
.................... {
.................... int n;
....................
.................... while (input(PIN_C4))
01CA: BSF 44.4
01CB: MOVF 44,W
01CC: BSF 03.5
01CD: MOVWF 07
01CE: BCF 03.5
01CF: BTFSS 07.4
01D0: GOTO 2C9
.................... {
....................
.................... for (n=500; n<5000; n+=100)
01D1: MOVLW F4
01D2: MOVWF 71
.................... {
.................... SoundBeep(n,50); //beep
01D3: CLRF 73
01D4: MOVF 71,W
01D5: MOVWF 72
01D6: CLRF 75
01D7: MOVLW 32
01D8: MOVWF 74
01D9: CALL 129
.................... };
01DA: MOVLW 64
01DB: ADDWF 71,F
01DC: GOTO 1D3
.................... Delay_ms(1000);
01DD: MOVLW 04
01DE: MOVWF 72
01DF: MOVLW FA
01E0: MOVWF 73
01E1: CALL 0A8
01E2: DECFSZ 72,F
01E3: GOTO 1DF
....................
.................... STOPL; //zastav vse
01E4: BSF 03.5
01E5: BCF 06.6
01E6: BCF 03.5
01E7: BCF 06.6
01E8: BSF 03.5
01E9: BCF 06.7
01EA: BCF 03.5
01EB: BCF 06.7
.................... STOPR;
01EC: BSF 03.5
01ED: BCF 06.4
01EE: BCF 03.5
01EF: BCF 06.4
01F0: BSF 03.5
01F1: BCF 06.5
01F2: BCF 03.5
01F3: BCF 06.5
....................
.................... FR; //pravy pas
01F4: BSF 03.5
01F5: BCF 06.4
01F6: BCF 03.5
01F7: BSF 06.4
01F8: BSF 03.5
01F9: BCF 06.5
01FA: BCF 03.5
01FB: BCF 06.5
.................... Delay_ms(1000);
01FC: MOVLW 04
01FD: MOVWF 72
01FE: MOVLW FA
01FF: MOVWF 73
0200: CALL 0A8
0201: DECFSZ 72,F
0202: GOTO 1FE
.................... STOPR;
0203: BSF 03.5
0204: BCF 06.4
0205: BCF 03.5
0206: BCF 06.4
0207: BSF 03.5
0208: BCF 06.5
0209: BCF 03.5
020A: BCF 06.5
.................... Delay_ms(1000);
020B: MOVLW 04
020C: MOVWF 72
020D: MOVLW FA
020E: MOVWF 73
020F: CALL 0A8
0210: DECFSZ 72,F
0211: GOTO 20D
.................... BR;
0212: BSF 03.5
0213: BCF 06.5
0214: BCF 03.5
0215: BSF 06.5
0216: BSF 03.5
0217: BCF 06.4
0218: BCF 03.5
0219: BCF 06.4
.................... Delay_ms(1000);
021A: MOVLW 04
021B: MOVWF 72
021C: MOVLW FA
021D: MOVWF 73
021E: CALL 0A8
021F: DECFSZ 72,F
0220: GOTO 21C
.................... STOPR;
0221: BSF 03.5
0222: BCF 06.4
0223: BCF 03.5
0224: BCF 06.4
0225: BSF 03.5
0226: BCF 06.5
0227: BCF 03.5
0228: BCF 06.5
.................... Delay_ms(1000);
0229: MOVLW 04
022A: MOVWF 72
022B: MOVLW FA
022C: MOVWF 73
022D: CALL 0A8
022E: DECFSZ 72,F
022F: GOTO 22B
....................
.................... FL; //levy pas
0230: BSF 03.5
0231: BCF 06.6
0232: BCF 03.5
0233: BSF 06.6
0234: BSF 03.5
0235: BCF 06.7
0236: BCF 03.5
0237: BCF 06.7
.................... Delay_ms(1000);
0238: MOVLW 04
0239: MOVWF 72
023A: MOVLW FA
023B: MOVWF 73
023C: CALL 0A8
023D: DECFSZ 72,F
023E: GOTO 23A
.................... STOPL;
023F: BSF 03.5
0240: BCF 06.6
0241: BCF 03.5
0242: BCF 06.6
0243: BSF 03.5
0244: BCF 06.7
0245: BCF 03.5
0246: BCF 06.7
.................... Delay_ms(1000);
0247: MOVLW 04
0248: MOVWF 72
0249: MOVLW FA
024A: MOVWF 73
024B: CALL 0A8
024C: DECFSZ 72,F
024D: GOTO 249
.................... BL;
024E: BSF 03.5
024F: BCF 06.7
0250: BCF 03.5
0251: BSF 06.7
0252: BSF 03.5
0253: BCF 06.6
0254: BCF 03.5
0255: BCF 06.6
.................... Delay_ms(1000);
0256: MOVLW 04
0257: MOVWF 72
0258: MOVLW FA
0259: MOVWF 73
025A: CALL 0A8
025B: DECFSZ 72,F
025C: GOTO 258
.................... STOPL;
025D: BSF 03.5
025E: BCF 06.6
025F: BCF 03.5
0260: BCF 06.6
0261: BSF 03.5
0262: BCF 06.7
0263: BCF 03.5
0264: BCF 06.7
.................... Delay_ms(1000);
0265: MOVLW 04
0266: MOVWF 72
0267: MOVLW FA
0268: MOVWF 73
0269: CALL 0A8
026A: DECFSZ 72,F
026B: GOTO 267
....................
.................... FL; //oba pasy
026C: BSF 03.5
026D: BCF 06.6
026E: BCF 03.5
026F: BSF 06.6
0270: BSF 03.5
0271: BCF 06.7
0272: BCF 03.5
0273: BCF 06.7
.................... FR;
0274: BSF 03.5
0275: BCF 06.4
0276: BCF 03.5
0277: BSF 06.4
0278: BSF 03.5
0279: BCF 06.5
027A: BCF 03.5
027B: BCF 06.5
.................... Delay_ms(1000);
027C: MOVLW 04
027D: MOVWF 72
027E: MOVLW FA
027F: MOVWF 73
0280: CALL 0A8
0281: DECFSZ 72,F
0282: GOTO 27E
.................... STOPL;
0283: BSF 03.5
0284: BCF 06.6
0285: BCF 03.5
0286: BCF 06.6
0287: BSF 03.5
0288: BCF 06.7
0289: BCF 03.5
028A: BCF 06.7
.................... STOPR;
028B: BSF 03.5
028C: BCF 06.4
028D: BCF 03.5
028E: BCF 06.4
028F: BSF 03.5
0290: BCF 06.5
0291: BCF 03.5
0292: BCF 06.5
.................... Delay_ms(1000);
0293: MOVLW 04
0294: MOVWF 72
0295: MOVLW FA
0296: MOVWF 73
0297: CALL 0A8
0298: DECFSZ 72,F
0299: GOTO 295
.................... BL;
029A: BSF 03.5
029B: BCF 06.7
029C: BCF 03.5
029D: BSF 06.7
029E: BSF 03.5
029F: BCF 06.6
02A0: BCF 03.5
02A1: BCF 06.6
.................... BR;
02A2: BSF 03.5
02A3: BCF 06.5
02A4: BCF 03.5
02A5: BSF 06.5
02A6: BSF 03.5
02A7: BCF 06.4
02A8: BCF 03.5
02A9: BCF 06.4
.................... Delay_ms(1000);
02AA: MOVLW 04
02AB: MOVWF 72
02AC: MOVLW FA
02AD: MOVWF 73
02AE: CALL 0A8
02AF: DECFSZ 72,F
02B0: GOTO 2AC
.................... STOPL;
02B1: BSF 03.5
02B2: BCF 06.6
02B3: BCF 03.5
02B4: BCF 06.6
02B5: BSF 03.5
02B6: BCF 06.7
02B7: BCF 03.5
02B8: BCF 06.7
.................... STOPR;
02B9: BSF 03.5
02BA: BCF 06.4
02BB: BCF 03.5
02BC: BCF 06.4
02BD: BSF 03.5
02BE: BCF 06.5
02BF: BCF 03.5
02C0: BCF 06.5
.................... Delay_ms(1000);
02C1: MOVLW 04
02C2: MOVWF 72
02C3: MOVLW FA
02C4: MOVWF 73
02C5: CALL 0A8
02C6: DECFSZ 72,F
02C7: GOTO 2C3
.................... }
02C8: GOTO 1CA
02C9: BCF 0A.3
02CA: GOTO 2F0 (RETURN)
.................... }
....................
.................... void main()
.................... {
02CB: CLRF 04
02CC: MOVLW 1F
02CD: ANDWF 03,F
02CE: MOVLW 07
02CF: BSF 03.5
02D0: MOVWF 1F
02D1: MOVLW 82
02D2: BCF 03.5
02D3: MOVWF 2D
02D4: MOVLW 98
02D5: MOVWF 2E
02D6: MOVWF 2F
02D7: MOVLW 40
02D8: MOVWF 30
02D9: MOVWF 31
02DA: MOVWF 32
02DB: MOVLW 60
02DC: MOVWF 33
02DD: MOVLW 86
02DE: MOVWF 34
02DF: MOVLW B4
02E0: MOVWF 35
02E1: MOVLW 60
02E2: MOVWF 36
02E3: MOVLW A4
02E4: MOVWF 37
02E5: MOVWF 38
02E6: MOVWF 39
02E7: MOVLW 61
02E8: MOVWF 3A
02E9: MOVLW 03
02EA: MOVWF 3B
02EB: MOVLW F0
02EC: MOVWF 3C
02ED: MOVLW FF
02EE: MOVWF 44
.................... diagnostika();
02EF: GOTO 1CA
....................
.................... SoundBeep(640,200); //beep
02F0: MOVLW 02
02F1: MOVWF 73
02F2: MOVLW 80
02F3: MOVWF 72
02F4: CLRF 75
02F5: MOVLW C8
02F6: MOVWF 74
02F7: CALL 129
.................... Delay_ms(50);
02F8: MOVLW 32
02F9: MOVWF 73
02FA: CALL 0A8
.................... SoundBeep(640,200);
02FB: MOVLW 02
02FC: MOVWF 73
02FD: MOVLW 80
02FE: MOVWF 72
02FF: CLRF 75
0300: MOVLW C8
0301: MOVWF 74
0302: CALL 129
....................
.................... setup_adc_ports(RA0_RA1_RA3_ANALOG);
0303: MOVLW 04
0304: BSF 03.5
0305: MOVWF 1F
.................... setup_adc(ADC_CLOCK_DIV_2);
0306: BCF 03.5
0307: MOVF 1F,W
0308: ANDLW 38
0309: IORLW 01
030A: MOVWF 1F
.................... Delay_ms(1000); // 1s
030B: MOVLW 04
030C: MOVWF 71
030D: MOVLW FA
030E: MOVWF 73
030F: CALL 0A8
0310: DECFSZ 71,F
0311: GOTO 30D
....................
.................... movement=R;
0312: MOVLW 01
0313: MOVWF 6D
.................... line=S;
0314: MOVLW 02
0315: MOVWF 6E
.................... dira=0;
0316: CLRF 6F
....................
.................... //cik_cak(); // toc se, abys nasel caru
.................... FL; FR; // vpred
0317: BSF 03.5
0318: BCF 06.6
0319: BCF 03.5
031A: BSF 06.6
031B: BSF 03.5
031C: BCF 06.7
031D: BCF 03.5
031E: BCF 06.7
031F: BSF 03.5
0320: BCF 06.4
0321: BCF 03.5
0322: BSF 06.4
0323: BSF 03.5
0324: BCF 06.5
0325: BCF 03.5
0326: BCF 06.5
....................
.................... // Sledovani cary
.................... while(true)
.................... {
.................... snimani:
.................... set_adc_channel(RSENSOR);
0327: MOVLW 08
0328: MOVWF 21
0329: MOVF 1F,W
032A: ANDLW C7
032B: IORWF 21,W
032C: MOVWF 1F
.................... Delay_us(2);
032D: NOP
032E: NOP
.................... if (TRESHOLD > read_adc()) // Cara pod pravym senzorem
032F: BSF 1F.2
0330: BTFSC 1F.2
0331: GOTO 330
0332: MOVF 1E,W
0333: SUBLW 31
0334: BTFSS 03.0
0335: GOTO 34A
.................... {
.................... dira=0; // nuluj pocitadlo diry, protoze jsme videli caru
0336: CLRF 6F
.................... line=R; // zaznamenej, kdes videl caru
0337: MOVLW 01
0338: MOVWF 6E
.................... FL;FR;
0339: BSF 03.5
033A: BCF 06.6
033B: BCF 03.5
033C: BSF 06.6
033D: BSF 03.5
033E: BCF 06.7
033F: BCF 03.5
0340: BCF 06.7
0341: BSF 03.5
0342: BCF 06.4
0343: BCF 03.5
0344: BSF 06.4
0345: BSF 03.5
0346: BCF 06.5
0347: BCF 03.5
0348: BCF 06.5
.................... goto snimani;
0349: GOTO 327
.................... }
....................
.................... set_adc_channel(LSENSOR);
034A: MOVLW 00
034B: MOVWF 21
034C: MOVF 1F,W
034D: ANDLW C7
034E: IORWF 21,W
034F: MOVWF 1F
.................... Delay_us(2);
0350: NOP
0351: NOP
.................... if (TRESHOLD > read_adc()) // Cara pod levym senzorem
0352: BSF 1F.2
0353: BTFSC 1F.2
0354: GOTO 353
0355: MOVF 1E,W
0356: SUBLW 31
0357: BTFSS 03.0
0358: GOTO 36C
.................... {
.................... dira=0; // nuluj pocitadlo diry, protoze jsme videli caru
0359: CLRF 6F
.................... line=L; // zaznamenej, kdes videl caru
035A: CLRF 6E
.................... FL;FR;
035B: BSF 03.5
035C: BCF 06.6
035D: BCF 03.5
035E: BSF 06.6
035F: BSF 03.5
0360: BCF 06.7
0361: BCF 03.5
0362: BCF 06.7
0363: BSF 03.5
0364: BCF 06.4
0365: BCF 03.5
0366: BSF 06.4
0367: BSF 03.5
0368: BCF 06.5
0369: BCF 03.5
036A: BCF 06.5
.................... goto snimani;
036B: GOTO 327
.................... }
....................
.................... // oba senzory mimo caru
.................... if (0==dira) // v prvnim cyklu po ztrate cary zacneme zahybat
036C: MOVF 6F,F
036D: BTFSS 03.2
036E: GOTO 3BF
.................... // v ostatnich cyklech nedelame nic (pro urychleni snimani)
.................... {
.................... STOPL;
036F: BSF 03.5
0370: BCF 06.6
0371: BCF 03.5
0372: BCF 06.6
0373: BSF 03.5
0374: BCF 06.7
0375: BCF 03.5
0376: BCF 06.7
.................... STOPR;
0377: BSF 03.5
0378: BCF 06.4
0379: BCF 03.5
037A: BCF 06.4
037B: BSF 03.5
037C: BCF 06.5
037D: BCF 03.5
037E: BCF 06.5
.................... BL;
037F: BSF 03.5
0380: BCF 06.7
0381: BCF 03.5
0382: BSF 06.7
0383: BSF 03.5
0384: BCF 06.6
0385: BCF 03.5
0386: BCF 06.6
.................... BR;
0387: BSF 03.5
0388: BCF 06.5
0389: BCF 03.5
038A: BSF 06.5
038B: BSF 03.5
038C: BCF 06.4
038D: BCF 03.5
038E: BCF 06.4
.................... Delay_ms(20);
038F: MOVLW 14
0390: MOVWF 73
0391: CALL 0A8
.................... STOPL;
0392: BSF 03.5
0393: BCF 06.6
0394: BCF 03.5
0395: BCF 06.6
0396: BSF 03.5
0397: BCF 06.7
0398: BCF 03.5
0399: BCF 06.7
.................... STOPR;
039A: BSF 03.5
039B: BCF 06.4
039C: BCF 03.5
039D: BCF 06.4
039E: BSF 03.5
039F: BCF 06.5
03A0: BCF 03.5
03A1: BCF 06.5
.................... Delay_ms(200);
03A2: MOVLW C8
03A3: MOVWF 73
03A4: CALL 0A8
.................... // kdyz nevidis caru, tak jed tam, kdes ji videl naposled
.................... if(line==L)
03A5: MOVF 6E,F
03A6: BTFSS 03.2
03A7: GOTO 3B1
.................... {
.................... // doleva
.................... // STOPL;
.................... FR;
03A8: BSF 03.5
03A9: BCF 06.4
03AA: BCF 03.5
03AB: BSF 06.4
03AC: BSF 03.5
03AD: BCF 06.5
03AE: BCF 03.5
03AF: BCF 06.5
.................... movement=L; // poznamenej kam jedes
03B0: CLRF 6D
.................... }
.................... if(line==R)
03B1: DECFSZ 6E,W
03B2: GOTO 3BD
.................... {
.................... // doprava
.................... // STOPR;
.................... FL;
03B3: BSF 03.5
03B4: BCF 06.6
03B5: BCF 03.5
03B6: BSF 06.6
03B7: BSF 03.5
03B8: BCF 06.7
03B9: BCF 03.5
03BA: BCF 06.7
.................... movement=R; // poznamenej kam jedes
03BB: MOVLW 01
03BC: MOVWF 6D
.................... }
.................... dira++; // zvets pocitadlo diry, aby to pristi cyklus tudy neslo
03BD: INCF 6F,F
.................... goto snimani; // co nejrychleji se vrat na snimani cary
03BE: GOTO 327
.................... }
....................
.................... /*if (MEZERA < dira++) // nejedeme uz moc dlouho bez cary??
.................... {
.................... dira=0;
.................... switch(movement) // kam se jelo ??
.................... {
.................... case L:
.................... BR; // couvej doprava
.................... Delay_ms(COUVEJ);
.................... movement=R;
.................... break;
.................... case R:
.................... BL; // couvej doleva
.................... Delay_ms(COUVEJ);
.................... movement=L;
.................... break;
.................... }
.................... STOP(); // konec couvani
.................... FL; FR; // rovne pres diru
.................... Delay_ms(PRES_DIRU);
.................... STOP();
.................... cik_cak(); // najdi caru
.................... FR; FL; // vpred
.................... } // dira*/
....................
.................... } // while(true)
03BF: GOTO 327
....................
.................... }
....................
03C0: SLEEP
.................... /*void objizdka()
.................... {
.................... BL; BR; // zacouvej
.................... Delay_ms(150);
.................... STOP();
....................
.................... cik_cak(); // vyrovnej se na caru
.................... cik_cak(); // radeji 3x, aby se vyrovnaly setrvacne sily
.................... cik_cak();
....................
.................... BL; FR; Delay_ms(220); // vlevo
.................... STOP();
.................... FL; FR; Delay_ms(650); // rovne
.................... STOP();
.................... FL; BR; Delay_ms(220); // vpravo
.................... STOP();
.................... FL; FR; Delay_ms(770); // rovne
.................... STOP();
.................... FL; BR; Delay_ms(210); // vpravo
.................... STOP();
.................... FL; FR;
.................... Delay_ms(200); // kousek rovne
.................... // rovne, dokud nenarazis na caru
.................... while(input(RSENSOR)); // pravej senzor, protoze cihla je vpravo
.................... STOP();
.................... BL; FR; // toc se doleva, dokud nenarazis na caru
.................... while(input(LSENSOR)); // levej senzor, protoze cara je urcite vlevo
.................... STOP();
.................... line=R; // caru predpokladame vpravo, kdybysme ji prejeli
.................... dira=0;
.................... FL; FR; // vpred
.................... }*/
....................
/roboti/istrobot/tank/main.PJT
0,0 → 1,35
[PROJECT]
Target=main.HEX
Development_Mode=
Processor=0x873F
ToolSuite=CCS
 
[Directories]
Include=C:\Program Files\PICC\devices\;C:\Program Files\PICC\drivers\;C:\library\kaklik\CCS;
Library=
LinkerScript=
 
[Target Data]
FileList=main.c;
BuildTool=C-COMPILER
OptionString=+FM
AdditionalOptionString=
BuildRequired=1
 
[main.c]
Type=4
Path=
FileList=
BuildTool=
OptionString=
AdditionalOptionString=
 
[mru-list]
1=main.c
 
[Windows]
0=0000 main.c 0 0 796 451 3 0
 
[Opened Files]
1=D:\KAKLIK\programy\PIC_C\roboti\tank\main.c
2=
/roboti/istrobot/tank/main.SYM
0,0 → 1,90
003 STATUS
015-016 CCP_1
015 CCP_1_LOW
016 CCP_1_HIGH
01B-01C CCP_2
01B CCP_2_LOW
01C CCP_2_HIGH
020 @SCRATCH
021 @SCRATCH
021 _RETURN_
022 @SCRATCH
023 @SCRATCH
024 @SCRATCH
025-028 SoundCount
029-02C SoundPeriod
02D-03C SendData
03D.0 bit
03E fcslo
03F fcshi
040 stuff
041 flag_flag
042 fcs_flag
043 i
044 @TRIS_C
045-06C AXstring
06D movement
06E line
06F dira
070 n
071 diagnostika.n
071 main.@SCRATCH
072-073 SoundBeep.Frequency
072 diagnostika.@SCRATCH
073 delay_ms.P1
074-075 SoundBeep.Duration
076.0 SoundLoop.Data
076-079 @DIV3232.P1
076-079 @MUL3232.P2
076 SoundBeep.@SCRATCH
077-078 SoundLoop.i
077 SoundBeep.@SCRATCH
078 SoundBeep.@SCRATCH
079 SoundLoop.@SCRATCH
079 SoundBeep.@SCRATCH
07A-07D @DIV3232.P1
07A-07D @MUL3232.P2
07A SoundLoop.@SCRATCH
07B-07C DelaySpecial.Time
07D DelaySpecial.TimeHi
07E DelaySpecial.@SCRATCH
07F DelaySpecial.@SCRATCH
0A0 @DIV3232.@SCRATCH
0A0 @MUL3232.@SCRATCH
0A1 @DIV3232.@SCRATCH
0A1 @MUL3232.@SCRATCH
0A2 @DIV3232.@SCRATCH
0A2 @MUL3232.@SCRATCH
0A3 @DIV3232.@SCRATCH
0A3 @MUL3232.@SCRATCH
0A4 @DIV3232.@SCRATCH
0A4 @MUL3232.@SCRATCH
delay_us.P1
SoundNote.Note
SoundNote.Octave
-000 SoundNote.Duration
-016 Table
fcsbit.tbyte
SendByte.inbyte
SendByte.k
SendByte.bt
SendPacket.Data
 
00A8 delay_ms
0100 DelaySpecial
0129 SoundBeep
0004 @DIV3232
0066 @MUL3232
01CA diagnostika
02CB main
010A Next
0120 Loop
0126 Next1
0327 snimani
 
Project Files:
d:\kaklik\programy\pic_c\robot\tank\main.c
D:\@KAKLIK\programy\PIC_C\robot\tank\main.h
C:\Program Files\PICC\devices\16F873.h
C:\Program Files\PICC\drivers\sound.c
C:\library\kaklik\CCS\AX25.c
/roboti/istrobot/tank/main.c
0,0 → 1,282
#include "D:\KAKLIK\programy\PIC_C\roboti\tank\main.h"
 
//motory
#define FR output_high(PIN_B4);output_low(PIN_B5) // Vpred
#define FL output_high(PIN_B6);output_low(PIN_B7)
#define BR output_high(PIN_B5);output_low(PIN_B4) // Vzad
#define BL output_high(PIN_B7);output_low(PIN_B6)
#define STOPR output_low(PIN_B4);output_low(PIN_B5)
#define STOPL output_low(PIN_B6);output_low(PIN_B7)
 
//cidla
#define RSENSOR 1 // Senzory na caru
#define LSENSOR 0
//#define BUMPER SENSOR_2 // Senzor na cihlu
 
//human interface
#DEFINE LED PIN_A2
 
#DEFINE SOUND_HI PIN_B2
#DEFINE SOUND_LO PIN_B3
#include "sound.c"
 
#DEFINE TXo PIN_C0 // Vysilac
#include "C:\library\kaklik\CCS\AX25.c" // Podprogram pro prenos telemetrie
 
//program
#define MEZERA 38 // jak se muze jet dlouho bez cary
#define COUVEJ 700 // kolik se ma couvat po detekci diry
#define CIKCAK 40 // kolik se ma jet cik/cak
#define PRES_DIRU 350 // jak predpokladame velkou diru
#define TRESHOLD 50
 
#define L 0 // left
#define R 1 // right
#define S 2 // straight
 
#use fixed_io(b_outputs=PIN_B2, PIN_B3, PIN_B4, PIN_B5, PIN_B6, PIN_B7)
#use fixed_io(a_outputs=PIN_A2)
#use fixed_io(c_outputs=PIN_C0)
 
char AXstring[40]; // Buffer pro prenos telemetrie
 
int movement; // smer minuleho pohybu
int line; // na ktere strane byla detekovana cara
int dira; // pocitadlo pro nalezeni preruseni cary
int n; // pomocna promena pro cyklus FOR
 
void cik_cak() // Hledani cary
{
n=CIKCAK/2; // poprve hned zatoc opacne, nez se jelo pred detekci diry
switch(movement) // zmenime smer zataceni
{
case L:
FL;STOPR; // doprava
movement=R; // poznamenej kam jedem
line=L; // kdyz prejedem, tak bude cara vlevo
break;
case R:
FR;STOPL; // doleva
movement=L; // poznamenej kam jedem
line=R; // kdyz prejedem, tak bude cara vpravo
break;
}
 
while(true) // jed cik-cak, dokud nenajdes caru
{
set_adc_channel(RSENSOR);
if (TRESHOLD > read_adc()) // je cara ?
{
STOPL;
STOPR;
break;
};
if (CIKCAK < n++) // Jedeme uz dost dlouho cik? Pak jed cak.
{
n=0;
STOPL;
STOPR;
switch(movement) // zmenime smer zataceni
{
case L:
FL; // doprava
movement=R; // poznamenej kam jedem
line=L; // kdyz prejedem, tak bude cara vlevo
break;
case R:
FR; // doleva
movement=L; // poznamenej kam jedem
line=R; // kdyz prejedem, tak bude cara vpravo
break;
}
}
}
}
 
 
void diagnostika()
{
int n;
while (input(PIN_C5))
{
set_adc_channel(RSENSOR);
Delay_us(2);
 
set_adc_channel(LSENSOR);
Delay_us(2);
 
sprintf(AXstring,"Counter: %U\0", n++); // Convert DATA to String.
SendPacket(&AXstring[0]);
delay_ms(1000);
}
 
while (input(PIN_C4))
{
 
for (n=500; n<5000; n+=100)
{
SoundBeep(n,50); //beep
};
Delay_ms(1000);
 
STOPL; //zastav vse
STOPR;
 
FR; //pravy pas
Delay_ms(1000);
STOPR;
Delay_ms(1000);
BR;
Delay_ms(1000);
STOPR;
Delay_ms(1000);
 
FL; //levy pas
Delay_ms(1000);
STOPL;
Delay_ms(1000);
BL;
Delay_ms(1000);
STOPL;
Delay_ms(1000);
 
FL; //oba pasy
FR;
Delay_ms(1000);
STOPL;
STOPR;
Delay_ms(1000);
BL;
BR;
Delay_ms(1000);
STOPL;
STOPR;
Delay_ms(1000);
}
}
 
void main()
{
setup_adc_ports(RA0_RA1_RA3_ANALOG);
setup_adc(ADC_CLOCK_DIV_2);
diagnostika();
 
SoundBeep(640,200); //beep
Delay_ms(50);
SoundBeep(640,200);
Delay_ms(1000); // 1s
 
movement=R;
line=S;
dira=0;
 
//cik_cak(); // toc se, abys nasel caru
FL; FR; // vpred
 
// Sledovani cary
while(true)
{
snimani:
set_adc_channel(RSENSOR);
Delay_us(2);
if (TRESHOLD > read_adc()) // Cara pod pravym senzorem
{
dira=0; // nuluj pocitadlo diry, protoze jsme videli caru
line=R; // zaznamenej, kdes videl caru
FL;FR;
goto snimani;
}
 
set_adc_channel(LSENSOR);
Delay_us(2);
if (TRESHOLD > read_adc()) // Cara pod levym senzorem
{
dira=0; // nuluj pocitadlo diry, protoze jsme videli caru
line=L; // zaznamenej, kdes videl caru
FL;FR;
goto snimani;
}
 
// oba senzory mimo caru
if (0==dira) // v prvnim cyklu po ztrate cary zacneme zahybat
// v ostatnich cyklech nedelame nic (pro urychleni snimani)
{
// kdyz nevidis caru, tak jed tam, kdes ji videl naposled
if(line==L)
{
// doleva
// STOPL;
FR;
movement=L; // poznamenej kam jedes
}
if(line==R)
{
// doprava
// STOPR;
FL;
movement=R; // poznamenej kam jedes
}
dira++; // zvets pocitadlo diry, aby to pristi cyklus tudy neslo
goto snimani; // co nejrychleji se vrat na snimani cary
}
 
/*if (MEZERA < dira++) // nejedeme uz moc dlouho bez cary?
{
dira=0;
switch(movement) // kam se jelo ?
{
case L:
BR; // couvej doprava
Delay_ms(COUVEJ);
movement=R;
break;
case R:
BL; // couvej doleva
Delay_ms(COUVEJ);
movement=L;
break;
}
STOP(); // konec couvani
FL; FR; // rovne pres diru
Delay_ms(PRES_DIRU);
STOP();
cik_cak(); // najdi caru
FR; FL; // vpred
} // dira*/
 
} // while(true)
 
}
 
/*void objizdka()
{
BL; BR; // zacouvej
Delay_ms(150);
STOP();
 
cik_cak(); // vyrovnej se na caru
cik_cak(); // radeji 3x, aby se vyrovnaly setrvacne sily
cik_cak();
 
BL; FR; Delay_ms(220); // vlevo
STOP();
FL; FR; Delay_ms(650); // rovne
STOP();
FL; BR; Delay_ms(220); // vpravo
STOP();
FL; FR; Delay_ms(770); // rovne
STOP();
FL; BR; Delay_ms(210); // vpravo
STOP();
FL; FR;
Delay_ms(200); // kousek rovne
// rovne, dokud nenarazis na caru
while(input(RSENSOR)); // pravej senzor, protoze cihla je vpravo
STOP();
BL; FR; // toc se doleva, dokud nenarazis na caru
while(input(LSENSOR)); // levej senzor, protoze cara je urcite vlevo
STOP();
line=R; // caru predpokladame vpravo, kdybysme ji prejeli
dira=0;
FL; FR; // vpred
}*/
/roboti/istrobot/tank/main.cod
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/roboti/istrobot/tank/main.err
0,0 → 1,11
DelaySpecial
Seg 00100-00128, 0029 left, need 002D
0000
 
SoundBeep
 
diagnostika
 
main
 
Error[71] D:\KAKLIK\programy\PIC_C\roboti\tank\main.c 284 : Out of ROM, A segment or the program is too large
/roboti/istrobot/tank/main.h
0,0 → 1,4
#include <16F873.h>
#use delay(clock=4000000)
#fuses XT,NOWDT,NOLVP
 
/roboti/istrobot/tank/main.sta
0,0 → 1,38
 
ROM used: 893 (22%)
2048 (50%) including unused fragments
 
1 Average locations per line
3 Average locations per statement
 
RAM used: 82 (43%) at main() level
101 (53%) worst case
 
Lines Stmts % Files
----- ----- --- -----
276 167 62 d:\kaklik\programy\pic_c\robot\tank\main.c
5 0 0 D:\@KAKLIK\programy\PIC_C\robot\tank\main.h
225 0 0 C:\Program Files\PICC\devices\16F873.h
216 35 8 C:\Program Files\PICC\drivers\sound.c
136 67 14 C:\library\kaklik\CCS\AX25.c
----- -----
1716 538 Total
 
Page ROM % RAM Functions:
---- --- --- --- ----------
0 21 2 1 delay_ms
0 40 4 5 DelaySpecial
0 161 18 8 SoundBeep
0 98 11 13 @DIV3232
0 66 7 13 @MUL3232
0 257 29 2 diagnostika
0 246 28 1 main
 
Segment Used Free
--------- ---- ----
0000-0003 4 0
0004-00FF 185 67
0100-0128 40 1
0129-07FF 664 1087
0800-0FFF 0 2048
 
/roboti/istrobot/tank/main.tre
0,0 → 1,88
ÀÄmain
ÀÄmain Ram=1
ÃÄ??0??
ÃÄdiagnostika Ram=3
³ ÃÄ@const10226 0/17 Ram=0
³ ÃÄ@SPRINTF 0/8 Ram=1
³ ÃÄ@PRINTF_U_344 0/78 Ram=2
³ ³ ÃÄ@DIV88 0/21 Ram=3
³ ³ ÃÄ@SPRINTF 0/8 Ram=1
³ ³ ÃÄ@SPRINTF 0/8 Ram=1
³ ³ ÃÄ@SPRINTF 0/8 Ram=1
³ ³ ÃÄ@DIV88 0/21 Ram=3
³ ³ ÃÄ@SPRINTF 0/8 Ram=1
³ ³ ÀÄ@SPRINTF 0/8 Ram=1
³ ÃÄSendPacket (Inline) Ram=2
³ ³ ÃÄSendByte 0/74 Ram=4
³ ³ ³ ÃÄfcsbit (Inline) Ram=3
³ ³ ³ ÃÄflipout 0/7 Ram=0
³ ³ ³ ÃÄSendBit 0/74 Ram=0
³ ³ ³ ÃÄflipout 0/7 Ram=0
³ ³ ³ ÀÄSendBit 0/74 Ram=0
³ ³ ÃÄSendByte 0/74 Ram=4
³ ³ ³ ÃÄfcsbit (Inline) Ram=3
³ ³ ³ ÃÄflipout 0/7 Ram=0
³ ³ ³ ÃÄSendBit 0/74 Ram=0
³ ³ ³ ÃÄflipout 0/7 Ram=0
³ ³ ³ ÀÄSendBit 0/74 Ram=0
³ ³ ÃÄSendByte 0/74 Ram=4
³ ³ ³ ÃÄfcsbit (Inline) Ram=3
³ ³ ³ ÃÄflipout 0/7 Ram=0
³ ³ ³ ÃÄSendBit 0/74 Ram=0
³ ³ ³ ÃÄflipout 0/7 Ram=0
³ ³ ³ ÀÄSendBit 0/74 Ram=0
³ ³ ÃÄSendByte 0/74 Ram=4
³ ³ ³ ÃÄfcsbit (Inline) Ram=3
³ ³ ³ ÃÄflipout 0/7 Ram=0
³ ³ ³ ÃÄSendBit 0/74 Ram=0
³ ³ ³ ÃÄflipout 0/7 Ram=0
³ ³ ³ ÀÄSendBit 0/74 Ram=0
³ ³ ÃÄSendByte 0/74 Ram=4
³ ³ ³ ÃÄfcsbit (Inline) Ram=3
³ ³ ³ ÃÄflipout 0/7 Ram=0
³ ³ ³ ÃÄSendBit 0/74 Ram=0
³ ³ ³ ÃÄflipout 0/7 Ram=0
³ ³ ³ ÀÄSendBit 0/74 Ram=0
³ ³ ÀÄSendByte 0/74 Ram=4
³ ³ ÃÄfcsbit (Inline) Ram=3
³ ³ ÃÄflipout 0/7 Ram=0
³ ³ ÃÄSendBit 0/74 Ram=0
³ ³ ÃÄflipout 0/7 Ram=0
³ ³ ÀÄSendBit 0/74 Ram=0
³ ÃÄ@delay_ms1 0/21 Ram=1
³ ÃÄSoundBeep Ram=8
³ ³ ÃÄDelaySpecial ?/45 Ram=5
³ ³ ÃÄ@DIV3232 Ram=13
³ ³ ÃÄ@MUL3232 Ram=13
³ ³ ÃÄ@DIV3232 Ram=13
³ ³ ÀÄSoundLoop (Inline) Ram=5
³ ³ ÀÄDelaySpecial ?/45 Ram=5
³ ÃÄ@delay_ms1 0/21 Ram=1
³ ÃÄ@delay_ms1 0/21 Ram=1
³ ÃÄ@delay_ms1 0/21 Ram=1
³ ÃÄ@delay_ms1 0/21 Ram=1
³ ÃÄ@delay_ms1 0/21 Ram=1
³ ÃÄ@delay_ms1 0/21 Ram=1
³ ÃÄ@delay_ms1 0/21 Ram=1
³ ÃÄ@delay_ms1 0/21 Ram=1
³ ÃÄ@delay_ms1 0/21 Ram=1
³ ÃÄ@delay_ms1 0/21 Ram=1
³ ÃÄ@delay_ms1 0/21 Ram=1
³ ÃÄ@delay_ms1 0/21 Ram=1
³ ÀÄ@delay_ms1 0/21 Ram=1
ÃÄSoundBeep Ram=8
³ ÃÄDelaySpecial ?/45 Ram=5
³ ÃÄ@DIV3232 Ram=13
³ ÃÄ@MUL3232 Ram=13
³ ÃÄ@DIV3232 Ram=13
³ ÀÄSoundLoop (Inline) Ram=5
³ ÀÄDelaySpecial ?/45 Ram=5
ÃÄ@delay_ms1 0/21 Ram=1
ÃÄSoundBeep Ram=8
³ ÃÄDelaySpecial ?/45 Ram=5
³ ÃÄ@DIV3232 Ram=13
³ ÃÄ@MUL3232 Ram=13
³ ÃÄ@DIV3232 Ram=13
³ ÀÄSoundLoop (Inline) Ram=5
³ ÀÄDelaySpecial ?/45 Ram=5
ÀÄ@delay_ms1 0/21 Ram=1
/roboti/istrobot/tank/prg.bat
0,0 → 1,6
call picpgr stop lpt2
call picpgr erase pic16f873 lpt2
call picpgr program main.hex hex pic16f873 lpt2
call picpgr run lpt2
pause
call picpgr stop lpt2
/roboti/istrobot/tank/vssver.scc
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property