Subversion Repositories svnkaklik

Compare Revisions

No changes between revisions

Ignore whitespace Rev 5 → Rev 6

/schemata/prenos/letadlo/SW/prijimac/A.BAT
0,0 → 1,6
call picpgr stop
call picpgr erase pic16F84
call picpgr program main.hex hex pic16F84
call picpgr run
pause
call picpgr stop
/schemata/prenos/letadlo/SW/prijimac/VC.MNU
0,0 → 1,4
R: Run
picpgr run
S: Stop
picpgr stop
/schemata/prenos/letadlo/SW/prijimac/main.BAK
0,0 → 1,99
// Prijimac
 
#include "main.h"
#include "..\common.h"
 
#DEFINE LCD_RS PIN_B1 // rizeni registru LCD displeje
#DEFINE LCD_E PIN_B0 // enable LCD displeje
#DEFINE LCD_DATA_LSB PIN_B2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
#INCLUDE "MYLCD.C"
 
#DEFINE PRIJIMAC PIN_A3 // pin na ktery je pripojen prijimac
#DEFINE SERVO_X PIN_A0 // pin na ktery je pripojeno servo
#DEFINE SERVO_Y PIN_A1
#INCLUDE "prijimac.c"
 
 
 
int8 x,y,tlacitka;
int8 xc,yc; // pocitadla aktualizace x a y
int e1,e2,e3,e4; // pocitadla chyb - ladici
 
void main()
{
lcd_init(); // zinicializuj LCD display
delay_ms(5);
printf(lcd_putc,"Ahoj...");
delay_ms(300);
 
x = 0;
y = 0;
xc = 0;
yc = 0;
e1 = 0;
e2 = 0;
e3 = 0;
e4 = 0;
 
while (true)
{
int8 kanal, data;
 
if (prijmi_ramec(&kanal,&data))
e1++;
else
{
switch (kanal) // rozeskoc se podle adresy osy
{
case OSA_X:
{
x=data;
xc++;
break;
};
case OSA_Y:
{
y=data;
yc++;
break;
};
case TLs:
{
tlacitka=data;
break;
};
};
 
 
// ladici vypisy
 
lcd_gotoxy(1,1); // vytiskni X a Y
printf(lcd_putc,"X%2U %3U%3U%3U ", x, xc, e1, e2);
lcd_gotoxy(1,2);
printf(lcd_putc,"Y%2U %3U%3U%3U ", y, yc, e3, tlacitka);
 
// ovladani serv
output_high(SERVO_X);
delay_ms(1);
for (data=x; data--; data>0)
delay_us(65);
output_low(SERVO_X);
 
output_high(SERVO_Y);
delay_ms(1);
for (data=y; data--; data>0)
delay_us(65);
output_low(SERVO_Y);
 
for (data=30-x-y; data--; data>0)
delay_us(65);
 
// Vystupy tlacitek
 
// if (bit_test(tlacitka,1)) output_high(pin_A2); else output_low(pin_A2);
output_bit(PIN_A2,bit_test(tlacitka,1));
}
}
}
 
 
/schemata/prenos/letadlo/SW/prijimac/main.HEX
0,0 → 1,90
:1000000000308A00C92900000A108A100A118207EC
:1000100028340C34013406340A108A100A1182077D
:10002000413468346F346A3400341C308400000872
:100030000319292801308D008C018C0B1D288D0B94
:100040001C284A308C008C0B232800000000800BF9
:100050001A2800340608C339A300220D8C008C0D29
:10006000FC308C050C083C392304860006148316EA
:100070000610000083120610831606108312003447
:10008000A008031D4528861046288614831686106E
:100090008312A10E2108A2002A20A10E2108A2008D
:1000A0002A200D308C008C0B5328003414309C0017
:1000B0001520C3308316860583128610831686109A
:1000C0008312061083160610831299011908023C48
:1000D000031C722802309C0015200330A2002A2045
:1000E000990A66280D308C008C0B74280230A2000F
:1000F0002A200D308C008C0B7B2899011908023CBA
:10010000031C8E28190804209A00A0011A08A100D7
:10011000402002309C001520990A7E28CD2901300C
:100120001C029E001D08023C031D982840309E07BB
:100130001E0880389F00A0011F08A1004020003445
:100140001B088C000C300C020319B3280A300C0277
:100150000319BB280D300C020319C12808300C020A
:100160000319C628CB28A0010130A100402002308D
:100170009C001520D72801309C0002309D008F2064
:10018000D72801309C009D008F20D728A001103077
:10019000A1004020D7281B081F3C031CD128073092
:1001A0009B050130A0001B08A1004020D728003487
:1001B0001E088400800104309F009F080319EE2868
:1001C000831685158312851DE72804309F0029308A
:1001D0008C008C0BE92800009F03DD288316851511
:1001E0008312851DEE28DD308C008C0BF528000075
:1001F00000001D08840083168515003083128519C0
:10020000013080009F011F08033C031C2329A630F6
:100210008C008C0B092900001E0884000310000CC0
:100220008C008000831685158312851D1C291E08ED
:10023000840008300007800006308C008C0B1E29DB
:1002400000009F0A032900308D0000341B309D0000
:100250001A089E00D8208D080319312901308D001D
:1002600081299B08031D26291A08840000080F3CD9
:1002700003193D2902308D0081291B309D0019088A
:100280009E00D8208D080319482901308D0081294E
:100290009B08031D4E2903308D0081291B309D00D2
:1002A0001A089E00D8208D080319592901308D00A5
:1002B00081299B08031D5F2903308D0081291B3094
:1002C0009D001C309E00D8208D0803196A2901303A
:1002D0008D0081299B08031D702903308D00812921
:1002E0001908840000089D001A08840000081D07F2
:1002F0000F391C0203197F2903308D00812900303A
:100300008D00F5291C088D011B0203188A291B0882
:100310008C0096298C0108309D009B0D8C0D1C08CB
:100320000C0203188C008D0D9D0B8D2900340D08D7
:1003300019089B0064309C0082210C0899000D086C
:100340003030031DAA291A189A159A19B0291A1AB9
:100350002030AC299A111A128D070D089B00A0209D
:1003600019089B000A309C0082210C0899000D0896
:100370003030031DBF299A19C3291A1A20308D075E
:100380000D089B00A0203030990719089B00A02081
:10039000003484011F308305562805309C00152049
:1003A000990119080C20990A9B00A0200430190219
:1003B000031DD12903309A002E309B00A0209A0BF8
:1003C000DC290230990096309C001520990BE32916
:1003D0008E018F0191019201930194019501960183
:1003E0001730990018309A0026298D080319FA2928
:1003F000930AAA2A01301702FD3E03180C2A033E75
:10040000AC2A18088E00910A0C2A18088F00920A4C
:100410000C2A180890000C2A01309C009D008F20A7
:1004200058309B00A0200E08990011309A009721A7
:1004300020309B00A0201108990010309A009721CD
:100440001308990010309A00972114089900103071
:100450009A00972120309B00A02020309B00A020F4
:1004600001309C0002309D008F2059309B00A0205D
:100470000F08990011309A00972120309B00A0208E
:100480001208990010309A00972115089900103031
:100490009A0097211008990010309A009721203077
:1004A0009B00A02020309B00A02083160511831202
:1004B000051501309C0015200E08980018089803B7
:1004C000003A03196D2A15308C008C0B652A000048
:1004D0009808031D6C2A00305E2A831605118312CA
:1004E0000511831606108312061401309C00152096
:1004F0000F08980018089803003A0319892A153044
:100500008C008C0B812A00009808031D882A00307B
:100510007A2A83160610831206100E081E3C8D00E0
:100520000F080D02980018089803003A0319A22A30
:1005300015308C008C0B9A2A00009808031DA12A04
:100540000030932A9018A62A0511A72A05158316AC
:1005500005118312F02963000A108A140A11820718
:06056000012A052A092A08
:02400E00F13F80
:00000001FF
;PIC16F84
/schemata/prenos/letadlo/SW/prijimac/main.LST
0,0 → 1,1166
CCS PCW C Compiler, Version 3.110, 15448
 
Filename: d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\main.LST
 
ROM used: 691 (67%)
Largest free fragment is 333
RAM used: 13 (19%) at main() level
25 (37%) worst case
Stack: 5 locations
 
*
0000: MOVLW 00
0001: MOVWF 0A
0002: GOTO 1C9
0003: NOP
.................... // Prijimac
....................
.................... #include "main.h"
.................... #include <16F84.h>
.................... //////// Standard Header file for the PIC16F84 device ////////////////
.................... #device PIC16F84
.................... #list
....................
.................... #use delay(clock=4000000)
*
0015: MOVLW 1C
0016: MOVWF 04
0017: MOVF 00,W
0018: BTFSC 03.2
0019: GOTO 029
001A: MOVLW 01
001B: MOVWF 0D
001C: CLRF 0C
001D: DECFSZ 0C,F
001E: GOTO 01D
001F: DECFSZ 0D,F
0020: GOTO 01C
0021: MOVLW 4A
0022: MOVWF 0C
0023: DECFSZ 0C,F
0024: GOTO 023
0025: NOP
0026: NOP
0027: DECFSZ 00,F
0028: GOTO 01A
0029: RETLW 00
.................... #fuses XT,NOWDT,PUT
....................
....................
.................... #include "..\common.h"
.................... #DEFINE OSA_X 1 // adresy os
.................... #DEFINE OSA_Y 2
.................... #DEFINE TLs 3
.................... #DEFINE IMPULS 250 // sirka impulsu
.................... #DEFINE SYNC_NIBBLE 0b1111 // magiske cislo sync niblu
....................
....................
.................... #DEFINE LCD_RS PIN_B1 // rizeni registru LCD displeje
.................... #DEFINE LCD_E PIN_B0 // enable LCD displeje
.................... #DEFINE LCD_DATA_LSB PIN_B2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
.................... #INCLUDE "MYLCD.C"
.................... // LCD modul pro ovladani dvouradkoveho LCD modulu se standardnim Hitachi radicem
.................... // (c)miho 2002
.................... //
.................... // Historie:
.................... //
.................... // 0.0 Uvodni verze se snadnou definici portu LCD displeje
.................... //
.................... //
.................... // Funkce:
.................... //
.................... // lcd_init() inicializuje LCD displej a porty, nutno volat jako prvni
.................... //
.................... // lcd_putc(c) zapis snaku do lcd displeje, zpracovava nasledujici ridici znaky
.................... // \f = \x0C - nova stranka - smazani displeje
.................... // \n = \x0A - odradkovani (prechod na druhou radku)
.................... // \b = \x08 - backspace - posunuti kurzoru o 1 pozici zpet
.................... // \r = \x0D - goto home to position 1,1
.................... // \0 .. \7 - definovatelne znaky v pozicich 0 az 7 v CGRAM
.................... // \20 .. \27 - alternativne zapsane znaky (oktalove) v pozicich 0 az 7 CGRAM
.................... // Pozor na to, ze funkce printf konci tisk pokud narazi na \0 (konec retezce)
.................... //
.................... // lcd_gotoxy(x,y) presune kurzor na uvedenou adresu
.................... // nekontroluje parametry
.................... //
.................... // lcd_cursor_on zapne kurzor
.................... // lcd_cursor_off vypne kurzor
.................... //
.................... // lcd_define_char(Index, Def) Makro, ktere definuje znaky od pozice Index obsahem definicniho
.................... // retezce Def. Kazdych 8 znaku retezce Def definuje dalsi znak v CGRAM.
.................... // Kapacita CGRAM je celkem 8 znaku s indexem 0 az 7.
.................... // Na konci se provede lcd_gotoxy(1,1).
.................... // Na konci teto knihovny je priklad pouziti definovanych znaku
.................... //
.................... // Definice portu:
.................... //
.................... // #DEFINE LCD_RS PIN_B2 // rizeni registru LCD displeje
.................... // #DEFINE LCD_E PIN_B1 // enable LCD displeje
.................... // #DEFINE LCD_DATA_LSB PIN_C2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
....................
....................
....................
....................
.................... // Privatni sekce, cist jen v pripade, ze neco nefunguje
....................
....................
....................
....................
.................... // Generovane defince portu pro ucely teto knihovny aby kod generoval spravne IO operace a soucasne
.................... // bylo mozne jednoduse deklarovat pripojene piny LCD displeje pri pouziti teto knihovny. Problem spociva
.................... // v tom, ze se musi spravne ridit smery portu a soucasne datovy port zabira jen 4 bity ze zadaneho portu
.................... //
.................... #DEFINE LCD_SHIFT (LCD_DATA_LSB&7) // pocet bitu posuvu dataoveho kanalu v datovem portu
.................... #DEFINE LCD_PORT (LCD_DATA_LSB>>3) // adresa LCD datoveho portu
.................... #DEFINE LCD_TRIS (LCD_PORT+0x80) // adresa prislusneho TRIS registru
.................... #DEFINE LCD_MASK (0xF<<LCD_SHIFT) // maska platnych bitu
.................... //
.................... #IF LCD_SHIFT>4 // kontrola mezi
.................... #ERROR LCD data port LSB bit not in range 0..4
.................... #ENDIF
....................
....................
.................... // Definice konstant pro LCD display
.................... //
.................... #define LCD_CURSOR_ON_ 0x0E // kurzor jako blikajici radka pod znakem
.................... #define LCD_CURSOR_OFF_ 0x0C // zadny kurzor
.................... #define LCD_LINE_2 0x40 // adresa 1. znaku 2. radky
....................
....................
.................... // Definice rezimu LCD displeje
.................... //
.................... BYTE const LCD_INIT_STRING[4] =
.................... {
.................... 0x28, // intrfejs 4 bity, 2 radky, font 5x7
.................... LCD_CURSOR_OFF_, // display on, kurzor off,
.................... 0x01, // clear displeje
.................... 0x06 // inkrement pozice kurzoru (posun kurzoru doprava)
.................... };
*
0004: BCF 0A.0
0005: BCF 0A.1
0006: BCF 0A.2
0007: ADDWF 02,F
0008: RETLW 28
0009: RETLW 0C
000A: RETLW 01
000B: RETLW 06
....................
....................
.................... // Odesle nibble do displeje (posle data a klikne signalem e)
.................... //
.................... void lcd_send_nibble( BYTE n )
.................... {
.................... *LCD_PORT = (*LCD_PORT & ~LCD_MASK) | ((n << LCD_SHIFT) & LCD_MASK); // nastav datove bity portu a ostatni zachovej
*
002A: MOVF 06,W
002B: ANDLW C3
002C: MOVWF 23
002D: RLF 22,W
002E: MOVWF 0C
002F: RLF 0C,F
0030: MOVLW FC
0031: ANDWF 0C,F
0032: MOVF 0C,W
0033: ANDLW 3C
0034: IORWF 23,W
0035: MOVWF 06
.................... output_bit(LCD_E,1); // vzestupna hrana
0036: BSF 06.0
0037: BSF 03.5
0038: BCF 06.0
.................... delay_us(1); // pockej alespon 450ns od e nebo alespon 195ns od dat
0039: NOP
.................... output_bit(LCD_E,0); // sestupna hrana (minimalni perioda e je 1us)
003A: BCF 03.5
003B: BCF 06.0
003C: BSF 03.5
003D: BCF 06.0
003E: BCF 03.5
003F: RETLW 00
.................... }
....................
....................
.................... // Odesle bajt do registru LCD
.................... //
.................... // Pokud je Adr=0 .. instrukcni registr
.................... // Pokud je Adr=1 .. datovy registr
.................... //
.................... void lcd_send_byte( BOOLEAN Adr, BYTE n )
.................... {
.................... output_bit(LCD_RS,Adr); // vyber registr
0040: MOVF 20,F
0041: BTFSS 03.2
0042: GOTO 045
0043: BCF 06.1
0044: GOTO 046
0045: BSF 06.1
0046: BSF 03.5
0047: BCF 06.1
.................... swap(n);
0048: BCF 03.5
0049: SWAPF 21,F
.................... lcd_send_nibble(n); // posli horni pulku bajtu
004A: MOVF 21,W
004B: MOVWF 22
004C: CALL 02A
.................... swap(n);
004D: SWAPF 21,F
.................... lcd_send_nibble(n); // posli spodni pulku bajtu
004E: MOVF 21,W
004F: MOVWF 22
0050: CALL 02A
.................... delay_us(40); // minimalni doba na provedeni prikazu
0051: MOVLW 0D
0052: MOVWF 0C
0053: DECFSZ 0C,F
0054: GOTO 053
0055: RETLW 00
.................... }
....................
....................
.................... // Provede inicializaci LCD displeje, smaze obsah a nastavi mod displeje
.................... //
.................... // Tato procedura se musi volat pred pouzitim ostatnich lcd_ procedur
.................... //
.................... void lcd_init()
.................... {
....................
.................... int i; // pocitadlo cyklu
....................
.................... delay_ms(20); // spozdeni pro provedeni startu displeje po zapnuti napajeni
0056: MOVLW 14
0057: MOVWF 1C
0058: CALL 015
....................
.................... *LCD_TRIS = *LCD_TRIS & ~LCD_MASK; // nuluj odpovidajici bity tris registru datoveho portu LCD
0059: MOVLW C3
005A: BSF 03.5
005B: ANDWF 06,F
....................
.................... output_bit(LCD_RS,0); // nastav jako vystup a nastav klidovy stav
005C: BCF 03.5
005D: BCF 06.1
005E: BSF 03.5
005F: BCF 06.1
.................... output_bit(LCD_E,0); // nastav jako vystup a nastav klidovy stav
0060: BCF 03.5
0061: BCF 06.0
0062: BSF 03.5
0063: BCF 06.0
....................
.................... for (i=0; i<3; i++) // nastav lcd do rezimu 8 bitu sbernice
0064: BCF 03.5
0065: CLRF 19
0066: MOVF 19,W
0067: SUBLW 02
0068: BTFSS 03.0
0069: GOTO 072
.................... {
.................... delay_ms(2); // muze byt rozdelany prenos dat (2x 4 bity) nebo pomaly povel
006A: MOVLW 02
006B: MOVWF 1C
006C: CALL 015
.................... lcd_send_nibble(3); // rezim 8 bitu
006D: MOVLW 03
006E: MOVWF 22
006F: CALL 02A
.................... }
0070: INCF 19,F
0071: GOTO 066
....................
.................... delay_us(40); // cas na zpracovani
0072: MOVLW 0D
0073: MOVWF 0C
0074: DECFSZ 0C,F
0075: GOTO 074
.................... lcd_send_nibble(2); // nastav rezim 4 bitu (plati od nasledujiciho prenosu)
0076: MOVLW 02
0077: MOVWF 22
0078: CALL 02A
.................... delay_us(40); // cas na zpracovani
0079: MOVLW 0D
007A: MOVWF 0C
007B: DECFSZ 0C,F
007C: GOTO 07B
....................
.................... for (i=0;i<3;i++) // proved inicializaci (nastaveni modu, smazani apod)
007D: CLRF 19
007E: MOVF 19,W
007F: SUBLW 02
0080: BTFSS 03.0
0081: GOTO 08E
.................... {
.................... lcd_send_byte(0,LCD_INIT_STRING[i]);
0082: MOVF 19,W
0083: CALL 004
0084: MOVWF 1A
0085: CLRF 20
0086: MOVF 1A,W
0087: MOVWF 21
0088: CALL 040
.................... delay_ms(2);
0089: MOVLW 02
008A: MOVWF 1C
008B: CALL 015
.................... }
008C: INCF 19,F
008D: GOTO 07E
008E: GOTO 1CD (RETURN)
.................... }
....................
....................
.................... // Proved presun kurzoru
.................... //
.................... // Pozice 1.1 je domu
.................... //
.................... void lcd_gotoxy( BYTE x, BYTE y)
.................... {
....................
.................... BYTE Adr;
....................
.................... Adr=x-1;
008F: MOVLW 01
0090: SUBWF 1C,W
0091: MOVWF 1E
.................... if(y==2)
0092: MOVF 1D,W
0093: SUBLW 02
0094: BTFSS 03.2
0095: GOTO 098
.................... Adr+=LCD_LINE_2;
0096: MOVLW 40
0097: ADDWF 1E,F
....................
.................... lcd_send_byte(0,0x80|Adr);
0098: MOVF 1E,W
0099: IORLW 80
009A: MOVWF 1F
009B: CLRF 20
009C: MOVF 1F,W
009D: MOVWF 21
009E: CALL 040
009F: RETLW 00
.................... }
....................
....................
.................... // Zapis znaku na displej, zpracovani ridicich znaku
.................... //
.................... void lcd_putc( char c)
.................... {
....................
.................... switch (c)
00A0: MOVF 1B,W
00A1: MOVWF 0C
00A2: MOVLW 0C
00A3: SUBWF 0C,W
00A4: BTFSC 03.2
00A5: GOTO 0B3
00A6: MOVLW 0A
00A7: SUBWF 0C,W
00A8: BTFSC 03.2
00A9: GOTO 0BB
00AA: MOVLW 0D
00AB: SUBWF 0C,W
00AC: BTFSC 03.2
00AD: GOTO 0C1
00AE: MOVLW 08
00AF: SUBWF 0C,W
00B0: BTFSC 03.2
00B1: GOTO 0C6
00B2: GOTO 0CB
.................... {
.................... case '\f' : lcd_send_byte(0,1); // smaz displej
00B3: CLRF 20
00B4: MOVLW 01
00B5: MOVWF 21
00B6: CALL 040
.................... delay_ms(2);
00B7: MOVLW 02
00B8: MOVWF 1C
00B9: CALL 015
.................... break;
00BA: GOTO 0D7
.................... case '\n' : lcd_gotoxy(1,2); break; // presun se na 1. znak 2. radky
00BB: MOVLW 01
00BC: MOVWF 1C
00BD: MOVLW 02
00BE: MOVWF 1D
00BF: CALL 08F
00C0: GOTO 0D7
.................... case '\r' : lcd_gotoxy(1,1); break; // presun home
00C1: MOVLW 01
00C2: MOVWF 1C
00C3: MOVWF 1D
00C4: CALL 08F
00C5: GOTO 0D7
.................... case '\b' : lcd_send_byte(0,0x10); break; // posun kurzor o 1 zpet
00C6: CLRF 20
00C7: MOVLW 10
00C8: MOVWF 21
00C9: CALL 040
00CA: GOTO 0D7
.................... default : if (c<0x20) c&=0x7; // preklopeni definovatelnych znaku na rozsah 0 az 0x1F
00CB: MOVF 1B,W
00CC: SUBLW 1F
00CD: BTFSS 03.0
00CE: GOTO 0D1
00CF: MOVLW 07
00D0: ANDWF 1B,F
.................... lcd_send_byte(1,c); break; // zapis znak
00D1: MOVLW 01
00D2: MOVWF 20
00D3: MOVF 1B,W
00D4: MOVWF 21
00D5: CALL 040
00D6: GOTO 0D7
.................... }
00D7: RETLW 00
.................... }
....................
....................
.................... // Zapni kurzor
.................... //
.................... void lcd_cursor_on()
.................... {
.................... lcd_send_byte(0,LCD_CURSOR_ON_);
.................... }
....................
....................
.................... // Vypni kurzor
.................... //
.................... void lcd_cursor_off()
.................... {
.................... lcd_send_byte(0,LCD_CURSOR_OFF_);
.................... }
....................
....................
.................... // Definice vlastnich fontu
.................... //
.................... // Vlastnich definic muze byt jen 8 do pozic 0 az 7 pameti CGRAM radice lcd displeje
.................... // Pro snadne definovani jsou pripraveny nasledujici definice a na konci souboru je uveden
.................... // priklad pouziti definovanych znaku.
....................
....................
.................... // Pomocna procedura pro posilani ridicich dat do radice displeje
.................... //
.................... void lcd_putc2(int Data)
.................... {
.................... lcd_send_byte(1,Data);
.................... }
....................
....................
.................... // Pomocne definice pro programovani obsahu CGRAM
.................... //
.................... #DEFINE lcd_define_start(Code) lcd_send_byte(0,0x40+(Code<<3)); delay_ms(2)
.................... #DEFINE lcd_define_def(String) printf(lcd_putc2,String);
.................... #DEFINE lcd_define_end() lcd_send_byte(0,3); delay_ms(2)
....................
....................
.................... // Vlastni vykonne makro pro definovani fontu do pozice Index CGRAM s definicnim retezcem Def
.................... //
.................... #DEFINE lcd_define_char(Index, Def) lcd_define_start(Index); lcd_define_def(Def); lcd_define_end();
....................
....................
.................... // Pripravene definice fontu vybranych znaku
.................... // V tabulce nesmi byt 00 (konec retezce v printf()), misto toho davame 80
.................... //
.................... #DEFINE LCD_CHAR_BAT100 "\x0E\x1F\x1F\x1F\x1F\x1F\x1F\x1F" /* symbol plne baterie */
.................... #DEFINE LCD_CHAR_BAT50 "\x0E\x1F\x11\x11\x13\x17\x1F\x1F" /* symbol polovicni baterie */
.................... #DEFINE LCD_CHAR_BAT0 "\x0E\x1F\x11\x11\x11\x11\x11\x1F" /* symbol vybite baterie */
.................... #DEFINE LCD_CHAR_LUA "\x04\x0E\x11\x11\x1F\x11\x11\x80" /* A s carkou */
.................... #DEFINE LCD_CHAR_LLA "\x01\x02\x0E\x01\x1F\x11\x0F\x80" /* a s carkou */
.................... #DEFINE LCD_CHAR_HUC "\x0A\x0E\x11\x10\x10\x11\x0E\x80" /* C s hackem */
.................... #DEFINE LCD_CHAR_HLC "\x0A\x04\x0E\x10\x10\x11\x0E\x80" /* c s hackem */
.................... #DEFINE LCD_CHAR_HUD "\x0A\x1C\x12\x11\x11\x12\x1C\x80" /* D s hackem */
.................... #DEFINE LCD_CHAR_HLD "\x05\x03\x0D\x13\x11\x11\x0F\x80" /* d s hackem */
.................... #DEFINE LCD_CHAR_LUE "\x04\x1F\x10\x10\x1E\x10\x1F\x80" /* E s carkou */
.................... #DEFINE LCD_CHAR_LLE "\x01\x02\x0E\x11\x1F\x10\x0E\x80" /* e s carkou */
.................... #DEFINE LCD_CHAR_HUE "\x0A\x1F\x10\x1E\x10\x10\x1F\x80" /* E s hackem */
.................... #DEFINE LCD_CHAR_HLE "\x0A\x04\x0E\x11\x1F\x10\x0E\x80" /* e s hackem */
.................... #DEFINE LCD_CHAR_LUI "\x04\x0E\x04\x04\x04\x04\x0E\x80" /* I s carkou */
.................... #DEFINE LCD_CHAR_LLI "\x02\x04\x80\x0C\x04\x04\x0E\x80" /* i s carkou */
.................... #DEFINE LCD_CHAR_HUN "\x0A\x15\x11\x19\x15\x13\x11\x80" /* N s hackem */
.................... #DEFINE LCD_CHAR_HLN "\x0A\x04\x16\x19\x11\x11\x11\x80" /* n s hackem */
.................... #DEFINE LCD_CHAR_LUO "\x04\x0E\x11\x11\x11\x11\x0E\x80" /* O s carkou */
.................... #DEFINE LCD_CHAR_LLO "\x02\x04\x0E\x11\x11\x11\x0E\x80" /* o s carkou */
.................... #DEFINE LCD_CHAR_HUR "\x0A\x1E\x11\x1E\x14\x12\x11\x80" /* R s hackem */
.................... #DEFINE LCD_CHAR_HLR "\x0A\x04\x16\x19\x10\x10\x10\x80" /* r s hackem */
.................... #DEFINE LCD_CHAR_HUS "\x0A\x0F\x10\x0E\x01\x01\x1E\x80" /* S s hackem */
.................... #DEFINE LCD_CHAR_HLS "\x0A\x04\x0E\x10\x0E\x01\x1E\x80" /* s s hackem */
.................... #DEFINE LCD_CHAR_HUT "\x0A\x1F\x04\x04\x04\x04\x04\x80" /* T s hackem */
.................... #DEFINE LCD_CHAR_HLT "\x0A\x0C\x1C\x08\x08\x09\x06\x80" /* t s hackem */
.................... #DEFINE LCD_CHAR_LUU "\x02\x15\x11\x11\x11\x11\x0E\x80" /* U s carkou */
.................... #DEFINE LCD_CHAR_LLU "\x02\x04\x11\x11\x11\x13\x0D\x80" /* u s carkou */
.................... #DEFINE LCD_CHAR_CUU "\x06\x17\x11\x11\x11\x11\x0E\x80" /* U s krouzkem */
.................... #DEFINE LCD_CHAR_CLU "\x06\x06\x11\x11\x11\x11\x0E\x80" /* u s krouzkem */
.................... #DEFINE LCD_CHAR_LUY "\x02\x15\x11\x0A\x04\x04\x04\x80" /* Y s carkou */
.................... #DEFINE LCD_CHAR_LLY "\x02\x04\x11\x11\x0F\x01\x0E\x80" /* y s carkou */
.................... #DEFINE LCD_CHAR_HUZ "\x0A\x1F\x01\x02\x04\x08\x1F\x80" /* Z s hackem */
.................... #DEFINE LCD_CHAR_HLZ "\x0A\x04\x1F\x02\x04\x08\x1F\x80" /* z s hackem */
....................
....................
.................... // Priklad pouziti definovanych znaku
.................... //
.................... //
.................... //void lcd_sample()
.................... //{
.................... // lcd_define_char(0,LCD_CHAR_BAT50); // Priklad definice znaku baterie do pozice 0
.................... // lcd_define_char(2,LCD_CHAR_HLE LCD_CHAR_LUI); // Priklad definice znaku e s hackem a I s carkou od pozice 2
.................... // // vsimnete si, ze neni carka mezi retezci s definici (oba retezce definuji
.................... // // jediny definicni retezec)
.................... // printf(lcd_putc,"\fZnaky:\20\22\23"); // priklad vypisu znaku z pozice 0, 2 a 3
.................... // delay_ms(1000);
.................... // lcd_define_char(0,LCD_CHAR_BAT0); // Predefinovani tvaru znaku v pozici 0
.................... // delay_ms(1000);
.................... //}
....................
....................
.................... #DEFINE PRIJIMAC PIN_A3 // pin na ktery je pripojen prijimac
.................... #DEFINE SERVO_X PIN_A2 // pin na ktery je pripojeno servo
.................... #DEFINE SERVO_Y PIN_B0
.................... #INCLUDE "prijimac.c"
....................
.................... //#DEFINE DEBUG PIN_A4 // ladici pomocne synchronizacni impulzy
....................
.................... //#DEFINE PRIJIMAC PIN_A3 // pin na ktery je pripojen prijimac
....................
.................... // Prijme datovy nibble vcetne zasynchronizovani
.................... // Chybi dodelat timeout
.................... int8 prijmi_nibble(int8* datovy, int8* data)
.................... {
.................... int8 i;
....................
.................... #IFDEF DEBUG
.................... int1 tmp;
.................... #ENDIF
....................
.................... *data=0;
00D8: MOVF 1E,W
00D9: MOVWF 04
00DA: CLRF 00
....................
.................... // Cekam na dlouhou nulu
.................... for (i=4; i>0; i--)
00DB: MOVLW 04
00DC: MOVWF 1F
00DD: MOVF 1F,F
00DE: BTFSC 03.2
00DF: GOTO 0EE
.................... {
.................... if (input(PRIJIMAC)) i=4;
00E0: BSF 03.5
00E1: BSF 05.3
00E2: BCF 03.5
00E3: BTFSS 05.3
00E4: GOTO 0E7
00E5: MOVLW 04
00E6: MOVWF 1F
.................... delay_us(IMPULS/2);
00E7: MOVLW 29
00E8: MOVWF 0C
00E9: DECFSZ 0C,F
00EA: GOTO 0E9
00EB: NOP
.................... }
00EC: DECF 1F,F
00ED: GOTO 0DD
....................
.................... // Cekam na jednicku (start ramce)
.................... for (; !input(PRIJIMAC); )
00EE: BSF 03.5
00EF: BSF 05.3
00F0: BCF 03.5
00F1: BTFSS 05.3
.................... {
.................... }
00F2: GOTO 0EE
....................
.................... // Ctu typ nibblu
.................... delay_us(2*IMPULS+2*IMPULS/3);
00F3: MOVLW DD
00F4: MOVWF 0C
00F5: DECFSZ 0C,F
00F6: GOTO 0F5
00F7: NOP
00F8: NOP
.................... *datovy=input(PRIJIMAC);
00F9: MOVF 1D,W
00FA: MOVWF 04
00FB: BSF 03.5
00FC: BSF 05.3
00FD: MOVLW 00
00FE: BCF 03.5
00FF: BTFSC 05.3
0100: MOVLW 01
0101: MOVWF 00
....................
.................... // Prenasim bity
.................... for (i=0; i<4; i++)
0102: CLRF 1F
0103: MOVF 1F,W
0104: SUBLW 03
0105: BTFSS 03.0
0106: GOTO 123
.................... {
.................... delay_us(2*IMPULS);
0107: MOVLW A6
0108: MOVWF 0C
0109: DECFSZ 0C,F
010A: GOTO 109
010B: NOP
.................... *data >>= 1;
010C: MOVF 1E,W
010D: MOVWF 04
010E: BCF 03.0
010F: RRF 00,W
0110: MOVWF 0C
0111: MOVWF 00
.................... if (input(PRIJIMAC)) *data +=0b1000;
0112: BSF 03.5
0113: BSF 05.3
0114: BCF 03.5
0115: BTFSS 05.3
0116: GOTO 11C
0117: MOVF 1E,W
0118: MOVWF 04
0119: MOVLW 08
011A: ADDWF 00,W
011B: MOVWF 00
....................
.................... #IFDEF DEBUG
.................... output_bit(DEBUG,tmp);
.................... tmp=!tmp;
.................... #ELSE
.................... delay_us(20);
011C: MOVLW 06
011D: MOVWF 0C
011E: DECFSZ 0C,F
011F: GOTO 11E
0120: NOP
.................... #ENDIF
.................... }
0121: INCF 1F,F
0122: GOTO 103
....................
.................... return FALSE;
0123: MOVLW 00
0124: MOVWF 0D
0125: RETLW 00
.................... }
....................
....................
.................... // Prijme datovy ramec
.................... // Pokud nastane chyba vraci kod chyby
.................... int8 prijmi_ramec(int8* kanal, int8* data)
.................... {
.................... int8 datovy;
.................... int8 suma;
....................
.................... // Cekej na synchronizacni nibble
.................... do
.................... {
.................... if (prijmi_nibble(&datovy, data)) return 1; // chyba timout
0126: MOVLW 1B
0127: MOVWF 1D
0128: MOVF 1A,W
0129: MOVWF 1E
012A: CALL 0D8
012B: MOVF 0D,F
012C: BTFSC 03.2
012D: GOTO 131
012E: MOVLW 01
012F: MOVWF 0D
0130: GOTO 181
.................... }
.................... while(datovy);
0131: MOVF 1B,F
0132: BTFSS 03.2
0133: GOTO 126
....................
.................... // Zkontroluj magickou hodnotu
.................... if (*data != SYNC_NIBBLE) return 2; // chyba magickeho kodu ramce
0134: MOVF 1A,W
0135: MOVWF 04
0136: MOVF 00,W
0137: SUBLW 0F
0138: BTFSC 03.2
0139: GOTO 13D
013A: MOVLW 02
013B: MOVWF 0D
013C: GOTO 181
....................
.................... // Prijmi cislo kanalu
.................... if (prijmi_nibble(&datovy, kanal)) return 1; // chyba timeout
013D: MOVLW 1B
013E: MOVWF 1D
013F: MOVF 19,W
0140: MOVWF 1E
0141: CALL 0D8
0142: MOVF 0D,F
0143: BTFSC 03.2
0144: GOTO 148
0145: MOVLW 01
0146: MOVWF 0D
0147: GOTO 181
.................... if (!datovy) return 3; // chyba typu nibblu
0148: MOVF 1B,F
0149: BTFSS 03.2
014A: GOTO 14E
014B: MOVLW 03
014C: MOVWF 0D
014D: GOTO 181
....................
.................... // Prijmi data
.................... if (prijmi_nibble(&datovy, data)) return 1; // chyba timeout
014E: MOVLW 1B
014F: MOVWF 1D
0150: MOVF 1A,W
0151: MOVWF 1E
0152: CALL 0D8
0153: MOVF 0D,F
0154: BTFSC 03.2
0155: GOTO 159
0156: MOVLW 01
0157: MOVWF 0D
0158: GOTO 181
.................... if (!datovy) return 3; // chyba typu nibblu
0159: MOVF 1B,F
015A: BTFSS 03.2
015B: GOTO 15F
015C: MOVLW 03
015D: MOVWF 0D
015E: GOTO 181
....................
.................... // Prijmi zabezpeceni
.................... if (prijmi_nibble(&datovy, &suma)) return 1; // chyba timeout
015F: MOVLW 1B
0160: MOVWF 1D
0161: MOVLW 1C
0162: MOVWF 1E
0163: CALL 0D8
0164: MOVF 0D,F
0165: BTFSC 03.2
0166: GOTO 16A
0167: MOVLW 01
0168: MOVWF 0D
0169: GOTO 181
.................... if (!datovy) return 3; // chyba typu nibblu
016A: MOVF 1B,F
016B: BTFSS 03.2
016C: GOTO 170
016D: MOVLW 03
016E: MOVWF 0D
016F: GOTO 181
....................
.................... // Zkontroluj kontrolni soucet
.................... if (((*kanal+*data) & 0b1111) != suma) return 3; // chyba kontrolniho souctu
0170: MOVF 19,W
0171: MOVWF 04
0172: MOVF 00,W
0173: MOVWF 1D
0174: MOVF 1A,W
0175: MOVWF 04
0176: MOVF 00,W
0177: ADDWF 1D,W
0178: ANDLW 0F
0179: SUBWF 1C,W
017A: BTFSC 03.2
017B: GOTO 17F
017C: MOVLW 03
017D: MOVWF 0D
017E: GOTO 181
....................
.................... return 0;
017F: MOVLW 00
0180: MOVWF 0D
0181: GOTO 1F5 (RETURN)
.................... }
....................
....................
....................
....................
....................
.................... int8 x,y,tlacitka;
.................... int8 xc,yc; // pocitadla aktualizace x a y
.................... int e1,e2,e3,e4; // pocitadla chyb - ladici
....................
.................... void main()
.................... {
*
01C9: CLRF 04
01CA: MOVLW 1F
01CB: ANDWF 03,F
.................... lcd_init(); // zinicializuj LCD display
01CC: GOTO 056
.................... delay_ms(5);
01CD: MOVLW 05
01CE: MOVWF 1C
01CF: CALL 015
.................... printf(lcd_putc,"Ahoj...");
*
000C: BCF 0A.0
000D: BCF 0A.1
000E: BCF 0A.2
000F: ADDWF 02,F
0010: RETLW 41
0011: RETLW 68
0012: RETLW 6F
0013: RETLW 6A
0014: RETLW 00
*
01D0: CLRF 19
01D1: MOVF 19,W
01D2: CALL 00C
01D3: INCF 19,F
01D4: MOVWF 1B
01D5: CALL 0A0
01D6: MOVLW 04
01D7: SUBWF 19,W
01D8: BTFSS 03.2
01D9: GOTO 1D1
01DA: MOVLW 03
01DB: MOVWF 1A
01DC: MOVLW 2E
01DD: MOVWF 1B
01DE: CALL 0A0
01DF: DECFSZ 1A,F
01E0: GOTO 1DC
.................... delay_ms(300);
01E1: MOVLW 02
01E2: MOVWF 19
01E3: MOVLW 96
01E4: MOVWF 1C
01E5: CALL 015
01E6: DECFSZ 19,F
01E7: GOTO 1E3
....................
.................... x = 0;
01E8: CLRF 0E
.................... y = 0;
01E9: CLRF 0F
.................... xc = 0;
01EA: CLRF 11
.................... yc = 0;
01EB: CLRF 12
.................... e1 = 0;
01EC: CLRF 13
.................... e2 = 0;
01ED: CLRF 14
.................... e3 = 0;
01EE: CLRF 15
.................... e4 = 0;
01EF: CLRF 16
....................
.................... while (true)
.................... {
.................... int8 kanal, data;
....................
.................... if (prijmi_ramec(&kanal,&data))
01F0: MOVLW 17
01F1: MOVWF 19
01F2: MOVLW 18
01F3: MOVWF 1A
01F4: GOTO 126
01F5: MOVF 0D,F
01F6: BTFSC 03.2
01F7: GOTO 1FA
.................... e1++;
01F8: INCF 13,F
.................... else
01F9: GOTO 2AA
.................... {
.................... switch (kanal) // rozeskoc se podle adresy osy
01FA: MOVLW 01
01FB: SUBWF 17,W
01FC: ADDLW FD
01FD: BTFSC 03.0
01FE: GOTO 20C
01FF: ADDLW 03
0200: GOTO 2AC
.................... {
.................... case OSA_X:
.................... {
.................... x=data;
0201: MOVF 18,W
0202: MOVWF 0E
.................... xc++;
0203: INCF 11,F
.................... break;
0204: GOTO 20C
.................... };
.................... case OSA_Y:
.................... {
.................... y=data;
0205: MOVF 18,W
0206: MOVWF 0F
.................... yc++;
0207: INCF 12,F
.................... break;
0208: GOTO 20C
.................... };
.................... case TLs:
.................... {
.................... tlacitka=data;
0209: MOVF 18,W
020A: MOVWF 10
.................... break;
020B: GOTO 20C
.................... };
.................... };
*
02AC: BCF 0A.0
02AD: BSF 0A.1
02AE: BCF 0A.2
02AF: ADDWF 02,F
02B0: GOTO 201
02B1: GOTO 205
02B2: GOTO 209
....................
....................
.................... // ladici vypisy
....................
.................... lcd_gotoxy(1,1); // vytiskni X a Y
*
020C: MOVLW 01
020D: MOVWF 1C
020E: MOVWF 1D
020F: CALL 08F
.................... printf(lcd_putc,"X%2U %3U%3U%3U ", x, xc, e1, e2);
*
0197: MOVF 0D,W
0198: MOVF 19,W
0199: MOVWF 1B
019A: MOVLW 64
019B: MOVWF 1C
019C: CALL 182
019D: MOVF 0C,W
019E: MOVWF 19
019F: MOVF 0D,W
01A0: MOVLW 30
01A1: BTFSS 03.2
01A2: GOTO 1AA
01A3: BTFSC 1A.0
01A4: BSF 1A.3
01A5: BTFSC 1A.3
01A6: GOTO 1B0
01A7: BTFSC 1A.4
01A8: MOVLW 20
01A9: GOTO 1AC
01AA: BCF 1A.3
01AB: BCF 1A.4
01AC: ADDWF 0D,F
01AD: MOVF 0D,W
01AE: MOVWF 1B
01AF: CALL 0A0
01B0: MOVF 19,W
01B1: MOVWF 1B
01B2: MOVLW 0A
01B3: MOVWF 1C
01B4: CALL 182
01B5: MOVF 0C,W
01B6: MOVWF 19
01B7: MOVF 0D,W
01B8: MOVLW 30
01B9: BTFSS 03.2
01BA: GOTO 1BF
01BB: BTFSC 1A.3
01BC: GOTO 1C3
01BD: BTFSC 1A.4
01BE: MOVLW 20
01BF: ADDWF 0D,F
01C0: MOVF 0D,W
01C1: MOVWF 1B
01C2: CALL 0A0
01C3: MOVLW 30
01C4: ADDWF 19,F
01C5: MOVF 19,W
01C6: MOVWF 1B
01C7: CALL 0A0
01C8: RETLW 00
*
0210: MOVLW 58
0211: MOVWF 1B
0212: CALL 0A0
0213: MOVF 0E,W
0214: MOVWF 19
0215: MOVLW 11
0216: MOVWF 1A
0217: CALL 197
0218: MOVLW 20
0219: MOVWF 1B
021A: CALL 0A0
021B: MOVF 11,W
021C: MOVWF 19
021D: MOVLW 10
021E: MOVWF 1A
021F: CALL 197
0220: MOVF 13,W
0221: MOVWF 19
0222: MOVLW 10
0223: MOVWF 1A
0224: CALL 197
0225: MOVF 14,W
0226: MOVWF 19
0227: MOVLW 10
0228: MOVWF 1A
0229: CALL 197
022A: MOVLW 20
022B: MOVWF 1B
022C: CALL 0A0
022D: MOVLW 20
022E: MOVWF 1B
022F: CALL 0A0
.................... lcd_gotoxy(1,2);
0230: MOVLW 01
0231: MOVWF 1C
0232: MOVLW 02
0233: MOVWF 1D
0234: CALL 08F
.................... printf(lcd_putc,"Y%2U %3U%3U%3U ", y, yc, e3, tlacitka);
0235: MOVLW 59
0236: MOVWF 1B
0237: CALL 0A0
0238: MOVF 0F,W
0239: MOVWF 19
023A: MOVLW 11
023B: MOVWF 1A
023C: CALL 197
023D: MOVLW 20
023E: MOVWF 1B
023F: CALL 0A0
0240: MOVF 12,W
0241: MOVWF 19
0242: MOVLW 10
0243: MOVWF 1A
0244: CALL 197
0245: MOVF 15,W
0246: MOVWF 19
0247: MOVLW 10
0248: MOVWF 1A
0249: CALL 197
024A: MOVF 10,W
024B: MOVWF 19
024C: MOVLW 10
024D: MOVWF 1A
024E: CALL 197
024F: MOVLW 20
0250: MOVWF 1B
0251: CALL 0A0
0252: MOVLW 20
0253: MOVWF 1B
0254: CALL 0A0
....................
.................... // ovladani serv
.................... output_high(SERVO_X);
0255: BSF 03.5
0256: BCF 05.2
0257: BCF 03.5
0258: BSF 05.2
.................... delay_ms(1);
0259: MOVLW 01
025A: MOVWF 1C
025B: CALL 015
.................... for (data=x; data--; data>0)
025C: MOVF 0E,W
025D: MOVWF 18
025E: MOVF 18,W
025F: DECF 18,F
0260: XORLW 00
0261: BTFSC 03.2
0262: GOTO 26D
.................... delay_us(65);
0263: MOVLW 15
0264: MOVWF 0C
0265: DECFSZ 0C,F
0266: GOTO 265
0267: NOP
0268: MOVF 18,F
0269: BTFSS 03.2
026A: GOTO 26C
026B: MOVLW 00
026C: GOTO 25E
.................... output_low(SERVO_X);
026D: BSF 03.5
026E: BCF 05.2
026F: BCF 03.5
0270: BCF 05.2
....................
.................... output_high(SERVO_Y);
0271: BSF 03.5
0272: BCF 06.0
0273: BCF 03.5
0274: BSF 06.0
.................... delay_ms(1);
0275: MOVLW 01
0276: MOVWF 1C
0277: CALL 015
.................... for (data=y; data--; data>0)
0278: MOVF 0F,W
0279: MOVWF 18
027A: MOVF 18,W
027B: DECF 18,F
027C: XORLW 00
027D: BTFSC 03.2
027E: GOTO 289
.................... delay_us(65);
027F: MOVLW 15
0280: MOVWF 0C
0281: DECFSZ 0C,F
0282: GOTO 281
0283: NOP
0284: MOVF 18,F
0285: BTFSS 03.2
0286: GOTO 288
0287: MOVLW 00
0288: GOTO 27A
.................... output_low(SERVO_Y);
0289: BSF 03.5
028A: BCF 06.0
028B: BCF 03.5
028C: BCF 06.0
....................
.................... for (data=30-x-y; data--; data>0)
028D: MOVF 0E,W
028E: SUBLW 1E
028F: MOVWF 0D
0290: MOVF 0F,W
0291: SUBWF 0D,W
0292: MOVWF 18
0293: MOVF 18,W
0294: DECF 18,F
0295: XORLW 00
0296: BTFSC 03.2
0297: GOTO 2A2
.................... delay_us(65);
0298: MOVLW 15
0299: MOVWF 0C
029A: DECFSZ 0C,F
029B: GOTO 29A
029C: NOP
029D: MOVF 18,F
029E: BTFSS 03.2
029F: GOTO 2A1
02A0: MOVLW 00
02A1: GOTO 293
....................
.................... // Vystupy tlacitek
....................
.................... // if (bit_test(tlacitka,1)) output_high(pin_A2); else output_low(pin_A2);
.................... output_bit(PIN_A2,bit_test(tlacitka,1));
02A2: BTFSC 10.1
02A3: GOTO 2A6
02A4: BCF 05.2
02A5: GOTO 2A7
02A6: BSF 05.2
02A7: BSF 03.5
02A8: BCF 05.2
02A9: BCF 03.5
.................... }
.................... }
02AA: GOTO 1F0
.................... }
....................
02AB: SLEEP
....................
....................
/schemata/prenos/letadlo/SW/prijimac/main.PJT
0,0 → 1,32
[PROJECT]
Target=main.HEX
Development_Mode=
Processor=0x684A
ToolSuite=CCS
 
[Directories]
Include=C:\Program Files\PICC\Devices;C:\Program Files\PICC\Dri;
Library=
LinkerScript=
 
[Target Data]
FileList=main.c;
BuildTool=CCSC
OptionString=-p +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
 
/schemata/prenos/letadlo/SW/prijimac/main.SYM
0,0 → 1,72
00C @SCRATCH
00D @SCRATCH
00D _RETURN_
00E x
00F y
010 tlacitka
011 xc
012 yc
013 e1
014 e2
015 e3
016 e4
017 kanal
018 Data
019 lcd_init.i
019 prijmi_ramec.kanal
019 @PRINTF_U_149.P1
019 main.@SCRATCH
01A prijmi_ramec.Data
01A @PRINTF_U_149.P1
01A lcd_init.@SCRATCH
01A main.@SCRATCH
01B lcd_putc.c
01B prijmi_ramec.datovy
01B @DIV88.P1
01C delay_ms.P1
01C lcd_gotoxy.x
01C prijmi_ramec.suma
01C @DIV88.P1
01D lcd_gotoxy.y
01D prijmi_nibble.datovy
01D prijmi_ramec.@SCRATCH
01D @DIV88.@SCRATCH
01E lcd_gotoxy.Adr
01E prijmi_nibble.Data
01E prijmi_ramec.@SCRATCH
01F prijmi_nibble.i
01F lcd_gotoxy.@SCRATCH
01F prijmi_ramec.@SCRATCH
020 lcd_send_byte.Adr
020 prijmi_nibble.@SCRATCH
021 lcd_send_byte.n
021 prijmi_nibble.@SCRATCH
022 lcd_send_nibble.n
023 lcd_send_nibble.@SCRATCH
024 lcd_send_nibble.@SCRATCH
delay_us.P1
-002 LCD_INIT_STRING
lcd_putc2.Data
 
0015 delay_ms
0004 @const22
002A lcd_send_nibble
0040 lcd_send_byte
0056 lcd_init
008F lcd_gotoxy
00A0 lcd_putc
00D8 prijmi_nibble
0126 prijmi_ramec
01C9 main
000C @const10155
02AC @goto10178
0182 @DIV88
0197 @PRINTF_U_149
 
Project Files:
d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\main.c
d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\main.h
C:\Program Files\PICC\Devices\16F84.h
d:\@kaklik\programy\pic_c\prenos\letadlo\common.h
d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\MYLCD.C
d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\prijimac.c
/schemata/prenos/letadlo/SW/prijimac/main.c
0,0 → 1,99
// Prijimac
 
#include "main.h"
#include "..\common.h"
 
#DEFINE LCD_RS PIN_B1 // rizeni registru LCD displeje
#DEFINE LCD_E PIN_B0 // enable LCD displeje
#DEFINE LCD_DATA_LSB PIN_B2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
#INCLUDE "MYLCD.C"
 
#DEFINE PRIJIMAC PIN_A3 // pin na ktery je pripojen prijimac
#DEFINE SERVO_X PIN_A2 // pin na ktery je pripojeno servo
#DEFINE SERVO_Y PIN_B0
#INCLUDE "prijimac.c"
 
 
 
int8 x,y,tlacitka;
int8 xc,yc; // pocitadla aktualizace x a y
int e1,e2,e3,e4; // pocitadla chyb - ladici
 
void main()
{
lcd_init(); // zinicializuj LCD display
delay_ms(5);
printf(lcd_putc,"Ahoj...");
delay_ms(300);
 
x = 0;
y = 0;
xc = 0;
yc = 0;
e1 = 0;
e2 = 0;
e3 = 0;
e4 = 0;
 
while (true)
{
int8 kanal, data;
 
if (prijmi_ramec(&kanal,&data))
e1++;
else
{
switch (kanal) // rozeskoc se podle adresy osy
{
case OSA_X:
{
x=data;
xc++;
break;
};
case OSA_Y:
{
y=data;
yc++;
break;
};
case TLs:
{
tlacitka=data;
break;
};
};
 
 
// ladici vypisy
 
lcd_gotoxy(1,1); // vytiskni X a Y
printf(lcd_putc,"X%2U %3U%3U%3U ", x, xc, e1, e2);
lcd_gotoxy(1,2);
printf(lcd_putc,"Y%2U %3U%3U%3U ", y, yc, e3, tlacitka);
 
// ovladani serv
output_high(SERVO_X);
delay_ms(1);
for (data=x; data--; data>0)
delay_us(65);
output_low(SERVO_X);
 
output_high(SERVO_Y);
delay_ms(1);
for (data=y; data--; data>0)
delay_us(65);
output_low(SERVO_Y);
 
for (data=30-x-y; data--; data>0)
delay_us(65);
 
// Vystupy tlacitek
 
// if (bit_test(tlacitka,1)) output_high(pin_A2); else output_low(pin_A2);
output_bit(PIN_A2,bit_test(tlacitka,1));
}
}
}
 
 
/schemata/prenos/letadlo/SW/prijimac/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
/schemata/prenos/letadlo/SW/prijimac/main.err
0,0 → 1,0
No Errors
/schemata/prenos/letadlo/SW/prijimac/main.h
0,0 → 1,4
#include <16F84.h>
#use delay(clock=4000000)
#fuses XT,NOWDT,PUT
 
/schemata/prenos/letadlo/SW/prijimac/main.sta
0,0 → 1,43
 
ROM used: 691 (67%)
333 (33%) including unused fragments
 
1 Average locations per line
5 Average locations per statement
 
RAM used: 13 (19%) at main() level
25 (37%) worst case
 
Lines Stmts % Files
----- ----- --- -----
100 50 37 d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\main.c
5 0 0 d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\main.h
111 0 0 C:\Program Files\PICC\Devices\16F84.h
6 0 0 d:\@kaklik\programy\pic_c\prenos\letadlo\common.h
272 46 25 d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\MYLCD.C
88 39 17 d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\prijimac.c
----- -----
1164 270 Total
 
Page ROM % RAM Functions:
---- --- --- --- ----------
0 21 3 1 delay_ms
0 8 1 0 @const22
0 22 3 3 lcd_send_nibble
0 22 3 2 lcd_send_byte
0 57 8 2 lcd_init
0 17 2 4 lcd_gotoxy
0 56 8 1 lcd_putc
0 78 11 5 prijmi_nibble
0 92 13 7 prijmi_ramec
0 227 33 2 main
0 9 1 0 @const10155
0 7 1 0 @goto10178
0 21 3 3 @DIV88
0 50 7 2 @PRINTF_U_149
 
Segment Used Free
--------- ---- ----
0000-0003 4 0
0004-03FF 687 333
 
/schemata/prenos/letadlo/SW/prijimac/main.tre
0,0 → 1,702
ÀÄmain
ÀÄmain 0/227 Ram=2
ÃÄ??0??
ÃÄlcd_init 0/57 Ram=2
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@const22 0/8 Ram=0
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄdelay_ms 0/21 Ram=1
ÃÄdelay_ms 0/21 Ram=1
ÃÄ@const10155 0/9 Ram=0
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄdelay_ms 0/21 Ram=1
ÃÄprijmi_ramec 0/92 Ram=7
³ ÃÄprijmi_nibble 0/78 Ram=5
³ ÃÄprijmi_nibble 0/78 Ram=5
³ ÃÄprijmi_nibble 0/78 Ram=5
³ ÀÄprijmi_nibble 0/78 Ram=5
ÃÄ@goto10178 0/7 Ram=0
ÃÄlcd_gotoxy 0/17 Ram=4
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_149 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_149 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_149 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_149 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_gotoxy 0/17 Ram=4
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_149 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_149 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_149 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_149 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄdelay_ms 0/21 Ram=1
ÀÄdelay_ms 0/21 Ram=1
/schemata/prenos/letadlo/SW/prijimac/mylcd.c
0,0 → 1,271
// LCD modul pro ovladani dvouradkoveho LCD modulu se standardnim Hitachi radicem
// (c)miho 2002
//
// Historie:
//
// 0.0 Uvodni verze se snadnou definici portu LCD displeje
//
//
// Funkce:
//
// lcd_init() inicializuje LCD displej a porty, nutno volat jako prvni
//
// lcd_putc(c) zapis snaku do lcd displeje, zpracovava nasledujici ridici znaky
// \f = \x0C - nova stranka - smazani displeje
// \n = \x0A - odradkovani (prechod na druhou radku)
// \b = \x08 - backspace - posunuti kurzoru o 1 pozici zpet
// \r = \x0D - goto home to position 1,1
// \0 .. \7 - definovatelne znaky v pozicich 0 az 7 v CGRAM
// \20 .. \27 - alternativne zapsane znaky (oktalove) v pozicich 0 az 7 CGRAM
// Pozor na to, ze funkce printf konci tisk pokud narazi na \0 (konec retezce)
//
// lcd_gotoxy(x,y) presune kurzor na uvedenou adresu
// nekontroluje parametry
//
// lcd_cursor_on zapne kurzor
// lcd_cursor_off vypne kurzor
//
// lcd_define_char(Index, Def) Makro, ktere definuje znaky od pozice Index obsahem definicniho
// retezce Def. Kazdych 8 znaku retezce Def definuje dalsi znak v CGRAM.
// Kapacita CGRAM je celkem 8 znaku s indexem 0 az 7.
// Na konci se provede lcd_gotoxy(1,1).
// Na konci teto knihovny je priklad pouziti definovanych znaku
//
// Definice portu:
//
// #DEFINE LCD_RS PIN_B2 // rizeni registru LCD displeje
// #DEFINE LCD_E PIN_B1 // enable LCD displeje
// #DEFINE LCD_DATA_LSB PIN_C2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
 
 
 
 
// Privatni sekce, cist jen v pripade, ze neco nefunguje
 
 
 
 
// Generovane defince portu pro ucely teto knihovny aby kod generoval spravne IO operace a soucasne
// bylo mozne jednoduse deklarovat pripojene piny LCD displeje pri pouziti teto knihovny. Problem spociva
// v tom, ze se musi spravne ridit smery portu a soucasne datovy port zabira jen 4 bity ze zadaneho portu
//
#DEFINE LCD_SHIFT (LCD_DATA_LSB&7) // pocet bitu posuvu dataoveho kanalu v datovem portu
#DEFINE LCD_PORT (LCD_DATA_LSB>>3) // adresa LCD datoveho portu
#DEFINE LCD_TRIS (LCD_PORT+0x80) // adresa prislusneho TRIS registru
#DEFINE LCD_MASK (0xF<<LCD_SHIFT) // maska platnych bitu
//
#IF LCD_SHIFT>4 // kontrola mezi
#ERROR LCD data port LSB bit not in range 0..4
#ENDIF
 
 
// Definice konstant pro LCD display
//
#define LCD_CURSOR_ON_ 0x0E // kurzor jako blikajici radka pod znakem
#define LCD_CURSOR_OFF_ 0x0C // zadny kurzor
#define LCD_LINE_2 0x40 // adresa 1. znaku 2. radky
 
 
// Definice rezimu LCD displeje
//
BYTE const LCD_INIT_STRING[4] =
{
0x28, // intrfejs 4 bity, 2 radky, font 5x7
LCD_CURSOR_OFF_, // display on, kurzor off,
0x01, // clear displeje
0x06 // inkrement pozice kurzoru (posun kurzoru doprava)
};
 
 
// Odesle nibble do displeje (posle data a klikne signalem e)
//
void lcd_send_nibble( BYTE n )
{
*LCD_PORT = (*LCD_PORT & ~LCD_MASK) | ((n << LCD_SHIFT) & LCD_MASK); // nastav datove bity portu a ostatni zachovej
output_bit(LCD_E,1); // vzestupna hrana
delay_us(1); // pockej alespon 450ns od e nebo alespon 195ns od dat
output_bit(LCD_E,0); // sestupna hrana (minimalni perioda e je 1us)
}
 
 
// Odesle bajt do registru LCD
//
// Pokud je Adr=0 .. instrukcni registr
// Pokud je Adr=1 .. datovy registr
//
void lcd_send_byte( BOOLEAN Adr, BYTE n )
{
output_bit(LCD_RS,Adr); // vyber registr
swap(n);
lcd_send_nibble(n); // posli horni pulku bajtu
swap(n);
lcd_send_nibble(n); // posli spodni pulku bajtu
delay_us(40); // minimalni doba na provedeni prikazu
}
 
 
// Provede inicializaci LCD displeje, smaze obsah a nastavi mod displeje
//
// Tato procedura se musi volat pred pouzitim ostatnich lcd_ procedur
//
void lcd_init()
{
 
int i; // pocitadlo cyklu
 
delay_ms(20); // spozdeni pro provedeni startu displeje po zapnuti napajeni
 
*LCD_TRIS = *LCD_TRIS & ~LCD_MASK; // nuluj odpovidajici bity tris registru datoveho portu LCD
 
output_bit(LCD_RS,0); // nastav jako vystup a nastav klidovy stav
output_bit(LCD_E,0); // nastav jako vystup a nastav klidovy stav
 
for (i=0; i<3; i++) // nastav lcd do rezimu 8 bitu sbernice
{
delay_ms(2); // muze byt rozdelany prenos dat (2x 4 bity) nebo pomaly povel
lcd_send_nibble(3); // rezim 8 bitu
}
 
delay_us(40); // cas na zpracovani
lcd_send_nibble(2); // nastav rezim 4 bitu (plati od nasledujiciho prenosu)
delay_us(40); // cas na zpracovani
 
for (i=0;i<3;i++) // proved inicializaci (nastaveni modu, smazani apod)
{
lcd_send_byte(0,LCD_INIT_STRING[i]);
delay_ms(2);
}
}
 
 
// Proved presun kurzoru
//
// Pozice 1.1 je domu
//
void lcd_gotoxy( BYTE x, BYTE y)
{
 
BYTE Adr;
 
Adr=x-1;
if(y==2)
Adr+=LCD_LINE_2;
 
lcd_send_byte(0,0x80|Adr);
}
 
 
// Zapis znaku na displej, zpracovani ridicich znaku
//
void lcd_putc( char c)
{
 
switch (c)
{
case '\f' : lcd_send_byte(0,1); // smaz displej
delay_ms(2);
break;
case '\n' : lcd_gotoxy(1,2); break; // presun se na 1. znak 2. radky
case '\r' : lcd_gotoxy(1,1); break; // presun home
case '\b' : lcd_send_byte(0,0x10); break; // posun kurzor o 1 zpet
default : if (c<0x20) c&=0x7; // preklopeni definovatelnych znaku na rozsah 0 az 0x1F
lcd_send_byte(1,c); break; // zapis znak
}
}
 
 
// Zapni kurzor
//
void lcd_cursor_on()
{
lcd_send_byte(0,LCD_CURSOR_ON_);
}
 
 
// Vypni kurzor
//
void lcd_cursor_off()
{
lcd_send_byte(0,LCD_CURSOR_OFF_);
}
 
 
// Definice vlastnich fontu
//
// Vlastnich definic muze byt jen 8 do pozic 0 az 7 pameti CGRAM radice lcd displeje
// Pro snadne definovani jsou pripraveny nasledujici definice a na konci souboru je uveden
// priklad pouziti definovanych znaku.
 
 
// Pomocna procedura pro posilani ridicich dat do radice displeje
//
void lcd_putc2(int Data)
{
lcd_send_byte(1,Data);
}
 
 
// Pomocne definice pro programovani obsahu CGRAM
//
#DEFINE lcd_define_start(Code) lcd_send_byte(0,0x40+(Code<<3)); delay_ms(2)
#DEFINE lcd_define_def(String) printf(lcd_putc2,String);
#DEFINE lcd_define_end() lcd_send_byte(0,3); delay_ms(2)
 
 
// Vlastni vykonne makro pro definovani fontu do pozice Index CGRAM s definicnim retezcem Def
//
#DEFINE lcd_define_char(Index, Def) lcd_define_start(Index); lcd_define_def(Def); lcd_define_end();
 
 
// Pripravene definice fontu vybranych znaku
// V tabulce nesmi byt 00 (konec retezce v printf()), misto toho davame 80
//
#DEFINE LCD_CHAR_BAT100 "\x0E\x1F\x1F\x1F\x1F\x1F\x1F\x1F" /* symbol plne baterie */
#DEFINE LCD_CHAR_BAT50 "\x0E\x1F\x11\x11\x13\x17\x1F\x1F" /* symbol polovicni baterie */
#DEFINE LCD_CHAR_BAT0 "\x0E\x1F\x11\x11\x11\x11\x11\x1F" /* symbol vybite baterie */
#DEFINE LCD_CHAR_LUA "\x04\x0E\x11\x11\x1F\x11\x11\x80" /* A s carkou */
#DEFINE LCD_CHAR_LLA "\x01\x02\x0E\x01\x1F\x11\x0F\x80" /* a s carkou */
#DEFINE LCD_CHAR_HUC "\x0A\x0E\x11\x10\x10\x11\x0E\x80" /* C s hackem */
#DEFINE LCD_CHAR_HLC "\x0A\x04\x0E\x10\x10\x11\x0E\x80" /* c s hackem */
#DEFINE LCD_CHAR_HUD "\x0A\x1C\x12\x11\x11\x12\x1C\x80" /* D s hackem */
#DEFINE LCD_CHAR_HLD "\x05\x03\x0D\x13\x11\x11\x0F\x80" /* d s hackem */
#DEFINE LCD_CHAR_LUE "\x04\x1F\x10\x10\x1E\x10\x1F\x80" /* E s carkou */
#DEFINE LCD_CHAR_LLE "\x01\x02\x0E\x11\x1F\x10\x0E\x80" /* e s carkou */
#DEFINE LCD_CHAR_HUE "\x0A\x1F\x10\x1E\x10\x10\x1F\x80" /* E s hackem */
#DEFINE LCD_CHAR_HLE "\x0A\x04\x0E\x11\x1F\x10\x0E\x80" /* e s hackem */
#DEFINE LCD_CHAR_LUI "\x04\x0E\x04\x04\x04\x04\x0E\x80" /* I s carkou */
#DEFINE LCD_CHAR_LLI "\x02\x04\x80\x0C\x04\x04\x0E\x80" /* i s carkou */
#DEFINE LCD_CHAR_HUN "\x0A\x15\x11\x19\x15\x13\x11\x80" /* N s hackem */
#DEFINE LCD_CHAR_HLN "\x0A\x04\x16\x19\x11\x11\x11\x80" /* n s hackem */
#DEFINE LCD_CHAR_LUO "\x04\x0E\x11\x11\x11\x11\x0E\x80" /* O s carkou */
#DEFINE LCD_CHAR_LLO "\x02\x04\x0E\x11\x11\x11\x0E\x80" /* o s carkou */
#DEFINE LCD_CHAR_HUR "\x0A\x1E\x11\x1E\x14\x12\x11\x80" /* R s hackem */
#DEFINE LCD_CHAR_HLR "\x0A\x04\x16\x19\x10\x10\x10\x80" /* r s hackem */
#DEFINE LCD_CHAR_HUS "\x0A\x0F\x10\x0E\x01\x01\x1E\x80" /* S s hackem */
#DEFINE LCD_CHAR_HLS "\x0A\x04\x0E\x10\x0E\x01\x1E\x80" /* s s hackem */
#DEFINE LCD_CHAR_HUT "\x0A\x1F\x04\x04\x04\x04\x04\x80" /* T s hackem */
#DEFINE LCD_CHAR_HLT "\x0A\x0C\x1C\x08\x08\x09\x06\x80" /* t s hackem */
#DEFINE LCD_CHAR_LUU "\x02\x15\x11\x11\x11\x11\x0E\x80" /* U s carkou */
#DEFINE LCD_CHAR_LLU "\x02\x04\x11\x11\x11\x13\x0D\x80" /* u s carkou */
#DEFINE LCD_CHAR_CUU "\x06\x17\x11\x11\x11\x11\x0E\x80" /* U s krouzkem */
#DEFINE LCD_CHAR_CLU "\x06\x06\x11\x11\x11\x11\x0E\x80" /* u s krouzkem */
#DEFINE LCD_CHAR_LUY "\x02\x15\x11\x0A\x04\x04\x04\x80" /* Y s carkou */
#DEFINE LCD_CHAR_LLY "\x02\x04\x11\x11\x0F\x01\x0E\x80" /* y s carkou */
#DEFINE LCD_CHAR_HUZ "\x0A\x1F\x01\x02\x04\x08\x1F\x80" /* Z s hackem */
#DEFINE LCD_CHAR_HLZ "\x0A\x04\x1F\x02\x04\x08\x1F\x80" /* z s hackem */
 
 
// Priklad pouziti definovanych znaku
//
//
//void lcd_sample()
//{
// lcd_define_char(0,LCD_CHAR_BAT50); // Priklad definice znaku baterie do pozice 0
// lcd_define_char(2,LCD_CHAR_HLE LCD_CHAR_LUI); // Priklad definice znaku e s hackem a I s carkou od pozice 2
// // vsimnete si, ze neni carka mezi retezci s definici (oba retezce definuji
// // jediny definicni retezec)
// printf(lcd_putc,"\fZnaky:\20\22\23"); // priklad vypisu znaku z pozice 0, 2 a 3
// delay_ms(1000);
// lcd_define_char(0,LCD_CHAR_BAT0); // Predefinovani tvaru znaku v pozici 0
// delay_ms(1000);
//}
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/A.BAT
0,0 → 1,6
call picpgr stop
call picpgr erase pic16F84
call picpgr program main.hex hex pic16F84
call picpgr run
pause
call picpgr stop
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/VC.MNU
0,0 → 1,4
R: Run
picpgr run
S: Stop
picpgr stop
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/main.BAK
0,0 → 1,115
// Prijimac
#include "main.h"
#include "..\..\common.h"
 
#DEFINE PRIJIMAC PIN_A3 // pin na ktery je pripojen prijimac
#DEFINE SERVO_X PIN_A2 // piny na ktere jsou pripojena serva
#DEFINE SERVO_Y PIN_B0
#DEFINE DILEK 20 // jeden krok serva v mikrosekundach
 
#bit T0IF = 0xB.2 // int. flag od Timer0
 
static int8 x = 16; // poloha serv
static int8 y = 16;
int8 trim_x = 2;
int8 trim_y = 2;
 
boolean flag; // priznak, ze doslo k preruseni prijmu ovladanim serv
 
#int_TIMER0
TIMER0_isr()
{
int8 n;
 
flag = true; // doslo k preruseni prijmu
// x = 15;
// y = 15;
 
output_high(SERVO_X); // uvodni impuls 1ms
delay_ms(1);
for (n=trim_x; n>0; n--);
for (n=x; n>0; n--) Delay_us(DILEK);
output_low(SERVO_X);
 
output_high(SERVO_Y);
delay_ms(1);
for (n=trim_y; n>0; n--);
for (n=y; n>0; n--) Delay_us(DILEK);
output_low(SERVO_Y);
}
 
// output_high(PIN_B1); // debug pin
 
void main()
{
int i;
int8 osa, data, check, suma;
 
setup_counters(RTCC_INTERNAL,RTCC_DIV_64); // Preruseni po 16,3ms
enable_interrupts(INT_TIMER0);
// enable_interrupts(global);
 
loop:
flag = false;
 
// Cekej na uvodni ticho
for (i=SYNC; i>0; i--)
{
delay_us(IMPULS/4);
if (flag) goto loop;
if (!input(PRIJIMAC)) i=SYNC;
}
 
// Cekej na startovaci 1
while (input(PRIJIMAC)) if (flag) goto loop;
 
if (flag) goto loop;
 
// Posun na cteni prvniho datoveho bitu
delay_us(2*IMPULS+2*IMPULS/3);
 
// Cteme bity
for (i=8; i>0; i--)
{
data <<= 1;
if (input(PRIJIMAC)) data |= 1;
if (flag) goto loop;
output_high(PIN_B1); // debug pin
delay_us(2*IMPULS+15);
output_low(PIN_B1); // debug pin
}
 
// Cteme checksum
check = 0;
for (i=4; i>0; i--)
{
check <<= 1;
if (input(PRIJIMAC)) check |= 1;
if (flag) goto loop;
output_high(PIN_B1); // debug pin
delay_us(2*IMPULS+15);
output_low(PIN_B1); // debug pin
}
 
swap(data); // kontrola kontrolniho souctu
suma = data & 0xF;
swap(data);
suma += data & 0xF;
suma++;
suma &= 0xF;
if (suma != check) goto loop;
 
osa = data >> 5; // extrahuj z ramce cislo osy a hodnotu
data &= 0x1F;
switch(osa)
{
case OSA_X:
x=data;
break;
case OSA_y:
y=data;
break;
}
 
goto loop;
}
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/main.HEX
0,0 → 1,42
:1000000000308A0083280000831A0A288E00030E1D
:100010008F000F2883128E00030E8F008F140A08A2
:1000200093008A0183138E0E040890000C0891003F
:100030000D08920083128B1E1F280B1943281008ED
:10004000840011088C0012088D0013088A000F0E1E
:10005000830083120E0E8F18831609001F30840050
:1000600000080319422801308D008C018C0B3628C2
:100070008D0B35284A308C008C0B3C28000000008A
:10008000800B3328003418148316051183120515CC
:1000900001309F002E2016089E009E08031952284A
:1000A0009E034D2814089E009E0803195E28063002
:1000B0008C008C0B592800009E03542883160511D0
:1000C00083120511831606108312061401309F0057
:1000D0002E2017089E009E08031970289E036B2887
:1000E00015089E009E0803197C2806308C008C0B96
:1000F000772800009E0372288316061083120610CC
:100100000B118A111F2884011F30830510309400C1
:10011000950002309600970005308C008C1D9828C1
:1001200007308101813084000008C0390F38800019
:100130006400813084000008C0390C0480008B16F4
:100140008B1718100F30990099080319B82814302C
:100150008C008C0BA9280000181CAF28A12883163E
:10016000851583128519B6280F3099009903A428A4
:10017000831685158312851DC128181CC028A12847
:10018000B828181CC428A128DD308C008C0BC62888
:10019000000000000830990099080319E9280310AD
:1001A0009B0D831685158312851DD7281B14181CDB
:1001B000DA28A1288316861083128614AB308C00AF
:1001C0008C0BE0280000831686108312861099039A
:1001D000CC289C01043099009908031909290310BF
:1001E0009C0D831685158312851DF7281C14181C79
:1001F000FA28A1288316861083128614AB308C004F
:100200008C0B002900008316861083128610990338
:10021000EC289B0E1B080F399D009B0E1B080F3905
:100220009D079D0A0F309D051C081D020319192901
:10023000A1281B0E9A009A0C07309A051F309B05C7
:1002400001301A02FE3E03182D29023E2F291B08F9
:1002500094002D291B0895002D29A12863000A145C
:0A0260008A100A11820727292A29B3
:02400E00F13F80
:00000001FF
;PIC16F84
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/main.LST
0,0 → 1,457
CCS PCW C Compiler, Version 3.110, 15448
 
Filename: d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\ostra_bez_ladicich_impulsu\main.LST
 
ROM used: 309 (30%)
Largest free fragment is 715
RAM used: 18 (26%) at main() level
20 (29%) worst case
Stack: 3 worst case (1 in main + 2 for interrupts)
 
*
0000: MOVLW 00
0001: MOVWF 0A
0002: GOTO 083
0003: NOP
0004: BTFSC 03.5
0005: GOTO 00A
0006: MOVWF 0E
0007: SWAPF 03,W
0008: MOVWF 0F
0009: GOTO 00F
000A: BCF 03.5
000B: MOVWF 0E
000C: SWAPF 03,W
000D: MOVWF 0F
000E: BSF 0F.1
000F: MOVF 0A,W
0010: MOVWF 13
0011: CLRF 0A
0012: BCF 03.7
0013: SWAPF 0E,F
0014: MOVF 04,W
0015: MOVWF 10
0016: MOVF 0C,W
0017: MOVWF 11
0018: MOVF 0D,W
0019: MOVWF 12
001A: BCF 03.5
001B: BTFSS 0B.5
001C: GOTO 01F
001D: BTFSC 0B.2
001E: GOTO 043
001F: MOVF 10,W
0020: MOVWF 04
0021: MOVF 11,W
0022: MOVWF 0C
0023: MOVF 12,W
0024: MOVWF 0D
0025: MOVF 13,W
0026: MOVWF 0A
0027: SWAPF 0F,W
0028: MOVWF 03
0029: BCF 03.5
002A: SWAPF 0E,W
002B: BTFSC 0F.1
002C: BSF 03.5
002D: RETFIE
.................... // Prijimac
.................... #include "main.h"
.................... #include <16F84.h>
.................... //////// Standard Header file for the PIC16F84 device ////////////////
.................... #device PIC16F84
.................... #list
....................
.................... #use delay(clock=4000000)
002E: MOVLW 1F
002F: MOVWF 04
0030: MOVF 00,W
0031: BTFSC 03.2
0032: GOTO 042
0033: MOVLW 01
0034: MOVWF 0D
0035: CLRF 0C
0036: DECFSZ 0C,F
0037: GOTO 036
0038: DECFSZ 0D,F
0039: GOTO 035
003A: MOVLW 4A
003B: MOVWF 0C
003C: DECFSZ 0C,F
003D: GOTO 03C
003E: NOP
003F: NOP
0040: DECFSZ 00,F
0041: GOTO 033
0042: RETLW 00
.................... #fuses XT,PUT,NOWDT
....................
....................
.................... #include "..\..\common.h"
.................... #DEFINE OSA_X 1 // adresy os
.................... #DEFINE OSA_Y 2
.................... #DEFINE OSA_Z 3
.................... #DEFINE OSA_W 4
.................... #DEFINE TLs 5
.................... #DEFINE Trim 6 // ovladani prijimace
....................
.................... #DEFINE IMPULS 250 // sirka impulsu
.................... #DEFINE SYNC 15 // delka uvodniho ticha v IMPULS/4
....................
....................
.................... #DEFINE PRIJIMAC PIN_A3 // pin na ktery je pripojen prijimac
.................... #DEFINE SERVO_X PIN_A2 // piny na ktere jsou pripojena serva
.................... #DEFINE SERVO_Y PIN_B0
.................... #DEFINE DILEK 20 // jeden krok serva v mikrosekundach
....................
.................... #bit T0IF = 0xB.2 // int. flag od Timer0
....................
.................... static int8 x = 16; // poloha serv
.................... static int8 y = 16;
.................... int8 trim_x = 2;
.................... int8 trim_y = 2;
....................
.................... boolean flag; // priznak, ze doslo k preruseni prijmu ovladanim serv
....................
.................... #int_TIMER0
.................... TIMER0_isr()
.................... {
.................... int8 n;
....................
.................... flag = true; // doslo k preruseni prijmu
0043: BSF 18.0
.................... // x = 15;
.................... // y = 15;
....................
.................... output_high(SERVO_X); // uvodni impuls 1ms
0044: BSF 03.5
0045: BCF 05.2
0046: BCF 03.5
0047: BSF 05.2
.................... delay_ms(1);
0048: MOVLW 01
0049: MOVWF 1F
004A: CALL 02E
.................... for (n=trim_x; n>0; n--);
004B: MOVF 16,W
004C: MOVWF 1E
004D: MOVF 1E,F
004E: BTFSC 03.2
004F: GOTO 052
0050: DECF 1E,F
0051: GOTO 04D
.................... for (n=x; n>0; n--) Delay_us(DILEK);
0052: MOVF 14,W
0053: MOVWF 1E
0054: MOVF 1E,F
0055: BTFSC 03.2
0056: GOTO 05E
0057: MOVLW 06
0058: MOVWF 0C
0059: DECFSZ 0C,F
005A: GOTO 059
005B: NOP
005C: DECF 1E,F
005D: GOTO 054
.................... output_low(SERVO_X);
005E: BSF 03.5
005F: BCF 05.2
0060: BCF 03.5
0061: BCF 05.2
....................
.................... output_high(SERVO_Y);
0062: BSF 03.5
0063: BCF 06.0
0064: BCF 03.5
0065: BSF 06.0
.................... delay_ms(1);
0066: MOVLW 01
0067: MOVWF 1F
0068: CALL 02E
.................... for (n=trim_y; n>0; n--);
0069: MOVF 17,W
006A: MOVWF 1E
006B: MOVF 1E,F
006C: BTFSC 03.2
006D: GOTO 070
006E: DECF 1E,F
006F: GOTO 06B
.................... for (n=y; n>0; n--) Delay_us(DILEK);
0070: MOVF 15,W
0071: MOVWF 1E
0072: MOVF 1E,F
0073: BTFSC 03.2
0074: GOTO 07C
0075: MOVLW 06
0076: MOVWF 0C
0077: DECFSZ 0C,F
0078: GOTO 077
0079: NOP
007A: DECF 1E,F
007B: GOTO 072
.................... output_low(SERVO_Y);
007C: BSF 03.5
007D: BCF 06.0
007E: BCF 03.5
007F: BCF 06.0
0080: BCF 0B.2
0081: BCF 0A.3
0082: GOTO 01F
.................... }
....................
.................... // output_high(PIN_B1); // debug pin
....................
.................... void main()
.................... {
.................... int i;
.................... int8 osa, data, check, suma;
0083: CLRF 04
0084: MOVLW 1F
0085: ANDWF 03,F
0086: MOVLW 10
0087: MOVWF 14
0088: MOVWF 15
0089: MOVLW 02
008A: MOVWF 16
008B: MOVWF 17
....................
.................... setup_counters(RTCC_INTERNAL,RTCC_DIV_64); // Preruseni po 16,3ms
008C: MOVLW 05
008D: MOVWF 0C
008E: BTFSS 0C.3
008F: GOTO 098
0090: MOVLW 07
0091: CLRF 01
0092: MOVLW 81
0093: MOVWF 04
0094: MOVF 00,W
0095: ANDLW C0
0096: IORLW 0F
0097: MOVWF 00
0098: CLRWDT
0099: MOVLW 81
009A: MOVWF 04
009B: MOVF 00,W
009C: ANDLW C0
009D: IORWF 0C,W
009E: MOVWF 00
.................... enable_interrupts(INT_TIMER0);
009F: BSF 0B.5
.................... enable_interrupts(global);
00A0: BSF 0B.7
....................
.................... loop:
.................... flag = false;
00A1: BCF 18.0
....................
.................... // Cekej na uvodni ticho
.................... for (i=SYNC; i>0; i--)
00A2: MOVLW 0F
00A3: MOVWF 19
00A4: MOVF 19,F
00A5: BTFSC 03.2
00A6: GOTO 0B8
.................... {
.................... delay_us(IMPULS/4);
00A7: MOVLW 14
00A8: MOVWF 0C
00A9: DECFSZ 0C,F
00AA: GOTO 0A9
00AB: NOP
.................... if (flag) goto loop;
00AC: BTFSS 18.0
00AD: GOTO 0AF
00AE: GOTO 0A1
.................... if (!input(PRIJIMAC)) i=SYNC;
00AF: BSF 03.5
00B0: BSF 05.3
00B1: BCF 03.5
00B2: BTFSC 05.3
00B3: GOTO 0B6
00B4: MOVLW 0F
00B5: MOVWF 19
.................... }
00B6: DECF 19,F
00B7: GOTO 0A4
....................
.................... // Cekej na startovaci 1
.................... while (input(PRIJIMAC)) if (flag) goto loop;
00B8: BSF 03.5
00B9: BSF 05.3
00BA: BCF 03.5
00BB: BTFSS 05.3
00BC: GOTO 0C1
00BD: BTFSS 18.0
00BE: GOTO 0C0
00BF: GOTO 0A1
00C0: GOTO 0B8
....................
.................... if (flag) goto loop;
00C1: BTFSS 18.0
00C2: GOTO 0C4
00C3: GOTO 0A1
....................
.................... // Posun na cteni prvniho datoveho bitu
.................... delay_us(2*IMPULS+2*IMPULS/3);
00C4: MOVLW DD
00C5: MOVWF 0C
00C6: DECFSZ 0C,F
00C7: GOTO 0C6
00C8: NOP
00C9: NOP
....................
.................... // Cteme bity
.................... for (i=8; i>0; i--)
00CA: MOVLW 08
00CB: MOVWF 19
00CC: MOVF 19,F
00CD: BTFSC 03.2
00CE: GOTO 0E9
.................... {
.................... data <<= 1;
00CF: BCF 03.0
00D0: RLF 1B,F
.................... if (input(PRIJIMAC)) data |= 1;
00D1: BSF 03.5
00D2: BSF 05.3
00D3: BCF 03.5
00D4: BTFSS 05.3
00D5: GOTO 0D7
00D6: BSF 1B.0
.................... if (flag) goto loop;
00D7: BTFSS 18.0
00D8: GOTO 0DA
00D9: GOTO 0A1
.................... output_high(PIN_B1); // debug pin
00DA: BSF 03.5
00DB: BCF 06.1
00DC: BCF 03.5
00DD: BSF 06.1
.................... delay_us(2*IMPULS+15);
00DE: MOVLW AB
00DF: MOVWF 0C
00E0: DECFSZ 0C,F
00E1: GOTO 0E0
00E2: NOP
.................... output_low(PIN_B1); // debug pin
00E3: BSF 03.5
00E4: BCF 06.1
00E5: BCF 03.5
00E6: BCF 06.1
.................... }
00E7: DECF 19,F
00E8: GOTO 0CC
....................
.................... // Cteme checksum
.................... check = 0;
00E9: CLRF 1C
.................... for (i=4; i>0; i--)
00EA: MOVLW 04
00EB: MOVWF 19
00EC: MOVF 19,F
00ED: BTFSC 03.2
00EE: GOTO 109
.................... {
.................... check <<= 1;
00EF: BCF 03.0
00F0: RLF 1C,F
.................... if (input(PRIJIMAC)) check |= 1;
00F1: BSF 03.5
00F2: BSF 05.3
00F3: BCF 03.5
00F4: BTFSS 05.3
00F5: GOTO 0F7
00F6: BSF 1C.0
.................... if (flag) goto loop;
00F7: BTFSS 18.0
00F8: GOTO 0FA
00F9: GOTO 0A1
.................... output_high(PIN_B1); // debug pin
00FA: BSF 03.5
00FB: BCF 06.1
00FC: BCF 03.5
00FD: BSF 06.1
.................... delay_us(2*IMPULS+15);
00FE: MOVLW AB
00FF: MOVWF 0C
0100: DECFSZ 0C,F
0101: GOTO 100
0102: NOP
.................... output_low(PIN_B1); // debug pin
0103: BSF 03.5
0104: BCF 06.1
0105: BCF 03.5
0106: BCF 06.1
.................... }
0107: DECF 19,F
0108: GOTO 0EC
....................
.................... swap(data); // kontrola kontrolniho souctu
0109: SWAPF 1B,F
.................... suma = data & 0xF;
010A: MOVF 1B,W
010B: ANDLW 0F
010C: MOVWF 1D
.................... swap(data);
010D: SWAPF 1B,F
.................... suma += data & 0xF;
010E: MOVF 1B,W
010F: ANDLW 0F
0110: ADDWF 1D,F
.................... suma++;
0111: INCF 1D,F
.................... suma &= 0xF;
0112: MOVLW 0F
0113: ANDWF 1D,F
.................... if (suma != check) goto loop;
0114: MOVF 1C,W
0115: SUBWF 1D,W
0116: BTFSC 03.2
0117: GOTO 119
0118: GOTO 0A1
....................
.................... osa = data >> 5; // extrahuj z ramce cislo osy a hodnotu
0119: SWAPF 1B,W
011A: MOVWF 1A
011B: RRF 1A,F
011C: MOVLW 07
011D: ANDWF 1A,F
.................... data &= 0x1F;
011E: MOVLW 1F
011F: ANDWF 1B,F
.................... switch(osa)
0120: MOVLW 01
0121: SUBWF 1A,W
0122: ADDLW FE
0123: BTFSC 03.0
0124: GOTO 12D
0125: ADDLW 02
0126: GOTO 12F
.................... {
.................... case OSA_X:
.................... x=data;
0127: MOVF 1B,W
0128: MOVWF 14
.................... break;
0129: GOTO 12D
.................... case OSA_y:
.................... y=data;
012A: MOVF 1B,W
012B: MOVWF 15
.................... break;
012C: GOTO 12D
.................... }
*
012F: BSF 0A.0
0130: BCF 0A.1
0131: BCF 0A.2
0132: ADDWF 02,F
0133: GOTO 127
0134: GOTO 12A
....................
.................... goto loop;
*
012D: GOTO 0A1
.................... }
....................
012E: SLEEP
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/main.PJT
0,0 → 1,32
[PROJECT]
Target=main.HEX
Development_Mode=
Processor=0x684A
ToolSuite=CCS
 
[Directories]
Include=C:\Program Files\PICC\Devices;C:\Program Files\PICC\Dri
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
 
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/main.SYM
0,0 → 1,35
00B.2 T0IF
00C @SCRATCH
00D @SCRATCH
00D _RETURN_
00E @INTERRUPT_AREA
00F @INTERRUPT_AREA
010 @INTERRUPT_AREA
011 @INTERRUPT_AREA
012 @INTERRUPT_AREA
013 @INTERRUPT_AREA
014 x
015 y
016 trim_x
017 trim_y
018.0 flag
019 main.i
01A main.osa
01B main.data
01C main.check
01D main.suma
01E TIMER0_isr.n
01F delay_ms.P1
delay_us.P1
 
002E delay_ms
0043 TIMER0_isr
0083 main
012F @goto10103
00A1 loop
 
Project Files:
d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\ostra_bez_ladicich_impulsu\main.c
d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\ostra_bez_ladicich_impulsu\main.h
C:\Program Files\PICC\Devices\16F84.h
d:\@kaklik\programy\pic_c\prenos\letadlo\common.h
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/main.c
0,0 → 1,115
// Prijimac
#include "main.h"
#include "..\..\common.h"
 
#DEFINE PRIJIMAC PIN_A3 // pin na ktery je pripojen prijimac
#DEFINE SERVO_X PIN_A2 // piny na ktere jsou pripojena serva
#DEFINE SERVO_Y PIN_B0
#DEFINE DILEK 20 // jeden krok serva v mikrosekundach
 
#bit T0IF = 0xB.2 // int. flag od Timer0
 
static int8 x = 16; // poloha serv
static int8 y = 16;
int8 trim_x = 2;
int8 trim_y = 2;
 
boolean flag; // priznak, ze doslo k preruseni prijmu ovladanim serv
 
#int_TIMER0
TIMER0_isr()
{
int8 n;
 
flag = true; // doslo k preruseni prijmu
// x = 15;
// y = 15;
 
output_high(SERVO_X); // uvodni impuls 1ms
delay_ms(1);
for (n=trim_x; n>0; n--);
for (n=x; n>0; n--) Delay_us(DILEK);
output_low(SERVO_X);
 
output_high(SERVO_Y);
delay_ms(1);
for (n=trim_y; n>0; n--);
for (n=y; n>0; n--) Delay_us(DILEK);
output_low(SERVO_Y);
}
 
// output_high(PIN_B1); // debug pin
 
void main()
{
int i;
int8 osa, data, check, suma;
 
setup_counters(RTCC_INTERNAL,RTCC_DIV_64); // Preruseni po 16,3ms
enable_interrupts(INT_TIMER0);
enable_interrupts(global);
 
loop:
flag = false;
 
// Cekej na uvodni ticho
for (i=SYNC; i>0; i--)
{
delay_us(IMPULS/4);
if (flag) goto loop;
if (!input(PRIJIMAC)) i=SYNC;
}
 
// Cekej na startovaci 1
while (input(PRIJIMAC)) if (flag) goto loop;
 
if (flag) goto loop;
 
// Posun na cteni prvniho datoveho bitu
delay_us(2*IMPULS+2*IMPULS/3);
 
// Cteme bity
for (i=8; i>0; i--)
{
data <<= 1;
if (input(PRIJIMAC)) data |= 1;
if (flag) goto loop;
output_high(PIN_B1); // debug pin
delay_us(2*IMPULS+15);
output_low(PIN_B1); // debug pin
}
 
// Cteme checksum
check = 0;
for (i=4; i>0; i--)
{
check <<= 1;
if (input(PRIJIMAC)) check |= 1;
if (flag) goto loop;
output_high(PIN_B1); // debug pin
delay_us(2*IMPULS+15);
output_low(PIN_B1); // debug pin
}
 
swap(data); // kontrola kontrolniho souctu
suma = data & 0xF;
swap(data);
suma += data & 0xF;
suma++;
suma &= 0xF;
if (suma != check) goto loop;
 
osa = data >> 5; // extrahuj z ramce cislo osy a hodnotu
data &= 0x1F;
switch(osa)
{
case OSA_X:
x=data;
break;
case OSA_y:
y=data;
break;
}
 
goto loop;
}
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/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
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/main.err
0,0 → 1,0
No Errors
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/main.h
0,0 → 1,4
#include <16F84.h>
#use delay(clock=4000000)
#fuses XT,PUT,NOWDT
 
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/main.sta
0,0 → 1,32
 
ROM used: 309 (30%)
715 (70%) including unused fragments
 
1 Average locations per line
4 Average locations per statement
 
RAM used: 18 (26%) at main() level
20 (29%) worst case
 
Lines Stmts % Files
----- ----- --- -----
116 70 100 d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\ostra_bez_ladicich_impulsu\main.c
5 0 0 d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\ostra_bez_ladicich_impulsu\main.h
111 0 0 C:\Program Files\PICC\Devices\16F84.h
10 0 0 d:\@kaklik\programy\pic_c\prenos\letadlo\common.h
----- -----
484 140 Total
 
Page ROM % RAM Functions:
---- --- --- --- ----------
0 21 7 1 delay_ms
0 64 21 1 TIMER0_isr
0 172 56 5 main
0 6 2 0 @goto10103
 
Segment Used Free
--------- ---- ----
0000-0003 4 0
0004-002D 42 0
002E-03FF 263 715
 
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/main.tre
0,0 → 1,7
ÀÄmain
ÃÄmain 0/172 Ram=5
³ ÃÄ??0??
³ ÀÄ@goto10103 0/6 Ram=0
ÀÄTIMER0_isr 0/64 Ram=1
ÃÄdelay_ms 0/21 Ram=1
ÀÄdelay_ms 0/21 Ram=1
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/mylcd.c
0,0 → 1,271
// LCD modul pro ovladani dvouradkoveho LCD modulu se standardnim Hitachi radicem
// (c)miho 2002
//
// Historie:
//
// 0.0 Uvodni verze se snadnou definici portu LCD displeje
//
//
// Funkce:
//
// lcd_init() inicializuje LCD displej a porty, nutno volat jako prvni
//
// lcd_putc(c) zapis snaku do lcd displeje, zpracovava nasledujici ridici znaky
// \f = \x0C - nova stranka - smazani displeje
// \n = \x0A - odradkovani (prechod na druhou radku)
// \b = \x08 - backspace - posunuti kurzoru o 1 pozici zpet
// \r = \x0D - goto home to position 1,1
// \0 .. \7 - definovatelne znaky v pozicich 0 az 7 v CGRAM
// \20 .. \27 - alternativne zapsane znaky (oktalove) v pozicich 0 az 7 CGRAM
// Pozor na to, ze funkce printf konci tisk pokud narazi na \0 (konec retezce)
//
// lcd_gotoxy(x,y) presune kurzor na uvedenou adresu
// nekontroluje parametry
//
// lcd_cursor_on zapne kurzor
// lcd_cursor_off vypne kurzor
//
// lcd_define_char(Index, Def) Makro, ktere definuje znaky od pozice Index obsahem definicniho
// retezce Def. Kazdych 8 znaku retezce Def definuje dalsi znak v CGRAM.
// Kapacita CGRAM je celkem 8 znaku s indexem 0 az 7.
// Na konci se provede lcd_gotoxy(1,1).
// Na konci teto knihovny je priklad pouziti definovanych znaku
//
// Definice portu:
//
// #DEFINE LCD_RS PIN_B2 // rizeni registru LCD displeje
// #DEFINE LCD_E PIN_B1 // enable LCD displeje
// #DEFINE LCD_DATA_LSB PIN_C2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
 
 
 
 
// Privatni sekce, cist jen v pripade, ze neco nefunguje
 
 
 
 
// Generovane defince portu pro ucely teto knihovny aby kod generoval spravne IO operace a soucasne
// bylo mozne jednoduse deklarovat pripojene piny LCD displeje pri pouziti teto knihovny. Problem spociva
// v tom, ze se musi spravne ridit smery portu a soucasne datovy port zabira jen 4 bity ze zadaneho portu
//
#DEFINE LCD_SHIFT (LCD_DATA_LSB&7) // pocet bitu posuvu dataoveho kanalu v datovem portu
#DEFINE LCD_PORT (LCD_DATA_LSB>>3) // adresa LCD datoveho portu
#DEFINE LCD_TRIS (LCD_PORT+0x80) // adresa prislusneho TRIS registru
#DEFINE LCD_MASK (0xF<<LCD_SHIFT) // maska platnych bitu
//
#IF LCD_SHIFT>4 // kontrola mezi
#ERROR LCD data port LSB bit not in range 0..4
#ENDIF
 
 
// Definice konstant pro LCD display
//
#define LCD_CURSOR_ON_ 0x0E // kurzor jako blikajici radka pod znakem
#define LCD_CURSOR_OFF_ 0x0C // zadny kurzor
#define LCD_LINE_2 0x40 // adresa 1. znaku 2. radky
 
 
// Definice rezimu LCD displeje
//
BYTE const LCD_INIT_STRING[4] =
{
0x28, // intrfejs 4 bity, 2 radky, font 5x7
LCD_CURSOR_OFF_, // display on, kurzor off,
0x01, // clear displeje
0x06 // inkrement pozice kurzoru (posun kurzoru doprava)
};
 
 
// Odesle nibble do displeje (posle data a klikne signalem e)
//
void lcd_send_nibble( BYTE n )
{
*LCD_PORT = (*LCD_PORT & ~LCD_MASK) | ((n << LCD_SHIFT) & LCD_MASK); // nastav datove bity portu a ostatni zachovej
output_bit(LCD_E,1); // vzestupna hrana
delay_us(1); // pockej alespon 450ns od e nebo alespon 195ns od dat
output_bit(LCD_E,0); // sestupna hrana (minimalni perioda e je 1us)
}
 
 
// Odesle bajt do registru LCD
//
// Pokud je Adr=0 .. instrukcni registr
// Pokud je Adr=1 .. datovy registr
//
void lcd_send_byte( BOOLEAN Adr, BYTE n )
{
output_bit(LCD_RS,Adr); // vyber registr
swap(n);
lcd_send_nibble(n); // posli horni pulku bajtu
swap(n);
lcd_send_nibble(n); // posli spodni pulku bajtu
delay_us(40); // minimalni doba na provedeni prikazu
}
 
 
// Provede inicializaci LCD displeje, smaze obsah a nastavi mod displeje
//
// Tato procedura se musi volat pred pouzitim ostatnich lcd_ procedur
//
void lcd_init()
{
 
int i; // pocitadlo cyklu
 
delay_ms(20); // spozdeni pro provedeni startu displeje po zapnuti napajeni
 
*LCD_TRIS = *LCD_TRIS & ~LCD_MASK; // nuluj odpovidajici bity tris registru datoveho portu LCD
 
output_bit(LCD_RS,0); // nastav jako vystup a nastav klidovy stav
output_bit(LCD_E,0); // nastav jako vystup a nastav klidovy stav
 
for (i=0; i<3; i++) // nastav lcd do rezimu 8 bitu sbernice
{
delay_ms(2); // muze byt rozdelany prenos dat (2x 4 bity) nebo pomaly povel
lcd_send_nibble(3); // rezim 8 bitu
}
 
delay_us(40); // cas na zpracovani
lcd_send_nibble(2); // nastav rezim 4 bitu (plati od nasledujiciho prenosu)
delay_us(40); // cas na zpracovani
 
for (i=0;i<3;i++) // proved inicializaci (nastaveni modu, smazani apod)
{
lcd_send_byte(0,LCD_INIT_STRING[i]);
delay_ms(2);
}
}
 
 
// Proved presun kurzoru
//
// Pozice 1.1 je domu
//
void lcd_gotoxy( BYTE x, BYTE y)
{
 
BYTE Adr;
 
Adr=x-1;
if(y==2)
Adr+=LCD_LINE_2;
 
lcd_send_byte(0,0x80|Adr);
}
 
 
// Zapis znaku na displej, zpracovani ridicich znaku
//
void lcd_putc( char c)
{
 
switch (c)
{
case '\f' : lcd_send_byte(0,1); // smaz displej
delay_ms(2);
break;
case '\n' : lcd_gotoxy(1,2); break; // presun se na 1. znak 2. radky
case '\r' : lcd_gotoxy(1,1); break; // presun home
case '\b' : lcd_send_byte(0,0x10); break; // posun kurzor o 1 zpet
default : if (c<0x20) c&=0x7; // preklopeni definovatelnych znaku na rozsah 0 az 0x1F
lcd_send_byte(1,c); break; // zapis znak
}
}
 
 
// Zapni kurzor
//
void lcd_cursor_on()
{
lcd_send_byte(0,LCD_CURSOR_ON_);
}
 
 
// Vypni kurzor
//
void lcd_cursor_off()
{
lcd_send_byte(0,LCD_CURSOR_OFF_);
}
 
 
// Definice vlastnich fontu
//
// Vlastnich definic muze byt jen 8 do pozic 0 az 7 pameti CGRAM radice lcd displeje
// Pro snadne definovani jsou pripraveny nasledujici definice a na konci souboru je uveden
// priklad pouziti definovanych znaku.
 
 
// Pomocna procedura pro posilani ridicich dat do radice displeje
//
void lcd_putc2(int Data)
{
lcd_send_byte(1,Data);
}
 
 
// Pomocne definice pro programovani obsahu CGRAM
//
#DEFINE lcd_define_start(Code) lcd_send_byte(0,0x40+(Code<<3)); delay_ms(2)
#DEFINE lcd_define_def(String) printf(lcd_putc2,String);
#DEFINE lcd_define_end() lcd_send_byte(0,3); delay_ms(2)
 
 
// Vlastni vykonne makro pro definovani fontu do pozice Index CGRAM s definicnim retezcem Def
//
#DEFINE lcd_define_char(Index, Def) lcd_define_start(Index); lcd_define_def(Def); lcd_define_end();
 
 
// Pripravene definice fontu vybranych znaku
// V tabulce nesmi byt 00 (konec retezce v printf()), misto toho davame 80
//
#DEFINE LCD_CHAR_BAT100 "\x0E\x1F\x1F\x1F\x1F\x1F\x1F\x1F" /* symbol plne baterie */
#DEFINE LCD_CHAR_BAT50 "\x0E\x1F\x11\x11\x13\x17\x1F\x1F" /* symbol polovicni baterie */
#DEFINE LCD_CHAR_BAT0 "\x0E\x1F\x11\x11\x11\x11\x11\x1F" /* symbol vybite baterie */
#DEFINE LCD_CHAR_LUA "\x04\x0E\x11\x11\x1F\x11\x11\x80" /* A s carkou */
#DEFINE LCD_CHAR_LLA "\x01\x02\x0E\x01\x1F\x11\x0F\x80" /* a s carkou */
#DEFINE LCD_CHAR_HUC "\x0A\x0E\x11\x10\x10\x11\x0E\x80" /* C s hackem */
#DEFINE LCD_CHAR_HLC "\x0A\x04\x0E\x10\x10\x11\x0E\x80" /* c s hackem */
#DEFINE LCD_CHAR_HUD "\x0A\x1C\x12\x11\x11\x12\x1C\x80" /* D s hackem */
#DEFINE LCD_CHAR_HLD "\x05\x03\x0D\x13\x11\x11\x0F\x80" /* d s hackem */
#DEFINE LCD_CHAR_LUE "\x04\x1F\x10\x10\x1E\x10\x1F\x80" /* E s carkou */
#DEFINE LCD_CHAR_LLE "\x01\x02\x0E\x11\x1F\x10\x0E\x80" /* e s carkou */
#DEFINE LCD_CHAR_HUE "\x0A\x1F\x10\x1E\x10\x10\x1F\x80" /* E s hackem */
#DEFINE LCD_CHAR_HLE "\x0A\x04\x0E\x11\x1F\x10\x0E\x80" /* e s hackem */
#DEFINE LCD_CHAR_LUI "\x04\x0E\x04\x04\x04\x04\x0E\x80" /* I s carkou */
#DEFINE LCD_CHAR_LLI "\x02\x04\x80\x0C\x04\x04\x0E\x80" /* i s carkou */
#DEFINE LCD_CHAR_HUN "\x0A\x15\x11\x19\x15\x13\x11\x80" /* N s hackem */
#DEFINE LCD_CHAR_HLN "\x0A\x04\x16\x19\x11\x11\x11\x80" /* n s hackem */
#DEFINE LCD_CHAR_LUO "\x04\x0E\x11\x11\x11\x11\x0E\x80" /* O s carkou */
#DEFINE LCD_CHAR_LLO "\x02\x04\x0E\x11\x11\x11\x0E\x80" /* o s carkou */
#DEFINE LCD_CHAR_HUR "\x0A\x1E\x11\x1E\x14\x12\x11\x80" /* R s hackem */
#DEFINE LCD_CHAR_HLR "\x0A\x04\x16\x19\x10\x10\x10\x80" /* r s hackem */
#DEFINE LCD_CHAR_HUS "\x0A\x0F\x10\x0E\x01\x01\x1E\x80" /* S s hackem */
#DEFINE LCD_CHAR_HLS "\x0A\x04\x0E\x10\x0E\x01\x1E\x80" /* s s hackem */
#DEFINE LCD_CHAR_HUT "\x0A\x1F\x04\x04\x04\x04\x04\x80" /* T s hackem */
#DEFINE LCD_CHAR_HLT "\x0A\x0C\x1C\x08\x08\x09\x06\x80" /* t s hackem */
#DEFINE LCD_CHAR_LUU "\x02\x15\x11\x11\x11\x11\x0E\x80" /* U s carkou */
#DEFINE LCD_CHAR_LLU "\x02\x04\x11\x11\x11\x13\x0D\x80" /* u s carkou */
#DEFINE LCD_CHAR_CUU "\x06\x17\x11\x11\x11\x11\x0E\x80" /* U s krouzkem */
#DEFINE LCD_CHAR_CLU "\x06\x06\x11\x11\x11\x11\x0E\x80" /* u s krouzkem */
#DEFINE LCD_CHAR_LUY "\x02\x15\x11\x0A\x04\x04\x04\x80" /* Y s carkou */
#DEFINE LCD_CHAR_LLY "\x02\x04\x11\x11\x0F\x01\x0E\x80" /* y s carkou */
#DEFINE LCD_CHAR_HUZ "\x0A\x1F\x01\x02\x04\x08\x1F\x80" /* Z s hackem */
#DEFINE LCD_CHAR_HLZ "\x0A\x04\x1F\x02\x04\x08\x1F\x80" /* z s hackem */
 
 
// Priklad pouziti definovanych znaku
//
//
//void lcd_sample()
//{
// lcd_define_char(0,LCD_CHAR_BAT50); // Priklad definice znaku baterie do pozice 0
// lcd_define_char(2,LCD_CHAR_HLE LCD_CHAR_LUI); // Priklad definice znaku e s hackem a I s carkou od pozice 2
// // vsimnete si, ze neni carka mezi retezci s definici (oba retezce definuji
// // jediny definicni retezec)
// printf(lcd_putc,"\fZnaky:\20\22\23"); // priklad vypisu znaku z pozice 0, 2 a 3
// delay_ms(1000);
// lcd_define_char(0,LCD_CHAR_BAT0); // Predefinovani tvaru znaku v pozici 0
// delay_ms(1000);
//}
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/prg.bat
0,0 → 1,6
call picpgr stop
call picpgr erase pic16f84
call picpgr program main.hex hex pic16f84
call picpgr run
pause
call picpgr stop
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/prijimac.BAK
0,0 → 1,96
 
//#DEFINE DEBUG PIN_A4 // ladici pomocne synchronizacni impulzy
 
// Prijme datovy nibble vcetne zasynchronizovani
// Chybi dodelat timeout
int8 prijmi_nibble(int8* datovy, int8* data)
{
int8 i;
 
#IFDEF DEBUG
int1 tmp;
#ENDIF
 
*data=0;
 
// Cekam na dlouhou nulu
for (i=6; i>0; i--)
{
delay_us(IMPULS/2);
if (input(PRIJIMAC)) i=4;
}
 
// Cekam na jednicku (start ramce)
while (!input(PRIJIMAC));
// Ctu typ nibblu
delay_us(2*IMPULS+2*IMPULS/3);
*datovy=input(PRIJIMAC);
 
// Prenasim bity
for (i=0; i<4; i++)
{
delay_us(2*IMPULS);
*data >>= 1;
if (input(PRIJIMAC)) *data +=0b1000;
 
#IFDEF DEBUG
output_bit(DEBUG,tmp);
tmp=!tmp;
#ELSE
delay_us(20);
#ENDIF
}
 
return FALSE;
}
 
 
// Prijme datovy ramec
// Pokud nastane chyba vraci kod chyby
int8 prijmi_ramec(int8* kanal, int8* data)
{
int8 i;
int8 datovy;
int8 suma;
 
// Cekej na uvodni ticho
for (i=4; i>0; i--)
{
delay_us(IMPULS/4);
if (input(PRIJIMAC)) i=4;
}
// Cekej na startovaci 1
while (!input(PRIJIMAC));
// Posun na cteni prvniho datoveho bitu
delay_us(2*IMPULS+2*IMPULS/3);
do
{
if (prijmi_nibble(&datovy, data)) return 1; // chyba timout
}
while(datovy);
 
// Zkontroluj magickou hodnotu
if (*data != SYNC_NIBBLE) return 2; // chyba magickeho kodu ramce
 
// Prijmi cislo kanalu
if (prijmi_nibble(&datovy, kanal)) return 1; // chyba timeout
if (!datovy) return 3; // chyba typu nibblu
 
// Prijmi data
if (prijmi_nibble(&datovy, data)) return 1; // chyba timeout
if (!datovy) return 3; // chyba typu nibblu
 
// Prijmi zabezpeceni
if (prijmi_nibble(&datovy, &suma)) return 1; // chyba timeout
if (!datovy) return 3; // chyba typu nibblu
 
// Zkontroluj kontrolni soucet
if (((*kanal+*data) & 0b1111) != suma) return 3; // chyba kontrolniho souctu
 
return 0;
}
 
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/prijimac.c
0,0 → 1,96
 
//#DEFINE DEBUG PIN_A4 // ladici pomocne synchronizacni impulzy
 
// Prijme datovy nibble vcetne zasynchronizovani
// Chybi dodelat timeout
int8 prijmi_nibble(int8* datovy, int8* data)
{
int8 i;
 
#IFDEF DEBUG
int1 tmp;
#ENDIF
 
*data=0;
 
// Cekam na dlouhou nulu
for (i=6; i>0; i--)
{
delay_us(IMPULS/2);
if (input(PRIJIMAC)) i=4;
}
 
// Cekam na jednicku (start ramce)
while (!input(PRIJIMAC));
// Ctu typ nibblu
delay_us(2*IMPULS+2*IMPULS/3);
*datovy=input(PRIJIMAC);
 
// Prenasim bity
for (i=0; i<4; i++)
{
delay_us(2*IMPULS);
*data >>= 1;
if (input(PRIJIMAC)) *data +=0b1000;
 
#IFDEF DEBUG
output_bit(DEBUG,tmp);
tmp=!tmp;
#ELSE
delay_us(20);
#ENDIF
}
 
return FALSE;
}
 
 
// Prijme datovy ramec
// Pokud nastane chyba vraci kod chyby
int8 prijmi_ramec(int8* kanal, int8* data)
{
int8 i;
int8 datovy;
int8 suma;
 
// Cekej na uvodni ticho
for (i=SYNC; i>0; i--)
{
delay_us(IMPULS/4);
if (!input(PRIJIMAC)) i=SYNC;
}
// Cekej na startovaci 1
while (input(PRIJIMAC));
// Posun na cteni prvniho datoveho bitu
delay_us(2*IMPULS+2*IMPULS/3);
do
{
if (prijmi_nibble(&datovy, data)) return 1; // chyba timout
}
while(datovy);
 
// Zkontroluj magickou hodnotu
if (*data != SYNC_NIBBLE) return 2; // chyba magickeho kodu ramce
 
// Prijmi cislo kanalu
if (prijmi_nibble(&datovy, kanal)) return 1; // chyba timeout
if (!datovy) return 3; // chyba typu nibblu
 
// Prijmi data
if (prijmi_nibble(&datovy, data)) return 1; // chyba timeout
if (!datovy) return 3; // chyba typu nibblu
 
// Prijmi zabezpeceni
if (prijmi_nibble(&datovy, &suma)) return 1; // chyba timeout
if (!datovy) return 3; // chyba typu nibblu
 
// Zkontroluj kontrolni soucet
if (((*kanal+*data) & 0b1111) != suma) return 3; // chyba kontrolniho souctu
 
return 0;
}
 
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/run.bat
0,0 → 1,5
call picpgr run
pause
call picpgr stop
pause
run.bat
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/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
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/x.BAK
--- ostra_bez_ladicich_impulsu/x.c (nonexistent)
+++ ostra_bez_ladicich_impulsu/x.c (revision 6)
@@ -0,0 +1 @@
+#use rs232(baud=9600,parity=N,xmit=PIN_A3,rcv=PIN_A2,stream=,bits=8)
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/01/MAIN.BAK
0,0 → 1,163
#include "main.h"
#include "..\common.h"
 
#DEFINE LCD_RS PIN_B1 // rizeni registru LCD displeje
#DEFINE LCD_E PIN_B0 // enable LCD displeje
#DEFINE LCD_DATA_LSB PIN_B2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
#INCLUDE "MYLCD.C"
#DEFINE PRIJIMAC PIN_A3 // pin na ktery je pripojen prijimac
#DEFINE SERVO_X PIN_A0 // pin na ktery je pripojeno servo
#DEFINE SERVO_Y PIN_A1
 
int8 bit,x,y;
int counter; // pocitadlo 1 a 0 v detektoru
int x_old=0,y_old;
 
void servo(int uhel, int souradnice)
{
if (X==souradnice) output_high(SERVO_X); else output_high(SERVO_Y);
 
delay_us(62.5*uhel);
 
if (SERVO_X==souradnice) output_low(SERVO_X); else output_low(SERVO_Y);
// delay_ms(10);
}
 
int8 prijmout(int8* bit)
{
// || |
// |--|_____ 1
// |
// |-|__|-|_ 0
 
while (!input(PRIJIMAC)) ; // cekej na jednicku
delay_us(IMPULS/4); // presvec se, jestli je stale 1 po 1/4 impulsu
if (!input(PRIJIMAC)) return(false); // vrat chybu, kdyz neni stale 1
delay_us(3*IMPULS); // pockej na rozhodovaci misto
if (input(PRIJIMAC)) *bit=0; else *bit=1; // dekoduj 1 nebo 0
delay_us(IMPULS); // pockej na konec znaku
 
output_bit(PIN_A0, *bit); // kontrolni vystup
 
return(true); // vrat, ze se cteni povedlo
}
 
int8 read_nibble(int8* value)
{
int8 n; // citac
int8 bit; // pomocna promenna
 
*value=0;
for (n=1; n<=4; n++) // prijmi 4 bity
{
*value >>= 1; // posun jiz prectene do leva
if (0==prijmout(&bit)) return(false); // prijmi bit; pri chybe cteni vrat chybu
*value |= bit << 3; // pridej bit do nibblu
};
return(true); // vrat 1, jako ,ze je vse O.K.
}
 
/*void dekodovat(void)
{
int8 osa, hodnota, kontrola;
 
counter=4;
 
decoder:
 
counter=0; // vynuluj citac
do // vyhledej synchronizacni jednicky
{
if (!prijmout(&bit)) goto decoder; // prijmi bit; pri chybe zacni znovu
if (1==bit) counter++; else goto decoder; // kdyz je bit 1, tak zvys citac; jinak zacni znovu
} while(counter<4); // pockej na 4 jednicky
 
if (!read_nibble(&osa)) goto decoder; // nacti identifikator osy
 
if (!read_nibble(&hodnota)) goto decoder; // nacti 1. nibble; pri chybe zacni znovu
if (!read_nibble(&kontrola)) goto decoder; // nacti 2. nibble; pri chybe zacni znovu
if (hodnota != kontrola) goto decoder; // zacni znovu, pokud jsou ruzne nibble
 
switch (osa) // rozeskoc se podle adresy osy
{
case OSA_X:
{
x=hodnota;
break;
};
case OSA_Y:
{
y=hodnota;
break;
};
case TLs:
{
break;
};
};
}
*/
void main()
{
lcd_init(); // zinicializuj LCD display
 
while (true)
{
int8 osa, hodnota, kontrola;
 
counter=4;
 
decoder:
 
servo(x_old,SERVO_X);
servo(y_old,SERVO_Y);
 
counter=0; // vynuluj citac
do // vyhledej synchronizacni jednicky
{
if (!prijmout(&bit)) goto decoder; // prijmi bit; pri chybe zacni znovu
if (1==bit) counter++; else goto decoder; // kdyz je bit 1, tak zvys citac; jinak zacni znovu
} while(counter<4); // pockej na 4 jednicky
 
if (!read_nibble(&osa)) goto decoder; // nacti identifikator osy
 
if (!read_nibble(&hodnota)) goto decoder; // nacti 1. nibble; pri chybe zacni znovu
if (!read_nibble(&kontrola)) goto decoder; // nacti 2. nibble; pri chybe zacni znovu
if (hodnota != kontrola) goto decoder; // zacni znovu, pokud jsou ruzne nibble
 
switch (osa) // rozeskoc se podle adresy osy
{
case OSA_X:
{
x=hodnota;
x_old=x;
break;
};
case OSA_Y:
{
y=hodnota;
y_old=y
break;
};
case TLs:
{
break;
};
};
 
 
lcd_gotoxy(1,1); // vytiskni X a Y
printf(lcd_putc,"X: %U ", x);
lcd_gotoxy(1,2);
printf(lcd_putc,"Y: %U ", y);
}
}
 
 
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/01/MAIN.C
0,0 → 1,164
#include "main.h"
#include "..\common.h"
 
#DEFINE LCD_RS PIN_B1 // rizeni registru LCD displeje
#DEFINE LCD_E PIN_B0 // enable LCD displeje
#DEFINE LCD_DATA_LSB PIN_B2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
#INCLUDE "MYLCD.C"
#DEFINE PRIJIMAC PIN_A3 // pin na ktery je pripojen prijimac
#DEFINE SERVO_X PIN_A0 // pin na ktery je pripojeno servo
#DEFINE SERVO_Y PIN_A1
 
int8 bit,x,y;
int counter; // pocitadlo 1 a 0 v detektoru
int x_old=0,y_old;
 
void servo(int uhel, int souradnice)
{
if (X==souradnice) output_high(SERVO_X); else output_high(SERVO_Y);
 
delay_us(62.5*uhel);
 
if (SERVO_X==souradnice) output_low(SERVO_X); else output_low(SERVO_Y);
// delay_ms(10);
}
 
int8 prijmout(int8* bit)
{
// || |
// |--|_____ 1
// |
// |-|__|-|_ 0
 
while (!input(PRIJIMAC)) ; // cekej na jednicku
delay_us(IMPULS/4); // presvec se, jestli je stale 1 po 1/4 impulsu
if (!input(PRIJIMAC)) return(false); // vrat chybu, kdyz neni stale 1
delay_us(3*IMPULS); // pockej na rozhodovaci misto
if (input(PRIJIMAC)) *bit=0; else *bit=1; // dekoduj 1 nebo 0
delay_us(IMPULS); // pockej na konec znaku
 
output_bit(PIN_A0, *bit); // kontrolni vystup
 
return(true); // vrat, ze se cteni povedlo
}
 
int8 read_nibble(int8* value)
{
int8 n; // citac
int8 bit; // pomocna promenna
 
*value=0;
for (n=1; n<=4; n++) // prijmi 4 bity
{
*value >>= 1; // posun jiz prectene do leva
if (0==prijmout(&bit)) return(false); // prijmi bit; pri chybe cteni vrat chybu
*value |= bit << 3; // pridej bit do nibblu
};
return(true); // vrat 1, jako ,ze je vse O.K.
}
 
/*void dekodovat(void)
{
int8 osa, hodnota, kontrola;
 
counter=4;
 
decoder:
 
counter=0; // vynuluj citac
do // vyhledej synchronizacni jednicky
{
if (!prijmout(&bit)) goto decoder; // prijmi bit; pri chybe zacni znovu
if (1==bit) counter++; else goto decoder; // kdyz je bit 1, tak zvys citac; jinak zacni znovu
} while(counter<4); // pockej na 4 jednicky
 
if (!read_nibble(&osa)) goto decoder; // nacti identifikator osy
 
if (!read_nibble(&hodnota)) goto decoder; // nacti 1. nibble; pri chybe zacni znovu
if (!read_nibble(&kontrola)) goto decoder; // nacti 2. nibble; pri chybe zacni znovu
if (hodnota != kontrola) goto decoder; // zacni znovu, pokud jsou ruzne nibble
 
switch (osa) // rozeskoc se podle adresy osy
{
case OSA_X:
{
x=hodnota;
break;
};
case OSA_Y:
{
y=hodnota;
break;
};
case TLs:
{
break;
};
};
}
*/
void main()
{
lcd_init(); // zinicializuj LCD display
 
while (true)
{
int8 osa, hodnota, kontrola;
 
counter=4;
 
decoder:
 
servo(x_old,SERVO_X);
servo(y_old,SERVO_Y);
 
counter=0; // vynuluj citac
do // vyhledej synchronizacni jednicky
{
if (!prijmout(&bit)) goto decoder; // prijmi bit; pri chybe zacni znovu
if (1==bit) counter++; else goto decoder; // kdyz je bit 1, tak zvys citac; jinak zacni znovu
} while(counter<4); // pockej na 4 jednicky
 
if (!read_nibble(&osa)) goto decoder; // nacti identifikator osy
 
if (!read_nibble(&hodnota)) goto decoder; // nacti 1. nibble; pri chybe zacni znovu
if (!read_nibble(&kontrola)) goto decoder; // nacti 2. nibble; pri chybe zacni znovu
if (hodnota != kontrola) goto decoder; // zacni znovu, pokud jsou ruzne nibble
 
switch (osa) // rozeskoc se podle adresy osy
{
case OSA_X:
{
x=hodnota;
x_old=x;
break;
};
case OSA_Y:
{
y=hodnota;
y_old=y;
break;
};
case TLs:
{
break;
};
};
 
 
lcd_gotoxy(1,1); // vytiskni X a Y
printf(lcd_putc,"X: %U ", x);
lcd_gotoxy(1,2);
printf(lcd_putc,"Y: %U ", y);
}
}
 
 
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/01/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
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/01/MAIN.ERR
0,0 → 1,0
No Errors
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/01/MAIN.H
0,0 → 1,4
#include <16F84.h>
#use delay(clock=4000000)
#fuses XT,NOWDT,PUT
 
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/01/MAIN.HEX
0,0 → 1,95
:1000000000308A00512A00000A108A100A11820763
:1000100028340C34013406341A30840000080319E3
:10002000202801308D008C018C0B14288D0B132897
:100030004A308C008C0B1A2800000000800B11281D
:1000400000340608C339A100200D8C008C0DFC3053
:100050008C050C083C392104860006148316061012
:1000600000008312061083160610831200349E08C7
:10007000031D3C2886103D288614831686108312A3
:100080009F0E1F08A00021209F0E1F08A000212006
:100090000D308C008C0B4A28003414309A000C2050
:1000A000C33083168605831286108316861083124A
:1000B000061083160610831297011708023C031CD2
:1000C000692802309A000C200330A0002120970AF2
:1000D0005D280D308C008C0B6B280230A000212095
:1000E0000D308C008C0B722897011708023C031C02
:1000F00085281708042098009E0118089F003720C3
:1001000002309A000C20970A7528562A8E308C00EF
:100110001A088D0019088E008F018D08031D9A287A
:100120000E088D008E0108308C028D08031D9A2860
:100130008C01A22803108D1BA1288E0D8D0D8C0320
:100140009A288D1300003A29190803191529A100CE
:100150001D0803191529A107031CAF28B6287F30F5
:10016000A102031C152903191529BA288130A107FA
:100170000318152921088C008D018E018F011A08A2
:10018000A500A5171B08A4001C08A3001830A10097
:10019000A201231CE32820088F07031CD5288E0A00
:1001A000031DD5288D0A0319A2171F088E07031CEB
:1001B000DC288D0A0319A2171E089B009B171B0839
:1001C0008D070318A217A20D8D0C8E0C8F0CA50C99
:1001D000A40CA30C0310A10BC82801308C07031832
:1001E00015298D1BFA28A50D8F0D8E0D8D0D8C03F5
:1001F00003191529A51F0B298F0A031D0B298E0A28
:10020000031D0B298D0A031D0B298D0C8E0C8F0CE1
:100210008C0A031915291A08A2001E08A206A21F9B
:1002200013298D1719298D1319298C018D018E0120
:100230008F01000049291D308400FC308005800CAE
:10024000800C00080319282926290000800B252985
:10025000542918080F02031D322983160510831232
:100260000514362983168510831285149A01170800
:10027000990086289C019B017A309A00843099006D
:100280000F08A0000E089F000D089E000C089D009E
:10029000A4280C0899000D089A000E089B000F086E
:1002A0009C000C089D001B291808283C031D5D2993
:1002B0008316051083120510612983168510831299
:1002C00085100034831685158312851D622914302C
:1002D0008C008C0B69290000831685158312851903
:1002E000742900308D009829F9308C008C0B762908
:1002F00000000000831685158312851D83291A08C6
:100300008400800187291A0884000130800053305E
:100310008C008C0B89291A0884008008031D9229FF
:1003200005109329051483160510013083128D00E2
:100330000034170884008001013098001808043C3C
:10034000031CBE29170884000310000C8C008000D9
:1003500019309A0062218D08031DB12900308D00EB
:10036000C02917088400190D8C008C0D8C0DF830F5
:100370008C050C0800048000980A9E2901308D002D
:10038000003401301A029C001B08023C031DCA29DC
:1003900040309C071C0880389D009E011D089F006E
:1003A0003720003419088C000C300C020319E529A1
:1003B0000A300C020319ED290D300C020319F32940
:1003C00008300C020319F829FD299E0101309F0015
:1003D000372002309A000C20092A01309A0002309E
:1003E0009B00C121092A01309A009B00C121092AE2
:1003F0009E0110309F003720092A19081F3C031C5A
:10040000032A0730990501309E0019089F00372004
:10041000092A00341A088D0119020318122A190832
:100420008C001E2A8C0108309B00990D8C0D1A0837
:100430000C0203188C008D0D9B0B152A00340D083F
:100440001708990064309A000A220C0897000D08DA
:100450003030031D322A181898159819382A181A9E
:100460002030342A981118128D070D089900D221D6
:10047000170899000A309A000A220C0897000D0804
:100480003030031D472A98194B2A181A20308D073F
:100490000D089900D2213030970717089900D22112
:1004A000003484011F30830592014D2804309100EF
:1004B0001208970028309800292113089700293046
:1004C0009800292191010E309A0062218D08031DA8
:1004D0006A2A582A0E0B6E2A910A6F2A582A110886
:1004E000033C0318632A1430970099218D08031DDB
:1004F0007A2A582A1530970099218D08031D812AE0
:10050000582A1630970099218D08031D882A582AE9
:100510001608150203198D2A582A1408FD3E0318DF
:100520009E2A033ED32A15088F000F0892009E2AA8
:1005300015089000100893009E2A9E2A01309A0008
:100540009B00C12158309900D2213A309900D22124
:1005500020309900D2210F089700183098001F22F0
:100560000630970020309900D221970BB22A013033
:100570009A0002309B00C12159309900D2213A30B3
:100580009900D22120309900D2211008970018300C
:1005900098001F220630970020309900D221970B37
:1005A000CC2A562A63000A108A140A118207932A59
:0405B000982A9D2ABE
:02400E00F13F80
:00000001FF
;PIC16F84
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/01/MAIN.LST
0,0 → 1,1033
CCS PCW C Compiler, Version 3.110, 15448
 
Filename: d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\main.LST
 
ROM used: 730 (71%)
Largest free fragment is 294
RAM used: 9 (13%) at main() level
26 (38%) worst case
Stack: 5 locations
 
*
0000: MOVLW 00
0001: MOVWF 0A
0002: GOTO 251
0003: NOP
.................... #include "main.h"
.................... #include <16F84.h>
.................... //////// Standard Header file for the PIC16F84 device ////////////////
.................... #device PIC16F84
.................... #list
....................
.................... #use delay(clock=4000000)
*
000C: MOVLW 1A
000D: MOVWF 04
000E: MOVF 00,W
000F: BTFSC 03.2
0010: GOTO 020
0011: MOVLW 01
0012: MOVWF 0D
0013: CLRF 0C
0014: DECFSZ 0C,F
0015: GOTO 014
0016: DECFSZ 0D,F
0017: GOTO 013
0018: MOVLW 4A
0019: MOVWF 0C
001A: DECFSZ 0C,F
001B: GOTO 01A
001C: NOP
001D: NOP
001E: DECFSZ 00,F
001F: GOTO 011
0020: RETLW 00
*
011B: MOVLW 1D
011C: MOVWF 04
011D: MOVLW FC
011E: ANDWF 00,F
011F: RRF 00,F
0120: RRF 00,F
0121: MOVF 00,W
0122: BTFSC 03.2
0123: GOTO 128
0124: GOTO 126
0125: NOP
0126: DECFSZ 00,F
0127: GOTO 125
0128: GOTO 154 (RETURN)
.................... #fuses XT,NOWDT,PUT
....................
....................
.................... #include "..\common.h"
.................... #DEFINE OSA_X 0 // adresy os
.................... #DEFINE OSA_Y 1
.................... #DEFINE TLs 2
.................... #DEFINE IMPULS 250 // sirka impulsu
....................
....................
.................... #DEFINE LCD_RS PIN_B1 // rizeni registru LCD displeje
.................... #DEFINE LCD_E PIN_B0 // enable LCD displeje
.................... #DEFINE LCD_DATA_LSB PIN_B2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
.................... #INCLUDE "MYLCD.C"
.................... // LCD modul pro ovladani dvouradkoveho LCD modulu se standardnim Hitachi radicem
.................... // (c)miho 2002
.................... //
.................... // Historie:
.................... //
.................... // 0.0 Uvodni verze se snadnou definici portu LCD displeje
.................... //
.................... //
.................... // Funkce:
.................... //
.................... // lcd_init() inicializuje LCD displej a porty, nutno volat jako prvni
.................... //
.................... // lcd_putc(c) zapis snaku do lcd displeje, zpracovava nasledujici ridici znaky
.................... // \f = \x0C - nova stranka - smazani displeje
.................... // \n = \x0A - odradkovani (prechod na druhou radku)
.................... // \b = \x08 - backspace - posunuti kurzoru o 1 pozici zpet
.................... // \r = \x0D - goto home to position 1,1
.................... // \0 .. \7 - definovatelne znaky v pozicich 0 az 7 v CGRAM
.................... // \20 .. \27 - alternativne zapsane znaky (oktalove) v pozicich 0 az 7 CGRAM
.................... // Pozor na to, ze funkce printf konci tisk pokud narazi na \0 (konec retezce)
.................... //
.................... // lcd_gotoxy(x,y) presune kurzor na uvedenou adresu
.................... // nekontroluje parametry
.................... //
.................... // lcd_cursor_on zapne kurzor
.................... // lcd_cursor_off vypne kurzor
.................... //
.................... // lcd_define_char(Index, Def) Makro, ktere definuje znaky od pozice Index obsahem definicniho
.................... // retezce Def. Kazdych 8 znaku retezce Def definuje dalsi znak v CGRAM.
.................... // Kapacita CGRAM je celkem 8 znaku s indexem 0 az 7.
.................... // Na konci se provede lcd_gotoxy(1,1).
.................... // Na konci teto knihovny je priklad pouziti definovanych znaku
.................... //
.................... // Definice portu:
.................... //
.................... // #DEFINE LCD_RS PIN_B2 // rizeni registru LCD displeje
.................... // #DEFINE LCD_E PIN_B1 // enable LCD displeje
.................... // #DEFINE LCD_DATA_LSB PIN_C2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
....................
....................
....................
....................
.................... // Privatni sekce, cist jen v pripade, ze neco nefunguje
....................
....................
....................
....................
.................... // Generovane defince portu pro ucely teto knihovny aby kod generoval spravne IO operace a soucasne
.................... // bylo mozne jednoduse deklarovat pripojene piny LCD displeje pri pouziti teto knihovny. Problem spociva
.................... // v tom, ze se musi spravne ridit smery portu a soucasne datovy port zabira jen 4 bity ze zadaneho portu
.................... //
.................... #DEFINE LCD_SHIFT (LCD_DATA_LSB&7) // pocet bitu posuvu dataoveho kanalu v datovem portu
.................... #DEFINE LCD_PORT (LCD_DATA_LSB>>3) // adresa LCD datoveho portu
.................... #DEFINE LCD_TRIS (LCD_PORT+0x80) // adresa prislusneho TRIS registru
.................... #DEFINE LCD_MASK (0xF<<LCD_SHIFT) // maska platnych bitu
.................... //
.................... #IF LCD_SHIFT>4 // kontrola mezi
.................... #ERROR LCD data port LSB bit not in range 0..4
.................... #ENDIF
....................
....................
.................... // Definice konstant pro LCD display
.................... //
.................... #define LCD_CURSOR_ON_ 0x0E // kurzor jako blikajici radka pod znakem
.................... #define LCD_CURSOR_OFF_ 0x0C // zadny kurzor
.................... #define LCD_LINE_2 0x40 // adresa 1. znaku 2. radky
....................
....................
.................... // Definice rezimu LCD displeje
.................... //
.................... BYTE const LCD_INIT_STRING[4] =
.................... {
.................... 0x28, // intrfejs 4 bity, 2 radky, font 5x7
.................... LCD_CURSOR_OFF_, // display on, kurzor off,
.................... 0x01, // clear displeje
.................... 0x06 // inkrement pozice kurzoru (posun kurzoru doprava)
.................... };
*
0004: BCF 0A.0
0005: BCF 0A.1
0006: BCF 0A.2
0007: ADDWF 02,F
0008: RETLW 28
0009: RETLW 0C
000A: RETLW 01
000B: RETLW 06
....................
....................
.................... // Odesle nibble do displeje (posle data a klikne signalem e)
.................... //
.................... void lcd_send_nibble( BYTE n )
.................... {
.................... *LCD_PORT = (*LCD_PORT & ~LCD_MASK) | ((n << LCD_SHIFT) & LCD_MASK); // nastav datove bity portu a ostatni zachovej
*
0021: MOVF 06,W
0022: ANDLW C3
0023: MOVWF 21
0024: RLF 20,W
0025: MOVWF 0C
0026: RLF 0C,F
0027: MOVLW FC
0028: ANDWF 0C,F
0029: MOVF 0C,W
002A: ANDLW 3C
002B: IORWF 21,W
002C: MOVWF 06
.................... output_bit(LCD_E,1); // vzestupna hrana
002D: BSF 06.0
002E: BSF 03.5
002F: BCF 06.0
.................... delay_us(1); // pockej alespon 450ns od e nebo alespon 195ns od dat
0030: NOP
.................... output_bit(LCD_E,0); // sestupna hrana (minimalni perioda e je 1us)
0031: BCF 03.5
0032: BCF 06.0
0033: BSF 03.5
0034: BCF 06.0
0035: BCF 03.5
0036: RETLW 00
.................... }
....................
....................
.................... // Odesle bajt do registru LCD
.................... //
.................... // Pokud je Adr=0 .. instrukcni registr
.................... // Pokud je Adr=1 .. datovy registr
.................... //
.................... void lcd_send_byte( BOOLEAN Adr, BYTE n )
.................... {
.................... output_bit(LCD_RS,Adr); // vyber registr
0037: MOVF 1E,F
0038: BTFSS 03.2
0039: GOTO 03C
003A: BCF 06.1
003B: GOTO 03D
003C: BSF 06.1
003D: BSF 03.5
003E: BCF 06.1
.................... swap(n);
003F: BCF 03.5
0040: SWAPF 1F,F
.................... lcd_send_nibble(n); // posli horni pulku bajtu
0041: MOVF 1F,W
0042: MOVWF 20
0043: CALL 021
.................... swap(n);
0044: SWAPF 1F,F
.................... lcd_send_nibble(n); // posli spodni pulku bajtu
0045: MOVF 1F,W
0046: MOVWF 20
0047: CALL 021
.................... delay_us(40); // minimalni doba na provedeni prikazu
0048: MOVLW 0D
0049: MOVWF 0C
004A: DECFSZ 0C,F
004B: GOTO 04A
004C: RETLW 00
.................... }
....................
....................
.................... // Provede inicializaci LCD displeje, smaze obsah a nastavi mod displeje
.................... //
.................... // Tato procedura se musi volat pred pouzitim ostatnich lcd_ procedur
.................... //
.................... void lcd_init()
.................... {
....................
.................... int i; // pocitadlo cyklu
....................
.................... delay_ms(20); // spozdeni pro provedeni startu displeje po zapnuti napajeni
004D: MOVLW 14
004E: MOVWF 1A
004F: CALL 00C
....................
.................... *LCD_TRIS = *LCD_TRIS & ~LCD_MASK; // nuluj odpovidajici bity tris registru datoveho portu LCD
0050: MOVLW C3
0051: BSF 03.5
0052: ANDWF 06,F
....................
.................... output_bit(LCD_RS,0); // nastav jako vystup a nastav klidovy stav
0053: BCF 03.5
0054: BCF 06.1
0055: BSF 03.5
0056: BCF 06.1
.................... output_bit(LCD_E,0); // nastav jako vystup a nastav klidovy stav
0057: BCF 03.5
0058: BCF 06.0
0059: BSF 03.5
005A: BCF 06.0
....................
.................... for (i=0; i<3; i++) // nastav lcd do rezimu 8 bitu sbernice
005B: BCF 03.5
005C: CLRF 17
005D: MOVF 17,W
005E: SUBLW 02
005F: BTFSS 03.0
0060: GOTO 069
.................... {
.................... delay_ms(2); // muze byt rozdelany prenos dat (2x 4 bity) nebo pomaly povel
0061: MOVLW 02
0062: MOVWF 1A
0063: CALL 00C
.................... lcd_send_nibble(3); // rezim 8 bitu
0064: MOVLW 03
0065: MOVWF 20
0066: CALL 021
.................... }
0067: INCF 17,F
0068: GOTO 05D
....................
.................... delay_us(40); // cas na zpracovani
0069: MOVLW 0D
006A: MOVWF 0C
006B: DECFSZ 0C,F
006C: GOTO 06B
.................... lcd_send_nibble(2); // nastav rezim 4 bitu (plati od nasledujiciho prenosu)
006D: MOVLW 02
006E: MOVWF 20
006F: CALL 021
.................... delay_us(40); // cas na zpracovani
0070: MOVLW 0D
0071: MOVWF 0C
0072: DECFSZ 0C,F
0073: GOTO 072
....................
.................... for (i=0;i<3;i++) // proved inicializaci (nastaveni modu, smazani apod)
0074: CLRF 17
0075: MOVF 17,W
0076: SUBLW 02
0077: BTFSS 03.0
0078: GOTO 085
.................... {
.................... lcd_send_byte(0,LCD_INIT_STRING[i]);
0079: MOVF 17,W
007A: CALL 004
007B: MOVWF 18
007C: CLRF 1E
007D: MOVF 18,W
007E: MOVWF 1F
007F: CALL 037
.................... delay_ms(2);
0080: MOVLW 02
0081: MOVWF 1A
0082: CALL 00C
.................... }
0083: INCF 17,F
0084: GOTO 075
0085: GOTO 256 (RETURN)
.................... }
....................
....................
.................... // Proved presun kurzoru
.................... //
.................... // Pozice 1.1 je domu
.................... //
.................... void lcd_gotoxy( BYTE x, BYTE y)
.................... {
....................
.................... BYTE Adr;
....................
.................... Adr=x-1;
*
01C1: MOVLW 01
01C2: SUBWF 1A,W
01C3: MOVWF 1C
.................... if(y==2)
01C4: MOVF 1B,W
01C5: SUBLW 02
01C6: BTFSS 03.2
01C7: GOTO 1CA
.................... Adr+=LCD_LINE_2;
01C8: MOVLW 40
01C9: ADDWF 1C,F
....................
.................... lcd_send_byte(0,0x80|Adr);
01CA: MOVF 1C,W
01CB: IORLW 80
01CC: MOVWF 1D
01CD: CLRF 1E
01CE: MOVF 1D,W
01CF: MOVWF 1F
01D0: CALL 037
01D1: RETLW 00
.................... }
....................
....................
.................... // Zapis znaku na displej, zpracovani ridicich znaku
.................... //
.................... void lcd_putc( char c)
.................... {
....................
.................... switch (c)
01D2: MOVF 19,W
01D3: MOVWF 0C
01D4: MOVLW 0C
01D5: SUBWF 0C,W
01D6: BTFSC 03.2
01D7: GOTO 1E5
01D8: MOVLW 0A
01D9: SUBWF 0C,W
01DA: BTFSC 03.2
01DB: GOTO 1ED
01DC: MOVLW 0D
01DD: SUBWF 0C,W
01DE: BTFSC 03.2
01DF: GOTO 1F3
01E0: MOVLW 08
01E1: SUBWF 0C,W
01E2: BTFSC 03.2
01E3: GOTO 1F8
01E4: GOTO 1FD
.................... {
.................... case '\f' : lcd_send_byte(0,1); // smaz displej
01E5: CLRF 1E
01E6: MOVLW 01
01E7: MOVWF 1F
01E8: CALL 037
.................... delay_ms(2);
01E9: MOVLW 02
01EA: MOVWF 1A
01EB: CALL 00C
.................... break;
01EC: GOTO 209
.................... case '\n' : lcd_gotoxy(1,2); break; // presun se na 1. znak 2. radky
01ED: MOVLW 01
01EE: MOVWF 1A
01EF: MOVLW 02
01F0: MOVWF 1B
01F1: CALL 1C1
01F2: GOTO 209
.................... case '\r' : lcd_gotoxy(1,1); break; // presun home
01F3: MOVLW 01
01F4: MOVWF 1A
01F5: MOVWF 1B
01F6: CALL 1C1
01F7: GOTO 209
.................... case '\b' : lcd_send_byte(0,0x10); break; // posun kurzor o 1 zpet
01F8: CLRF 1E
01F9: MOVLW 10
01FA: MOVWF 1F
01FB: CALL 037
01FC: GOTO 209
.................... default : if (c<0x20) c&=0x7; // preklopeni definovatelnych znaku na rozsah 0 az 0x1F
01FD: MOVF 19,W
01FE: SUBLW 1F
01FF: BTFSS 03.0
0200: GOTO 203
0201: MOVLW 07
0202: ANDWF 19,F
.................... lcd_send_byte(1,c); break; // zapis znak
0203: MOVLW 01
0204: MOVWF 1E
0205: MOVF 19,W
0206: MOVWF 1F
0207: CALL 037
0208: GOTO 209
.................... }
0209: RETLW 00
.................... }
....................
....................
.................... // Zapni kurzor
.................... //
.................... void lcd_cursor_on()
.................... {
.................... lcd_send_byte(0,LCD_CURSOR_ON_);
.................... }
....................
....................
.................... // Vypni kurzor
.................... //
.................... void lcd_cursor_off()
.................... {
.................... lcd_send_byte(0,LCD_CURSOR_OFF_);
.................... }
....................
....................
.................... // Definice vlastnich fontu
.................... //
.................... // Vlastnich definic muze byt jen 8 do pozic 0 az 7 pameti CGRAM radice lcd displeje
.................... // Pro snadne definovani jsou pripraveny nasledujici definice a na konci souboru je uveden
.................... // priklad pouziti definovanych znaku.
....................
....................
.................... // Pomocna procedura pro posilani ridicich dat do radice displeje
.................... //
.................... void lcd_putc2(int Data)
.................... {
.................... lcd_send_byte(1,Data);
.................... }
....................
....................
.................... // Pomocne definice pro programovani obsahu CGRAM
.................... //
.................... #DEFINE lcd_define_start(Code) lcd_send_byte(0,0x40+(Code<<3)); delay_ms(2)
.................... #DEFINE lcd_define_def(String) printf(lcd_putc2,String);
.................... #DEFINE lcd_define_end() lcd_send_byte(0,3); delay_ms(2)
....................
....................
.................... // Vlastni vykonne makro pro definovani fontu do pozice Index CGRAM s definicnim retezcem Def
.................... //
.................... #DEFINE lcd_define_char(Index, Def) lcd_define_start(Index); lcd_define_def(Def); lcd_define_end();
....................
....................
.................... // Pripravene definice fontu vybranych znaku
.................... // V tabulce nesmi byt 00 (konec retezce v printf()), misto toho davame 80
.................... //
.................... #DEFINE LCD_CHAR_BAT100 "\x0E\x1F\x1F\x1F\x1F\x1F\x1F\x1F" /* symbol plne baterie */
.................... #DEFINE LCD_CHAR_BAT50 "\x0E\x1F\x11\x11\x13\x17\x1F\x1F" /* symbol polovicni baterie */
.................... #DEFINE LCD_CHAR_BAT0 "\x0E\x1F\x11\x11\x11\x11\x11\x1F" /* symbol vybite baterie */
.................... #DEFINE LCD_CHAR_LUA "\x04\x0E\x11\x11\x1F\x11\x11\x80" /* A s carkou */
.................... #DEFINE LCD_CHAR_LLA "\x01\x02\x0E\x01\x1F\x11\x0F\x80" /* a s carkou */
.................... #DEFINE LCD_CHAR_HUC "\x0A\x0E\x11\x10\x10\x11\x0E\x80" /* C s hackem */
.................... #DEFINE LCD_CHAR_HLC "\x0A\x04\x0E\x10\x10\x11\x0E\x80" /* c s hackem */
.................... #DEFINE LCD_CHAR_HUD "\x0A\x1C\x12\x11\x11\x12\x1C\x80" /* D s hackem */
.................... #DEFINE LCD_CHAR_HLD "\x05\x03\x0D\x13\x11\x11\x0F\x80" /* d s hackem */
.................... #DEFINE LCD_CHAR_LUE "\x04\x1F\x10\x10\x1E\x10\x1F\x80" /* E s carkou */
.................... #DEFINE LCD_CHAR_LLE "\x01\x02\x0E\x11\x1F\x10\x0E\x80" /* e s carkou */
.................... #DEFINE LCD_CHAR_HUE "\x0A\x1F\x10\x1E\x10\x10\x1F\x80" /* E s hackem */
.................... #DEFINE LCD_CHAR_HLE "\x0A\x04\x0E\x11\x1F\x10\x0E\x80" /* e s hackem */
.................... #DEFINE LCD_CHAR_LUI "\x04\x0E\x04\x04\x04\x04\x0E\x80" /* I s carkou */
.................... #DEFINE LCD_CHAR_LLI "\x02\x04\x80\x0C\x04\x04\x0E\x80" /* i s carkou */
.................... #DEFINE LCD_CHAR_HUN "\x0A\x15\x11\x19\x15\x13\x11\x80" /* N s hackem */
.................... #DEFINE LCD_CHAR_HLN "\x0A\x04\x16\x19\x11\x11\x11\x80" /* n s hackem */
.................... #DEFINE LCD_CHAR_LUO "\x04\x0E\x11\x11\x11\x11\x0E\x80" /* O s carkou */
.................... #DEFINE LCD_CHAR_LLO "\x02\x04\x0E\x11\x11\x11\x0E\x80" /* o s carkou */
.................... #DEFINE LCD_CHAR_HUR "\x0A\x1E\x11\x1E\x14\x12\x11\x80" /* R s hackem */
.................... #DEFINE LCD_CHAR_HLR "\x0A\x04\x16\x19\x10\x10\x10\x80" /* r s hackem */
.................... #DEFINE LCD_CHAR_HUS "\x0A\x0F\x10\x0E\x01\x01\x1E\x80" /* S s hackem */
.................... #DEFINE LCD_CHAR_HLS "\x0A\x04\x0E\x10\x0E\x01\x1E\x80" /* s s hackem */
.................... #DEFINE LCD_CHAR_HUT "\x0A\x1F\x04\x04\x04\x04\x04\x80" /* T s hackem */
.................... #DEFINE LCD_CHAR_HLT "\x0A\x0C\x1C\x08\x08\x09\x06\x80" /* t s hackem */
.................... #DEFINE LCD_CHAR_LUU "\x02\x15\x11\x11\x11\x11\x0E\x80" /* U s carkou */
.................... #DEFINE LCD_CHAR_LLU "\x02\x04\x11\x11\x11\x13\x0D\x80" /* u s carkou */
.................... #DEFINE LCD_CHAR_CUU "\x06\x17\x11\x11\x11\x11\x0E\x80" /* U s krouzkem */
.................... #DEFINE LCD_CHAR_CLU "\x06\x06\x11\x11\x11\x11\x0E\x80" /* u s krouzkem */
.................... #DEFINE LCD_CHAR_LUY "\x02\x15\x11\x0A\x04\x04\x04\x80" /* Y s carkou */
.................... #DEFINE LCD_CHAR_LLY "\x02\x04\x11\x11\x0F\x01\x0E\x80" /* y s carkou */
.................... #DEFINE LCD_CHAR_HUZ "\x0A\x1F\x01\x02\x04\x08\x1F\x80" /* Z s hackem */
.................... #DEFINE LCD_CHAR_HLZ "\x0A\x04\x1F\x02\x04\x08\x1F\x80" /* z s hackem */
....................
....................
.................... // Priklad pouziti definovanych znaku
.................... //
.................... //
.................... //void lcd_sample()
.................... //{
.................... // lcd_define_char(0,LCD_CHAR_BAT50); // Priklad definice znaku baterie do pozice 0
.................... // lcd_define_char(2,LCD_CHAR_HLE LCD_CHAR_LUI); // Priklad definice znaku e s hackem a I s carkou od pozice 2
.................... // // vsimnete si, ze neni carka mezi retezci s definici (oba retezce definuji
.................... // // jediny definicni retezec)
.................... // printf(lcd_putc,"\fZnaky:\20\22\23"); // priklad vypisu znaku z pozice 0, 2 a 3
.................... // delay_ms(1000);
.................... // lcd_define_char(0,LCD_CHAR_BAT0); // Predefinovani tvaru znaku v pozici 0
.................... // delay_ms(1000);
.................... //}
....................
.................... #DEFINE PRIJIMAC PIN_A3 // pin na ktery je pripojen prijimac
.................... #DEFINE SERVO_X PIN_A0 // pin na ktery je pripojeno servo
.................... #DEFINE SERVO_Y PIN_A1
....................
.................... int8 bit,x,y;
.................... int counter; // pocitadlo 1 a 0 v detektoru
.................... int x_old=0,y_old;
....................
.................... void servo(int uhel, int souradnice)
.................... {
....................
....................
.................... if (X==souradnice) output_high(SERVO_X); else output_high(SERVO_Y);
*
0129: MOVF 18,W
012A: SUBWF 0F,W
012B: BTFSS 03.2
012C: GOTO 132
012D: BSF 03.5
012E: BCF 05.0
012F: BCF 03.5
0130: BSF 05.0
0131: GOTO 136
0132: BSF 03.5
0133: BCF 05.1
0134: BCF 03.5
0135: BSF 05.1
....................
.................... delay_us(62.5*uhel);
0136: CLRF 1A
0137: MOVF 17,W
0138: MOVWF 19
0139: GOTO 086
013A: CLRF 1C
013B: CLRF 1B
013C: MOVLW 7A
013D: MOVWF 1A
013E: MOVLW 84
013F: MOVWF 19
0140: MOVF 0F,W
0141: MOVWF 20
0142: MOVF 0E,W
0143: MOVWF 1F
0144: MOVF 0D,W
0145: MOVWF 1E
0146: MOVF 0C,W
0147: MOVWF 1D
0148: GOTO 0A4
0149: MOVF 0C,W
014A: MOVWF 19
014B: MOVF 0D,W
014C: MOVWF 1A
014D: MOVF 0E,W
014E: MOVWF 1B
014F: MOVF 0F,W
0150: MOVWF 1C
0151: MOVF 0C,W
0152: MOVWF 1D
0153: GOTO 11B
....................
.................... if (SERVO_X==souradnice) output_low(SERVO_X); else output_low(SERVO_Y);
0154: MOVF 18,W
0155: SUBLW 28
0156: BTFSS 03.2
0157: GOTO 15D
0158: BSF 03.5
0159: BCF 05.0
015A: BCF 03.5
015B: BCF 05.0
015C: GOTO 161
015D: BSF 03.5
015E: BCF 05.1
015F: BCF 03.5
0160: BCF 05.1
0161: RETLW 00
.................... // delay_ms(10);
....................
....................
.................... }
....................
.................... int8 prijmout(int8* bit)
.................... {
.................... // || |
.................... // |--|_____ 1
.................... // |
.................... // |-|__|-|_ 0
....................
.................... while (!input(PRIJIMAC)) ; // cekej na jednicku
0162: BSF 03.5
0163: BSF 05.3
0164: BCF 03.5
0165: BTFSS 05.3
0166: GOTO 162
.................... delay_us(IMPULS/4); // presvec se, jestli je stale 1 po 1/4 impulsu
0167: MOVLW 14
0168: MOVWF 0C
0169: DECFSZ 0C,F
016A: GOTO 169
016B: NOP
.................... if (!input(PRIJIMAC)) return(false); // vrat chybu, kdyz neni stale 1
016C: BSF 03.5
016D: BSF 05.3
016E: BCF 03.5
016F: BTFSC 05.3
0170: GOTO 174
0171: MOVLW 00
0172: MOVWF 0D
0173: GOTO 198
.................... delay_us(3*IMPULS); // pockej na rozhodovaci misto
0174: MOVLW F9
0175: MOVWF 0C
0176: DECFSZ 0C,F
0177: GOTO 176
0178: NOP
0179: NOP
.................... if (input(PRIJIMAC)) *bit=0; else *bit=1; // dekoduj 1 nebo 0
017A: BSF 03.5
017B: BSF 05.3
017C: BCF 03.5
017D: BTFSS 05.3
017E: GOTO 183
017F: MOVF 1A,W
0180: MOVWF 04
0181: CLRF 00
0182: GOTO 187
0183: MOVF 1A,W
0184: MOVWF 04
0185: MOVLW 01
0186: MOVWF 00
.................... delay_us(IMPULS); // pockej na konec znaku
0187: MOVLW 53
0188: MOVWF 0C
0189: DECFSZ 0C,F
018A: GOTO 189
....................
.................... output_bit(PIN_A0, *bit); // kontrolni vystup
018B: MOVF 1A,W
018C: MOVWF 04
018D: MOVF 00,F
018E: BTFSS 03.2
018F: GOTO 192
0190: BCF 05.0
0191: GOTO 193
0192: BSF 05.0
0193: BSF 03.5
0194: BCF 05.0
....................
.................... return(true); // vrat, ze se cteni povedlo
0195: MOVLW 01
0196: BCF 03.5
0197: MOVWF 0D
0198: RETLW 00
.................... }
....................
.................... int8 read_nibble(int8* value)
.................... {
.................... int8 n; // citac
.................... int8 bit; // pomocna promenna
....................
.................... *value=0;
0199: MOVF 17,W
019A: MOVWF 04
019B: CLRF 00
.................... for (n=1; n<=4; n++) // prijmi 4 bity
019C: MOVLW 01
019D: MOVWF 18
019E: MOVF 18,W
019F: SUBLW 04
01A0: BTFSS 03.0
01A1: GOTO 1BE
.................... {
.................... *value >>= 1; // posun jiz prectene do leva
01A2: MOVF 17,W
01A3: MOVWF 04
01A4: BCF 03.0
01A5: RRF 00,W
01A6: MOVWF 0C
01A7: MOVWF 00
.................... if (0==prijmout(&bit)) return(false); // prijmi bit; pri chybe cteni vrat chybu
01A8: MOVLW 19
01A9: MOVWF 1A
01AA: CALL 162
01AB: MOVF 0D,F
01AC: BTFSS 03.2
01AD: GOTO 1B1
01AE: MOVLW 00
01AF: MOVWF 0D
01B0: GOTO 1C0
.................... *value |= bit << 3; // pridej bit do nibblu
01B1: MOVF 17,W
01B2: MOVWF 04
01B3: RLF 19,W
01B4: MOVWF 0C
01B5: RLF 0C,F
01B6: RLF 0C,F
01B7: MOVLW F8
01B8: ANDWF 0C,F
01B9: MOVF 0C,W
01BA: IORWF 00,W
01BB: MOVWF 00
.................... };
01BC: INCF 18,F
01BD: GOTO 19E
.................... return(true); // vrat 1, jako ,ze je vse O.K.
01BE: MOVLW 01
01BF: MOVWF 0D
01C0: RETLW 00
.................... }
....................
.................... /*void dekodovat(void)
.................... {
.................... int8 osa, hodnota, kontrola;
....................
.................... counter=4;
....................
.................... decoder:
....................
.................... counter=0; // vynuluj citac
.................... do // vyhledej synchronizacni jednicky
.................... {
.................... if (!prijmout(&bit)) goto decoder; // prijmi bit; pri chybe zacni znovu
.................... if (1==bit) counter++; else goto decoder; // kdyz je bit 1, tak zvys citac; jinak zacni znovu
.................... } while(counter<4); // pockej na 4 jednicky
....................
.................... if (!read_nibble(&osa)) goto decoder; // nacti identifikator osy
....................
.................... if (!read_nibble(&hodnota)) goto decoder; // nacti 1. nibble; pri chybe zacni znovu
.................... if (!read_nibble(&kontrola)) goto decoder; // nacti 2. nibble; pri chybe zacni znovu
.................... if (hodnota != kontrola) goto decoder; // zacni znovu, pokud jsou ruzne nibble
....................
.................... switch (osa) // rozeskoc se podle adresy osy
.................... {
.................... case OSA_X:
.................... {
.................... x=hodnota;
.................... break;
.................... };
.................... case OSA_Y:
.................... {
.................... y=hodnota;
.................... break;
.................... };
.................... case TLs:
.................... {
.................... break;
.................... };
.................... };
.................... }
.................... */
.................... void main()
.................... {
*
0251: CLRF 04
0252: MOVLW 1F
0253: ANDWF 03,F
0254: CLRF 12
.................... lcd_init(); // zinicializuj LCD display
0255: GOTO 04D
....................
.................... while (true)
.................... {
.................... int8 osa, hodnota, kontrola;
....................
.................... counter=4;
0256: MOVLW 04
0257: MOVWF 11
....................
.................... decoder:
....................
.................... servo(x_old,SERVO_X);
0258: MOVF 12,W
0259: MOVWF 17
025A: MOVLW 28
025B: MOVWF 18
025C: CALL 129
....................
.................... servo(y_old,SERVO_Y);
025D: MOVF 13,W
025E: MOVWF 17
025F: MOVLW 29
0260: MOVWF 18
0261: CALL 129
....................
.................... counter=0; // vynuluj citac
0262: CLRF 11
.................... do // vyhledej synchronizacni jednicky
.................... {
.................... if (!prijmout(&bit)) goto decoder; // prijmi bit; pri chybe zacni znovu
0263: MOVLW 0E
0264: MOVWF 1A
0265: CALL 162
0266: MOVF 0D,F
0267: BTFSS 03.2
0268: GOTO 26A
0269: GOTO 258
.................... if (1==bit) counter++; else goto decoder; // kdyz je bit 1, tak zvys citac; jinak zacni znovu
026A: DECFSZ 0E,W
026B: GOTO 26E
026C: INCF 11,F
026D: GOTO 26F
026E: GOTO 258
.................... } while(counter<4); // pockej na 4 jednicky
026F: MOVF 11,W
0270: SUBLW 03
0271: BTFSC 03.0
0272: GOTO 263
....................
.................... if (!read_nibble(&osa)) goto decoder; // nacti identifikator osy
0273: MOVLW 14
0274: MOVWF 17
0275: CALL 199
0276: MOVF 0D,F
0277: BTFSS 03.2
0278: GOTO 27A
0279: GOTO 258
....................
.................... if (!read_nibble(&hodnota)) goto decoder; // nacti 1. nibble; pri chybe zacni znovu
027A: MOVLW 15
027B: MOVWF 17
027C: CALL 199
027D: MOVF 0D,F
027E: BTFSS 03.2
027F: GOTO 281
0280: GOTO 258
.................... if (!read_nibble(&kontrola)) goto decoder; // nacti 2. nibble; pri chybe zacni znovu
0281: MOVLW 16
0282: MOVWF 17
0283: CALL 199
0284: MOVF 0D,F
0285: BTFSS 03.2
0286: GOTO 288
0287: GOTO 258
.................... if (hodnota != kontrola) goto decoder; // zacni znovu, pokud jsou ruzne nibble
0288: MOVF 16,W
0289: SUBWF 15,W
028A: BTFSC 03.2
028B: GOTO 28D
028C: GOTO 258
....................
.................... switch (osa) // rozeskoc se podle adresy osy
028D: MOVF 14,W
028E: ADDLW FD
028F: BTFSC 03.0
0290: GOTO 29E
0291: ADDLW 03
0292: GOTO 2D3
.................... {
.................... case OSA_X:
.................... {
....................
.................... x=hodnota;
0293: MOVF 15,W
0294: MOVWF 0F
.................... x_old=x;
0295: MOVF 0F,W
0296: MOVWF 12
....................
.................... break;
0297: GOTO 29E
.................... };
.................... case OSA_Y:
.................... {
.................... y=hodnota;
0298: MOVF 15,W
0299: MOVWF 10
.................... y_old=y;
029A: MOVF 10,W
029B: MOVWF 13
....................
.................... break;
029C: GOTO 29E
.................... };
.................... case TLs:
.................... {
.................... break;
029D: GOTO 29E
.................... };
.................... };
*
02D3: BCF 0A.0
02D4: BSF 0A.1
02D5: BCF 0A.2
02D6: ADDWF 02,F
02D7: GOTO 293
02D8: GOTO 298
02D9: GOTO 29D
....................
....................
.................... lcd_gotoxy(1,1); // vytiskni X a Y
*
029E: MOVLW 01
029F: MOVWF 1A
02A0: MOVWF 1B
02A1: CALL 1C1
.................... printf(lcd_putc,"X: %U ", x);
*
021F: MOVF 0D,W
0220: MOVF 17,W
0221: MOVWF 19
0222: MOVLW 64
0223: MOVWF 1A
0224: CALL 20A
0225: MOVF 0C,W
0226: MOVWF 17
0227: MOVF 0D,W
0228: MOVLW 30
0229: BTFSS 03.2
022A: GOTO 232
022B: BTFSC 18.0
022C: BSF 18.3
022D: BTFSC 18.3
022E: GOTO 238
022F: BTFSC 18.4
0230: MOVLW 20
0231: GOTO 234
0232: BCF 18.3
0233: BCF 18.4
0234: ADDWF 0D,F
0235: MOVF 0D,W
0236: MOVWF 19
0237: CALL 1D2
0238: MOVF 17,W
0239: MOVWF 19
023A: MOVLW 0A
023B: MOVWF 1A
023C: CALL 20A
023D: MOVF 0C,W
023E: MOVWF 17
023F: MOVF 0D,W
0240: MOVLW 30
0241: BTFSS 03.2
0242: GOTO 247
0243: BTFSC 18.3
0244: GOTO 24B
0245: BTFSC 18.4
0246: MOVLW 20
0247: ADDWF 0D,F
0248: MOVF 0D,W
0249: MOVWF 19
024A: CALL 1D2
024B: MOVLW 30
024C: ADDWF 17,F
024D: MOVF 17,W
024E: MOVWF 19
024F: CALL 1D2
0250: RETLW 00
*
02A2: MOVLW 58
02A3: MOVWF 19
02A4: CALL 1D2
02A5: MOVLW 3A
02A6: MOVWF 19
02A7: CALL 1D2
02A8: MOVLW 20
02A9: MOVWF 19
02AA: CALL 1D2
02AB: MOVF 0F,W
02AC: MOVWF 17
02AD: MOVLW 18
02AE: MOVWF 18
02AF: CALL 21F
02B0: MOVLW 06
02B1: MOVWF 17
02B2: MOVLW 20
02B3: MOVWF 19
02B4: CALL 1D2
02B5: DECFSZ 17,F
02B6: GOTO 2B2
.................... lcd_gotoxy(1,2);
02B7: MOVLW 01
02B8: MOVWF 1A
02B9: MOVLW 02
02BA: MOVWF 1B
02BB: CALL 1C1
.................... printf(lcd_putc,"Y: %U ", y);
02BC: MOVLW 59
02BD: MOVWF 19
02BE: CALL 1D2
02BF: MOVLW 3A
02C0: MOVWF 19
02C1: CALL 1D2
02C2: MOVLW 20
02C3: MOVWF 19
02C4: CALL 1D2
02C5: MOVF 10,W
02C6: MOVWF 17
02C7: MOVLW 18
02C8: MOVWF 18
02C9: CALL 21F
02CA: MOVLW 06
02CB: MOVWF 17
02CC: MOVLW 20
02CD: MOVWF 19
02CE: CALL 1D2
02CF: DECFSZ 17,F
02D0: GOTO 2CC
.................... }
02D1: GOTO 256
.................... }
....................
02D2: SLEEP
....................
....................
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/01/MAIN.PJT
0,0 → 1,32
[PROJECT]
Target=main.HEX
Development_Mode=
Processor=0x684A
ToolSuite=CCS
 
[Directories]
Include=C:\Program Files\PICC\Devices;C:\Program Files\PICC\Dri;
Library=
LinkerScript=
 
[Target Data]
FileList=main.c;
BuildTool=CCSC
OptionString=-p +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
 
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/01/MAIN.STA
0,0 → 1,45
 
ROM used: 730 (71%)
294 (29%) including unused fragments
 
1 Average locations per line
6 Average locations per statement
 
RAM used: 9 (13%) at main() level
26 (38%) worst case
 
Lines Stmts % Files
----- ----- --- -----
165 70 60 d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\main.c
5 0 0 d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\main.h
111 0 0 C:\Program Files\PICC\Devices\16F84.h
5 0 0 d:\@kaklik\programy\pic_c\prenos\letadlo\common.h
272 46 25 d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\MYLCD.C
----- -----
1116 232 Total
 
Page ROM % RAM Functions:
---- --- --- --- ----------
0 21 3 1 delay_ms
0 14 2 1 delay_us
0 8 1 0 @const22
0 22 3 3 lcd_send_nibble
0 22 3 2 lcd_send_byte
0 57 8 2 lcd_init
0 17 2 4 lcd_gotoxy
0 56 8 1 lcd_putc
0 57 8 6 servo
0 30 4 2 @ITOF
0 119 16 13 @MULFF
0 55 8 2 prijmout
0 40 5 5 read_nibble
0 130 18 1 main
0 7 1 0 @goto10184
0 21 3 3 @DIV88
0 50 7 2 @PRINTF_U_148
 
Segment Used Free
--------- ---- ----
0000-0003 4 0
0004-03FF 726 294
 
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/01/MAIN.SYM
0,0 → 1,81
00C @SCRATCH
00D @SCRATCH
00D _RETURN_
00E bit
00F x
010 y
011 counter
012 x_old
013 y_old
014 osa
015 hodnota
016 kontrola
017 lcd_init.i
017 servo.uhel
017 read_nibble.value
017 @PRINTF_U_148.P1
017 main.@SCRATCH
018 servo.souradnice
018 read_nibble.n
018 @PRINTF_U_148.P1
018 lcd_init.@SCRATCH
019 lcd_putc.c
019-01A @ITOF.P1
019-01C @MULFF.P2
019 read_nibble.bit
019 @DIV88.P1
019 servo.@SCRATCH
01A delay_ms.P1
01A lcd_gotoxy.x
01A prijmout.bit
01A @DIV88.P1
01A servo.@SCRATCH
01A read_nibble.@SCRATCH
01B lcd_gotoxy.y
01B servo.@SCRATCH
01B prijmout.@SCRATCH
01B read_nibble.@SCRATCH
01B @DIV88.@SCRATCH
01C lcd_gotoxy.Adr
01C servo.@SCRATCH
01D delay_us.P1
01D-020 @MULFF.P2
01D lcd_gotoxy.@SCRATCH
01E lcd_send_byte.Adr
01F lcd_send_byte.n
020 lcd_send_nibble.n
021 lcd_send_nibble.@SCRATCH
021 @MULFF.@SCRATCH
022 lcd_send_nibble.@SCRATCH
022 @MULFF.@SCRATCH
023 @MULFF.@SCRATCH
024 @MULFF.@SCRATCH
025 @MULFF.@SCRATCH
-002 LCD_INIT_STRING
lcd_putc2.Data
 
000C delay_ms
011B delay_us
0004 @const22
0021 lcd_send_nibble
0037 lcd_send_byte
004D lcd_init
01C1 lcd_gotoxy
01D2 lcd_putc
0129 servo
0086 @ITOF
00A4 @MULFF
0162 prijmout
0199 read_nibble
0251 main
02D3 @goto10184
020A @DIV88
021F @PRINTF_U_148
0258 decoder
 
Project Files:
d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\main.c
d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\main.h
C:\Program Files\PICC\Devices\16F84.h
d:\@kaklik\programy\pic_c\prenos\letadlo\common.h
d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\MYLCD.C
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/01/MAIN.TRE
0,0 → 1,309
ÀÄmain
ÀÄmain 0/130 Ram=1
ÃÄ??0??
ÃÄlcd_init 0/57 Ram=2
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@const22 0/8 Ram=0
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄdelay_ms 0/21 Ram=1
ÃÄservo 0/57 Ram=6
³ ÃÄ@ITOF 0/30 Ram=2
³ ÃÄ@MULFF 0/119 Ram=13
³ ÀÄdelay_us 0/14 Ram=1
ÃÄservo 0/57 Ram=6
³ ÃÄ@ITOF 0/30 Ram=2
³ ÃÄ@MULFF 0/119 Ram=13
³ ÀÄdelay_us 0/14 Ram=1
ÃÄprijmout 0/55 Ram=2
ÃÄread_nibble 0/40 Ram=5
³ ÀÄprijmout 0/55 Ram=2
ÃÄread_nibble 0/40 Ram=5
³ ÀÄprijmout 0/55 Ram=2
ÃÄread_nibble 0/40 Ram=5
³ ÀÄprijmout 0/55 Ram=2
ÃÄ@goto10184 0/7 Ram=0
ÃÄlcd_gotoxy 0/17 Ram=4
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_148 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_gotoxy 0/17 Ram=4
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_148 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÀÄlcd_putc 0/56 Ram=1
ÃÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄdelay_ms 0/21 Ram=1
ÃÄlcd_gotoxy 0/17 Ram=4
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_gotoxy 0/17 Ram=4
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÀÄlcd_send_byte 0/22 Ram=2
ÃÄlcd_send_nibble 0/22 Ram=3
ÀÄlcd_send_nibble 0/22 Ram=3
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/01/MYLCD.BAK
0,0 → 1,271
// LCD modul pro ovladani dvouradkoveho LCD modulu se standardnim Hitachi radicem
// (c)miho 2002
//
// Historie:
//
// 0.0 Uvodni verze se snadnou definici portu LCD displeje
//
//
// Funkce:
//
// lcd_init() inicializuje LCD displej a porty, nutno volat jako prvni
//
// lcd_putc(c) zapis snaku do lcd displeje, zpracovava nasledujici ridici znaky
// \f = \x0C - nova stranka - smazani displeje
// \n = \x0A - odradkovani (prechod na druhou radku)
// \b = \x08 - backspace - posunuti kurzoru o 1 pozici zpet
// \r = \x0D - goto home to position 1,1
// \0 .. \7 - definovatelne znaky v pozicich 0 az 7 v CGRAM
// \20 .. \27 - alternativne zapsane znaky (oktalove) v pozicich 0 az 7 CGRAM
// Pozor na to, ze funkce printf konci tisk pokud narazi na \0 (konec retezce)
//
// lcd_gotoxy(x,y) presune kurzor na uvedenou adresu
// nekontroluje parametry
//
// lcd_cursor_on zapne kurzor
// lcd_cursor_off vypne kurzor
//
// lcd_define_char(Index, Def) Makro, ktere definuje znaky od pozice Index obsahem definicniho
// retezce Def. Kazdych 8 znaku retezce Def definuje dalsi znak v CGRAM.
// Kapacita CGRAM je celkem 8 znaku s indexem 0 az 7.
// Na konci se provede lcd_gotoxy(1,1).
// Na konci teto knihovny je priklad pouziti definovanych znaku
//
// Definice portu:
//
// #DEFINE LCD_RS PIN_B2 // rizeni registru LCD displeje
// #DEFINE LCD_E PIN_B1 // enable LCD displeje
// #DEFINE LCD_DATA_LSB PIN_C2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
 
 
 
 
// Privatni sekce, cist jen v pripade, ze neco nefunguje
 
 
 
 
// Generovane defince portu pro ucely teto knihovny aby kod generoval spravne IO operace a soucasne
// bylo mozne jednoduse deklarovat pripojene piny LCD displeje pri pouziti teto knihovny. Problem spociva
// v tom, ze se musi spravne ridit smery portu a soucasne datovy port zabira jen 4 bity ze zadaneho portu
//
#DEFINE LCD_SHIFT (LCD_DATA_LSB&7) // pocet bitu posuvu dataoveho kanalu v datovem portu
#DEFINE LCD_PORT (LCD_DATA_LSB>>3) // adresa LCD datoveho portu
#DEFINE LCD_TRIS (LCD_PORT+0x80) // adresa prislusneho TRIS registru
#DEFINE LCD_MASK (0xF<<LCD_SHIFT) // maska platnych bitu
//
#IF LCD_SHIFT>4 // kontrola mezi
#ERROR LCD data port LSB bit not in range 0..4
#ENDIF
 
 
// Definice konstant pro LCD display
//
#define LCD_CURSOR_ON_ 0x0E // kurzor jako blikajici radka pod znakem
#define LCD_CURSOR_OFF_ 0x0C // zadny kurzor
#define LCD_LINE_2 0x40 // adresa 1. znaku 2. radky
 
 
// Definice rezimu LCD displeje
//
BYTE const LCD_INIT_STRING[4] =
{
0x28, // intrfejs 4 bity, 2 radky, font 5x7
LCD_CURSOR_OFF_, // display on, kurzor off,
0x01, // clear displeje
0x06 // inkrement pozice kurzoru (posun kurzoru doprava)
};
 
 
// Odesle nibble do displeje (posle data a klikne signalem e)
//
void lcd_send_nibble( BYTE n )
{
*LCD_PORT = (*LCD_PORT & ~LCD_MASK) | ((n << LCD_SHIFT) & LCD_MASK); // nastav datove bity portu a ostatni zachovej
output_bit(LCD_E,1); // vzestupna hrana
delay_us(1); // pockej alespon 450ns od e nebo alespon 195ns od dat
output_bit(LCD_E,0); // sestupna hrana (minimalni perioda e je 1us)
}
 
 
// Odesle bajt do registru LCD
//
// Pokud je Adr=0 .. instrukcni registr
// Pokud je Adr=1 .. datovy registr
//
void lcd_send_byte( BOOLEAN Adr, BYTE n )
{
output_bit(LCD_RS,Adr); // vyber registr
swap(n);
lcd_send_nibble(n); // posli horni pulku bajtu
swap(n);
lcd_send_nibble(n); // posli spodni pulku bajtu
delay_us(40); // minimalni doba na provedeni prikazu
}
 
 
// Provede inicializaci LCD displeje, smaze obsah a nastavi mod displeje
//
// Tato procedura se musi volat pred pouzitim ostatnich lcd_ procedur
//
void lcd_init()
{
 
int i; // pocitadlo cyklu
 
delay_ms(20); // spozdeni pro provedeni startu displeje po zapnuti napajeni
 
*LCD_TRIS = *LCD_TRIS & ~LCD_MASK; // nuluj odpovidajici bity tris registru datoveho portu LCD
 
output_bit(PIN_B2,0); // nastav jako vystup a nastav klidovy stav
output_bit(PIN_B1,0); // nastav jako vystup a nastav klidovy stav
 
for (i=0; i<3; i++) // nastav lcd do rezimu 8 bitu sbernice
{
delay_ms(2); // muze byt rozdelany prenos dat (2x 4 bity) nebo pomaly povel
lcd_send_nibble(3); // rezim 8 bitu
}
 
delay_us(40); // cas na zpracovani
lcd_send_nibble(2); // nastav rezim 4 bitu (plati od nasledujiciho prenosu)
delay_us(40); // cas na zpracovani
 
for (i=0;i<3;i++) // proved inicializaci (nastaveni modu, smazani apod)
{
lcd_send_byte(0,LCD_INIT_STRING[i]);
delay_ms(2);
}
}
 
 
// Proved presun kurzoru
//
// Pozice 1.1 je domu
//
void lcd_gotoxy( BYTE x, BYTE y)
{
 
BYTE Adr;
 
Adr=x-1;
if(y==2)
Adr+=LCD_LINE_2;
 
lcd_send_byte(0,0x80|Adr);
}
 
 
// Zapis znaku na displej, zpracovani ridicich znaku
//
void lcd_putc( char c)
{
 
switch (c)
{
case '\f' : lcd_send_byte(0,1); // smaz displej
delay_ms(2);
break;
case '\n' : lcd_gotoxy(1,2); break; // presun se na 1. znak 2. radky
case '\r' : lcd_gotoxy(1,1); break; // presun home
case '\b' : lcd_send_byte(0,0x10); break; // posun kurzor o 1 zpet
default : if (c<0x20) c&=0x7; // preklopeni definovatelnych znaku na rozsah 0 az 0x1F
lcd_send_byte(1,c); break; // zapis znak
}
}
 
 
// Zapni kurzor
//
void lcd_cursor_on()
{
lcd_send_byte(0,LCD_CURSOR_ON_);
}
 
 
// Vypni kurzor
//
void lcd_cursor_off()
{
lcd_send_byte(0,LCD_CURSOR_OFF_);
}
 
 
// Definice vlastnich fontu
//
// Vlastnich definic muze byt jen 8 do pozic 0 az 7 pameti CGRAM radice lcd displeje
// Pro snadne definovani jsou pripraveny nasledujici definice a na konci souboru je uveden
// priklad pouziti definovanych znaku.
 
 
// Pomocna procedura pro posilani ridicich dat do radice displeje
//
void lcd_putc2(int Data)
{
lcd_send_byte(1,Data);
}
 
 
// Pomocne definice pro programovani obsahu CGRAM
//
#DEFINE lcd_define_start(Code) lcd_send_byte(0,0x40+(Code<<3)); delay_ms(2)
#DEFINE lcd_define_def(String) printf(lcd_putc2,String);
#DEFINE lcd_define_end() lcd_send_byte(0,3); delay_ms(2)
 
 
// Vlastni vykonne makro pro definovani fontu do pozice Index CGRAM s definicnim retezcem Def
//
#DEFINE lcd_define_char(Index, Def) lcd_define_start(Index); lcd_define_def(Def); lcd_define_end();
 
 
// Pripravene definice fontu vybranych znaku
// V tabulce nesmi byt 00 (konec retezce v printf()), misto toho davame 80
//
#DEFINE LCD_CHAR_BAT100 "\x0E\x1F\x1F\x1F\x1F\x1F\x1F\x1F" /* symbol plne baterie */
#DEFINE LCD_CHAR_BAT50 "\x0E\x1F\x11\x11\x13\x17\x1F\x1F" /* symbol polovicni baterie */
#DEFINE LCD_CHAR_BAT0 "\x0E\x1F\x11\x11\x11\x11\x11\x1F" /* symbol vybite baterie */
#DEFINE LCD_CHAR_LUA "\x04\x0E\x11\x11\x1F\x11\x11\x80" /* A s carkou */
#DEFINE LCD_CHAR_LLA "\x01\x02\x0E\x01\x1F\x11\x0F\x80" /* a s carkou */
#DEFINE LCD_CHAR_HUC "\x0A\x0E\x11\x10\x10\x11\x0E\x80" /* C s hackem */
#DEFINE LCD_CHAR_HLC "\x0A\x04\x0E\x10\x10\x11\x0E\x80" /* c s hackem */
#DEFINE LCD_CHAR_HUD "\x0A\x1C\x12\x11\x11\x12\x1C\x80" /* D s hackem */
#DEFINE LCD_CHAR_HLD "\x05\x03\x0D\x13\x11\x11\x0F\x80" /* d s hackem */
#DEFINE LCD_CHAR_LUE "\x04\x1F\x10\x10\x1E\x10\x1F\x80" /* E s carkou */
#DEFINE LCD_CHAR_LLE "\x01\x02\x0E\x11\x1F\x10\x0E\x80" /* e s carkou */
#DEFINE LCD_CHAR_HUE "\x0A\x1F\x10\x1E\x10\x10\x1F\x80" /* E s hackem */
#DEFINE LCD_CHAR_HLE "\x0A\x04\x0E\x11\x1F\x10\x0E\x80" /* e s hackem */
#DEFINE LCD_CHAR_LUI "\x04\x0E\x04\x04\x04\x04\x0E\x80" /* I s carkou */
#DEFINE LCD_CHAR_LLI "\x02\x04\x80\x0C\x04\x04\x0E\x80" /* i s carkou */
#DEFINE LCD_CHAR_HUN "\x0A\x15\x11\x19\x15\x13\x11\x80" /* N s hackem */
#DEFINE LCD_CHAR_HLN "\x0A\x04\x16\x19\x11\x11\x11\x80" /* n s hackem */
#DEFINE LCD_CHAR_LUO "\x04\x0E\x11\x11\x11\x11\x0E\x80" /* O s carkou */
#DEFINE LCD_CHAR_LLO "\x02\x04\x0E\x11\x11\x11\x0E\x80" /* o s carkou */
#DEFINE LCD_CHAR_HUR "\x0A\x1E\x11\x1E\x14\x12\x11\x80" /* R s hackem */
#DEFINE LCD_CHAR_HLR "\x0A\x04\x16\x19\x10\x10\x10\x80" /* r s hackem */
#DEFINE LCD_CHAR_HUS "\x0A\x0F\x10\x0E\x01\x01\x1E\x80" /* S s hackem */
#DEFINE LCD_CHAR_HLS "\x0A\x04\x0E\x10\x0E\x01\x1E\x80" /* s s hackem */
#DEFINE LCD_CHAR_HUT "\x0A\x1F\x04\x04\x04\x04\x04\x80" /* T s hackem */
#DEFINE LCD_CHAR_HLT "\x0A\x0C\x1C\x08\x08\x09\x06\x80" /* t s hackem */
#DEFINE LCD_CHAR_LUU "\x02\x15\x11\x11\x11\x11\x0E\x80" /* U s carkou */
#DEFINE LCD_CHAR_LLU "\x02\x04\x11\x11\x11\x13\x0D\x80" /* u s carkou */
#DEFINE LCD_CHAR_CUU "\x06\x17\x11\x11\x11\x11\x0E\x80" /* U s krouzkem */
#DEFINE LCD_CHAR_CLU "\x06\x06\x11\x11\x11\x11\x0E\x80" /* u s krouzkem */
#DEFINE LCD_CHAR_LUY "\x02\x15\x11\x0A\x04\x04\x04\x80" /* Y s carkou */
#DEFINE LCD_CHAR_LLY "\x02\x04\x11\x11\x0F\x01\x0E\x80" /* y s carkou */
#DEFINE LCD_CHAR_HUZ "\x0A\x1F\x01\x02\x04\x08\x1F\x80" /* Z s hackem */
#DEFINE LCD_CHAR_HLZ "\x0A\x04\x1F\x02\x04\x08\x1F\x80" /* z s hackem */
 
 
// Priklad pouziti definovanych znaku
//
//
//void lcd_sample()
//{
// lcd_define_char(0,LCD_CHAR_BAT50); // Priklad definice znaku baterie do pozice 0
// lcd_define_char(2,LCD_CHAR_HLE LCD_CHAR_LUI); // Priklad definice znaku e s hackem a I s carkou od pozice 2
// // vsimnete si, ze neni carka mezi retezci s definici (oba retezce definuji
// // jediny definicni retezec)
// printf(lcd_putc,"\fZnaky:\20\22\23"); // priklad vypisu znaku z pozice 0, 2 a 3
// delay_ms(1000);
// lcd_define_char(0,LCD_CHAR_BAT0); // Predefinovani tvaru znaku v pozici 0
// delay_ms(1000);
//}
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/01/MYLCD.C
0,0 → 1,271
// LCD modul pro ovladani dvouradkoveho LCD modulu se standardnim Hitachi radicem
// (c)miho 2002
//
// Historie:
//
// 0.0 Uvodni verze se snadnou definici portu LCD displeje
//
//
// Funkce:
//
// lcd_init() inicializuje LCD displej a porty, nutno volat jako prvni
//
// lcd_putc(c) zapis snaku do lcd displeje, zpracovava nasledujici ridici znaky
// \f = \x0C - nova stranka - smazani displeje
// \n = \x0A - odradkovani (prechod na druhou radku)
// \b = \x08 - backspace - posunuti kurzoru o 1 pozici zpet
// \r = \x0D - goto home to position 1,1
// \0 .. \7 - definovatelne znaky v pozicich 0 az 7 v CGRAM
// \20 .. \27 - alternativne zapsane znaky (oktalove) v pozicich 0 az 7 CGRAM
// Pozor na to, ze funkce printf konci tisk pokud narazi na \0 (konec retezce)
//
// lcd_gotoxy(x,y) presune kurzor na uvedenou adresu
// nekontroluje parametry
//
// lcd_cursor_on zapne kurzor
// lcd_cursor_off vypne kurzor
//
// lcd_define_char(Index, Def) Makro, ktere definuje znaky od pozice Index obsahem definicniho
// retezce Def. Kazdych 8 znaku retezce Def definuje dalsi znak v CGRAM.
// Kapacita CGRAM je celkem 8 znaku s indexem 0 az 7.
// Na konci se provede lcd_gotoxy(1,1).
// Na konci teto knihovny je priklad pouziti definovanych znaku
//
// Definice portu:
//
// #DEFINE LCD_RS PIN_B2 // rizeni registru LCD displeje
// #DEFINE LCD_E PIN_B1 // enable LCD displeje
// #DEFINE LCD_DATA_LSB PIN_C2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
 
 
 
 
// Privatni sekce, cist jen v pripade, ze neco nefunguje
 
 
 
 
// Generovane defince portu pro ucely teto knihovny aby kod generoval spravne IO operace a soucasne
// bylo mozne jednoduse deklarovat pripojene piny LCD displeje pri pouziti teto knihovny. Problem spociva
// v tom, ze se musi spravne ridit smery portu a soucasne datovy port zabira jen 4 bity ze zadaneho portu
//
#DEFINE LCD_SHIFT (LCD_DATA_LSB&7) // pocet bitu posuvu dataoveho kanalu v datovem portu
#DEFINE LCD_PORT (LCD_DATA_LSB>>3) // adresa LCD datoveho portu
#DEFINE LCD_TRIS (LCD_PORT+0x80) // adresa prislusneho TRIS registru
#DEFINE LCD_MASK (0xF<<LCD_SHIFT) // maska platnych bitu
//
#IF LCD_SHIFT>4 // kontrola mezi
#ERROR LCD data port LSB bit not in range 0..4
#ENDIF
 
 
// Definice konstant pro LCD display
//
#define LCD_CURSOR_ON_ 0x0E // kurzor jako blikajici radka pod znakem
#define LCD_CURSOR_OFF_ 0x0C // zadny kurzor
#define LCD_LINE_2 0x40 // adresa 1. znaku 2. radky
 
 
// Definice rezimu LCD displeje
//
BYTE const LCD_INIT_STRING[4] =
{
0x28, // intrfejs 4 bity, 2 radky, font 5x7
LCD_CURSOR_OFF_, // display on, kurzor off,
0x01, // clear displeje
0x06 // inkrement pozice kurzoru (posun kurzoru doprava)
};
 
 
// Odesle nibble do displeje (posle data a klikne signalem e)
//
void lcd_send_nibble( BYTE n )
{
*LCD_PORT = (*LCD_PORT & ~LCD_MASK) | ((n << LCD_SHIFT) & LCD_MASK); // nastav datove bity portu a ostatni zachovej
output_bit(LCD_E,1); // vzestupna hrana
delay_us(1); // pockej alespon 450ns od e nebo alespon 195ns od dat
output_bit(LCD_E,0); // sestupna hrana (minimalni perioda e je 1us)
}
 
 
// Odesle bajt do registru LCD
//
// Pokud je Adr=0 .. instrukcni registr
// Pokud je Adr=1 .. datovy registr
//
void lcd_send_byte( BOOLEAN Adr, BYTE n )
{
output_bit(LCD_RS,Adr); // vyber registr
swap(n);
lcd_send_nibble(n); // posli horni pulku bajtu
swap(n);
lcd_send_nibble(n); // posli spodni pulku bajtu
delay_us(40); // minimalni doba na provedeni prikazu
}
 
 
// Provede inicializaci LCD displeje, smaze obsah a nastavi mod displeje
//
// Tato procedura se musi volat pred pouzitim ostatnich lcd_ procedur
//
void lcd_init()
{
 
int i; // pocitadlo cyklu
 
delay_ms(20); // spozdeni pro provedeni startu displeje po zapnuti napajeni
 
*LCD_TRIS = *LCD_TRIS & ~LCD_MASK; // nuluj odpovidajici bity tris registru datoveho portu LCD
 
output_bit(LCD_RS,0); // nastav jako vystup a nastav klidovy stav
output_bit(LCD_E,0); // nastav jako vystup a nastav klidovy stav
 
for (i=0; i<3; i++) // nastav lcd do rezimu 8 bitu sbernice
{
delay_ms(2); // muze byt rozdelany prenos dat (2x 4 bity) nebo pomaly povel
lcd_send_nibble(3); // rezim 8 bitu
}
 
delay_us(40); // cas na zpracovani
lcd_send_nibble(2); // nastav rezim 4 bitu (plati od nasledujiciho prenosu)
delay_us(40); // cas na zpracovani
 
for (i=0;i<3;i++) // proved inicializaci (nastaveni modu, smazani apod)
{
lcd_send_byte(0,LCD_INIT_STRING[i]);
delay_ms(2);
}
}
 
 
// Proved presun kurzoru
//
// Pozice 1.1 je domu
//
void lcd_gotoxy( BYTE x, BYTE y)
{
 
BYTE Adr;
 
Adr=x-1;
if(y==2)
Adr+=LCD_LINE_2;
 
lcd_send_byte(0,0x80|Adr);
}
 
 
// Zapis znaku na displej, zpracovani ridicich znaku
//
void lcd_putc( char c)
{
 
switch (c)
{
case '\f' : lcd_send_byte(0,1); // smaz displej
delay_ms(2);
break;
case '\n' : lcd_gotoxy(1,2); break; // presun se na 1. znak 2. radky
case '\r' : lcd_gotoxy(1,1); break; // presun home
case '\b' : lcd_send_byte(0,0x10); break; // posun kurzor o 1 zpet
default : if (c<0x20) c&=0x7; // preklopeni definovatelnych znaku na rozsah 0 az 0x1F
lcd_send_byte(1,c); break; // zapis znak
}
}
 
 
// Zapni kurzor
//
void lcd_cursor_on()
{
lcd_send_byte(0,LCD_CURSOR_ON_);
}
 
 
// Vypni kurzor
//
void lcd_cursor_off()
{
lcd_send_byte(0,LCD_CURSOR_OFF_);
}
 
 
// Definice vlastnich fontu
//
// Vlastnich definic muze byt jen 8 do pozic 0 az 7 pameti CGRAM radice lcd displeje
// Pro snadne definovani jsou pripraveny nasledujici definice a na konci souboru je uveden
// priklad pouziti definovanych znaku.
 
 
// Pomocna procedura pro posilani ridicich dat do radice displeje
//
void lcd_putc2(int Data)
{
lcd_send_byte(1,Data);
}
 
 
// Pomocne definice pro programovani obsahu CGRAM
//
#DEFINE lcd_define_start(Code) lcd_send_byte(0,0x40+(Code<<3)); delay_ms(2)
#DEFINE lcd_define_def(String) printf(lcd_putc2,String);
#DEFINE lcd_define_end() lcd_send_byte(0,3); delay_ms(2)
 
 
// Vlastni vykonne makro pro definovani fontu do pozice Index CGRAM s definicnim retezcem Def
//
#DEFINE lcd_define_char(Index, Def) lcd_define_start(Index); lcd_define_def(Def); lcd_define_end();
 
 
// Pripravene definice fontu vybranych znaku
// V tabulce nesmi byt 00 (konec retezce v printf()), misto toho davame 80
//
#DEFINE LCD_CHAR_BAT100 "\x0E\x1F\x1F\x1F\x1F\x1F\x1F\x1F" /* symbol plne baterie */
#DEFINE LCD_CHAR_BAT50 "\x0E\x1F\x11\x11\x13\x17\x1F\x1F" /* symbol polovicni baterie */
#DEFINE LCD_CHAR_BAT0 "\x0E\x1F\x11\x11\x11\x11\x11\x1F" /* symbol vybite baterie */
#DEFINE LCD_CHAR_LUA "\x04\x0E\x11\x11\x1F\x11\x11\x80" /* A s carkou */
#DEFINE LCD_CHAR_LLA "\x01\x02\x0E\x01\x1F\x11\x0F\x80" /* a s carkou */
#DEFINE LCD_CHAR_HUC "\x0A\x0E\x11\x10\x10\x11\x0E\x80" /* C s hackem */
#DEFINE LCD_CHAR_HLC "\x0A\x04\x0E\x10\x10\x11\x0E\x80" /* c s hackem */
#DEFINE LCD_CHAR_HUD "\x0A\x1C\x12\x11\x11\x12\x1C\x80" /* D s hackem */
#DEFINE LCD_CHAR_HLD "\x05\x03\x0D\x13\x11\x11\x0F\x80" /* d s hackem */
#DEFINE LCD_CHAR_LUE "\x04\x1F\x10\x10\x1E\x10\x1F\x80" /* E s carkou */
#DEFINE LCD_CHAR_LLE "\x01\x02\x0E\x11\x1F\x10\x0E\x80" /* e s carkou */
#DEFINE LCD_CHAR_HUE "\x0A\x1F\x10\x1E\x10\x10\x1F\x80" /* E s hackem */
#DEFINE LCD_CHAR_HLE "\x0A\x04\x0E\x11\x1F\x10\x0E\x80" /* e s hackem */
#DEFINE LCD_CHAR_LUI "\x04\x0E\x04\x04\x04\x04\x0E\x80" /* I s carkou */
#DEFINE LCD_CHAR_LLI "\x02\x04\x80\x0C\x04\x04\x0E\x80" /* i s carkou */
#DEFINE LCD_CHAR_HUN "\x0A\x15\x11\x19\x15\x13\x11\x80" /* N s hackem */
#DEFINE LCD_CHAR_HLN "\x0A\x04\x16\x19\x11\x11\x11\x80" /* n s hackem */
#DEFINE LCD_CHAR_LUO "\x04\x0E\x11\x11\x11\x11\x0E\x80" /* O s carkou */
#DEFINE LCD_CHAR_LLO "\x02\x04\x0E\x11\x11\x11\x0E\x80" /* o s carkou */
#DEFINE LCD_CHAR_HUR "\x0A\x1E\x11\x1E\x14\x12\x11\x80" /* R s hackem */
#DEFINE LCD_CHAR_HLR "\x0A\x04\x16\x19\x10\x10\x10\x80" /* r s hackem */
#DEFINE LCD_CHAR_HUS "\x0A\x0F\x10\x0E\x01\x01\x1E\x80" /* S s hackem */
#DEFINE LCD_CHAR_HLS "\x0A\x04\x0E\x10\x0E\x01\x1E\x80" /* s s hackem */
#DEFINE LCD_CHAR_HUT "\x0A\x1F\x04\x04\x04\x04\x04\x80" /* T s hackem */
#DEFINE LCD_CHAR_HLT "\x0A\x0C\x1C\x08\x08\x09\x06\x80" /* t s hackem */
#DEFINE LCD_CHAR_LUU "\x02\x15\x11\x11\x11\x11\x0E\x80" /* U s carkou */
#DEFINE LCD_CHAR_LLU "\x02\x04\x11\x11\x11\x13\x0D\x80" /* u s carkou */
#DEFINE LCD_CHAR_CUU "\x06\x17\x11\x11\x11\x11\x0E\x80" /* U s krouzkem */
#DEFINE LCD_CHAR_CLU "\x06\x06\x11\x11\x11\x11\x0E\x80" /* u s krouzkem */
#DEFINE LCD_CHAR_LUY "\x02\x15\x11\x0A\x04\x04\x04\x80" /* Y s carkou */
#DEFINE LCD_CHAR_LLY "\x02\x04\x11\x11\x0F\x01\x0E\x80" /* y s carkou */
#DEFINE LCD_CHAR_HUZ "\x0A\x1F\x01\x02\x04\x08\x1F\x80" /* Z s hackem */
#DEFINE LCD_CHAR_HLZ "\x0A\x04\x1F\x02\x04\x08\x1F\x80" /* z s hackem */
 
 
// Priklad pouziti definovanych znaku
//
//
//void lcd_sample()
//{
// lcd_define_char(0,LCD_CHAR_BAT50); // Priklad definice znaku baterie do pozice 0
// lcd_define_char(2,LCD_CHAR_HLE LCD_CHAR_LUI); // Priklad definice znaku e s hackem a I s carkou od pozice 2
// // vsimnete si, ze neni carka mezi retezci s definici (oba retezce definuji
// // jediny definicni retezec)
// printf(lcd_putc,"\fZnaky:\20\22\23"); // priklad vypisu znaku z pozice 0, 2 a 3
// delay_ms(1000);
// lcd_define_char(0,LCD_CHAR_BAT0); // Predefinovani tvaru znaku v pozici 0
// delay_ms(1000);
//}
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/01/PRG.BAT
0,0 → 1,6
call picpgr stop
call picpgr erase pic16c84
call picpgr program main.hex hex pic16c84
call picpgr run
pause
call picpgr stop
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/01/PRG.PIF
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
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/01/RUN.BAT
0,0 → 1,5
call picpgr run
pause
call picpgr stop
pause
run.bat
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/01/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
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/02/A.BAT
0,0 → 1,6
call picpgr stop
call picpgr erase pic16F84
call picpgr program main.hex hex pic16F84
call picpgr run
pause
call picpgr stop
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/02/MAIN.C
0,0 → 1,118
#include "main.h"
#include "..\common.h"
 
#DEFINE LCD_RS PIN_B1 // rizeni registru LCD displeje
#DEFINE LCD_E PIN_B0 // enable LCD displeje
#DEFINE LCD_DATA_LSB PIN_B2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
#INCLUDE "MYLCD.C"
 
#DEFINE PRIJIMAC PIN_A3 // pin na ktery je pripojen prijimac
#DEFINE SERVO_X PIN_A0 // pin na ktery je pripojeno servo
#DEFINE SERVO_Y PIN_A1
 
 
int8 prijmout(int8* bit)
{
// || |
// |--|_____ 1
// |
// |-|__|-|_ 0
 
while (!input(PRIJIMAC)) ; // cekej na jednicku
delay_us(IMPULS/4); // presvec se, jestli je stale 1 po 1/4 impulsu
if (!input(PRIJIMAC)) return false; // vrat chybu, kdyz neni stale 1
delay_us(3*IMPULS); // pockej na rozhodovaci misto
if (input(PRIJIMAC)) *bit=0; else *bit=1; // dekoduj 1 nebo 0
delay_us(IMPULS); // pockej na konec znaku
 
return true; // vrat, ze se cteni povedlo
}
 
int8 read_nibble(int8* value)
{
int8 n; // citac
int8 bit; // pomocna promenna
 
*value=0;
for (n=1; n<=4; n++) // prijmi 4 bity
{
*value >>= 1; // posun jiz prectene do leva
if (0==prijmout(&bit)) return(false); // prijmi bit; pri chybe cteni vrat chybu
*value |= bit << 3; // pridej bit do nibblu
};
return(true); // vrat 1, jako ,ze je vse O.K.
}
 
 
int8 bit,x,y;
 
void main()
{
lcd_init(); // zinicializuj LCD display
 
while (true)
{
int8 osa, hodnota, kontrola;
int counter; // pocitadlo 1 a 0 v detektoru
 
counter=4;
 
decoder:
 
counter=0; // vynuluj citac
do // vyhledej synchronizacni jednicky
{
if (!prijmout(&bit)) goto decoder; // prijmi bit; pri chybe zacni znovu
if (1==bit) counter++; else goto decoder; // kdyz je bit 1, tak zvys citac; jinak zacni znovu
} while(counter<4); // pockej na 4 jednicky
 
if (!read_nibble(&osa)) goto decoder; // nacti identifikator osy
 
if (!read_nibble(&hodnota)) goto decoder; // nacti 1. nibble; pri chybe zacni znovu
if (!read_nibble(&kontrola)) goto decoder; // nacti 2. nibble; pri chybe zacni znovu
if (hodnota != kontrola) goto decoder; // zacni znovu, pokud jsou ruzne nibble
 
switch (osa) // rozeskoc se podle adresy osy
{
case OSA_X:
{
x=hodnota;
break;
};
case OSA_Y:
{
y=hodnota;
break;
};
case TLs:
{
break;
};
};
// ladici vypisy
lcd_gotoxy(1,1); // vytiskni X a Y
printf(lcd_putc,"X: %U ", x);
lcd_gotoxy(1,2);
printf(lcd_putc,"Y: %U ", y);
 
// ovladani serv
output_high(SERVO_X);
delay_ms(1);
for (osa=x; osa--; osa>0)
delay_us(65);
output_low(SERVO_X);
 
output_high(SERVO_Y);
delay_ms(1);
for (osa=y; osa--; osa>0)
delay_us(65);
output_low(SERVO_Y);
for (osa=30-x-y; osa--; osa>0)
delay_us(65);
 
}
}
 
 
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/02/MAIN.H
0,0 → 1,4
#include <16F84.h>
#use delay(clock=4000000)
#fuses XT,NOWDT,PUT
 
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/02/MAIN.PJT
0,0 → 1,32
[PROJECT]
Target=main.HEX
Development_Mode=
Processor=0x684A
ToolSuite=CCS
 
[Directories]
Include=C:\Program Files\PICC\Devices;C:\Program Files\PICC\Dri;
Library=
LinkerScript=
 
[Target Data]
FileList=main.c;
BuildTool=CCSC
OptionString=-p +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
 
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/02/MYLCD.C
0,0 → 1,271
// LCD modul pro ovladani dvouradkoveho LCD modulu se standardnim Hitachi radicem
// (c)miho 2002
//
// Historie:
//
// 0.0 Uvodni verze se snadnou definici portu LCD displeje
//
//
// Funkce:
//
// lcd_init() inicializuje LCD displej a porty, nutno volat jako prvni
//
// lcd_putc(c) zapis snaku do lcd displeje, zpracovava nasledujici ridici znaky
// \f = \x0C - nova stranka - smazani displeje
// \n = \x0A - odradkovani (prechod na druhou radku)
// \b = \x08 - backspace - posunuti kurzoru o 1 pozici zpet
// \r = \x0D - goto home to position 1,1
// \0 .. \7 - definovatelne znaky v pozicich 0 az 7 v CGRAM
// \20 .. \27 - alternativne zapsane znaky (oktalove) v pozicich 0 az 7 CGRAM
// Pozor na to, ze funkce printf konci tisk pokud narazi na \0 (konec retezce)
//
// lcd_gotoxy(x,y) presune kurzor na uvedenou adresu
// nekontroluje parametry
//
// lcd_cursor_on zapne kurzor
// lcd_cursor_off vypne kurzor
//
// lcd_define_char(Index, Def) Makro, ktere definuje znaky od pozice Index obsahem definicniho
// retezce Def. Kazdych 8 znaku retezce Def definuje dalsi znak v CGRAM.
// Kapacita CGRAM je celkem 8 znaku s indexem 0 az 7.
// Na konci se provede lcd_gotoxy(1,1).
// Na konci teto knihovny je priklad pouziti definovanych znaku
//
// Definice portu:
//
// #DEFINE LCD_RS PIN_B2 // rizeni registru LCD displeje
// #DEFINE LCD_E PIN_B1 // enable LCD displeje
// #DEFINE LCD_DATA_LSB PIN_C2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
 
 
 
 
// Privatni sekce, cist jen v pripade, ze neco nefunguje
 
 
 
 
// Generovane defince portu pro ucely teto knihovny aby kod generoval spravne IO operace a soucasne
// bylo mozne jednoduse deklarovat pripojene piny LCD displeje pri pouziti teto knihovny. Problem spociva
// v tom, ze se musi spravne ridit smery portu a soucasne datovy port zabira jen 4 bity ze zadaneho portu
//
#DEFINE LCD_SHIFT (LCD_DATA_LSB&7) // pocet bitu posuvu dataoveho kanalu v datovem portu
#DEFINE LCD_PORT (LCD_DATA_LSB>>3) // adresa LCD datoveho portu
#DEFINE LCD_TRIS (LCD_PORT+0x80) // adresa prislusneho TRIS registru
#DEFINE LCD_MASK (0xF<<LCD_SHIFT) // maska platnych bitu
//
#IF LCD_SHIFT>4 // kontrola mezi
#ERROR LCD data port LSB bit not in range 0..4
#ENDIF
 
 
// Definice konstant pro LCD display
//
#define LCD_CURSOR_ON_ 0x0E // kurzor jako blikajici radka pod znakem
#define LCD_CURSOR_OFF_ 0x0C // zadny kurzor
#define LCD_LINE_2 0x40 // adresa 1. znaku 2. radky
 
 
// Definice rezimu LCD displeje
//
BYTE const LCD_INIT_STRING[4] =
{
0x28, // intrfejs 4 bity, 2 radky, font 5x7
LCD_CURSOR_OFF_, // display on, kurzor off,
0x01, // clear displeje
0x06 // inkrement pozice kurzoru (posun kurzoru doprava)
};
 
 
// Odesle nibble do displeje (posle data a klikne signalem e)
//
void lcd_send_nibble( BYTE n )
{
*LCD_PORT = (*LCD_PORT & ~LCD_MASK) | ((n << LCD_SHIFT) & LCD_MASK); // nastav datove bity portu a ostatni zachovej
output_bit(LCD_E,1); // vzestupna hrana
delay_us(1); // pockej alespon 450ns od e nebo alespon 195ns od dat
output_bit(LCD_E,0); // sestupna hrana (minimalni perioda e je 1us)
}
 
 
// Odesle bajt do registru LCD
//
// Pokud je Adr=0 .. instrukcni registr
// Pokud je Adr=1 .. datovy registr
//
void lcd_send_byte( BOOLEAN Adr, BYTE n )
{
output_bit(LCD_RS,Adr); // vyber registr
swap(n);
lcd_send_nibble(n); // posli horni pulku bajtu
swap(n);
lcd_send_nibble(n); // posli spodni pulku bajtu
delay_us(40); // minimalni doba na provedeni prikazu
}
 
 
// Provede inicializaci LCD displeje, smaze obsah a nastavi mod displeje
//
// Tato procedura se musi volat pred pouzitim ostatnich lcd_ procedur
//
void lcd_init()
{
 
int i; // pocitadlo cyklu
 
delay_ms(20); // spozdeni pro provedeni startu displeje po zapnuti napajeni
 
*LCD_TRIS = *LCD_TRIS & ~LCD_MASK; // nuluj odpovidajici bity tris registru datoveho portu LCD
 
output_bit(LCD_RS,0); // nastav jako vystup a nastav klidovy stav
output_bit(LCD_E,0); // nastav jako vystup a nastav klidovy stav
 
for (i=0; i<3; i++) // nastav lcd do rezimu 8 bitu sbernice
{
delay_ms(2); // muze byt rozdelany prenos dat (2x 4 bity) nebo pomaly povel
lcd_send_nibble(3); // rezim 8 bitu
}
 
delay_us(40); // cas na zpracovani
lcd_send_nibble(2); // nastav rezim 4 bitu (plati od nasledujiciho prenosu)
delay_us(40); // cas na zpracovani
 
for (i=0;i<3;i++) // proved inicializaci (nastaveni modu, smazani apod)
{
lcd_send_byte(0,LCD_INIT_STRING[i]);
delay_ms(2);
}
}
 
 
// Proved presun kurzoru
//
// Pozice 1.1 je domu
//
void lcd_gotoxy( BYTE x, BYTE y)
{
 
BYTE Adr;
 
Adr=x-1;
if(y==2)
Adr+=LCD_LINE_2;
 
lcd_send_byte(0,0x80|Adr);
}
 
 
// Zapis znaku na displej, zpracovani ridicich znaku
//
void lcd_putc( char c)
{
 
switch (c)
{
case '\f' : lcd_send_byte(0,1); // smaz displej
delay_ms(2);
break;
case '\n' : lcd_gotoxy(1,2); break; // presun se na 1. znak 2. radky
case '\r' : lcd_gotoxy(1,1); break; // presun home
case '\b' : lcd_send_byte(0,0x10); break; // posun kurzor o 1 zpet
default : if (c<0x20) c&=0x7; // preklopeni definovatelnych znaku na rozsah 0 az 0x1F
lcd_send_byte(1,c); break; // zapis znak
}
}
 
 
// Zapni kurzor
//
void lcd_cursor_on()
{
lcd_send_byte(0,LCD_CURSOR_ON_);
}
 
 
// Vypni kurzor
//
void lcd_cursor_off()
{
lcd_send_byte(0,LCD_CURSOR_OFF_);
}
 
 
// Definice vlastnich fontu
//
// Vlastnich definic muze byt jen 8 do pozic 0 az 7 pameti CGRAM radice lcd displeje
// Pro snadne definovani jsou pripraveny nasledujici definice a na konci souboru je uveden
// priklad pouziti definovanych znaku.
 
 
// Pomocna procedura pro posilani ridicich dat do radice displeje
//
void lcd_putc2(int Data)
{
lcd_send_byte(1,Data);
}
 
 
// Pomocne definice pro programovani obsahu CGRAM
//
#DEFINE lcd_define_start(Code) lcd_send_byte(0,0x40+(Code<<3)); delay_ms(2)
#DEFINE lcd_define_def(String) printf(lcd_putc2,String);
#DEFINE lcd_define_end() lcd_send_byte(0,3); delay_ms(2)
 
 
// Vlastni vykonne makro pro definovani fontu do pozice Index CGRAM s definicnim retezcem Def
//
#DEFINE lcd_define_char(Index, Def) lcd_define_start(Index); lcd_define_def(Def); lcd_define_end();
 
 
// Pripravene definice fontu vybranych znaku
// V tabulce nesmi byt 00 (konec retezce v printf()), misto toho davame 80
//
#DEFINE LCD_CHAR_BAT100 "\x0E\x1F\x1F\x1F\x1F\x1F\x1F\x1F" /* symbol plne baterie */
#DEFINE LCD_CHAR_BAT50 "\x0E\x1F\x11\x11\x13\x17\x1F\x1F" /* symbol polovicni baterie */
#DEFINE LCD_CHAR_BAT0 "\x0E\x1F\x11\x11\x11\x11\x11\x1F" /* symbol vybite baterie */
#DEFINE LCD_CHAR_LUA "\x04\x0E\x11\x11\x1F\x11\x11\x80" /* A s carkou */
#DEFINE LCD_CHAR_LLA "\x01\x02\x0E\x01\x1F\x11\x0F\x80" /* a s carkou */
#DEFINE LCD_CHAR_HUC "\x0A\x0E\x11\x10\x10\x11\x0E\x80" /* C s hackem */
#DEFINE LCD_CHAR_HLC "\x0A\x04\x0E\x10\x10\x11\x0E\x80" /* c s hackem */
#DEFINE LCD_CHAR_HUD "\x0A\x1C\x12\x11\x11\x12\x1C\x80" /* D s hackem */
#DEFINE LCD_CHAR_HLD "\x05\x03\x0D\x13\x11\x11\x0F\x80" /* d s hackem */
#DEFINE LCD_CHAR_LUE "\x04\x1F\x10\x10\x1E\x10\x1F\x80" /* E s carkou */
#DEFINE LCD_CHAR_LLE "\x01\x02\x0E\x11\x1F\x10\x0E\x80" /* e s carkou */
#DEFINE LCD_CHAR_HUE "\x0A\x1F\x10\x1E\x10\x10\x1F\x80" /* E s hackem */
#DEFINE LCD_CHAR_HLE "\x0A\x04\x0E\x11\x1F\x10\x0E\x80" /* e s hackem */
#DEFINE LCD_CHAR_LUI "\x04\x0E\x04\x04\x04\x04\x0E\x80" /* I s carkou */
#DEFINE LCD_CHAR_LLI "\x02\x04\x80\x0C\x04\x04\x0E\x80" /* i s carkou */
#DEFINE LCD_CHAR_HUN "\x0A\x15\x11\x19\x15\x13\x11\x80" /* N s hackem */
#DEFINE LCD_CHAR_HLN "\x0A\x04\x16\x19\x11\x11\x11\x80" /* n s hackem */
#DEFINE LCD_CHAR_LUO "\x04\x0E\x11\x11\x11\x11\x0E\x80" /* O s carkou */
#DEFINE LCD_CHAR_LLO "\x02\x04\x0E\x11\x11\x11\x0E\x80" /* o s carkou */
#DEFINE LCD_CHAR_HUR "\x0A\x1E\x11\x1E\x14\x12\x11\x80" /* R s hackem */
#DEFINE LCD_CHAR_HLR "\x0A\x04\x16\x19\x10\x10\x10\x80" /* r s hackem */
#DEFINE LCD_CHAR_HUS "\x0A\x0F\x10\x0E\x01\x01\x1E\x80" /* S s hackem */
#DEFINE LCD_CHAR_HLS "\x0A\x04\x0E\x10\x0E\x01\x1E\x80" /* s s hackem */
#DEFINE LCD_CHAR_HUT "\x0A\x1F\x04\x04\x04\x04\x04\x80" /* T s hackem */
#DEFINE LCD_CHAR_HLT "\x0A\x0C\x1C\x08\x08\x09\x06\x80" /* t s hackem */
#DEFINE LCD_CHAR_LUU "\x02\x15\x11\x11\x11\x11\x0E\x80" /* U s carkou */
#DEFINE LCD_CHAR_LLU "\x02\x04\x11\x11\x11\x13\x0D\x80" /* u s carkou */
#DEFINE LCD_CHAR_CUU "\x06\x17\x11\x11\x11\x11\x0E\x80" /* U s krouzkem */
#DEFINE LCD_CHAR_CLU "\x06\x06\x11\x11\x11\x11\x0E\x80" /* u s krouzkem */
#DEFINE LCD_CHAR_LUY "\x02\x15\x11\x0A\x04\x04\x04\x80" /* Y s carkou */
#DEFINE LCD_CHAR_LLY "\x02\x04\x11\x11\x0F\x01\x0E\x80" /* y s carkou */
#DEFINE LCD_CHAR_HUZ "\x0A\x1F\x01\x02\x04\x08\x1F\x80" /* Z s hackem */
#DEFINE LCD_CHAR_HLZ "\x0A\x04\x1F\x02\x04\x08\x1F\x80" /* z s hackem */
 
 
// Priklad pouziti definovanych znaku
//
//
//void lcd_sample()
//{
// lcd_define_char(0,LCD_CHAR_BAT50); // Priklad definice znaku baterie do pozice 0
// lcd_define_char(2,LCD_CHAR_HLE LCD_CHAR_LUI); // Priklad definice znaku e s hackem a I s carkou od pozice 2
// // vsimnete si, ze neni carka mezi retezci s definici (oba retezce definuji
// // jediny definicni retezec)
// printf(lcd_putc,"\fZnaky:\20\22\23"); // priklad vypisu znaku z pozice 0, 2 a 3
// delay_ms(1000);
// lcd_define_char(0,LCD_CHAR_BAT0); // Predefinovani tvaru znaku v pozici 0
// delay_ms(1000);
//}
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/02/PRG.BAT
0,0 → 1,6
call picpgr stop
call picpgr erase pic16f84
call picpgr program main.hex hex pic16f84
call picpgr run
pause
call picpgr stop
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/02/PRG.PIF
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
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/02/RUN.BAT
0,0 → 1,5
call picpgr run
pause
call picpgr stop
pause
run.bat
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/02/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
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/03/A.BAT
0,0 → 1,6
call picpgr stop
call picpgr erase pic16F84
call picpgr program main.hex hex pic16F84
call picpgr run
pause
call picpgr stop
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/03/MAIN.BAK
0,0 → 1,174
// Prijimac
 
#include "main.h"
#include "..\common.h"
 
#DEFINE LCD_RS PIN_B1 // rizeni registru LCD displeje
#DEFINE LCD_E PIN_B0 // enable LCD displeje
#DEFINE LCD_DATA_LSB PIN_B2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
#INCLUDE "MYLCD.C"
 
#DEFINE PRIJIMAC PIN_A3 // pin na ktery je pripojen prijimac
#DEFINE SERVO_X PIN_A0 // pin na ktery je pripojeno servo
#DEFINE SERVO_Y PIN_A1
 
 
int8 prijmout(int8* bit)
{
// || |
// |--|_____ 1
// |
// |-|__|-|_ 0
 
while (!input(PRIJIMAC)) ; // cekej na jednicku
delay_us(IMPULS/4); // presvec se, jestli je stale 1 po 1/4 impulsu
if (!input(PRIJIMAC)) return false; // vrat chybu, kdyz neni stale 1
delay_us(3*IMPULS); // pockej na rozhodovaci misto
/// if (input(PRIJIMAC)) *bit=0; else *bit=1; // dekoduj 1 nebo 0
*bit=!input(PRIJIMAC); // dekoduj 1 nebo 0
delay_us(IMPULS); // pockej na konec znaku
 
return true; // vrat, ze se cteni povedlo
}
 
int8 read_nibble(int8* data)
{
int8 i;
int8 d;
 
d=0;
 
// Cekam na dlouhou nulu
for (i=8; i>0; i--)
{
if (input(PRIJIMAC)) i=8;
delay_us(IMPULS/2);
}
 
// Cekam na jednicku (start ramce)
for (; !input(PRIJIMAC); )
{
delay_us(IMPULS/2);
}
 
delay_us(IMPULS/2);
 
// Prenasim bity
for (i=0; i<4; i++)
{
delay_us(2*IMPULS);
d >>= 1;
if (!input(PRIJIMAC)) d +=8;
}
*data = d;
return TRUE;
}
 
int8 read_nibble2(int8* value)
{
int8 n; // citac
int8 bit; // pomocna promenna
 
*value=0;
for (n=1; n<=4; n++) // prijmi 4 bity
{
*value >>= 1; // posun jiz prectene do leva
if (0==prijmout(&bit)) return(false); // prijmi bit; pri chybe cteni vrat chybu
*value |= bit << 3; // pridej bit do nibblu
};
return(true); // vrat 1, jako ,ze je vse O.K.
}
 
 
int8 bit,x,y;
 
void main()
{
lcd_init(); // zinicializuj LCD display
delay_ms(5);
printf(lcd_putc,"Ahoj...");
delay_ms(1000);
 
//while(TRUE)
//{
// read_nibble(&x);
// lcd_gotoxy(1,1); // vytiskni X a Y
// printf(lcd_putc,"O:%d ",x);
//}
 
x = 0;
y = 0;
 
while (true)
{
int8 osa, hodnota, kontrola;
int counter; // pocitadlo 1 a 0 v detektoru
int e1,e2; // pocitadla chyb - ladici
e1=0;
e2=0;
counter=4;
 
decoder:
 
counter=0; // vynuluj citac
// do // vyhledej synchronizacni jednicky
// {
// if (!prijmout(&bit)) goto decoder; // prijmi bit; pri chybe zacni znovu
// if (1==bit) counter++; else goto decoder; // kdyz je bit 1, tak zvys citac; jinak zacni znovu
// } while(counter<4); // pockej na 4 jednicky
if (!read_nibble(&osa)) goto decoder;
if (osa!=15) {e1++; goto decoder;};
if (!read_nibble(&osa)) goto decoder; // nacti identifikator osy
 
if (!read_nibble(&hodnota)) goto decoder; // nacti 1. nibble; pri chybe zacni znovu
if (!read_nibble(&kontrola)) goto decoder; // nacti 2. nibble; pri chybe zacni znovu
if (hodnota != kontrola) {e2++; goto decoder;} // zacni znovu, pokud jsou ruzne nibble
 
switch (osa) // rozeskoc se podle adresy osy
{
case OSA_X:
{
x=hodnota;
break;
};
case OSA_Y:
{
y=hodnota;
break;
};
case TLs:
{
e1++;
break;
};
};
 
// ladici vypisy
lcd_gotoxy(1,1); // vytiskni X a Y
printf(lcd_putc,"X: %U ", x);
lcd_gotoxy(1,2);
printf(lcd_putc,"Y: %U ", y);
 
// ovladani serv
output_high(SERVO_X);
delay_ms(1);
for (osa=x; osa--; osa>0)
delay_us(65);
output_low(SERVO_X);
 
output_high(SERVO_Y);
delay_ms(1);
for (osa=y; osa--; osa>0)
delay_us(65);
output_low(SERVO_Y);
 
for (osa=30-x-y; osa--; osa>0)
delay_us(65);
 
}
}
 
 
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/03/MAIN.C
0,0 → 1,179
// Prijimac
 
#include "main.h"
#include "..\common.h"
 
#DEFINE LCD_RS PIN_B1 // rizeni registru LCD displeje
#DEFINE LCD_E PIN_B0 // enable LCD displeje
#DEFINE LCD_DATA_LSB PIN_B2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
#INCLUDE "MYLCD.C"
 
#DEFINE PRIJIMAC PIN_A3 // pin na ktery je pripojen prijimac
#DEFINE SERVO_X PIN_A0 // pin na ktery je pripojeno servo
#DEFINE SERVO_Y PIN_A1
 
 
int8 prijmout(int8* bit)
{
// || |
// |--|_____ 1
// |
// |-|__|-|_ 0
 
while (!input(PRIJIMAC)) ; // cekej na jednicku
delay_us(IMPULS/4); // presvec se, jestli je stale 1 po 1/4 impulsu
if (!input(PRIJIMAC)) return false; // vrat chybu, kdyz neni stale 1
delay_us(3*IMPULS); // pockej na rozhodovaci misto
/// if (input(PRIJIMAC)) *bit=0; else *bit=1; // dekoduj 1 nebo 0
*bit=!input(PRIJIMAC); // dekoduj 1 nebo 0
delay_us(IMPULS); // pockej na konec znaku
 
return true; // vrat, ze se cteni povedlo
}
 
int8 read_nibble(int8* data)
{
int8 i;
int8 d;
 
d=0;
 
// Cekam na dlouhou nulu
for (i=8; i>0; i--)
{
if (input(PRIJIMAC)) i=8;
delay_us(IMPULS/2);
}
 
// Cekam na jednicku (start ramce)
for (; !input(PRIJIMAC); )
{
delay_us(IMPULS/2);
}
 
delay_us(IMPULS/2);
 
// Prenasim bity
for (i=0; i<4; i++)
{
delay_us(2*IMPULS);
d >>= 1;
if (!input(PRIJIMAC)) d +=8;
}
*data = d;
return TRUE;
}
 
int8 read_nibble2(int8* value)
{
int8 n; // citac
int8 bit; // pomocna promenna
 
*value=0;
for (n=1; n<=4; n++) // prijmi 4 bity
{
*value >>= 1; // posun jiz prectene do leva
if (0==prijmout(&bit)) return(false); // prijmi bit; pri chybe cteni vrat chybu
*value |= bit << 3; // pridej bit do nibblu
};
return(true); // vrat 1, jako ,ze je vse O.K.
}
 
 
int8 bit,x,y;
int8 xc,yc; // pocitadla aktualizace x a y
 
void main()
{
lcd_init(); // zinicializuj LCD display
delay_ms(5);
printf(lcd_putc,"Ahoj...");
delay_ms(1000);
 
//while(TRUE)
//{
// read_nibble(&x);
// lcd_gotoxy(1,1); // vytiskni X a Y
// printf(lcd_putc,"O:%d ",x);
//}
 
x = 0;
y = 0;
xc=0;
yc=0;
 
while (true)
{
int8 osa, hodnota, kontrola;
int counter; // pocitadlo 1 a 0 v detektoru
int e1,e2; // pocitadla chyb - ladici
e1=0;
e2=0;
counter=4;
 
decoder:
 
counter=0; // vynuluj citac
// do // vyhledej synchronizacni jednicky
// {
// if (!prijmout(&bit)) goto decoder; // prijmi bit; pri chybe zacni znovu
// if (1==bit) counter++; else goto decoder; // kdyz je bit 1, tak zvys citac; jinak zacni znovu
// } while(counter<4); // pockej na 4 jednicky
if (!read_nibble(&osa)) goto decoder;
if (osa!=15) {e1++; goto decoder;};
if (!read_nibble(&osa)) goto decoder; // nacti identifikator osy
 
if (!read_nibble(&hodnota)) goto decoder; // nacti 1. nibble; pri chybe zacni znovu
if (!read_nibble(&kontrola)) goto decoder; // nacti 2. nibble; pri chybe zacni znovu
if (hodnota != kontrola) {e2++; goto decoder;} // zacni znovu, pokud jsou ruzne nibble
 
switch (osa) // rozeskoc se podle adresy osy
{
case OSA_X:
{
x=hodnota;
xc++;
break;
};
case OSA_Y:
{
y=hodnota;
yc++;
break;
};
case TLs:
{
e1++;
break;
};
};
 
// ladici vypisy
lcd_gotoxy(1,1); // vytiskni X a Y
printf(lcd_putc,"X: %U %u %U ", x, xc, e1);
lcd_gotoxy(1,2);
printf(lcd_putc,"Y: %U %U %U ", y, yc, e2);
 
// ovladani serv
output_high(SERVO_X);
delay_ms(1);
for (osa=x; osa--; osa>0)
delay_us(65);
output_low(SERVO_X);
 
output_high(SERVO_Y);
delay_ms(1);
for (osa=y; osa--; osa>0)
delay_us(65);
output_low(SERVO_Y);
 
for (osa=30-x-y; osa--; osa>0)
delay_us(65);
 
}
}
 
 
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/03/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
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/03/MAIN.ERR
0,0 → 1,0
No Errors
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/03/MAIN.H
0,0 → 1,4
#include <16F84.h>
#use delay(clock=4000000)
#fuses XT,NOWDT,PUT
 
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/03/MAIN.HEX
0,0 → 1,81
:1000000000308A005F2900000A108A100A11820756
:1000100028340C34013406340A108A100A1182077D
:10002000413468346F346A3400341C308400000872
:100030000319292801308D008C018C0B1D288D0B94
:100040001C284A308C008C0B232800000000800BF9
:100050001A2800340608C339A300220D8C008C0D29
:10006000FC308C050C083C392304860006148316EA
:100070000610000083120610831606108312003447
:10008000A008031D4528861046288614831686106E
:100090008312A10E2108A2002A20A10E2108A2008D
:1000A0002A200D308C008C0B5328003414309C0017
:1000B0001520C3308316860583128610831686109A
:1000C0008312061083160610831299011908023C48
:1000D000031C722802309C0015200330A2002A2045
:1000E000990A66280D308C008C0B74280230A2000F
:1000F0002A200D308C008C0B7B2899011908023CBA
:10010000031C8E28190804209A00A0011A08A100D7
:10011000402002309C001520990A7E286329013076
:100120001C029E001D08023C031D982840309E07BB
:100130001E0880389F00A0011F08A1004020003445
:100140001B088C000C300C020319B3280A300C0277
:100150000319BB280D300C020319C12808300C020A
:100160000319C628CB28A0010130A100402002308D
:100170009C001520D72801309C0002309D008F2064
:10018000D72801309C009D008F20D728A001103077
:10019000A1004020D7281B081F3C031CD128073092
:1001A0009B050130A0001B08A1004020D728003487
:1001B0009B0108309A009A080319EC2883168515CC
:1001C0008312851DE52808309A0029308C008C0B9D
:1001D000E72800009A03DB2883168515831285190A
:1001E000F72829308C008C0BF3280000EC282930EC
:1001F0008C008C0BF92800009A011A08033C031CA0
:100200001129A6308C008C0B0329000003109B0CD5
:1002100083168515831285190F2908309B079A0AC2
:10022000FD28190884001B08800001308D0000346F
:100230001C088D011B02031820291B088C002C2987
:100240008C0108309D009B0D8C0D1C080C020318BE
:100250008C008D0D9D0B232900340D0819089B007F
:1002600064309C0018210C0899000D083030031DE3
:1002700040291A189A159A1946291A1A2030422923
:100280009A111A128D070D089B00A02019089B00D7
:100290000A309C0018210C0899000D083030031D0D
:1002A00055299A1959291A1A20308D070D089B00D3
:1002B000A0203030990719089B00A0200034840149
:1002C0001F308305562805309C0015209901190818
:1002D0000C20990A9B00A02004301902031D6729F5
:1002E00003309A002E309B00A0209A0B7229043014
:1002F0009900FA309C001520990B79298F01900103
:1003000091019201970198010430960096011330F3
:100310009900D8208D08031D8E29862913080F3CCB
:1003200003199429970A862913309900D8208D083B
:10033000031D9B29862914309900D8208D08031DA0
:10034000A229862915309900D8208D08031DA929D6
:100350008629150814020319AF29980A8629013045
:100360001302FD3E0318C029033E622A14088F00C1
:10037000910AC02914089000920AC029970AC0293E
:1003800001309C009D008F2058309B00A0203A3007
:100390009B00A02020309B00A0200F08990018305F
:1003A0009A002D2120309B00A020110899001830C0
:1003B0009A002D2120309B00A020170899001830AA
:1003C0009A002D210530990020309B00A020990B28
:1003D000E42901309C0002309D008F2059309B00A1
:1003E000A0203A309B00A02020309B00A0201008C5
:1003F000990018309A002D2120309B00A02012086F
:10040000990018309A002D2120309B00A020180858
:10041000990018309A002D210530990020309B005A
:10042000A020990B0E2A83160510831205140130A3
:100430009C0015200F08930013089303003A03193A
:100440002B2A15308C008C0B232A00009308031DE7
:100450002A2A00301C2A83160510831205108316E1
:1004600085108312851401309C001520100893001C
:1004700013089303003A0319472A15308C008C0B9C
:100480003F2A00009308031D462A0030382A8316AD
:100490008510831285100F081E3C8D0010080D0278
:1004A000930013089303003A0319602A15308C0057
:1004B0008C0B582A00009308031D5F2A0030512A34
:1004C000822963000A108A140A118207B629BA2900
:0204D000BE2943
:02400E00F13F80
:00000001FF
;PIC16F84
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/03/MAIN.LST
0,0 → 1,1083
CCS PCW C Compiler, Version 3.110, 15448
 
Filename: d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\main.LST
 
ROM used: 617 (60%)
Largest free fragment is 407
RAM used: 9 (13%) at main() level
25 (37%) worst case
Stack: 5 locations
 
*
0000: MOVLW 00
0001: MOVWF 0A
0002: GOTO 15F
0003: NOP
.................... // Prijimac
....................
.................... #include "main.h"
.................... #include <16F84.h>
.................... //////// Standard Header file for the PIC16F84 device ////////////////
.................... #device PIC16F84
.................... #list
....................
.................... #use delay(clock=4000000)
*
0015: MOVLW 1C
0016: MOVWF 04
0017: MOVF 00,W
0018: BTFSC 03.2
0019: GOTO 029
001A: MOVLW 01
001B: MOVWF 0D
001C: CLRF 0C
001D: DECFSZ 0C,F
001E: GOTO 01D
001F: DECFSZ 0D,F
0020: GOTO 01C
0021: MOVLW 4A
0022: MOVWF 0C
0023: DECFSZ 0C,F
0024: GOTO 023
0025: NOP
0026: NOP
0027: DECFSZ 00,F
0028: GOTO 01A
0029: RETLW 00
.................... #fuses XT,NOWDT,PUT
....................
....................
.................... #include "..\common.h"
.................... #DEFINE OSA_X 1 // adresy os
.................... #DEFINE OSA_Y 2
.................... #DEFINE TLs 3
.................... #DEFINE IMPULS 250 // sirka impulsu
....................
....................
.................... #DEFINE LCD_RS PIN_B1 // rizeni registru LCD displeje
.................... #DEFINE LCD_E PIN_B0 // enable LCD displeje
.................... #DEFINE LCD_DATA_LSB PIN_B2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
.................... #INCLUDE "MYLCD.C"
.................... // LCD modul pro ovladani dvouradkoveho LCD modulu se standardnim Hitachi radicem
.................... // (c)miho 2002
.................... //
.................... // Historie:
.................... //
.................... // 0.0 Uvodni verze se snadnou definici portu LCD displeje
.................... //
.................... //
.................... // Funkce:
.................... //
.................... // lcd_init() inicializuje LCD displej a porty, nutno volat jako prvni
.................... //
.................... // lcd_putc(c) zapis snaku do lcd displeje, zpracovava nasledujici ridici znaky
.................... // \f = \x0C - nova stranka - smazani displeje
.................... // \n = \x0A - odradkovani (prechod na druhou radku)
.................... // \b = \x08 - backspace - posunuti kurzoru o 1 pozici zpet
.................... // \r = \x0D - goto home to position 1,1
.................... // \0 .. \7 - definovatelne znaky v pozicich 0 az 7 v CGRAM
.................... // \20 .. \27 - alternativne zapsane znaky (oktalove) v pozicich 0 az 7 CGRAM
.................... // Pozor na to, ze funkce printf konci tisk pokud narazi na \0 (konec retezce)
.................... //
.................... // lcd_gotoxy(x,y) presune kurzor na uvedenou adresu
.................... // nekontroluje parametry
.................... //
.................... // lcd_cursor_on zapne kurzor
.................... // lcd_cursor_off vypne kurzor
.................... //
.................... // lcd_define_char(Index, Def) Makro, ktere definuje znaky od pozice Index obsahem definicniho
.................... // retezce Def. Kazdych 8 znaku retezce Def definuje dalsi znak v CGRAM.
.................... // Kapacita CGRAM je celkem 8 znaku s indexem 0 az 7.
.................... // Na konci se provede lcd_gotoxy(1,1).
.................... // Na konci teto knihovny je priklad pouziti definovanych znaku
.................... //
.................... // Definice portu:
.................... //
.................... // #DEFINE LCD_RS PIN_B2 // rizeni registru LCD displeje
.................... // #DEFINE LCD_E PIN_B1 // enable LCD displeje
.................... // #DEFINE LCD_DATA_LSB PIN_C2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
....................
....................
....................
....................
.................... // Privatni sekce, cist jen v pripade, ze neco nefunguje
....................
....................
....................
....................
.................... // Generovane defince portu pro ucely teto knihovny aby kod generoval spravne IO operace a soucasne
.................... // bylo mozne jednoduse deklarovat pripojene piny LCD displeje pri pouziti teto knihovny. Problem spociva
.................... // v tom, ze se musi spravne ridit smery portu a soucasne datovy port zabira jen 4 bity ze zadaneho portu
.................... //
.................... #DEFINE LCD_SHIFT (LCD_DATA_LSB&7) // pocet bitu posuvu dataoveho kanalu v datovem portu
.................... #DEFINE LCD_PORT (LCD_DATA_LSB>>3) // adresa LCD datoveho portu
.................... #DEFINE LCD_TRIS (LCD_PORT+0x80) // adresa prislusneho TRIS registru
.................... #DEFINE LCD_MASK (0xF<<LCD_SHIFT) // maska platnych bitu
.................... //
.................... #IF LCD_SHIFT>4 // kontrola mezi
.................... #ERROR LCD data port LSB bit not in range 0..4
.................... #ENDIF
....................
....................
.................... // Definice konstant pro LCD display
.................... //
.................... #define LCD_CURSOR_ON_ 0x0E // kurzor jako blikajici radka pod znakem
.................... #define LCD_CURSOR_OFF_ 0x0C // zadny kurzor
.................... #define LCD_LINE_2 0x40 // adresa 1. znaku 2. radky
....................
....................
.................... // Definice rezimu LCD displeje
.................... //
.................... BYTE const LCD_INIT_STRING[4] =
.................... {
.................... 0x28, // intrfejs 4 bity, 2 radky, font 5x7
.................... LCD_CURSOR_OFF_, // display on, kurzor off,
.................... 0x01, // clear displeje
.................... 0x06 // inkrement pozice kurzoru (posun kurzoru doprava)
.................... };
*
0004: BCF 0A.0
0005: BCF 0A.1
0006: BCF 0A.2
0007: ADDWF 02,F
0008: RETLW 28
0009: RETLW 0C
000A: RETLW 01
000B: RETLW 06
....................
....................
.................... // Odesle nibble do displeje (posle data a klikne signalem e)
.................... //
.................... void lcd_send_nibble( BYTE n )
.................... {
.................... *LCD_PORT = (*LCD_PORT & ~LCD_MASK) | ((n << LCD_SHIFT) & LCD_MASK); // nastav datove bity portu a ostatni zachovej
*
002A: MOVF 06,W
002B: ANDLW C3
002C: MOVWF 23
002D: RLF 22,W
002E: MOVWF 0C
002F: RLF 0C,F
0030: MOVLW FC
0031: ANDWF 0C,F
0032: MOVF 0C,W
0033: ANDLW 3C
0034: IORWF 23,W
0035: MOVWF 06
.................... output_bit(LCD_E,1); // vzestupna hrana
0036: BSF 06.0
0037: BSF 03.5
0038: BCF 06.0
.................... delay_us(1); // pockej alespon 450ns od e nebo alespon 195ns od dat
0039: NOP
.................... output_bit(LCD_E,0); // sestupna hrana (minimalni perioda e je 1us)
003A: BCF 03.5
003B: BCF 06.0
003C: BSF 03.5
003D: BCF 06.0
003E: BCF 03.5
003F: RETLW 00
.................... }
....................
....................
.................... // Odesle bajt do registru LCD
.................... //
.................... // Pokud je Adr=0 .. instrukcni registr
.................... // Pokud je Adr=1 .. datovy registr
.................... //
.................... void lcd_send_byte( BOOLEAN Adr, BYTE n )
.................... {
.................... output_bit(LCD_RS,Adr); // vyber registr
0040: MOVF 20,F
0041: BTFSS 03.2
0042: GOTO 045
0043: BCF 06.1
0044: GOTO 046
0045: BSF 06.1
0046: BSF 03.5
0047: BCF 06.1
.................... swap(n);
0048: BCF 03.5
0049: SWAPF 21,F
.................... lcd_send_nibble(n); // posli horni pulku bajtu
004A: MOVF 21,W
004B: MOVWF 22
004C: CALL 02A
.................... swap(n);
004D: SWAPF 21,F
.................... lcd_send_nibble(n); // posli spodni pulku bajtu
004E: MOVF 21,W
004F: MOVWF 22
0050: CALL 02A
.................... delay_us(40); // minimalni doba na provedeni prikazu
0051: MOVLW 0D
0052: MOVWF 0C
0053: DECFSZ 0C,F
0054: GOTO 053
0055: RETLW 00
.................... }
....................
....................
.................... // Provede inicializaci LCD displeje, smaze obsah a nastavi mod displeje
.................... //
.................... // Tato procedura se musi volat pred pouzitim ostatnich lcd_ procedur
.................... //
.................... void lcd_init()
.................... {
....................
.................... int i; // pocitadlo cyklu
....................
.................... delay_ms(20); // spozdeni pro provedeni startu displeje po zapnuti napajeni
0056: MOVLW 14
0057: MOVWF 1C
0058: CALL 015
....................
.................... *LCD_TRIS = *LCD_TRIS & ~LCD_MASK; // nuluj odpovidajici bity tris registru datoveho portu LCD
0059: MOVLW C3
005A: BSF 03.5
005B: ANDWF 06,F
....................
.................... output_bit(LCD_RS,0); // nastav jako vystup a nastav klidovy stav
005C: BCF 03.5
005D: BCF 06.1
005E: BSF 03.5
005F: BCF 06.1
.................... output_bit(LCD_E,0); // nastav jako vystup a nastav klidovy stav
0060: BCF 03.5
0061: BCF 06.0
0062: BSF 03.5
0063: BCF 06.0
....................
.................... for (i=0; i<3; i++) // nastav lcd do rezimu 8 bitu sbernice
0064: BCF 03.5
0065: CLRF 19
0066: MOVF 19,W
0067: SUBLW 02
0068: BTFSS 03.0
0069: GOTO 072
.................... {
.................... delay_ms(2); // muze byt rozdelany prenos dat (2x 4 bity) nebo pomaly povel
006A: MOVLW 02
006B: MOVWF 1C
006C: CALL 015
.................... lcd_send_nibble(3); // rezim 8 bitu
006D: MOVLW 03
006E: MOVWF 22
006F: CALL 02A
.................... }
0070: INCF 19,F
0071: GOTO 066
....................
.................... delay_us(40); // cas na zpracovani
0072: MOVLW 0D
0073: MOVWF 0C
0074: DECFSZ 0C,F
0075: GOTO 074
.................... lcd_send_nibble(2); // nastav rezim 4 bitu (plati od nasledujiciho prenosu)
0076: MOVLW 02
0077: MOVWF 22
0078: CALL 02A
.................... delay_us(40); // cas na zpracovani
0079: MOVLW 0D
007A: MOVWF 0C
007B: DECFSZ 0C,F
007C: GOTO 07B
....................
.................... for (i=0;i<3;i++) // proved inicializaci (nastaveni modu, smazani apod)
007D: CLRF 19
007E: MOVF 19,W
007F: SUBLW 02
0080: BTFSS 03.0
0081: GOTO 08E
.................... {
.................... lcd_send_byte(0,LCD_INIT_STRING[i]);
0082: MOVF 19,W
0083: CALL 004
0084: MOVWF 1A
0085: CLRF 20
0086: MOVF 1A,W
0087: MOVWF 21
0088: CALL 040
.................... delay_ms(2);
0089: MOVLW 02
008A: MOVWF 1C
008B: CALL 015
.................... }
008C: INCF 19,F
008D: GOTO 07E
008E: GOTO 163 (RETURN)
.................... }
....................
....................
.................... // Proved presun kurzoru
.................... //
.................... // Pozice 1.1 je domu
.................... //
.................... void lcd_gotoxy( BYTE x, BYTE y)
.................... {
....................
.................... BYTE Adr;
....................
.................... Adr=x-1;
008F: MOVLW 01
0090: SUBWF 1C,W
0091: MOVWF 1E
.................... if(y==2)
0092: MOVF 1D,W
0093: SUBLW 02
0094: BTFSS 03.2
0095: GOTO 098
.................... Adr+=LCD_LINE_2;
0096: MOVLW 40
0097: ADDWF 1E,F
....................
.................... lcd_send_byte(0,0x80|Adr);
0098: MOVF 1E,W
0099: IORLW 80
009A: MOVWF 1F
009B: CLRF 20
009C: MOVF 1F,W
009D: MOVWF 21
009E: CALL 040
009F: RETLW 00
.................... }
....................
....................
.................... // Zapis znaku na displej, zpracovani ridicich znaku
.................... //
.................... void lcd_putc( char c)
.................... {
....................
.................... switch (c)
00A0: MOVF 1B,W
00A1: MOVWF 0C
00A2: MOVLW 0C
00A3: SUBWF 0C,W
00A4: BTFSC 03.2
00A5: GOTO 0B3
00A6: MOVLW 0A
00A7: SUBWF 0C,W
00A8: BTFSC 03.2
00A9: GOTO 0BB
00AA: MOVLW 0D
00AB: SUBWF 0C,W
00AC: BTFSC 03.2
00AD: GOTO 0C1
00AE: MOVLW 08
00AF: SUBWF 0C,W
00B0: BTFSC 03.2
00B1: GOTO 0C6
00B2: GOTO 0CB
.................... {
.................... case '\f' : lcd_send_byte(0,1); // smaz displej
00B3: CLRF 20
00B4: MOVLW 01
00B5: MOVWF 21
00B6: CALL 040
.................... delay_ms(2);
00B7: MOVLW 02
00B8: MOVWF 1C
00B9: CALL 015
.................... break;
00BA: GOTO 0D7
.................... case '\n' : lcd_gotoxy(1,2); break; // presun se na 1. znak 2. radky
00BB: MOVLW 01
00BC: MOVWF 1C
00BD: MOVLW 02
00BE: MOVWF 1D
00BF: CALL 08F
00C0: GOTO 0D7
.................... case '\r' : lcd_gotoxy(1,1); break; // presun home
00C1: MOVLW 01
00C2: MOVWF 1C
00C3: MOVWF 1D
00C4: CALL 08F
00C5: GOTO 0D7
.................... case '\b' : lcd_send_byte(0,0x10); break; // posun kurzor o 1 zpet
00C6: CLRF 20
00C7: MOVLW 10
00C8: MOVWF 21
00C9: CALL 040
00CA: GOTO 0D7
.................... default : if (c<0x20) c&=0x7; // preklopeni definovatelnych znaku na rozsah 0 az 0x1F
00CB: MOVF 1B,W
00CC: SUBLW 1F
00CD: BTFSS 03.0
00CE: GOTO 0D1
00CF: MOVLW 07
00D0: ANDWF 1B,F
.................... lcd_send_byte(1,c); break; // zapis znak
00D1: MOVLW 01
00D2: MOVWF 20
00D3: MOVF 1B,W
00D4: MOVWF 21
00D5: CALL 040
00D6: GOTO 0D7
.................... }
00D7: RETLW 00
.................... }
....................
....................
.................... // Zapni kurzor
.................... //
.................... void lcd_cursor_on()
.................... {
.................... lcd_send_byte(0,LCD_CURSOR_ON_);
.................... }
....................
....................
.................... // Vypni kurzor
.................... //
.................... void lcd_cursor_off()
.................... {
.................... lcd_send_byte(0,LCD_CURSOR_OFF_);
.................... }
....................
....................
.................... // Definice vlastnich fontu
.................... //
.................... // Vlastnich definic muze byt jen 8 do pozic 0 az 7 pameti CGRAM radice lcd displeje
.................... // Pro snadne definovani jsou pripraveny nasledujici definice a na konci souboru je uveden
.................... // priklad pouziti definovanych znaku.
....................
....................
.................... // Pomocna procedura pro posilani ridicich dat do radice displeje
.................... //
.................... void lcd_putc2(int Data)
.................... {
.................... lcd_send_byte(1,Data);
.................... }
....................
....................
.................... // Pomocne definice pro programovani obsahu CGRAM
.................... //
.................... #DEFINE lcd_define_start(Code) lcd_send_byte(0,0x40+(Code<<3)); delay_ms(2)
.................... #DEFINE lcd_define_def(String) printf(lcd_putc2,String);
.................... #DEFINE lcd_define_end() lcd_send_byte(0,3); delay_ms(2)
....................
....................
.................... // Vlastni vykonne makro pro definovani fontu do pozice Index CGRAM s definicnim retezcem Def
.................... //
.................... #DEFINE lcd_define_char(Index, Def) lcd_define_start(Index); lcd_define_def(Def); lcd_define_end();
....................
....................
.................... // Pripravene definice fontu vybranych znaku
.................... // V tabulce nesmi byt 00 (konec retezce v printf()), misto toho davame 80
.................... //
.................... #DEFINE LCD_CHAR_BAT100 "\x0E\x1F\x1F\x1F\x1F\x1F\x1F\x1F" /* symbol plne baterie */
.................... #DEFINE LCD_CHAR_BAT50 "\x0E\x1F\x11\x11\x13\x17\x1F\x1F" /* symbol polovicni baterie */
.................... #DEFINE LCD_CHAR_BAT0 "\x0E\x1F\x11\x11\x11\x11\x11\x1F" /* symbol vybite baterie */
.................... #DEFINE LCD_CHAR_LUA "\x04\x0E\x11\x11\x1F\x11\x11\x80" /* A s carkou */
.................... #DEFINE LCD_CHAR_LLA "\x01\x02\x0E\x01\x1F\x11\x0F\x80" /* a s carkou */
.................... #DEFINE LCD_CHAR_HUC "\x0A\x0E\x11\x10\x10\x11\x0E\x80" /* C s hackem */
.................... #DEFINE LCD_CHAR_HLC "\x0A\x04\x0E\x10\x10\x11\x0E\x80" /* c s hackem */
.................... #DEFINE LCD_CHAR_HUD "\x0A\x1C\x12\x11\x11\x12\x1C\x80" /* D s hackem */
.................... #DEFINE LCD_CHAR_HLD "\x05\x03\x0D\x13\x11\x11\x0F\x80" /* d s hackem */
.................... #DEFINE LCD_CHAR_LUE "\x04\x1F\x10\x10\x1E\x10\x1F\x80" /* E s carkou */
.................... #DEFINE LCD_CHAR_LLE "\x01\x02\x0E\x11\x1F\x10\x0E\x80" /* e s carkou */
.................... #DEFINE LCD_CHAR_HUE "\x0A\x1F\x10\x1E\x10\x10\x1F\x80" /* E s hackem */
.................... #DEFINE LCD_CHAR_HLE "\x0A\x04\x0E\x11\x1F\x10\x0E\x80" /* e s hackem */
.................... #DEFINE LCD_CHAR_LUI "\x04\x0E\x04\x04\x04\x04\x0E\x80" /* I s carkou */
.................... #DEFINE LCD_CHAR_LLI "\x02\x04\x80\x0C\x04\x04\x0E\x80" /* i s carkou */
.................... #DEFINE LCD_CHAR_HUN "\x0A\x15\x11\x19\x15\x13\x11\x80" /* N s hackem */
.................... #DEFINE LCD_CHAR_HLN "\x0A\x04\x16\x19\x11\x11\x11\x80" /* n s hackem */
.................... #DEFINE LCD_CHAR_LUO "\x04\x0E\x11\x11\x11\x11\x0E\x80" /* O s carkou */
.................... #DEFINE LCD_CHAR_LLO "\x02\x04\x0E\x11\x11\x11\x0E\x80" /* o s carkou */
.................... #DEFINE LCD_CHAR_HUR "\x0A\x1E\x11\x1E\x14\x12\x11\x80" /* R s hackem */
.................... #DEFINE LCD_CHAR_HLR "\x0A\x04\x16\x19\x10\x10\x10\x80" /* r s hackem */
.................... #DEFINE LCD_CHAR_HUS "\x0A\x0F\x10\x0E\x01\x01\x1E\x80" /* S s hackem */
.................... #DEFINE LCD_CHAR_HLS "\x0A\x04\x0E\x10\x0E\x01\x1E\x80" /* s s hackem */
.................... #DEFINE LCD_CHAR_HUT "\x0A\x1F\x04\x04\x04\x04\x04\x80" /* T s hackem */
.................... #DEFINE LCD_CHAR_HLT "\x0A\x0C\x1C\x08\x08\x09\x06\x80" /* t s hackem */
.................... #DEFINE LCD_CHAR_LUU "\x02\x15\x11\x11\x11\x11\x0E\x80" /* U s carkou */
.................... #DEFINE LCD_CHAR_LLU "\x02\x04\x11\x11\x11\x13\x0D\x80" /* u s carkou */
.................... #DEFINE LCD_CHAR_CUU "\x06\x17\x11\x11\x11\x11\x0E\x80" /* U s krouzkem */
.................... #DEFINE LCD_CHAR_CLU "\x06\x06\x11\x11\x11\x11\x0E\x80" /* u s krouzkem */
.................... #DEFINE LCD_CHAR_LUY "\x02\x15\x11\x0A\x04\x04\x04\x80" /* Y s carkou */
.................... #DEFINE LCD_CHAR_LLY "\x02\x04\x11\x11\x0F\x01\x0E\x80" /* y s carkou */
.................... #DEFINE LCD_CHAR_HUZ "\x0A\x1F\x01\x02\x04\x08\x1F\x80" /* Z s hackem */
.................... #DEFINE LCD_CHAR_HLZ "\x0A\x04\x1F\x02\x04\x08\x1F\x80" /* z s hackem */
....................
....................
.................... // Priklad pouziti definovanych znaku
.................... //
.................... //
.................... //void lcd_sample()
.................... //{
.................... // lcd_define_char(0,LCD_CHAR_BAT50); // Priklad definice znaku baterie do pozice 0
.................... // lcd_define_char(2,LCD_CHAR_HLE LCD_CHAR_LUI); // Priklad definice znaku e s hackem a I s carkou od pozice 2
.................... // // vsimnete si, ze neni carka mezi retezci s definici (oba retezce definuji
.................... // // jediny definicni retezec)
.................... // printf(lcd_putc,"\fZnaky:\20\22\23"); // priklad vypisu znaku z pozice 0, 2 a 3
.................... // delay_ms(1000);
.................... // lcd_define_char(0,LCD_CHAR_BAT0); // Predefinovani tvaru znaku v pozici 0
.................... // delay_ms(1000);
.................... //}
....................
....................
.................... #DEFINE PRIJIMAC PIN_A3 // pin na ktery je pripojen prijimac
.................... #DEFINE SERVO_X PIN_A0 // pin na ktery je pripojeno servo
.................... #DEFINE SERVO_Y PIN_A1
....................
....................
.................... int8 prijmout(int8* bit)
.................... {
.................... // || |
.................... // |--|_____ 1
.................... // |
.................... // |-|__|-|_ 0
....................
.................... while (!input(PRIJIMAC)) ; // cekej na jednicku
.................... delay_us(IMPULS/4); // presvec se, jestli je stale 1 po 1/4 impulsu
.................... if (!input(PRIJIMAC)) return false; // vrat chybu, kdyz neni stale 1
.................... delay_us(3*IMPULS); // pockej na rozhodovaci misto
.................... /// if (input(PRIJIMAC)) *bit=0; else *bit=1; // dekoduj 1 nebo 0
.................... *bit=!input(PRIJIMAC); // dekoduj 1 nebo 0
.................... delay_us(IMPULS); // pockej na konec znaku
....................
.................... return true; // vrat, ze se cteni povedlo
.................... }
....................
.................... int8 read_nibble(int8* data)
.................... {
.................... int8 i;
.................... int8 d;
....................
.................... d=0;
00D8: CLRF 1B
....................
.................... // Cekam na dlouhou nulu
.................... for (i=8; i>0; i--)
00D9: MOVLW 08
00DA: MOVWF 1A
00DB: MOVF 1A,F
00DC: BTFSC 03.2
00DD: GOTO 0EC
.................... {
.................... if (input(PRIJIMAC)) i=8;
00DE: BSF 03.5
00DF: BSF 05.3
00E0: BCF 03.5
00E1: BTFSS 05.3
00E2: GOTO 0E5
00E3: MOVLW 08
00E4: MOVWF 1A
.................... delay_us(IMPULS/2);
00E5: MOVLW 29
00E6: MOVWF 0C
00E7: DECFSZ 0C,F
00E8: GOTO 0E7
00E9: NOP
.................... }
00EA: DECF 1A,F
00EB: GOTO 0DB
....................
.................... // Cekam na jednicku (start ramce)
.................... for (; !input(PRIJIMAC); )
00EC: BSF 03.5
00ED: BSF 05.3
00EE: BCF 03.5
00EF: BTFSC 05.3
00F0: GOTO 0F7
.................... {
.................... delay_us(IMPULS/2);
00F1: MOVLW 29
00F2: MOVWF 0C
00F3: DECFSZ 0C,F
00F4: GOTO 0F3
00F5: NOP
.................... }
00F6: GOTO 0EC
....................
.................... delay_us(IMPULS/2);
00F7: MOVLW 29
00F8: MOVWF 0C
00F9: DECFSZ 0C,F
00FA: GOTO 0F9
00FB: NOP
....................
.................... // Prenasim bity
.................... for (i=0; i<4; i++)
00FC: CLRF 1A
00FD: MOVF 1A,W
00FE: SUBLW 03
00FF: BTFSS 03.0
0100: GOTO 111
.................... {
.................... delay_us(2*IMPULS);
0101: MOVLW A6
0102: MOVWF 0C
0103: DECFSZ 0C,F
0104: GOTO 103
0105: NOP
.................... d >>= 1;
0106: BCF 03.0
0107: RRF 1B,F
.................... if (!input(PRIJIMAC)) d +=8;
0108: BSF 03.5
0109: BSF 05.3
010A: BCF 03.5
010B: BTFSC 05.3
010C: GOTO 10F
010D: MOVLW 08
010E: ADDWF 1B,F
.................... }
010F: INCF 1A,F
0110: GOTO 0FD
.................... *data = d;
0111: MOVF 19,W
0112: MOVWF 04
0113: MOVF 1B,W
0114: MOVWF 00
.................... return TRUE;
0115: MOVLW 01
0116: MOVWF 0D
0117: RETLW 00
.................... }
....................
.................... int8 read_nibble2(int8* value)
.................... {
.................... int8 n; // citac
.................... int8 bit; // pomocna promenna
....................
.................... *value=0;
.................... for (n=1; n<=4; n++) // prijmi 4 bity
.................... {
.................... *value >>= 1; // posun jiz prectene do leva
.................... if (0==prijmout(&bit)) return(false); // prijmi bit; pri chybe cteni vrat chybu
.................... *value |= bit << 3; // pridej bit do nibblu
.................... };
.................... return(true); // vrat 1, jako ,ze je vse O.K.
.................... }
....................
....................
.................... int8 bit,x,y;
.................... int8 xc,yc; // pocitadla aktualizace x a y
....................
.................... void main()
.................... {
*
015F: CLRF 04
0160: MOVLW 1F
0161: ANDWF 03,F
.................... lcd_init(); // zinicializuj LCD display
0162: GOTO 056
.................... delay_ms(5);
0163: MOVLW 05
0164: MOVWF 1C
0165: CALL 015
.................... printf(lcd_putc,"Ahoj...");
*
000C: BCF 0A.0
000D: BCF 0A.1
000E: BCF 0A.2
000F: ADDWF 02,F
0010: RETLW 41
0011: RETLW 68
0012: RETLW 6F
0013: RETLW 6A
0014: RETLW 00
*
0166: CLRF 19
0167: MOVF 19,W
0168: CALL 00C
0169: INCF 19,F
016A: MOVWF 1B
016B: CALL 0A0
016C: MOVLW 04
016D: SUBWF 19,W
016E: BTFSS 03.2
016F: GOTO 167
0170: MOVLW 03
0171: MOVWF 1A
0172: MOVLW 2E
0173: MOVWF 1B
0174: CALL 0A0
0175: DECFSZ 1A,F
0176: GOTO 172
.................... delay_ms(1000);
0177: MOVLW 04
0178: MOVWF 19
0179: MOVLW FA
017A: MOVWF 1C
017B: CALL 015
017C: DECFSZ 19,F
017D: GOTO 179
....................
.................... //while(TRUE)
.................... //{
.................... // read_nibble(&x);
.................... // lcd_gotoxy(1,1); // vytiskni X a Y
.................... // printf(lcd_putc,"O:%d ",x);
.................... //}
....................
.................... x = 0;
017E: CLRF 0F
.................... y = 0;
017F: CLRF 10
.................... xc=0;
0180: CLRF 11
.................... yc=0;
0181: CLRF 12
....................
.................... while (true)
.................... {
.................... int8 osa, hodnota, kontrola;
.................... int counter; // pocitadlo 1 a 0 v detektoru
.................... int e1,e2; // pocitadla chyb - ladici
....................
.................... e1=0;
0182: CLRF 17
.................... e2=0;
0183: CLRF 18
....................
.................... counter=4;
0184: MOVLW 04
0185: MOVWF 16
....................
.................... decoder:
....................
.................... counter=0; // vynuluj citac
0186: CLRF 16
.................... // do // vyhledej synchronizacni jednicky
.................... // {
.................... // if (!prijmout(&bit)) goto decoder; // prijmi bit; pri chybe zacni znovu
.................... // if (1==bit) counter++; else goto decoder; // kdyz je bit 1, tak zvys citac; jinak zacni znovu
.................... // } while(counter<4); // pockej na 4 jednicky
.................... if (!read_nibble(&osa)) goto decoder;
0187: MOVLW 13
0188: MOVWF 19
0189: CALL 0D8
018A: MOVF 0D,F
018B: BTFSS 03.2
018C: GOTO 18E
018D: GOTO 186
.................... if (osa!=15) {e1++; goto decoder;};
018E: MOVF 13,W
018F: SUBLW 0F
0190: BTFSC 03.2
0191: GOTO 194
0192: INCF 17,F
0193: GOTO 186
.................... if (!read_nibble(&osa)) goto decoder; // nacti identifikator osy
0194: MOVLW 13
0195: MOVWF 19
0196: CALL 0D8
0197: MOVF 0D,F
0198: BTFSS 03.2
0199: GOTO 19B
019A: GOTO 186
....................
.................... if (!read_nibble(&hodnota)) goto decoder; // nacti 1. nibble; pri chybe zacni znovu
019B: MOVLW 14
019C: MOVWF 19
019D: CALL 0D8
019E: MOVF 0D,F
019F: BTFSS 03.2
01A0: GOTO 1A2
01A1: GOTO 186
.................... if (!read_nibble(&kontrola)) goto decoder; // nacti 2. nibble; pri chybe zacni znovu
01A2: MOVLW 15
01A3: MOVWF 19
01A4: CALL 0D8
01A5: MOVF 0D,F
01A6: BTFSS 03.2
01A7: GOTO 1A9
01A8: GOTO 186
.................... if (hodnota != kontrola) {e2++; goto decoder;} // zacni znovu, pokud jsou ruzne nibble
01A9: MOVF 15,W
01AA: SUBWF 14,W
01AB: BTFSC 03.2
01AC: GOTO 1AF
01AD: INCF 18,F
01AE: GOTO 186
....................
....................
.................... switch (osa) // rozeskoc se podle adresy osy
01AF: MOVLW 01
01B0: SUBWF 13,W
01B1: ADDLW FD
01B2: BTFSC 03.0
01B3: GOTO 1C0
01B4: ADDLW 03
01B5: GOTO 262
.................... {
.................... case OSA_X:
.................... {
.................... x=hodnota;
01B6: MOVF 14,W
01B7: MOVWF 0F
.................... xc++;
01B8: INCF 11,F
.................... break;
01B9: GOTO 1C0
.................... };
.................... case OSA_Y:
.................... {
.................... y=hodnota;
01BA: MOVF 14,W
01BB: MOVWF 10
.................... yc++;
01BC: INCF 12,F
.................... break;
01BD: GOTO 1C0
.................... };
.................... case TLs:
.................... {
.................... e1++;
01BE: INCF 17,F
.................... break;
01BF: GOTO 1C0
.................... };
.................... };
*
0262: BCF 0A.0
0263: BSF 0A.1
0264: BCF 0A.2
0265: ADDWF 02,F
0266: GOTO 1B6
0267: GOTO 1BA
0268: GOTO 1BE
....................
.................... // ladici vypisy
.................... lcd_gotoxy(1,1); // vytiskni X a Y
*
01C0: MOVLW 01
01C1: MOVWF 1C
01C2: MOVWF 1D
01C3: CALL 08F
.................... printf(lcd_putc,"X: %U %u %U ", x, xc, e1);
*
012D: MOVF 0D,W
012E: MOVF 19,W
012F: MOVWF 1B
0130: MOVLW 64
0131: MOVWF 1C
0132: CALL 118
0133: MOVF 0C,W
0134: MOVWF 19
0135: MOVF 0D,W
0136: MOVLW 30
0137: BTFSS 03.2
0138: GOTO 140
0139: BTFSC 1A.0
013A: BSF 1A.3
013B: BTFSC 1A.3
013C: GOTO 146
013D: BTFSC 1A.4
013E: MOVLW 20
013F: GOTO 142
0140: BCF 1A.3
0141: BCF 1A.4
0142: ADDWF 0D,F
0143: MOVF 0D,W
0144: MOVWF 1B
0145: CALL 0A0
0146: MOVF 19,W
0147: MOVWF 1B
0148: MOVLW 0A
0149: MOVWF 1C
014A: CALL 118
014B: MOVF 0C,W
014C: MOVWF 19
014D: MOVF 0D,W
014E: MOVLW 30
014F: BTFSS 03.2
0150: GOTO 155
0151: BTFSC 1A.3
0152: GOTO 159
0153: BTFSC 1A.4
0154: MOVLW 20
0155: ADDWF 0D,F
0156: MOVF 0D,W
0157: MOVWF 1B
0158: CALL 0A0
0159: MOVLW 30
015A: ADDWF 19,F
015B: MOVF 19,W
015C: MOVWF 1B
015D: CALL 0A0
015E: RETLW 00
*
01C4: MOVLW 58
01C5: MOVWF 1B
01C6: CALL 0A0
01C7: MOVLW 3A
01C8: MOVWF 1B
01C9: CALL 0A0
01CA: MOVLW 20
01CB: MOVWF 1B
01CC: CALL 0A0
01CD: MOVF 0F,W
01CE: MOVWF 19
01CF: MOVLW 18
01D0: MOVWF 1A
01D1: CALL 12D
01D2: MOVLW 20
01D3: MOVWF 1B
01D4: CALL 0A0
01D5: MOVF 11,W
01D6: MOVWF 19
01D7: MOVLW 18
01D8: MOVWF 1A
01D9: CALL 12D
01DA: MOVLW 20
01DB: MOVWF 1B
01DC: CALL 0A0
01DD: MOVF 17,W
01DE: MOVWF 19
01DF: MOVLW 18
01E0: MOVWF 1A
01E1: CALL 12D
01E2: MOVLW 05
01E3: MOVWF 19
01E4: MOVLW 20
01E5: MOVWF 1B
01E6: CALL 0A0
01E7: DECFSZ 19,F
01E8: GOTO 1E4
.................... lcd_gotoxy(1,2);
01E9: MOVLW 01
01EA: MOVWF 1C
01EB: MOVLW 02
01EC: MOVWF 1D
01ED: CALL 08F
.................... printf(lcd_putc,"Y: %U %U %U ", y, yc, e2);
01EE: MOVLW 59
01EF: MOVWF 1B
01F0: CALL 0A0
01F1: MOVLW 3A
01F2: MOVWF 1B
01F3: CALL 0A0
01F4: MOVLW 20
01F5: MOVWF 1B
01F6: CALL 0A0
01F7: MOVF 10,W
01F8: MOVWF 19
01F9: MOVLW 18
01FA: MOVWF 1A
01FB: CALL 12D
01FC: MOVLW 20
01FD: MOVWF 1B
01FE: CALL 0A0
01FF: MOVF 12,W
0200: MOVWF 19
0201: MOVLW 18
0202: MOVWF 1A
0203: CALL 12D
0204: MOVLW 20
0205: MOVWF 1B
0206: CALL 0A0
0207: MOVF 18,W
0208: MOVWF 19
0209: MOVLW 18
020A: MOVWF 1A
020B: CALL 12D
020C: MOVLW 05
020D: MOVWF 19
020E: MOVLW 20
020F: MOVWF 1B
0210: CALL 0A0
0211: DECFSZ 19,F
0212: GOTO 20E
....................
.................... // ovladani serv
.................... output_high(SERVO_X);
0213: BSF 03.5
0214: BCF 05.0
0215: BCF 03.5
0216: BSF 05.0
.................... delay_ms(1);
0217: MOVLW 01
0218: MOVWF 1C
0219: CALL 015
.................... for (osa=x; osa--; osa>0)
021A: MOVF 0F,W
021B: MOVWF 13
021C: MOVF 13,W
021D: DECF 13,F
021E: XORLW 00
021F: BTFSC 03.2
0220: GOTO 22B
.................... delay_us(65);
0221: MOVLW 15
0222: MOVWF 0C
0223: DECFSZ 0C,F
0224: GOTO 223
0225: NOP
0226: MOVF 13,F
0227: BTFSS 03.2
0228: GOTO 22A
0229: MOVLW 00
022A: GOTO 21C
.................... output_low(SERVO_X);
022B: BSF 03.5
022C: BCF 05.0
022D: BCF 03.5
022E: BCF 05.0
....................
.................... output_high(SERVO_Y);
022F: BSF 03.5
0230: BCF 05.1
0231: BCF 03.5
0232: BSF 05.1
.................... delay_ms(1);
0233: MOVLW 01
0234: MOVWF 1C
0235: CALL 015
.................... for (osa=y; osa--; osa>0)
0236: MOVF 10,W
0237: MOVWF 13
0238: MOVF 13,W
0239: DECF 13,F
023A: XORLW 00
023B: BTFSC 03.2
023C: GOTO 247
.................... delay_us(65);
023D: MOVLW 15
023E: MOVWF 0C
023F: DECFSZ 0C,F
0240: GOTO 23F
0241: NOP
0242: MOVF 13,F
0243: BTFSS 03.2
0244: GOTO 246
0245: MOVLW 00
0246: GOTO 238
.................... output_low(SERVO_Y);
0247: BSF 03.5
0248: BCF 05.1
0249: BCF 03.5
024A: BCF 05.1
....................
.................... for (osa=30-x-y; osa--; osa>0)
024B: MOVF 0F,W
024C: SUBLW 1E
024D: MOVWF 0D
024E: MOVF 10,W
024F: SUBWF 0D,W
0250: MOVWF 13
0251: MOVF 13,W
0252: DECF 13,F
0253: XORLW 00
0254: BTFSC 03.2
0255: GOTO 260
.................... delay_us(65);
0256: MOVLW 15
0257: MOVWF 0C
0258: DECFSZ 0C,F
0259: GOTO 258
025A: NOP
025B: MOVF 13,F
025C: BTFSS 03.2
025D: GOTO 25F
025E: MOVLW 00
025F: GOTO 251
....................
.................... }
0260: GOTO 182
.................... }
....................
0261: SLEEP
....................
....................
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/03/MAIN.PJT
0,0 → 1,32
[PROJECT]
Target=main.HEX
Development_Mode=
Processor=0x684A
ToolSuite=CCS
 
[Directories]
Include=C:\Program Files\PICC\Devices;C:\Program Files\PICC\Dri;
Library=
LinkerScript=
 
[Target Data]
FileList=main.c;
BuildTool=CCSC
OptionString=-p +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
 
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/03/MAIN.STA
0,0 → 1,41
 
ROM used: 617 (60%)
407 (40%) including unused fragments
 
1 Average locations per line
4 Average locations per statement
 
RAM used: 9 (13%) at main() level
25 (37%) worst case
 
Lines Stmts % Files
----- ----- --- -----
180 100 68 d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\main.c
5 0 0 d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\main.h
111 0 0 C:\Program Files\PICC\Devices\16F84.h
5 0 0 d:\@kaklik\programy\pic_c\prenos\letadlo\common.h
272 46 19 d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\MYLCD.C
----- -----
1146 292 Total
 
Page ROM % RAM Functions:
---- --- --- --- ----------
0 21 3 1 delay_ms
0 8 1 0 @const22
0 22 4 3 lcd_send_nibble
0 22 4 2 lcd_send_byte
0 57 9 2 lcd_init
0 17 3 4 lcd_gotoxy
0 56 9 1 lcd_putc
0 64 10 4 read_nibble
0 259 42 2 main
0 9 1 0 @const10152
0 7 1 0 @goto10188
0 21 3 3 @DIV88
0 50 8 2 @PRINTF_U_148
 
Segment Used Free
--------- ---- ----
0000-0003 4 0
0004-03FF 613 407
 
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/03/MAIN.SYM
0,0 → 1,67
00C @SCRATCH
00D @SCRATCH
00D _RETURN_
00E bit
00F x
010 y
011 xc
012 yc
013 osa
014 hodnota
015 kontrola
016 counter
017 e1
018 e2
019 lcd_init.i
019 read_nibble.Data
019 @PRINTF_U_148.P1
019 main.@SCRATCH
01A read_nibble.i
01A @PRINTF_U_148.P1
01A lcd_init.@SCRATCH
01A main.@SCRATCH
01B lcd_putc.c
01B read_nibble.d
01B @DIV88.P1
01C delay_ms.P1
01C lcd_gotoxy.x
01C @DIV88.P1
01C read_nibble.@SCRATCH
01D lcd_gotoxy.y
01D @DIV88.@SCRATCH
01E lcd_gotoxy.Adr
01F lcd_gotoxy.@SCRATCH
020 lcd_send_byte.Adr
021 lcd_send_byte.n
022 lcd_send_nibble.n
023 lcd_send_nibble.@SCRATCH
024 lcd_send_nibble.@SCRATCH
delay_us.P1
-002 LCD_INIT_STRING
lcd_putc2.Data
prijmout.bit
read_nibble2.value
read_nibble2.n
read_nibble2.bit
 
0015 delay_ms
0004 @const22
002A lcd_send_nibble
0040 lcd_send_byte
0056 lcd_init
008F lcd_gotoxy
00A0 lcd_putc
00D8 read_nibble
015F main
000C @const10152
0262 @goto10188
0118 @DIV88
012D @PRINTF_U_148
0186 decoder
 
Project Files:
d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\main.c
d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\main.h
C:\Program Files\PICC\Devices\16F84.h
d:\@kaklik\programy\pic_c\prenos\letadlo\common.h
d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\MYLCD.C
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/03/MAIN.TRE
0,0 → 1,657
ÀÄmain
ÀÄmain 0/259 Ram=2
ÃÄ??0??
ÃÄlcd_init 0/57 Ram=2
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@const22 0/8 Ram=0
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄdelay_ms 0/21 Ram=1
ÃÄdelay_ms 0/21 Ram=1
ÃÄ@const10152 0/9 Ram=0
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄdelay_ms 0/21 Ram=1
ÃÄread_nibble 0/64 Ram=4
ÃÄread_nibble 0/64 Ram=4
ÃÄread_nibble 0/64 Ram=4
ÃÄread_nibble 0/64 Ram=4
ÃÄ@goto10188 0/7 Ram=0
ÃÄlcd_gotoxy 0/17 Ram=4
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_148 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_148 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_148 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_gotoxy 0/17 Ram=4
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_148 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_148 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_148 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄdelay_ms 0/21 Ram=1
ÀÄdelay_ms 0/21 Ram=1
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/03/MYLCD.C
0,0 → 1,271
// LCD modul pro ovladani dvouradkoveho LCD modulu se standardnim Hitachi radicem
// (c)miho 2002
//
// Historie:
//
// 0.0 Uvodni verze se snadnou definici portu LCD displeje
//
//
// Funkce:
//
// lcd_init() inicializuje LCD displej a porty, nutno volat jako prvni
//
// lcd_putc(c) zapis snaku do lcd displeje, zpracovava nasledujici ridici znaky
// \f = \x0C - nova stranka - smazani displeje
// \n = \x0A - odradkovani (prechod na druhou radku)
// \b = \x08 - backspace - posunuti kurzoru o 1 pozici zpet
// \r = \x0D - goto home to position 1,1
// \0 .. \7 - definovatelne znaky v pozicich 0 az 7 v CGRAM
// \20 .. \27 - alternativne zapsane znaky (oktalove) v pozicich 0 az 7 CGRAM
// Pozor na to, ze funkce printf konci tisk pokud narazi na \0 (konec retezce)
//
// lcd_gotoxy(x,y) presune kurzor na uvedenou adresu
// nekontroluje parametry
//
// lcd_cursor_on zapne kurzor
// lcd_cursor_off vypne kurzor
//
// lcd_define_char(Index, Def) Makro, ktere definuje znaky od pozice Index obsahem definicniho
// retezce Def. Kazdych 8 znaku retezce Def definuje dalsi znak v CGRAM.
// Kapacita CGRAM je celkem 8 znaku s indexem 0 az 7.
// Na konci se provede lcd_gotoxy(1,1).
// Na konci teto knihovny je priklad pouziti definovanych znaku
//
// Definice portu:
//
// #DEFINE LCD_RS PIN_B2 // rizeni registru LCD displeje
// #DEFINE LCD_E PIN_B1 // enable LCD displeje
// #DEFINE LCD_DATA_LSB PIN_C2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
 
 
 
 
// Privatni sekce, cist jen v pripade, ze neco nefunguje
 
 
 
 
// Generovane defince portu pro ucely teto knihovny aby kod generoval spravne IO operace a soucasne
// bylo mozne jednoduse deklarovat pripojene piny LCD displeje pri pouziti teto knihovny. Problem spociva
// v tom, ze se musi spravne ridit smery portu a soucasne datovy port zabira jen 4 bity ze zadaneho portu
//
#DEFINE LCD_SHIFT (LCD_DATA_LSB&7) // pocet bitu posuvu dataoveho kanalu v datovem portu
#DEFINE LCD_PORT (LCD_DATA_LSB>>3) // adresa LCD datoveho portu
#DEFINE LCD_TRIS (LCD_PORT+0x80) // adresa prislusneho TRIS registru
#DEFINE LCD_MASK (0xF<<LCD_SHIFT) // maska platnych bitu
//
#IF LCD_SHIFT>4 // kontrola mezi
#ERROR LCD data port LSB bit not in range 0..4
#ENDIF
 
 
// Definice konstant pro LCD display
//
#define LCD_CURSOR_ON_ 0x0E // kurzor jako blikajici radka pod znakem
#define LCD_CURSOR_OFF_ 0x0C // zadny kurzor
#define LCD_LINE_2 0x40 // adresa 1. znaku 2. radky
 
 
// Definice rezimu LCD displeje
//
BYTE const LCD_INIT_STRING[4] =
{
0x28, // intrfejs 4 bity, 2 radky, font 5x7
LCD_CURSOR_OFF_, // display on, kurzor off,
0x01, // clear displeje
0x06 // inkrement pozice kurzoru (posun kurzoru doprava)
};
 
 
// Odesle nibble do displeje (posle data a klikne signalem e)
//
void lcd_send_nibble( BYTE n )
{
*LCD_PORT = (*LCD_PORT & ~LCD_MASK) | ((n << LCD_SHIFT) & LCD_MASK); // nastav datove bity portu a ostatni zachovej
output_bit(LCD_E,1); // vzestupna hrana
delay_us(1); // pockej alespon 450ns od e nebo alespon 195ns od dat
output_bit(LCD_E,0); // sestupna hrana (minimalni perioda e je 1us)
}
 
 
// Odesle bajt do registru LCD
//
// Pokud je Adr=0 .. instrukcni registr
// Pokud je Adr=1 .. datovy registr
//
void lcd_send_byte( BOOLEAN Adr, BYTE n )
{
output_bit(LCD_RS,Adr); // vyber registr
swap(n);
lcd_send_nibble(n); // posli horni pulku bajtu
swap(n);
lcd_send_nibble(n); // posli spodni pulku bajtu
delay_us(40); // minimalni doba na provedeni prikazu
}
 
 
// Provede inicializaci LCD displeje, smaze obsah a nastavi mod displeje
//
// Tato procedura se musi volat pred pouzitim ostatnich lcd_ procedur
//
void lcd_init()
{
 
int i; // pocitadlo cyklu
 
delay_ms(20); // spozdeni pro provedeni startu displeje po zapnuti napajeni
 
*LCD_TRIS = *LCD_TRIS & ~LCD_MASK; // nuluj odpovidajici bity tris registru datoveho portu LCD
 
output_bit(LCD_RS,0); // nastav jako vystup a nastav klidovy stav
output_bit(LCD_E,0); // nastav jako vystup a nastav klidovy stav
 
for (i=0; i<3; i++) // nastav lcd do rezimu 8 bitu sbernice
{
delay_ms(2); // muze byt rozdelany prenos dat (2x 4 bity) nebo pomaly povel
lcd_send_nibble(3); // rezim 8 bitu
}
 
delay_us(40); // cas na zpracovani
lcd_send_nibble(2); // nastav rezim 4 bitu (plati od nasledujiciho prenosu)
delay_us(40); // cas na zpracovani
 
for (i=0;i<3;i++) // proved inicializaci (nastaveni modu, smazani apod)
{
lcd_send_byte(0,LCD_INIT_STRING[i]);
delay_ms(2);
}
}
 
 
// Proved presun kurzoru
//
// Pozice 1.1 je domu
//
void lcd_gotoxy( BYTE x, BYTE y)
{
 
BYTE Adr;
 
Adr=x-1;
if(y==2)
Adr+=LCD_LINE_2;
 
lcd_send_byte(0,0x80|Adr);
}
 
 
// Zapis znaku na displej, zpracovani ridicich znaku
//
void lcd_putc( char c)
{
 
switch (c)
{
case '\f' : lcd_send_byte(0,1); // smaz displej
delay_ms(2);
break;
case '\n' : lcd_gotoxy(1,2); break; // presun se na 1. znak 2. radky
case '\r' : lcd_gotoxy(1,1); break; // presun home
case '\b' : lcd_send_byte(0,0x10); break; // posun kurzor o 1 zpet
default : if (c<0x20) c&=0x7; // preklopeni definovatelnych znaku na rozsah 0 az 0x1F
lcd_send_byte(1,c); break; // zapis znak
}
}
 
 
// Zapni kurzor
//
void lcd_cursor_on()
{
lcd_send_byte(0,LCD_CURSOR_ON_);
}
 
 
// Vypni kurzor
//
void lcd_cursor_off()
{
lcd_send_byte(0,LCD_CURSOR_OFF_);
}
 
 
// Definice vlastnich fontu
//
// Vlastnich definic muze byt jen 8 do pozic 0 az 7 pameti CGRAM radice lcd displeje
// Pro snadne definovani jsou pripraveny nasledujici definice a na konci souboru je uveden
// priklad pouziti definovanych znaku.
 
 
// Pomocna procedura pro posilani ridicich dat do radice displeje
//
void lcd_putc2(int Data)
{
lcd_send_byte(1,Data);
}
 
 
// Pomocne definice pro programovani obsahu CGRAM
//
#DEFINE lcd_define_start(Code) lcd_send_byte(0,0x40+(Code<<3)); delay_ms(2)
#DEFINE lcd_define_def(String) printf(lcd_putc2,String);
#DEFINE lcd_define_end() lcd_send_byte(0,3); delay_ms(2)
 
 
// Vlastni vykonne makro pro definovani fontu do pozice Index CGRAM s definicnim retezcem Def
//
#DEFINE lcd_define_char(Index, Def) lcd_define_start(Index); lcd_define_def(Def); lcd_define_end();
 
 
// Pripravene definice fontu vybranych znaku
// V tabulce nesmi byt 00 (konec retezce v printf()), misto toho davame 80
//
#DEFINE LCD_CHAR_BAT100 "\x0E\x1F\x1F\x1F\x1F\x1F\x1F\x1F" /* symbol plne baterie */
#DEFINE LCD_CHAR_BAT50 "\x0E\x1F\x11\x11\x13\x17\x1F\x1F" /* symbol polovicni baterie */
#DEFINE LCD_CHAR_BAT0 "\x0E\x1F\x11\x11\x11\x11\x11\x1F" /* symbol vybite baterie */
#DEFINE LCD_CHAR_LUA "\x04\x0E\x11\x11\x1F\x11\x11\x80" /* A s carkou */
#DEFINE LCD_CHAR_LLA "\x01\x02\x0E\x01\x1F\x11\x0F\x80" /* a s carkou */
#DEFINE LCD_CHAR_HUC "\x0A\x0E\x11\x10\x10\x11\x0E\x80" /* C s hackem */
#DEFINE LCD_CHAR_HLC "\x0A\x04\x0E\x10\x10\x11\x0E\x80" /* c s hackem */
#DEFINE LCD_CHAR_HUD "\x0A\x1C\x12\x11\x11\x12\x1C\x80" /* D s hackem */
#DEFINE LCD_CHAR_HLD "\x05\x03\x0D\x13\x11\x11\x0F\x80" /* d s hackem */
#DEFINE LCD_CHAR_LUE "\x04\x1F\x10\x10\x1E\x10\x1F\x80" /* E s carkou */
#DEFINE LCD_CHAR_LLE "\x01\x02\x0E\x11\x1F\x10\x0E\x80" /* e s carkou */
#DEFINE LCD_CHAR_HUE "\x0A\x1F\x10\x1E\x10\x10\x1F\x80" /* E s hackem */
#DEFINE LCD_CHAR_HLE "\x0A\x04\x0E\x11\x1F\x10\x0E\x80" /* e s hackem */
#DEFINE LCD_CHAR_LUI "\x04\x0E\x04\x04\x04\x04\x0E\x80" /* I s carkou */
#DEFINE LCD_CHAR_LLI "\x02\x04\x80\x0C\x04\x04\x0E\x80" /* i s carkou */
#DEFINE LCD_CHAR_HUN "\x0A\x15\x11\x19\x15\x13\x11\x80" /* N s hackem */
#DEFINE LCD_CHAR_HLN "\x0A\x04\x16\x19\x11\x11\x11\x80" /* n s hackem */
#DEFINE LCD_CHAR_LUO "\x04\x0E\x11\x11\x11\x11\x0E\x80" /* O s carkou */
#DEFINE LCD_CHAR_LLO "\x02\x04\x0E\x11\x11\x11\x0E\x80" /* o s carkou */
#DEFINE LCD_CHAR_HUR "\x0A\x1E\x11\x1E\x14\x12\x11\x80" /* R s hackem */
#DEFINE LCD_CHAR_HLR "\x0A\x04\x16\x19\x10\x10\x10\x80" /* r s hackem */
#DEFINE LCD_CHAR_HUS "\x0A\x0F\x10\x0E\x01\x01\x1E\x80" /* S s hackem */
#DEFINE LCD_CHAR_HLS "\x0A\x04\x0E\x10\x0E\x01\x1E\x80" /* s s hackem */
#DEFINE LCD_CHAR_HUT "\x0A\x1F\x04\x04\x04\x04\x04\x80" /* T s hackem */
#DEFINE LCD_CHAR_HLT "\x0A\x0C\x1C\x08\x08\x09\x06\x80" /* t s hackem */
#DEFINE LCD_CHAR_LUU "\x02\x15\x11\x11\x11\x11\x0E\x80" /* U s carkou */
#DEFINE LCD_CHAR_LLU "\x02\x04\x11\x11\x11\x13\x0D\x80" /* u s carkou */
#DEFINE LCD_CHAR_CUU "\x06\x17\x11\x11\x11\x11\x0E\x80" /* U s krouzkem */
#DEFINE LCD_CHAR_CLU "\x06\x06\x11\x11\x11\x11\x0E\x80" /* u s krouzkem */
#DEFINE LCD_CHAR_LUY "\x02\x15\x11\x0A\x04\x04\x04\x80" /* Y s carkou */
#DEFINE LCD_CHAR_LLY "\x02\x04\x11\x11\x0F\x01\x0E\x80" /* y s carkou */
#DEFINE LCD_CHAR_HUZ "\x0A\x1F\x01\x02\x04\x08\x1F\x80" /* Z s hackem */
#DEFINE LCD_CHAR_HLZ "\x0A\x04\x1F\x02\x04\x08\x1F\x80" /* z s hackem */
 
 
// Priklad pouziti definovanych znaku
//
//
//void lcd_sample()
//{
// lcd_define_char(0,LCD_CHAR_BAT50); // Priklad definice znaku baterie do pozice 0
// lcd_define_char(2,LCD_CHAR_HLE LCD_CHAR_LUI); // Priklad definice znaku e s hackem a I s carkou od pozice 2
// // vsimnete si, ze neni carka mezi retezci s definici (oba retezce definuji
// // jediny definicni retezec)
// printf(lcd_putc,"\fZnaky:\20\22\23"); // priklad vypisu znaku z pozice 0, 2 a 3
// delay_ms(1000);
// lcd_define_char(0,LCD_CHAR_BAT0); // Predefinovani tvaru znaku v pozici 0
// delay_ms(1000);
//}
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/03/PRG.BAT
0,0 → 1,6
call picpgr stop
call picpgr erase pic16f84
call picpgr program main.hex hex pic16f84
call picpgr run
pause
call picpgr stop
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/03/PRG.PIF
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
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/03/RUN.BAT
0,0 → 1,5
call picpgr run
pause
call picpgr stop
pause
run.bat
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/03/VC.MNU
0,0 → 1,4
R: Run
picpgr run
S: Stop
picpgr stop
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/03/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
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/04/A.BAT
0,0 → 1,6
call picpgr stop
call picpgr erase pic16F84
call picpgr program main.hex hex pic16F84
call picpgr run
pause
call picpgr stop
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/04/MAIN.BAK
0,0 → 1,170
// Prijimac
 
#include "main.h"
#include "..\common.h"
 
#DEFINE LCD_RS PIN_B1 // rizeni registru LCD displeje
#DEFINE LCD_E PIN_B0 // enable LCD displeje
#DEFINE LCD_DATA_LSB PIN_B2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
#INCLUDE "MYLCD.C"
 
#DEFINE PRIJIMAC PIN_A3 // pin na ktery je pripojen prijimac
#DEFINE SERVO_X PIN_A0 // pin na ktery je pripojeno servo
#DEFINE SERVO_Y PIN_A1
 
 
int8 prijmout(int8* bit)
{
// || |
// |--|_____ 1
// |
// |-|__|-|_ 0
 
while (!input(PRIJIMAC)) ; // cekej na jednicku
delay_us(IMPULS/4); // presvec se, jestli je stale 1 po 1/4 impulsu
if (!input(PRIJIMAC)) return false; // vrat chybu, kdyz neni stale 1
delay_us(3*IMPULS); // pockej na rozhodovaci misto
/// if (input(PRIJIMAC)) *bit=0; else *bit=1; // dekoduj 1 nebo 0
*bit=!input(PRIJIMAC); // dekoduj 1 nebo 0
delay_us(IMPULS); // pockej na konec znaku
 
return true; // vrat, ze se cteni povedlo
}
 
int8 read_nibble(int1* datovy, int8* data)
{
int8 i;
int8 d;
int1 tmp;
 
d=0;
 
// Cekam na dlouhou nulu
for (i=4; i>0; i--)
{
if (input(PRIJIMAC)) i=4;
delay_us(IMPULS/2);
}
 
// Cekam na jednicku (start ramce)
for (; !input(PRIJIMAC); )
{
delay_us(IMPULS/8);
}
 
// delay_us(IMPULS/2);
delay_us(2*IMPULS+IMPULS/2);
*datovy=input(PRIJIMAC);
 
// Prenasim bity
for (i=0; i<4; i++)
{
delay_us(2*IMPULS);
d >>= 1;
if (input(PRIJIMAC)) d +=0b1000;
//output_bit(PIN_A0,tmp);
//tmp=!tmp;
}
// delay_us(2*IMPULS); // cas posledniho datoveho bitu
 
*data = d;
return TRUE;
}
 
 
int8 x,y;
int8 xc,yc; // pocitadla aktualizace x a y
int e1,e2,e3,e4; // pocitadla chyb - ladici
 
void main()
{
lcd_init(); // zinicializuj LCD display
delay_ms(5);
printf(lcd_putc,"Ahoj...");
delay_ms(300);
 
x = 0;
y = 0;
xc=0;
yc=0;
e1=0;
e2=0;
e3=0;
e4=0;
 
while (true)
{
int8 kanal, data, suma;
int1 tmp;
int8 datovy;
 
decoder:
//output_high(PIN_A1);
 
// do // vyhledej synchronizacni jednicky
// {
// if (!prijmout(&bit)) goto decoder; // prijmi bit; pri chybe zacni znovu
// if (1==bit) counter++; else goto decoder; // kdyz je bit 1, tak zvys citac; jinak zacni znovu
// } while(counter<4); // pockej na 4 jednicky
///output_bit(PIN_A1,tmp);
///tmp=!tmp;
if (!read_nibble(&datovy,&kanal)) goto decoder;
if (datovy) goto decoder;
// output_low(PIN_A1);
//output_low(PIN_A1);
 
// if (kanal!=15) {e1++; goto decoder;};
if (!read_nibble(&datovy, &kanal)) goto decoder; // nacti identifikator osy
 
if (!read_nibble(&datovy, &data)) goto decoder; // nacti 1. nibble; pri chybe zacni znovu
if (!read_nibble(&datovy, &suma)) goto decoder; // nacti 2. nibble; pri chybe zacni znovu
if (((kanal+data) & 0b1111) != suma) {e1++; goto decoder;} // zacni znovu, pokud jsou ruzne nibble
 
 
switch (kanal) // rozeskoc se podle adresy osy
{
case OSA_X:
{
x=data;
xc++;
break;
};
case OSA_Y:
{
y=data;
yc++;
break;
};
case TLs:
{
e4++;
break;
};
};
 
// ladici vypisy
lcd_gotoxy(1,1); // vytiskni X a Y
printf(lcd_putc,"X%2U %3U%3U%3U ", x, xc, e1, e2);
lcd_gotoxy(1,2);
printf(lcd_putc,"Y%2U %3U%3U%3U ", y, yc, e3, data);
 
// ovladani serv
output_high(SERVO_X);
delay_ms(1);
for (data=x; data--; data>0)
delay_us(65);
output_low(SERVO_X);
 
output_high(SERVO_Y);
delay_ms(1);
for (data=y; data--; data>0)
delay_us(65);
output_low(SERVO_Y);
 
for (data=30-x-y; data--; data>0)
delay_us(65);
 
}
}
 
 
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/04/MAIN.C
0,0 → 1,170
// Prijimac
 
#include "main.h"
#include "..\common.h"
 
#DEFINE LCD_RS PIN_B1 // rizeni registru LCD displeje
#DEFINE LCD_E PIN_B0 // enable LCD displeje
#DEFINE LCD_DATA_LSB PIN_B2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
#INCLUDE "MYLCD.C"
 
#DEFINE PRIJIMAC PIN_A3 // pin na ktery je pripojen prijimac
#DEFINE SERVO_X PIN_A0 // pin na ktery je pripojeno servo
#DEFINE SERVO_Y PIN_A1
 
 
int8 prijmout(int8* bit)
{
// || |
// |--|_____ 1
// |
// |-|__|-|_ 0
 
while (!input(PRIJIMAC)) ; // cekej na jednicku
delay_us(IMPULS/4); // presvec se, jestli je stale 1 po 1/4 impulsu
if (!input(PRIJIMAC)) return false; // vrat chybu, kdyz neni stale 1
delay_us(3*IMPULS); // pockej na rozhodovaci misto
/// if (input(PRIJIMAC)) *bit=0; else *bit=1; // dekoduj 1 nebo 0
*bit=!input(PRIJIMAC); // dekoduj 1 nebo 0
delay_us(IMPULS); // pockej na konec znaku
 
return true; // vrat, ze se cteni povedlo
}
 
int8 read_nibble(int1* datovy, int8* data)
{
int8 i;
int8 d;
int1 tmp;
 
d=0;
 
// Cekam na dlouhou nulu
for (i=4; i>0; i--)
{
if (input(PRIJIMAC)) i=4;
delay_us(IMPULS/2);
}
 
// Cekam na jednicku (start ramce)
for (; !input(PRIJIMAC); )
{
delay_us(IMPULS/8);
}
 
// delay_us(IMPULS/2);
delay_us(2*IMPULS+IMPULS/2);
*datovy=input(PRIJIMAC);
 
// Prenasim bity
for (i=0; i<4; i++)
{
delay_us(2*IMPULS);
d >>= 1;
if (input(PRIJIMAC)) d +=0b1000;
output_bit(PIN_A4,tmp);
tmp=!tmp;
}
// delay_us(2*IMPULS); // cas posledniho datoveho bitu
 
*data = d;
return TRUE;
}
 
 
int8 x,y;
int8 xc,yc; // pocitadla aktualizace x a y
int e1,e2,e3,e4; // pocitadla chyb - ladici
 
void main()
{
lcd_init(); // zinicializuj LCD display
delay_ms(5);
printf(lcd_putc,"Ahoj...");
delay_ms(300);
 
x = 0;
y = 0;
xc=0;
yc=0;
e1=0;
e2=0;
e3=0;
e4=0;
 
while (true)
{
int8 kanal, data, suma;
int1 tmp;
int8 datovy;
 
decoder:
//output_high(PIN_A1);
 
// do // vyhledej synchronizacni jednicky
// {
// if (!prijmout(&bit)) goto decoder; // prijmi bit; pri chybe zacni znovu
// if (1==bit) counter++; else goto decoder; // kdyz je bit 1, tak zvys citac; jinak zacni znovu
// } while(counter<4); // pockej na 4 jednicky
///output_bit(PIN_A1,tmp);
///tmp=!tmp;
if (!read_nibble(&datovy,&kanal)) goto decoder;
if (datovy) goto decoder;
// output_low(PIN_A1);
//output_low(PIN_A1);
 
// if (kanal!=15) {e1++; goto decoder;};
if (!read_nibble(&datovy, &kanal)) goto decoder; // nacti identifikator osy
 
if (!read_nibble(&datovy, &data)) goto decoder; // nacti 1. nibble; pri chybe zacni znovu
if (!read_nibble(&datovy, &suma)) goto decoder; // nacti 2. nibble; pri chybe zacni znovu
if (((kanal+data) & 0b1111) != suma) {e1++; goto decoder;} // zacni znovu, pokud jsou ruzne nibble
 
 
switch (kanal) // rozeskoc se podle adresy osy
{
case OSA_X:
{
x=data;
xc++;
break;
};
case OSA_Y:
{
y=data;
yc++;
break;
};
case TLs:
{
e4++;
break;
};
};
 
// ladici vypisy
lcd_gotoxy(1,1); // vytiskni X a Y
printf(lcd_putc,"X%2U %3U%3U%3U ", x, xc, e1, e2);
lcd_gotoxy(1,2);
printf(lcd_putc,"Y%2U %3U%3U%3U ", y, yc, e3, data);
 
// ovladani serv
output_high(SERVO_X);
delay_ms(1);
for (data=x; data--; data>0)
delay_us(65);
output_low(SERVO_X);
 
output_high(SERVO_Y);
delay_ms(1);
for (data=y; data--; data>0)
delay_us(65);
output_low(SERVO_Y);
 
for (data=30-x-y; data--; data>0)
delay_us(65);
 
}
}
 
 
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/04/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
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/04/MAIN.ERR
0,0 → 1,0
No Errors
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/04/MAIN.H
0,0 → 1,4
#include <16F84.h>
#use delay(clock=4000000)
#fuses XT,NOWDT,PUT
 
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/04/MAIN.HEX
0,0 → 1,82
:1000000000308A00702900000A108A100A11820745
:1000100028340C34013406340A108A100A1182077D
:10002000413468346F346A3400341E308400000870
:100030000319292801308D008C018C0B1D288D0B94
:100040001C284A308C008C0B232800000000800BF9
:100050001A2800340608C339A500240D8C008C0D25
:10006000FC308C050C083C392504860006148316E8
:100070000610000083120610831606108312003447
:10008000A208031D4528861046288614831686106C
:100090008312A30E2308A4002A20A30E2308A40081
:1000A0002A200D308C008C0B5328003414309E0015
:1000B0001520C3308316860583128610831686109A
:1000C000831206108316061083129B011B08023C44
:1000D000031C722802309E0015200330A4002A2041
:1000E0009B0A66280D308C008C0B74280230A4000B
:1000F0002A200D308C008C0B7B289B011B08023CB6
:10010000031C8E281B0804209C00A2011C08A300CD
:10011000402002309E0015209B0A7E287429013061
:100120001E02A0001F08023C031D98284030A007B3
:1001300020088038A100A2012108A300402000343B
:100140001D088C000C300C020319B3280A300C0275
:100150000319BB280D300C020319C12808300C020A
:100160000319C628CB28A2010130A3004020023089
:100170009E001520D72801309E0002309F008F205E
:10018000D72801309E009F008F20D728A201103071
:10019000A3004020D7281D081F3C031CD12807308E
:1001A0009D050130A2001D08A3004020D72800347F
:1001B0009E0104309D009D080319EC2883168515C7
:1001C0008312851DE52804309D0029308C008C0B9E
:1001D000E72800009D03DB28831685158312851907
:1001E000F6280A308C008C0BF328EC28D0308C00D9
:1001F0008C0BF8281B0884008316851500308312A9
:100200008519013080009D011D08033C031C222933
:10021000A6308C008C0B0A29000003109E0C83165C
:1002200085158312851D162908309E071F181A2967
:1002300005121B29051683160512013083129F062D
:100240009D0A04291C0884001E08800001308D00CE
:1002500000341E088D011D02031831291D088C0071
:100260003D298C0108309F009D0D8C0D1E080C024D
:1002700003188C008D0D9F0B342900340D081B08CA
:100280009D0064309E0029210C089B000D08303031
:10029000031D51291C189C159C1957291C1A203024
:1002A00053299C111C128D070D089D00A0201B08CE
:1002B0009D000A309E0029210C089B000D0830305B
:1002C000031D66299C196A291C1A20308D070D0808
:1002D0009D00A02030309B071B089D00A02000340B
:1002E00084011F308305562805309E0015209B0190
:1002F0001B080C209B0A9D00A02004301B02031D3C
:10030000782903309C002E309D00A0209C0B83296F
:1003100002309B0096309E0015209B0B8A298E018F
:100320008F019001910192019301940195011A307E
:100330009B0016309C00D8208D08031DA02997290A
:100340009A080319A42997291A309B0016309C009B
:10035000D8208D08031DAD2997291A309B0017302E
:100360009C00D8208D08031DB62997291A309B00C0
:1003700018309C00D8208D08031DBF299729170825
:1003800016070F3918020319C729920A9729013055
:100390001602FD3E0318D829033E702A17088E0066
:1003A000900AD82917088F00910AD829950AD829C8
:1003B00001309E009F008F2058309D00A0200E0825
:1003C0009B0011309C003E2120309D00A020100891
:1003D0009B0010309C003E2112089B0010309C00B6
:1003E0003E2113089B0010309C003E2120309D00D0
:1003F000A02020309D00A02001309E0002309F00F0
:100400008F2059309D00A0200F089B0011309C00C8
:100410003E2120309D00A02011089B0010309C0040
:100420003E2114089B0010309C003E2117089B00C1
:1004300010309C003E2120309D00A02020309D00E7
:10044000A020831605108312051401309E0015208C
:100450000E08970017089703003A0319392A153038
:100460008C008C0B312A00009708031D382A0030BD
:100470002A2A83160510831205108316851083120D
:10048000851401309E0015200F0897001708970368
:10049000003A0319552A15308C008C0B4D2A0000A8
:1004A0009708031D542A0030462A831685108312AC
:1004B00085100E081E3C8D000F080D0297001708CE
:1004C0009703003A03196E2A15308C008C0B662AAC
:1004D00000009708031D6D2A00305F2A97296300EA
:0E04E0000A108A140A118207CE29D229D629C1
:02400E00F13F80
:00000001FF
;PIC16F84
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/04/MAIN.LST
0,0 → 1,1088
CCS PCW C Compiler, Version 3.110, 15448
 
Filename: d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\main.LST
 
ROM used: 631 (62%)
Largest free fragment is 393
RAM used: 12 (18%) at main() level
27 (40%) worst case
Stack: 5 locations
 
*
0000: MOVLW 00
0001: MOVWF 0A
0002: GOTO 170
0003: NOP
.................... // Prijimac
....................
.................... #include "main.h"
.................... #include <16F84.h>
.................... //////// Standard Header file for the PIC16F84 device ////////////////
.................... #device PIC16F84
.................... #list
....................
.................... #use delay(clock=4000000)
*
0015: MOVLW 1E
0016: MOVWF 04
0017: MOVF 00,W
0018: BTFSC 03.2
0019: GOTO 029
001A: MOVLW 01
001B: MOVWF 0D
001C: CLRF 0C
001D: DECFSZ 0C,F
001E: GOTO 01D
001F: DECFSZ 0D,F
0020: GOTO 01C
0021: MOVLW 4A
0022: MOVWF 0C
0023: DECFSZ 0C,F
0024: GOTO 023
0025: NOP
0026: NOP
0027: DECFSZ 00,F
0028: GOTO 01A
0029: RETLW 00
.................... #fuses XT,NOWDT,PUT
....................
....................
.................... #include "..\common.h"
.................... #DEFINE OSA_X 1 // adresy os
.................... #DEFINE OSA_Y 2
.................... #DEFINE TLs 3
.................... #DEFINE IMPULS 250 // sirka impulsu
....................
....................
.................... #DEFINE LCD_RS PIN_B1 // rizeni registru LCD displeje
.................... #DEFINE LCD_E PIN_B0 // enable LCD displeje
.................... #DEFINE LCD_DATA_LSB PIN_B2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
.................... #INCLUDE "MYLCD.C"
.................... // LCD modul pro ovladani dvouradkoveho LCD modulu se standardnim Hitachi radicem
.................... // (c)miho 2002
.................... //
.................... // Historie:
.................... //
.................... // 0.0 Uvodni verze se snadnou definici portu LCD displeje
.................... //
.................... //
.................... // Funkce:
.................... //
.................... // lcd_init() inicializuje LCD displej a porty, nutno volat jako prvni
.................... //
.................... // lcd_putc(c) zapis snaku do lcd displeje, zpracovava nasledujici ridici znaky
.................... // \f = \x0C - nova stranka - smazani displeje
.................... // \n = \x0A - odradkovani (prechod na druhou radku)
.................... // \b = \x08 - backspace - posunuti kurzoru o 1 pozici zpet
.................... // \r = \x0D - goto home to position 1,1
.................... // \0 .. \7 - definovatelne znaky v pozicich 0 az 7 v CGRAM
.................... // \20 .. \27 - alternativne zapsane znaky (oktalove) v pozicich 0 az 7 CGRAM
.................... // Pozor na to, ze funkce printf konci tisk pokud narazi na \0 (konec retezce)
.................... //
.................... // lcd_gotoxy(x,y) presune kurzor na uvedenou adresu
.................... // nekontroluje parametry
.................... //
.................... // lcd_cursor_on zapne kurzor
.................... // lcd_cursor_off vypne kurzor
.................... //
.................... // lcd_define_char(Index, Def) Makro, ktere definuje znaky od pozice Index obsahem definicniho
.................... // retezce Def. Kazdych 8 znaku retezce Def definuje dalsi znak v CGRAM.
.................... // Kapacita CGRAM je celkem 8 znaku s indexem 0 az 7.
.................... // Na konci se provede lcd_gotoxy(1,1).
.................... // Na konci teto knihovny je priklad pouziti definovanych znaku
.................... //
.................... // Definice portu:
.................... //
.................... // #DEFINE LCD_RS PIN_B2 // rizeni registru LCD displeje
.................... // #DEFINE LCD_E PIN_B1 // enable LCD displeje
.................... // #DEFINE LCD_DATA_LSB PIN_C2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
....................
....................
....................
....................
.................... // Privatni sekce, cist jen v pripade, ze neco nefunguje
....................
....................
....................
....................
.................... // Generovane defince portu pro ucely teto knihovny aby kod generoval spravne IO operace a soucasne
.................... // bylo mozne jednoduse deklarovat pripojene piny LCD displeje pri pouziti teto knihovny. Problem spociva
.................... // v tom, ze se musi spravne ridit smery portu a soucasne datovy port zabira jen 4 bity ze zadaneho portu
.................... //
.................... #DEFINE LCD_SHIFT (LCD_DATA_LSB&7) // pocet bitu posuvu dataoveho kanalu v datovem portu
.................... #DEFINE LCD_PORT (LCD_DATA_LSB>>3) // adresa LCD datoveho portu
.................... #DEFINE LCD_TRIS (LCD_PORT+0x80) // adresa prislusneho TRIS registru
.................... #DEFINE LCD_MASK (0xF<<LCD_SHIFT) // maska platnych bitu
.................... //
.................... #IF LCD_SHIFT>4 // kontrola mezi
.................... #ERROR LCD data port LSB bit not in range 0..4
.................... #ENDIF
....................
....................
.................... // Definice konstant pro LCD display
.................... //
.................... #define LCD_CURSOR_ON_ 0x0E // kurzor jako blikajici radka pod znakem
.................... #define LCD_CURSOR_OFF_ 0x0C // zadny kurzor
.................... #define LCD_LINE_2 0x40 // adresa 1. znaku 2. radky
....................
....................
.................... // Definice rezimu LCD displeje
.................... //
.................... BYTE const LCD_INIT_STRING[4] =
.................... {
.................... 0x28, // intrfejs 4 bity, 2 radky, font 5x7
.................... LCD_CURSOR_OFF_, // display on, kurzor off,
.................... 0x01, // clear displeje
.................... 0x06 // inkrement pozice kurzoru (posun kurzoru doprava)
.................... };
*
0004: BCF 0A.0
0005: BCF 0A.1
0006: BCF 0A.2
0007: ADDWF 02,F
0008: RETLW 28
0009: RETLW 0C
000A: RETLW 01
000B: RETLW 06
....................
....................
.................... // Odesle nibble do displeje (posle data a klikne signalem e)
.................... //
.................... void lcd_send_nibble( BYTE n )
.................... {
.................... *LCD_PORT = (*LCD_PORT & ~LCD_MASK) | ((n << LCD_SHIFT) & LCD_MASK); // nastav datove bity portu a ostatni zachovej
*
002A: MOVF 06,W
002B: ANDLW C3
002C: MOVWF 25
002D: RLF 24,W
002E: MOVWF 0C
002F: RLF 0C,F
0030: MOVLW FC
0031: ANDWF 0C,F
0032: MOVF 0C,W
0033: ANDLW 3C
0034: IORWF 25,W
0035: MOVWF 06
.................... output_bit(LCD_E,1); // vzestupna hrana
0036: BSF 06.0
0037: BSF 03.5
0038: BCF 06.0
.................... delay_us(1); // pockej alespon 450ns od e nebo alespon 195ns od dat
0039: NOP
.................... output_bit(LCD_E,0); // sestupna hrana (minimalni perioda e je 1us)
003A: BCF 03.5
003B: BCF 06.0
003C: BSF 03.5
003D: BCF 06.0
003E: BCF 03.5
003F: RETLW 00
.................... }
....................
....................
.................... // Odesle bajt do registru LCD
.................... //
.................... // Pokud je Adr=0 .. instrukcni registr
.................... // Pokud je Adr=1 .. datovy registr
.................... //
.................... void lcd_send_byte( BOOLEAN Adr, BYTE n )
.................... {
.................... output_bit(LCD_RS,Adr); // vyber registr
0040: MOVF 22,F
0041: BTFSS 03.2
0042: GOTO 045
0043: BCF 06.1
0044: GOTO 046
0045: BSF 06.1
0046: BSF 03.5
0047: BCF 06.1
.................... swap(n);
0048: BCF 03.5
0049: SWAPF 23,F
.................... lcd_send_nibble(n); // posli horni pulku bajtu
004A: MOVF 23,W
004B: MOVWF 24
004C: CALL 02A
.................... swap(n);
004D: SWAPF 23,F
.................... lcd_send_nibble(n); // posli spodni pulku bajtu
004E: MOVF 23,W
004F: MOVWF 24
0050: CALL 02A
.................... delay_us(40); // minimalni doba na provedeni prikazu
0051: MOVLW 0D
0052: MOVWF 0C
0053: DECFSZ 0C,F
0054: GOTO 053
0055: RETLW 00
.................... }
....................
....................
.................... // Provede inicializaci LCD displeje, smaze obsah a nastavi mod displeje
.................... //
.................... // Tato procedura se musi volat pred pouzitim ostatnich lcd_ procedur
.................... //
.................... void lcd_init()
.................... {
....................
.................... int i; // pocitadlo cyklu
....................
.................... delay_ms(20); // spozdeni pro provedeni startu displeje po zapnuti napajeni
0056: MOVLW 14
0057: MOVWF 1E
0058: CALL 015
....................
.................... *LCD_TRIS = *LCD_TRIS & ~LCD_MASK; // nuluj odpovidajici bity tris registru datoveho portu LCD
0059: MOVLW C3
005A: BSF 03.5
005B: ANDWF 06,F
....................
.................... output_bit(LCD_RS,0); // nastav jako vystup a nastav klidovy stav
005C: BCF 03.5
005D: BCF 06.1
005E: BSF 03.5
005F: BCF 06.1
.................... output_bit(LCD_E,0); // nastav jako vystup a nastav klidovy stav
0060: BCF 03.5
0061: BCF 06.0
0062: BSF 03.5
0063: BCF 06.0
....................
.................... for (i=0; i<3; i++) // nastav lcd do rezimu 8 bitu sbernice
0064: BCF 03.5
0065: CLRF 1B
0066: MOVF 1B,W
0067: SUBLW 02
0068: BTFSS 03.0
0069: GOTO 072
.................... {
.................... delay_ms(2); // muze byt rozdelany prenos dat (2x 4 bity) nebo pomaly povel
006A: MOVLW 02
006B: MOVWF 1E
006C: CALL 015
.................... lcd_send_nibble(3); // rezim 8 bitu
006D: MOVLW 03
006E: MOVWF 24
006F: CALL 02A
.................... }
0070: INCF 1B,F
0071: GOTO 066
....................
.................... delay_us(40); // cas na zpracovani
0072: MOVLW 0D
0073: MOVWF 0C
0074: DECFSZ 0C,F
0075: GOTO 074
.................... lcd_send_nibble(2); // nastav rezim 4 bitu (plati od nasledujiciho prenosu)
0076: MOVLW 02
0077: MOVWF 24
0078: CALL 02A
.................... delay_us(40); // cas na zpracovani
0079: MOVLW 0D
007A: MOVWF 0C
007B: DECFSZ 0C,F
007C: GOTO 07B
....................
.................... for (i=0;i<3;i++) // proved inicializaci (nastaveni modu, smazani apod)
007D: CLRF 1B
007E: MOVF 1B,W
007F: SUBLW 02
0080: BTFSS 03.0
0081: GOTO 08E
.................... {
.................... lcd_send_byte(0,LCD_INIT_STRING[i]);
0082: MOVF 1B,W
0083: CALL 004
0084: MOVWF 1C
0085: CLRF 22
0086: MOVF 1C,W
0087: MOVWF 23
0088: CALL 040
.................... delay_ms(2);
0089: MOVLW 02
008A: MOVWF 1E
008B: CALL 015
.................... }
008C: INCF 1B,F
008D: GOTO 07E
008E: GOTO 174 (RETURN)
.................... }
....................
....................
.................... // Proved presun kurzoru
.................... //
.................... // Pozice 1.1 je domu
.................... //
.................... void lcd_gotoxy( BYTE x, BYTE y)
.................... {
....................
.................... BYTE Adr;
....................
.................... Adr=x-1;
008F: MOVLW 01
0090: SUBWF 1E,W
0091: MOVWF 20
.................... if(y==2)
0092: MOVF 1F,W
0093: SUBLW 02
0094: BTFSS 03.2
0095: GOTO 098
.................... Adr+=LCD_LINE_2;
0096: MOVLW 40
0097: ADDWF 20,F
....................
.................... lcd_send_byte(0,0x80|Adr);
0098: MOVF 20,W
0099: IORLW 80
009A: MOVWF 21
009B: CLRF 22
009C: MOVF 21,W
009D: MOVWF 23
009E: CALL 040
009F: RETLW 00
.................... }
....................
....................
.................... // Zapis znaku na displej, zpracovani ridicich znaku
.................... //
.................... void lcd_putc( char c)
.................... {
....................
.................... switch (c)
00A0: MOVF 1D,W
00A1: MOVWF 0C
00A2: MOVLW 0C
00A3: SUBWF 0C,W
00A4: BTFSC 03.2
00A5: GOTO 0B3
00A6: MOVLW 0A
00A7: SUBWF 0C,W
00A8: BTFSC 03.2
00A9: GOTO 0BB
00AA: MOVLW 0D
00AB: SUBWF 0C,W
00AC: BTFSC 03.2
00AD: GOTO 0C1
00AE: MOVLW 08
00AF: SUBWF 0C,W
00B0: BTFSC 03.2
00B1: GOTO 0C6
00B2: GOTO 0CB
.................... {
.................... case '\f' : lcd_send_byte(0,1); // smaz displej
00B3: CLRF 22
00B4: MOVLW 01
00B5: MOVWF 23
00B6: CALL 040
.................... delay_ms(2);
00B7: MOVLW 02
00B8: MOVWF 1E
00B9: CALL 015
.................... break;
00BA: GOTO 0D7
.................... case '\n' : lcd_gotoxy(1,2); break; // presun se na 1. znak 2. radky
00BB: MOVLW 01
00BC: MOVWF 1E
00BD: MOVLW 02
00BE: MOVWF 1F
00BF: CALL 08F
00C0: GOTO 0D7
.................... case '\r' : lcd_gotoxy(1,1); break; // presun home
00C1: MOVLW 01
00C2: MOVWF 1E
00C3: MOVWF 1F
00C4: CALL 08F
00C5: GOTO 0D7
.................... case '\b' : lcd_send_byte(0,0x10); break; // posun kurzor o 1 zpet
00C6: CLRF 22
00C7: MOVLW 10
00C8: MOVWF 23
00C9: CALL 040
00CA: GOTO 0D7
.................... default : if (c<0x20) c&=0x7; // preklopeni definovatelnych znaku na rozsah 0 az 0x1F
00CB: MOVF 1D,W
00CC: SUBLW 1F
00CD: BTFSS 03.0
00CE: GOTO 0D1
00CF: MOVLW 07
00D0: ANDWF 1D,F
.................... lcd_send_byte(1,c); break; // zapis znak
00D1: MOVLW 01
00D2: MOVWF 22
00D3: MOVF 1D,W
00D4: MOVWF 23
00D5: CALL 040
00D6: GOTO 0D7
.................... }
00D7: RETLW 00
.................... }
....................
....................
.................... // Zapni kurzor
.................... //
.................... void lcd_cursor_on()
.................... {
.................... lcd_send_byte(0,LCD_CURSOR_ON_);
.................... }
....................
....................
.................... // Vypni kurzor
.................... //
.................... void lcd_cursor_off()
.................... {
.................... lcd_send_byte(0,LCD_CURSOR_OFF_);
.................... }
....................
....................
.................... // Definice vlastnich fontu
.................... //
.................... // Vlastnich definic muze byt jen 8 do pozic 0 az 7 pameti CGRAM radice lcd displeje
.................... // Pro snadne definovani jsou pripraveny nasledujici definice a na konci souboru je uveden
.................... // priklad pouziti definovanych znaku.
....................
....................
.................... // Pomocna procedura pro posilani ridicich dat do radice displeje
.................... //
.................... void lcd_putc2(int Data)
.................... {
.................... lcd_send_byte(1,Data);
.................... }
....................
....................
.................... // Pomocne definice pro programovani obsahu CGRAM
.................... //
.................... #DEFINE lcd_define_start(Code) lcd_send_byte(0,0x40+(Code<<3)); delay_ms(2)
.................... #DEFINE lcd_define_def(String) printf(lcd_putc2,String);
.................... #DEFINE lcd_define_end() lcd_send_byte(0,3); delay_ms(2)
....................
....................
.................... // Vlastni vykonne makro pro definovani fontu do pozice Index CGRAM s definicnim retezcem Def
.................... //
.................... #DEFINE lcd_define_char(Index, Def) lcd_define_start(Index); lcd_define_def(Def); lcd_define_end();
....................
....................
.................... // Pripravene definice fontu vybranych znaku
.................... // V tabulce nesmi byt 00 (konec retezce v printf()), misto toho davame 80
.................... //
.................... #DEFINE LCD_CHAR_BAT100 "\x0E\x1F\x1F\x1F\x1F\x1F\x1F\x1F" /* symbol plne baterie */
.................... #DEFINE LCD_CHAR_BAT50 "\x0E\x1F\x11\x11\x13\x17\x1F\x1F" /* symbol polovicni baterie */
.................... #DEFINE LCD_CHAR_BAT0 "\x0E\x1F\x11\x11\x11\x11\x11\x1F" /* symbol vybite baterie */
.................... #DEFINE LCD_CHAR_LUA "\x04\x0E\x11\x11\x1F\x11\x11\x80" /* A s carkou */
.................... #DEFINE LCD_CHAR_LLA "\x01\x02\x0E\x01\x1F\x11\x0F\x80" /* a s carkou */
.................... #DEFINE LCD_CHAR_HUC "\x0A\x0E\x11\x10\x10\x11\x0E\x80" /* C s hackem */
.................... #DEFINE LCD_CHAR_HLC "\x0A\x04\x0E\x10\x10\x11\x0E\x80" /* c s hackem */
.................... #DEFINE LCD_CHAR_HUD "\x0A\x1C\x12\x11\x11\x12\x1C\x80" /* D s hackem */
.................... #DEFINE LCD_CHAR_HLD "\x05\x03\x0D\x13\x11\x11\x0F\x80" /* d s hackem */
.................... #DEFINE LCD_CHAR_LUE "\x04\x1F\x10\x10\x1E\x10\x1F\x80" /* E s carkou */
.................... #DEFINE LCD_CHAR_LLE "\x01\x02\x0E\x11\x1F\x10\x0E\x80" /* e s carkou */
.................... #DEFINE LCD_CHAR_HUE "\x0A\x1F\x10\x1E\x10\x10\x1F\x80" /* E s hackem */
.................... #DEFINE LCD_CHAR_HLE "\x0A\x04\x0E\x11\x1F\x10\x0E\x80" /* e s hackem */
.................... #DEFINE LCD_CHAR_LUI "\x04\x0E\x04\x04\x04\x04\x0E\x80" /* I s carkou */
.................... #DEFINE LCD_CHAR_LLI "\x02\x04\x80\x0C\x04\x04\x0E\x80" /* i s carkou */
.................... #DEFINE LCD_CHAR_HUN "\x0A\x15\x11\x19\x15\x13\x11\x80" /* N s hackem */
.................... #DEFINE LCD_CHAR_HLN "\x0A\x04\x16\x19\x11\x11\x11\x80" /* n s hackem */
.................... #DEFINE LCD_CHAR_LUO "\x04\x0E\x11\x11\x11\x11\x0E\x80" /* O s carkou */
.................... #DEFINE LCD_CHAR_LLO "\x02\x04\x0E\x11\x11\x11\x0E\x80" /* o s carkou */
.................... #DEFINE LCD_CHAR_HUR "\x0A\x1E\x11\x1E\x14\x12\x11\x80" /* R s hackem */
.................... #DEFINE LCD_CHAR_HLR "\x0A\x04\x16\x19\x10\x10\x10\x80" /* r s hackem */
.................... #DEFINE LCD_CHAR_HUS "\x0A\x0F\x10\x0E\x01\x01\x1E\x80" /* S s hackem */
.................... #DEFINE LCD_CHAR_HLS "\x0A\x04\x0E\x10\x0E\x01\x1E\x80" /* s s hackem */
.................... #DEFINE LCD_CHAR_HUT "\x0A\x1F\x04\x04\x04\x04\x04\x80" /* T s hackem */
.................... #DEFINE LCD_CHAR_HLT "\x0A\x0C\x1C\x08\x08\x09\x06\x80" /* t s hackem */
.................... #DEFINE LCD_CHAR_LUU "\x02\x15\x11\x11\x11\x11\x0E\x80" /* U s carkou */
.................... #DEFINE LCD_CHAR_LLU "\x02\x04\x11\x11\x11\x13\x0D\x80" /* u s carkou */
.................... #DEFINE LCD_CHAR_CUU "\x06\x17\x11\x11\x11\x11\x0E\x80" /* U s krouzkem */
.................... #DEFINE LCD_CHAR_CLU "\x06\x06\x11\x11\x11\x11\x0E\x80" /* u s krouzkem */
.................... #DEFINE LCD_CHAR_LUY "\x02\x15\x11\x0A\x04\x04\x04\x80" /* Y s carkou */
.................... #DEFINE LCD_CHAR_LLY "\x02\x04\x11\x11\x0F\x01\x0E\x80" /* y s carkou */
.................... #DEFINE LCD_CHAR_HUZ "\x0A\x1F\x01\x02\x04\x08\x1F\x80" /* Z s hackem */
.................... #DEFINE LCD_CHAR_HLZ "\x0A\x04\x1F\x02\x04\x08\x1F\x80" /* z s hackem */
....................
....................
.................... // Priklad pouziti definovanych znaku
.................... //
.................... //
.................... //void lcd_sample()
.................... //{
.................... // lcd_define_char(0,LCD_CHAR_BAT50); // Priklad definice znaku baterie do pozice 0
.................... // lcd_define_char(2,LCD_CHAR_HLE LCD_CHAR_LUI); // Priklad definice znaku e s hackem a I s carkou od pozice 2
.................... // // vsimnete si, ze neni carka mezi retezci s definici (oba retezce definuji
.................... // // jediny definicni retezec)
.................... // printf(lcd_putc,"\fZnaky:\20\22\23"); // priklad vypisu znaku z pozice 0, 2 a 3
.................... // delay_ms(1000);
.................... // lcd_define_char(0,LCD_CHAR_BAT0); // Predefinovani tvaru znaku v pozici 0
.................... // delay_ms(1000);
.................... //}
....................
....................
.................... #DEFINE PRIJIMAC PIN_A3 // pin na ktery je pripojen prijimac
.................... #DEFINE SERVO_X PIN_A0 // pin na ktery je pripojeno servo
.................... #DEFINE SERVO_Y PIN_A1
....................
....................
.................... int8 prijmout(int8* bit)
.................... {
.................... // || |
.................... // |--|_____ 1
.................... // |
.................... // |-|__|-|_ 0
....................
.................... while (!input(PRIJIMAC)) ; // cekej na jednicku
.................... delay_us(IMPULS/4); // presvec se, jestli je stale 1 po 1/4 impulsu
.................... if (!input(PRIJIMAC)) return false; // vrat chybu, kdyz neni stale 1
.................... delay_us(3*IMPULS); // pockej na rozhodovaci misto
.................... /// if (input(PRIJIMAC)) *bit=0; else *bit=1; // dekoduj 1 nebo 0
.................... *bit=!input(PRIJIMAC); // dekoduj 1 nebo 0
.................... delay_us(IMPULS); // pockej na konec znaku
....................
.................... return true; // vrat, ze se cteni povedlo
.................... }
....................
.................... int8 read_nibble(int1* datovy, int8* data)
.................... {
.................... int8 i;
.................... int8 d;
.................... int1 tmp;
....................
.................... d=0;
00D8: CLRF 1E
....................
.................... // Cekam na dlouhou nulu
.................... for (i=4; i>0; i--)
00D9: MOVLW 04
00DA: MOVWF 1D
00DB: MOVF 1D,F
00DC: BTFSC 03.2
00DD: GOTO 0EC
.................... {
.................... if (input(PRIJIMAC)) i=4;
00DE: BSF 03.5
00DF: BSF 05.3
00E0: BCF 03.5
00E1: BTFSS 05.3
00E2: GOTO 0E5
00E3: MOVLW 04
00E4: MOVWF 1D
.................... delay_us(IMPULS/2);
00E5: MOVLW 29
00E6: MOVWF 0C
00E7: DECFSZ 0C,F
00E8: GOTO 0E7
00E9: NOP
.................... }
00EA: DECF 1D,F
00EB: GOTO 0DB
....................
.................... // Cekam na jednicku (start ramce)
.................... for (; !input(PRIJIMAC); )
00EC: BSF 03.5
00ED: BSF 05.3
00EE: BCF 03.5
00EF: BTFSC 05.3
00F0: GOTO 0F6
.................... {
.................... delay_us(IMPULS/8);
00F1: MOVLW 0A
00F2: MOVWF 0C
00F3: DECFSZ 0C,F
00F4: GOTO 0F3
.................... }
00F5: GOTO 0EC
....................
.................... // delay_us(IMPULS/2);
.................... delay_us(2*IMPULS+IMPULS/2);
00F6: MOVLW D0
00F7: MOVWF 0C
00F8: DECFSZ 0C,F
00F9: GOTO 0F8
.................... *datovy=input(PRIJIMAC);
00FA: MOVF 1B,W
00FB: MOVWF 04
00FC: BSF 03.5
00FD: BSF 05.3
00FE: MOVLW 00
00FF: BCF 03.5
0100: BTFSC 05.3
0101: MOVLW 01
0102: MOVWF 00
....................
.................... // Prenasim bity
.................... for (i=0; i<4; i++)
0103: CLRF 1D
0104: MOVF 1D,W
0105: SUBLW 03
0106: BTFSS 03.0
0107: GOTO 122
.................... {
.................... delay_us(2*IMPULS);
0108: MOVLW A6
0109: MOVWF 0C
010A: DECFSZ 0C,F
010B: GOTO 10A
010C: NOP
.................... d >>= 1;
010D: BCF 03.0
010E: RRF 1E,F
.................... if (input(PRIJIMAC)) d +=0b1000;
010F: BSF 03.5
0110: BSF 05.3
0111: BCF 03.5
0112: BTFSS 05.3
0113: GOTO 116
0114: MOVLW 08
0115: ADDWF 1E,F
.................... output_bit(PIN_A4,tmp);
0116: BTFSC 1F.0
0117: GOTO 11A
0118: BCF 05.4
0119: GOTO 11B
011A: BSF 05.4
011B: BSF 03.5
011C: BCF 05.4
.................... tmp=!tmp;
011D: MOVLW 01
011E: BCF 03.5
011F: XORWF 1F,F
.................... }
0120: INCF 1D,F
0121: GOTO 104
.................... // delay_us(2*IMPULS); // cas posledniho datoveho bitu
....................
.................... *data = d;
0122: MOVF 1C,W
0123: MOVWF 04
0124: MOVF 1E,W
0125: MOVWF 00
.................... return TRUE;
0126: MOVLW 01
0127: MOVWF 0D
0128: RETLW 00
.................... }
....................
....................
.................... int8 x,y;
.................... int8 xc,yc; // pocitadla aktualizace x a y
.................... int e1,e2,e3,e4; // pocitadla chyb - ladici
....................
.................... void main()
.................... {
*
0170: CLRF 04
0171: MOVLW 1F
0172: ANDWF 03,F
.................... lcd_init(); // zinicializuj LCD display
0173: GOTO 056
.................... delay_ms(5);
0174: MOVLW 05
0175: MOVWF 1E
0176: CALL 015
.................... printf(lcd_putc,"Ahoj...");
*
000C: BCF 0A.0
000D: BCF 0A.1
000E: BCF 0A.2
000F: ADDWF 02,F
0010: RETLW 41
0011: RETLW 68
0012: RETLW 6F
0013: RETLW 6A
0014: RETLW 00
*
0177: CLRF 1B
0178: MOVF 1B,W
0179: CALL 00C
017A: INCF 1B,F
017B: MOVWF 1D
017C: CALL 0A0
017D: MOVLW 04
017E: SUBWF 1B,W
017F: BTFSS 03.2
0180: GOTO 178
0181: MOVLW 03
0182: MOVWF 1C
0183: MOVLW 2E
0184: MOVWF 1D
0185: CALL 0A0
0186: DECFSZ 1C,F
0187: GOTO 183
.................... delay_ms(300);
0188: MOVLW 02
0189: MOVWF 1B
018A: MOVLW 96
018B: MOVWF 1E
018C: CALL 015
018D: DECFSZ 1B,F
018E: GOTO 18A
....................
.................... x = 0;
018F: CLRF 0E
.................... y = 0;
0190: CLRF 0F
.................... xc=0;
0191: CLRF 10
.................... yc=0;
0192: CLRF 11
.................... e1=0;
0193: CLRF 12
.................... e2=0;
0194: CLRF 13
.................... e3=0;
0195: CLRF 14
.................... e4=0;
0196: CLRF 15
....................
.................... while (true)
.................... {
.................... int8 kanal, data, suma;
.................... int1 tmp;
.................... int8 datovy;
....................
.................... decoder:
.................... //output_high(PIN_A1);
....................
.................... // do // vyhledej synchronizacni jednicky
.................... // {
.................... // if (!prijmout(&bit)) goto decoder; // prijmi bit; pri chybe zacni znovu
.................... // if (1==bit) counter++; else goto decoder; // kdyz je bit 1, tak zvys citac; jinak zacni znovu
.................... // } while(counter<4); // pockej na 4 jednicky
.................... ///output_bit(PIN_A1,tmp);
.................... ///tmp=!tmp;
.................... if (!read_nibble(&datovy,&kanal)) goto decoder;
0197: MOVLW 1A
0198: MOVWF 1B
0199: MOVLW 16
019A: MOVWF 1C
019B: CALL 0D8
019C: MOVF 0D,F
019D: BTFSS 03.2
019E: GOTO 1A0
019F: GOTO 197
.................... if (datovy) goto decoder;
01A0: MOVF 1A,F
01A1: BTFSC 03.2
01A2: GOTO 1A4
01A3: GOTO 197
.................... // output_low(PIN_A1);
.................... //output_low(PIN_A1);
....................
.................... // if (kanal!=15) {e1++; goto decoder;};
.................... if (!read_nibble(&datovy, &kanal)) goto decoder; // nacti identifikator osy
01A4: MOVLW 1A
01A5: MOVWF 1B
01A6: MOVLW 16
01A7: MOVWF 1C
01A8: CALL 0D8
01A9: MOVF 0D,F
01AA: BTFSS 03.2
01AB: GOTO 1AD
01AC: GOTO 197
....................
.................... if (!read_nibble(&datovy, &data)) goto decoder; // nacti 1. nibble; pri chybe zacni znovu
01AD: MOVLW 1A
01AE: MOVWF 1B
01AF: MOVLW 17
01B0: MOVWF 1C
01B1: CALL 0D8
01B2: MOVF 0D,F
01B3: BTFSS 03.2
01B4: GOTO 1B6
01B5: GOTO 197
.................... if (!read_nibble(&datovy, &suma)) goto decoder; // nacti 2. nibble; pri chybe zacni znovu
01B6: MOVLW 1A
01B7: MOVWF 1B
01B8: MOVLW 18
01B9: MOVWF 1C
01BA: CALL 0D8
01BB: MOVF 0D,F
01BC: BTFSS 03.2
01BD: GOTO 1BF
01BE: GOTO 197
.................... if (((kanal+data) & 0b1111) != suma) {e1++; goto decoder;} // zacni znovu, pokud jsou ruzne nibble
01BF: MOVF 17,W
01C0: ADDWF 16,W
01C1: ANDLW 0F
01C2: SUBWF 18,W
01C3: BTFSC 03.2
01C4: GOTO 1C7
01C5: INCF 12,F
01C6: GOTO 197
....................
....................
.................... switch (kanal) // rozeskoc se podle adresy osy
01C7: MOVLW 01
01C8: SUBWF 16,W
01C9: ADDLW FD
01CA: BTFSC 03.0
01CB: GOTO 1D8
01CC: ADDLW 03
01CD: GOTO 270
.................... {
.................... case OSA_X:
.................... {
.................... x=data;
01CE: MOVF 17,W
01CF: MOVWF 0E
.................... xc++;
01D0: INCF 10,F
.................... break;
01D1: GOTO 1D8
.................... };
.................... case OSA_Y:
.................... {
.................... y=data;
01D2: MOVF 17,W
01D3: MOVWF 0F
.................... yc++;
01D4: INCF 11,F
.................... break;
01D5: GOTO 1D8
.................... };
.................... case TLs:
.................... {
.................... e4++;
01D6: INCF 15,F
.................... break;
01D7: GOTO 1D8
.................... };
.................... };
*
0270: BCF 0A.0
0271: BSF 0A.1
0272: BCF 0A.2
0273: ADDWF 02,F
0274: GOTO 1CE
0275: GOTO 1D2
0276: GOTO 1D6
....................
.................... // ladici vypisy
.................... lcd_gotoxy(1,1); // vytiskni X a Y
*
01D8: MOVLW 01
01D9: MOVWF 1E
01DA: MOVWF 1F
01DB: CALL 08F
.................... printf(lcd_putc,"X%2U %3U%3U%3U ", x, xc, e1, e2);
*
013E: MOVF 0D,W
013F: MOVF 1B,W
0140: MOVWF 1D
0141: MOVLW 64
0142: MOVWF 1E
0143: CALL 129
0144: MOVF 0C,W
0145: MOVWF 1B
0146: MOVF 0D,W
0147: MOVLW 30
0148: BTFSS 03.2
0149: GOTO 151
014A: BTFSC 1C.0
014B: BSF 1C.3
014C: BTFSC 1C.3
014D: GOTO 157
014E: BTFSC 1C.4
014F: MOVLW 20
0150: GOTO 153
0151: BCF 1C.3
0152: BCF 1C.4
0153: ADDWF 0D,F
0154: MOVF 0D,W
0155: MOVWF 1D
0156: CALL 0A0
0157: MOVF 1B,W
0158: MOVWF 1D
0159: MOVLW 0A
015A: MOVWF 1E
015B: CALL 129
015C: MOVF 0C,W
015D: MOVWF 1B
015E: MOVF 0D,W
015F: MOVLW 30
0160: BTFSS 03.2
0161: GOTO 166
0162: BTFSC 1C.3
0163: GOTO 16A
0164: BTFSC 1C.4
0165: MOVLW 20
0166: ADDWF 0D,F
0167: MOVF 0D,W
0168: MOVWF 1D
0169: CALL 0A0
016A: MOVLW 30
016B: ADDWF 1B,F
016C: MOVF 1B,W
016D: MOVWF 1D
016E: CALL 0A0
016F: RETLW 00
*
01DC: MOVLW 58
01DD: MOVWF 1D
01DE: CALL 0A0
01DF: MOVF 0E,W
01E0: MOVWF 1B
01E1: MOVLW 11
01E2: MOVWF 1C
01E3: CALL 13E
01E4: MOVLW 20
01E5: MOVWF 1D
01E6: CALL 0A0
01E7: MOVF 10,W
01E8: MOVWF 1B
01E9: MOVLW 10
01EA: MOVWF 1C
01EB: CALL 13E
01EC: MOVF 12,W
01ED: MOVWF 1B
01EE: MOVLW 10
01EF: MOVWF 1C
01F0: CALL 13E
01F1: MOVF 13,W
01F2: MOVWF 1B
01F3: MOVLW 10
01F4: MOVWF 1C
01F5: CALL 13E
01F6: MOVLW 20
01F7: MOVWF 1D
01F8: CALL 0A0
01F9: MOVLW 20
01FA: MOVWF 1D
01FB: CALL 0A0
.................... lcd_gotoxy(1,2);
01FC: MOVLW 01
01FD: MOVWF 1E
01FE: MOVLW 02
01FF: MOVWF 1F
0200: CALL 08F
.................... printf(lcd_putc,"Y%2U %3U%3U%3U ", y, yc, e3, data);
0201: MOVLW 59
0202: MOVWF 1D
0203: CALL 0A0
0204: MOVF 0F,W
0205: MOVWF 1B
0206: MOVLW 11
0207: MOVWF 1C
0208: CALL 13E
0209: MOVLW 20
020A: MOVWF 1D
020B: CALL 0A0
020C: MOVF 11,W
020D: MOVWF 1B
020E: MOVLW 10
020F: MOVWF 1C
0210: CALL 13E
0211: MOVF 14,W
0212: MOVWF 1B
0213: MOVLW 10
0214: MOVWF 1C
0215: CALL 13E
0216: MOVF 17,W
0217: MOVWF 1B
0218: MOVLW 10
0219: MOVWF 1C
021A: CALL 13E
021B: MOVLW 20
021C: MOVWF 1D
021D: CALL 0A0
021E: MOVLW 20
021F: MOVWF 1D
0220: CALL 0A0
....................
.................... // ovladani serv
.................... output_high(SERVO_X);
0221: BSF 03.5
0222: BCF 05.0
0223: BCF 03.5
0224: BSF 05.0
.................... delay_ms(1);
0225: MOVLW 01
0226: MOVWF 1E
0227: CALL 015
.................... for (data=x; data--; data>0)
0228: MOVF 0E,W
0229: MOVWF 17
022A: MOVF 17,W
022B: DECF 17,F
022C: XORLW 00
022D: BTFSC 03.2
022E: GOTO 239
.................... delay_us(65);
022F: MOVLW 15
0230: MOVWF 0C
0231: DECFSZ 0C,F
0232: GOTO 231
0233: NOP
0234: MOVF 17,F
0235: BTFSS 03.2
0236: GOTO 238
0237: MOVLW 00
0238: GOTO 22A
.................... output_low(SERVO_X);
0239: BSF 03.5
023A: BCF 05.0
023B: BCF 03.5
023C: BCF 05.0
....................
.................... output_high(SERVO_Y);
023D: BSF 03.5
023E: BCF 05.1
023F: BCF 03.5
0240: BSF 05.1
.................... delay_ms(1);
0241: MOVLW 01
0242: MOVWF 1E
0243: CALL 015
.................... for (data=y; data--; data>0)
0244: MOVF 0F,W
0245: MOVWF 17
0246: MOVF 17,W
0247: DECF 17,F
0248: XORLW 00
0249: BTFSC 03.2
024A: GOTO 255
.................... delay_us(65);
024B: MOVLW 15
024C: MOVWF 0C
024D: DECFSZ 0C,F
024E: GOTO 24D
024F: NOP
0250: MOVF 17,F
0251: BTFSS 03.2
0252: GOTO 254
0253: MOVLW 00
0254: GOTO 246
.................... output_low(SERVO_Y);
0255: BSF 03.5
0256: BCF 05.1
0257: BCF 03.5
0258: BCF 05.1
....................
.................... for (data=30-x-y; data--; data>0)
0259: MOVF 0E,W
025A: SUBLW 1E
025B: MOVWF 0D
025C: MOVF 0F,W
025D: SUBWF 0D,W
025E: MOVWF 17
025F: MOVF 17,W
0260: DECF 17,F
0261: XORLW 00
0262: BTFSC 03.2
0263: GOTO 26E
.................... delay_us(65);
0264: MOVLW 15
0265: MOVWF 0C
0266: DECFSZ 0C,F
0267: GOTO 266
0268: NOP
0269: MOVF 17,F
026A: BTFSS 03.2
026B: GOTO 26D
026C: MOVLW 00
026D: GOTO 25F
....................
.................... }
026E: GOTO 197
.................... }
....................
026F: SLEEP
....................
....................
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/04/MAIN.PJT
0,0 → 1,32
[PROJECT]
Target=main.HEX
Development_Mode=
Processor=0x684A
ToolSuite=CCS
 
[Directories]
Include=C:\Program Files\PICC\Devices;C:\Program Files\PICC\Dri;
Library=
LinkerScript=
 
[Target Data]
FileList=main.c;
BuildTool=CCSC
OptionString=-p +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
 
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/04/MAIN.STA
0,0 → 1,41
 
ROM used: 631 (62%)
393 (38%) including unused fragments
 
1 Average locations per line
5 Average locations per statement
 
RAM used: 12 (18%) at main() level
27 (40%) worst case
 
Lines Stmts % Files
----- ----- --- -----
171 91 66 d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\main.c
5 0 0 d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\main.h
111 0 0 C:\Program Files\PICC\Devices\16F84.h
5 0 0 d:\@kaklik\programy\pic_c\prenos\letadlo\common.h
272 46 20 d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\MYLCD.C
----- -----
1128 274 Total
 
Page ROM % RAM Functions:
---- --- --- --- ----------
0 21 3 1 delay_ms
0 8 1 0 @const22
0 22 3 3 lcd_send_nibble
0 22 3 2 lcd_send_byte
0 57 9 2 lcd_init
0 17 3 4 lcd_gotoxy
0 56 9 1 lcd_putc
0 81 13 6 read_nibble
0 256 41 2 main
0 9 1 0 @const10145
0 7 1 0 @goto10179
0 21 3 3 @DIV88
0 50 8 2 @PRINTF_U_148
 
Segment Used Free
--------- ---- ----
0000-0003 4 0
0004-03FF 627 393
 
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/04/MAIN.SYM
0,0 → 1,68
00C @SCRATCH
00D @SCRATCH
00D _RETURN_
00E x
00F y
010 xc
011 yc
012 e1
013 e2
014 e3
015 e4
016 kanal
017 Data
018 suma
019.0 tmp
01A datovy
01B lcd_init.i
01B read_nibble.datovy
01B @PRINTF_U_148.P1
01B main.@SCRATCH
01C read_nibble.Data
01C @PRINTF_U_148.P1
01C lcd_init.@SCRATCH
01C main.@SCRATCH
01D lcd_putc.c
01D read_nibble.i
01D @DIV88.P1
01E delay_ms.P1
01E lcd_gotoxy.x
01E read_nibble.d
01E @DIV88.P1
01F lcd_gotoxy.y
01F.0 read_nibble.tmp
01F @DIV88.@SCRATCH
020 lcd_gotoxy.Adr
020 read_nibble.@SCRATCH
021 lcd_gotoxy.@SCRATCH
022 lcd_send_byte.Adr
023 lcd_send_byte.n
024 lcd_send_nibble.n
025 lcd_send_nibble.@SCRATCH
026 lcd_send_nibble.@SCRATCH
delay_us.P1
-002 LCD_INIT_STRING
lcd_putc2.Data
prijmout.bit
 
0015 delay_ms
0004 @const22
002A lcd_send_nibble
0040 lcd_send_byte
0056 lcd_init
008F lcd_gotoxy
00A0 lcd_putc
00D8 read_nibble
0170 main
000C @const10145
0270 @goto10179
0129 @DIV88
013E @PRINTF_U_148
0197 decoder
 
Project Files:
d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\main.c
d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\main.h
C:\Program Files\PICC\Devices\16F84.h
d:\@kaklik\programy\pic_c\prenos\letadlo\common.h
d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\MYLCD.C
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/04/MAIN.TRE
0,0 → 1,701
ÀÄmain
ÀÄmain 0/256 Ram=2
ÃÄ??0??
ÃÄlcd_init 0/57 Ram=2
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@const22 0/8 Ram=0
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄdelay_ms 0/21 Ram=1
ÃÄdelay_ms 0/21 Ram=1
ÃÄ@const10145 0/9 Ram=0
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄdelay_ms 0/21 Ram=1
ÃÄread_nibble 0/81 Ram=6
ÃÄread_nibble 0/81 Ram=6
ÃÄread_nibble 0/81 Ram=6
ÃÄread_nibble 0/81 Ram=6
ÃÄ@goto10179 0/7 Ram=0
ÃÄlcd_gotoxy 0/17 Ram=4
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_148 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_148 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_148 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_148 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_gotoxy 0/17 Ram=4
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_148 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_148 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_148 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_148 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄdelay_ms 0/21 Ram=1
ÀÄdelay_ms 0/21 Ram=1
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/04/MYLCD.C
0,0 → 1,271
// LCD modul pro ovladani dvouradkoveho LCD modulu se standardnim Hitachi radicem
// (c)miho 2002
//
// Historie:
//
// 0.0 Uvodni verze se snadnou definici portu LCD displeje
//
//
// Funkce:
//
// lcd_init() inicializuje LCD displej a porty, nutno volat jako prvni
//
// lcd_putc(c) zapis snaku do lcd displeje, zpracovava nasledujici ridici znaky
// \f = \x0C - nova stranka - smazani displeje
// \n = \x0A - odradkovani (prechod na druhou radku)
// \b = \x08 - backspace - posunuti kurzoru o 1 pozici zpet
// \r = \x0D - goto home to position 1,1
// \0 .. \7 - definovatelne znaky v pozicich 0 az 7 v CGRAM
// \20 .. \27 - alternativne zapsane znaky (oktalove) v pozicich 0 az 7 CGRAM
// Pozor na to, ze funkce printf konci tisk pokud narazi na \0 (konec retezce)
//
// lcd_gotoxy(x,y) presune kurzor na uvedenou adresu
// nekontroluje parametry
//
// lcd_cursor_on zapne kurzor
// lcd_cursor_off vypne kurzor
//
// lcd_define_char(Index, Def) Makro, ktere definuje znaky od pozice Index obsahem definicniho
// retezce Def. Kazdych 8 znaku retezce Def definuje dalsi znak v CGRAM.
// Kapacita CGRAM je celkem 8 znaku s indexem 0 az 7.
// Na konci se provede lcd_gotoxy(1,1).
// Na konci teto knihovny je priklad pouziti definovanych znaku
//
// Definice portu:
//
// #DEFINE LCD_RS PIN_B2 // rizeni registru LCD displeje
// #DEFINE LCD_E PIN_B1 // enable LCD displeje
// #DEFINE LCD_DATA_LSB PIN_C2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
 
 
 
 
// Privatni sekce, cist jen v pripade, ze neco nefunguje
 
 
 
 
// Generovane defince portu pro ucely teto knihovny aby kod generoval spravne IO operace a soucasne
// bylo mozne jednoduse deklarovat pripojene piny LCD displeje pri pouziti teto knihovny. Problem spociva
// v tom, ze se musi spravne ridit smery portu a soucasne datovy port zabira jen 4 bity ze zadaneho portu
//
#DEFINE LCD_SHIFT (LCD_DATA_LSB&7) // pocet bitu posuvu dataoveho kanalu v datovem portu
#DEFINE LCD_PORT (LCD_DATA_LSB>>3) // adresa LCD datoveho portu
#DEFINE LCD_TRIS (LCD_PORT+0x80) // adresa prislusneho TRIS registru
#DEFINE LCD_MASK (0xF<<LCD_SHIFT) // maska platnych bitu
//
#IF LCD_SHIFT>4 // kontrola mezi
#ERROR LCD data port LSB bit not in range 0..4
#ENDIF
 
 
// Definice konstant pro LCD display
//
#define LCD_CURSOR_ON_ 0x0E // kurzor jako blikajici radka pod znakem
#define LCD_CURSOR_OFF_ 0x0C // zadny kurzor
#define LCD_LINE_2 0x40 // adresa 1. znaku 2. radky
 
 
// Definice rezimu LCD displeje
//
BYTE const LCD_INIT_STRING[4] =
{
0x28, // intrfejs 4 bity, 2 radky, font 5x7
LCD_CURSOR_OFF_, // display on, kurzor off,
0x01, // clear displeje
0x06 // inkrement pozice kurzoru (posun kurzoru doprava)
};
 
 
// Odesle nibble do displeje (posle data a klikne signalem e)
//
void lcd_send_nibble( BYTE n )
{
*LCD_PORT = (*LCD_PORT & ~LCD_MASK) | ((n << LCD_SHIFT) & LCD_MASK); // nastav datove bity portu a ostatni zachovej
output_bit(LCD_E,1); // vzestupna hrana
delay_us(1); // pockej alespon 450ns od e nebo alespon 195ns od dat
output_bit(LCD_E,0); // sestupna hrana (minimalni perioda e je 1us)
}
 
 
// Odesle bajt do registru LCD
//
// Pokud je Adr=0 .. instrukcni registr
// Pokud je Adr=1 .. datovy registr
//
void lcd_send_byte( BOOLEAN Adr, BYTE n )
{
output_bit(LCD_RS,Adr); // vyber registr
swap(n);
lcd_send_nibble(n); // posli horni pulku bajtu
swap(n);
lcd_send_nibble(n); // posli spodni pulku bajtu
delay_us(40); // minimalni doba na provedeni prikazu
}
 
 
// Provede inicializaci LCD displeje, smaze obsah a nastavi mod displeje
//
// Tato procedura se musi volat pred pouzitim ostatnich lcd_ procedur
//
void lcd_init()
{
 
int i; // pocitadlo cyklu
 
delay_ms(20); // spozdeni pro provedeni startu displeje po zapnuti napajeni
 
*LCD_TRIS = *LCD_TRIS & ~LCD_MASK; // nuluj odpovidajici bity tris registru datoveho portu LCD
 
output_bit(LCD_RS,0); // nastav jako vystup a nastav klidovy stav
output_bit(LCD_E,0); // nastav jako vystup a nastav klidovy stav
 
for (i=0; i<3; i++) // nastav lcd do rezimu 8 bitu sbernice
{
delay_ms(2); // muze byt rozdelany prenos dat (2x 4 bity) nebo pomaly povel
lcd_send_nibble(3); // rezim 8 bitu
}
 
delay_us(40); // cas na zpracovani
lcd_send_nibble(2); // nastav rezim 4 bitu (plati od nasledujiciho prenosu)
delay_us(40); // cas na zpracovani
 
for (i=0;i<3;i++) // proved inicializaci (nastaveni modu, smazani apod)
{
lcd_send_byte(0,LCD_INIT_STRING[i]);
delay_ms(2);
}
}
 
 
// Proved presun kurzoru
//
// Pozice 1.1 je domu
//
void lcd_gotoxy( BYTE x, BYTE y)
{
 
BYTE Adr;
 
Adr=x-1;
if(y==2)
Adr+=LCD_LINE_2;
 
lcd_send_byte(0,0x80|Adr);
}
 
 
// Zapis znaku na displej, zpracovani ridicich znaku
//
void lcd_putc( char c)
{
 
switch (c)
{
case '\f' : lcd_send_byte(0,1); // smaz displej
delay_ms(2);
break;
case '\n' : lcd_gotoxy(1,2); break; // presun se na 1. znak 2. radky
case '\r' : lcd_gotoxy(1,1); break; // presun home
case '\b' : lcd_send_byte(0,0x10); break; // posun kurzor o 1 zpet
default : if (c<0x20) c&=0x7; // preklopeni definovatelnych znaku na rozsah 0 az 0x1F
lcd_send_byte(1,c); break; // zapis znak
}
}
 
 
// Zapni kurzor
//
void lcd_cursor_on()
{
lcd_send_byte(0,LCD_CURSOR_ON_);
}
 
 
// Vypni kurzor
//
void lcd_cursor_off()
{
lcd_send_byte(0,LCD_CURSOR_OFF_);
}
 
 
// Definice vlastnich fontu
//
// Vlastnich definic muze byt jen 8 do pozic 0 az 7 pameti CGRAM radice lcd displeje
// Pro snadne definovani jsou pripraveny nasledujici definice a na konci souboru je uveden
// priklad pouziti definovanych znaku.
 
 
// Pomocna procedura pro posilani ridicich dat do radice displeje
//
void lcd_putc2(int Data)
{
lcd_send_byte(1,Data);
}
 
 
// Pomocne definice pro programovani obsahu CGRAM
//
#DEFINE lcd_define_start(Code) lcd_send_byte(0,0x40+(Code<<3)); delay_ms(2)
#DEFINE lcd_define_def(String) printf(lcd_putc2,String);
#DEFINE lcd_define_end() lcd_send_byte(0,3); delay_ms(2)
 
 
// Vlastni vykonne makro pro definovani fontu do pozice Index CGRAM s definicnim retezcem Def
//
#DEFINE lcd_define_char(Index, Def) lcd_define_start(Index); lcd_define_def(Def); lcd_define_end();
 
 
// Pripravene definice fontu vybranych znaku
// V tabulce nesmi byt 00 (konec retezce v printf()), misto toho davame 80
//
#DEFINE LCD_CHAR_BAT100 "\x0E\x1F\x1F\x1F\x1F\x1F\x1F\x1F" /* symbol plne baterie */
#DEFINE LCD_CHAR_BAT50 "\x0E\x1F\x11\x11\x13\x17\x1F\x1F" /* symbol polovicni baterie */
#DEFINE LCD_CHAR_BAT0 "\x0E\x1F\x11\x11\x11\x11\x11\x1F" /* symbol vybite baterie */
#DEFINE LCD_CHAR_LUA "\x04\x0E\x11\x11\x1F\x11\x11\x80" /* A s carkou */
#DEFINE LCD_CHAR_LLA "\x01\x02\x0E\x01\x1F\x11\x0F\x80" /* a s carkou */
#DEFINE LCD_CHAR_HUC "\x0A\x0E\x11\x10\x10\x11\x0E\x80" /* C s hackem */
#DEFINE LCD_CHAR_HLC "\x0A\x04\x0E\x10\x10\x11\x0E\x80" /* c s hackem */
#DEFINE LCD_CHAR_HUD "\x0A\x1C\x12\x11\x11\x12\x1C\x80" /* D s hackem */
#DEFINE LCD_CHAR_HLD "\x05\x03\x0D\x13\x11\x11\x0F\x80" /* d s hackem */
#DEFINE LCD_CHAR_LUE "\x04\x1F\x10\x10\x1E\x10\x1F\x80" /* E s carkou */
#DEFINE LCD_CHAR_LLE "\x01\x02\x0E\x11\x1F\x10\x0E\x80" /* e s carkou */
#DEFINE LCD_CHAR_HUE "\x0A\x1F\x10\x1E\x10\x10\x1F\x80" /* E s hackem */
#DEFINE LCD_CHAR_HLE "\x0A\x04\x0E\x11\x1F\x10\x0E\x80" /* e s hackem */
#DEFINE LCD_CHAR_LUI "\x04\x0E\x04\x04\x04\x04\x0E\x80" /* I s carkou */
#DEFINE LCD_CHAR_LLI "\x02\x04\x80\x0C\x04\x04\x0E\x80" /* i s carkou */
#DEFINE LCD_CHAR_HUN "\x0A\x15\x11\x19\x15\x13\x11\x80" /* N s hackem */
#DEFINE LCD_CHAR_HLN "\x0A\x04\x16\x19\x11\x11\x11\x80" /* n s hackem */
#DEFINE LCD_CHAR_LUO "\x04\x0E\x11\x11\x11\x11\x0E\x80" /* O s carkou */
#DEFINE LCD_CHAR_LLO "\x02\x04\x0E\x11\x11\x11\x0E\x80" /* o s carkou */
#DEFINE LCD_CHAR_HUR "\x0A\x1E\x11\x1E\x14\x12\x11\x80" /* R s hackem */
#DEFINE LCD_CHAR_HLR "\x0A\x04\x16\x19\x10\x10\x10\x80" /* r s hackem */
#DEFINE LCD_CHAR_HUS "\x0A\x0F\x10\x0E\x01\x01\x1E\x80" /* S s hackem */
#DEFINE LCD_CHAR_HLS "\x0A\x04\x0E\x10\x0E\x01\x1E\x80" /* s s hackem */
#DEFINE LCD_CHAR_HUT "\x0A\x1F\x04\x04\x04\x04\x04\x80" /* T s hackem */
#DEFINE LCD_CHAR_HLT "\x0A\x0C\x1C\x08\x08\x09\x06\x80" /* t s hackem */
#DEFINE LCD_CHAR_LUU "\x02\x15\x11\x11\x11\x11\x0E\x80" /* U s carkou */
#DEFINE LCD_CHAR_LLU "\x02\x04\x11\x11\x11\x13\x0D\x80" /* u s carkou */
#DEFINE LCD_CHAR_CUU "\x06\x17\x11\x11\x11\x11\x0E\x80" /* U s krouzkem */
#DEFINE LCD_CHAR_CLU "\x06\x06\x11\x11\x11\x11\x0E\x80" /* u s krouzkem */
#DEFINE LCD_CHAR_LUY "\x02\x15\x11\x0A\x04\x04\x04\x80" /* Y s carkou */
#DEFINE LCD_CHAR_LLY "\x02\x04\x11\x11\x0F\x01\x0E\x80" /* y s carkou */
#DEFINE LCD_CHAR_HUZ "\x0A\x1F\x01\x02\x04\x08\x1F\x80" /* Z s hackem */
#DEFINE LCD_CHAR_HLZ "\x0A\x04\x1F\x02\x04\x08\x1F\x80" /* z s hackem */
 
 
// Priklad pouziti definovanych znaku
//
//
//void lcd_sample()
//{
// lcd_define_char(0,LCD_CHAR_BAT50); // Priklad definice znaku baterie do pozice 0
// lcd_define_char(2,LCD_CHAR_HLE LCD_CHAR_LUI); // Priklad definice znaku e s hackem a I s carkou od pozice 2
// // vsimnete si, ze neni carka mezi retezci s definici (oba retezce definuji
// // jediny definicni retezec)
// printf(lcd_putc,"\fZnaky:\20\22\23"); // priklad vypisu znaku z pozice 0, 2 a 3
// delay_ms(1000);
// lcd_define_char(0,LCD_CHAR_BAT0); // Predefinovani tvaru znaku v pozici 0
// delay_ms(1000);
//}
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/04/PRG.BAT
0,0 → 1,6
call picpgr stop
call picpgr erase pic16f84
call picpgr program main.hex hex pic16f84
call picpgr run
pause
call picpgr stop
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/04/PRG.PIF
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
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/04/RUN.BAT
0,0 → 1,5
call picpgr run
pause
call picpgr stop
pause
run.bat
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/04/VC.MNU
0,0 → 1,4
R: Run
picpgr run
S: Stop
picpgr stop
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/04/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
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/05/A.BAT
0,0 → 1,6
call picpgr stop
call picpgr erase pic16F84
call picpgr program main.hex hex pic16F84
call picpgr run
pause
call picpgr stop
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/05/MAIN.BAK
0,0 → 1,200
// Prijimac
 
#DEFINE DEBUG PIN_A2 // ladici pomocne synchronizacni impulzy
 
#include "main.h"
#include "..\common.h"
 
#DEFINE LCD_RS PIN_B1 // rizeni registru LCD displeje
#DEFINE LCD_E PIN_B0 // enable LCD displeje
#DEFINE LCD_DATA_LSB PIN_B2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
#INCLUDE "MYLCD.C"
 
#DEFINE PRIJIMAC PIN_A3 // pin na ktery je pripojen prijimac
#DEFINE SERVO_X PIN_A0 // pin na ktery je pripojeno servo
#DEFINE SERVO_Y PIN_A1
 
 
// Prijme datovy nibble vcetne zasynchronizovani
// Chybi dodelat timeout
int8 prijmi_nibble(int8* datovy, int8* data)
{
int8 i;
 
#IFDEF DEBUG
int1 tmp;
#ENDIF
 
*data=0;
 
// Cekam na dlouhou nulu
for (i=4; i>0; i--)
{
if (input(PRIJIMAC)) i=4;
delay_us(IMPULS/2);
}
 
// Cekam na jednicku (start ramce)
for (; !input(PRIJIMAC); )
{
}
 
// Ctu typ nibblu
delay_us(2*IMPULS+2*IMPULS/3);
*datovy=input(PRIJIMAC);
 
// Prenasim bity
for (i=0; i<4; i++)
{
delay_us(2*IMPULS);
*data >>= 1;
if (input(PRIJIMAC)) *data +=0b1000;
 
#IFDEF DEBUG
output_bit(DEBUG,tmp);
tmp=!tmp;
#ELSE
delay_us(20);
#ENDIF
}
 
return FALSE;
}
 
 
// Prijme datovy ramec
// Pokud nastane chyba vraci TRUE
int8 prijmi_ramec(int8* kanal, int8* data)
{
int8 datovy;
int8 suma;
 
// Cekej na synchronizacni nibble
do
{
if (prijmi_nibble(&datovy, data)) return 1; // chyba timout
}
while(datovy);
 
// Zkontroluj magickou hodnotu
if (*data != SYNC_NIBBLE) return 2; // chyba magickeho kodu ramce
 
// Prijmi cislo kanalu
if (prijmi_nibble(&datovy, kanal)) return 1; // chyba timeout
if (!datovy) return 3; // chyba typu nibblu
 
// Prijmi data
if (prijmi_nibble(&datovy, data)) return 1; // chyba timeout
if (!datovy) return 3; // chyba typu nibblu
 
// Prijmi zabezpeceni
if (prijmi_nibble(&datovy, &suma)) return 1; // chyba timeout
if (!datovy) return 3; // chyba typu nibblu
 
// Zkontroluj kontrolni soucet
 
 
lcd_gotoxy(1,1);
printf(lcd_putc,"R:%3U %3U %3U ",*kanal,*data,suma);
delay_ms(1000);
 
 
if (((*kanal+*data) & 0b1111) != suma) return 3; // chyba kontrolniho souctu
 
return 0;
}
 
 
 
int8 x,y;
int8 xc,yc; // pocitadla aktualizace x a y
int e1,e2,e3,e4; // pocitadla chyb - ladici
 
void main()
{
lcd_init(); // zinicializuj LCD display
delay_ms(5);
printf(lcd_putc,"Ahoj...");
delay_ms(300);
 
x = 0;
y = 0;
xc=0;
yc=0;
e1=0;
e2=0;
e3=0;
e4=0;
 
while (true)
{
int8 kanal, data, e;
/* int8 kanal, data, suma;
int1 tmp;
int8 datovy;
 
decoder:
 
if (prijmi_nibble(&datovy,&kanal)) goto decoder;
if (datovy) goto decoder;
 
// if (kanal!=15) {e1++; goto decoder;};
if (prijmi_nibble(&datovy, &kanal)) goto decoder; // nacti identifikator osy
 
if (prijmi_nibble(&datovy, &data)) goto decoder; // nacti 1. nibble; pri chybe zacni znovu
if (prijmi_nibble(&datovy, &suma)) goto decoder; // nacti 2. nibble; pri chybe zacni znovu
if (((kanal+data) & 0b1111) != suma) {e1++; goto decoder;} // zacni znovu, pokud jsou ruzne nibble
 
*/
e = prijmi_ramec(&kanal,&data);
//lcd_gotoxy(1,1);
//printf(lcd_putc,"Q:%3U %3U %3U ",kanal,data,e);
//delay_ms(1000);
if (!e)
switch (kanal) // rozeskoc se podle adresy osy
{
case OSA_X:
{
x=data;
xc++;
break;
};
case OSA_Y:
{
y=data;
yc++;
break;
};
case TLs:
{
e4++;
break;
};
};
 
// ladici vypisy
lcd_gotoxy(1,1); // vytiskni X a Y
printf(lcd_putc,"X%2U %3U%3U%3U ", x, xc, e1, e);
lcd_gotoxy(1,2);
printf(lcd_putc,"Y%2U %3U%3U%3U ", y, yc, e3, data);
 
// ovladani serv
output_high(SERVO_X);
delay_ms(1);
for (data=x; data--; data>0)
delay_us(65);
output_low(SERVO_X);
 
output_high(SERVO_Y);
delay_ms(1);
for (data=y; data--; data>0)
delay_us(65);
output_low(SERVO_Y);
 
for (data=30-x-y; data--; data>0)
delay_us(65);
 
}
}
 
 
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/05/MAIN.C
0,0 → 1,200
// Prijimac
 
#DEFINE DEBUG PIN_A2 // ladici pomocne synchronizacni impulzy
 
#include "main.h"
#include "..\common.h"
 
#DEFINE LCD_RS PIN_B1 // rizeni registru LCD displeje
#DEFINE LCD_E PIN_B0 // enable LCD displeje
#DEFINE LCD_DATA_LSB PIN_B2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
#INCLUDE "MYLCD.C"
 
#DEFINE PRIJIMAC PIN_A3 // pin na ktery je pripojen prijimac
#DEFINE SERVO_X PIN_A0 // pin na ktery je pripojeno servo
#DEFINE SERVO_Y PIN_A1
 
 
// Prijme datovy nibble vcetne zasynchronizovani
// Chybi dodelat timeout
int8 prijmi_nibble(int8* datovy, int8* data)
{
int8 i;
 
#IFDEF DEBUG
int1 tmp;
#ENDIF
 
*data=0;
 
// Cekam na dlouhou nulu
for (i=4; i>0; i--)
{
if (input(PRIJIMAC)) i=4;
delay_us(IMPULS/2);
}
 
// Cekam na jednicku (start ramce)
for (; !input(PRIJIMAC); )
{
}
 
// Ctu typ nibblu
delay_us(2*IMPULS+2*IMPULS/3);
*datovy=input(PRIJIMAC);
 
// Prenasim bity
for (i=0; i<4; i++)
{
delay_us(2*IMPULS);
*data >>= 1;
if (input(PRIJIMAC)) *data +=0b1000;
 
#IFDEF DEBUG
output_bit(DEBUG,tmp);
tmp=!tmp;
#ELSE
delay_us(20);
#ENDIF
}
 
return FALSE;
}
 
 
// Prijme datovy ramec
// Pokud nastane chyba vraci TRUE
int8 prijmi_ramec(int8* kanal, int8* data)
{
int8 datovy;
int8 suma;
 
// Cekej na synchronizacni nibble
do
{
if (prijmi_nibble(&datovy, data)) return 1; // chyba timout
}
while(datovy);
 
// Zkontroluj magickou hodnotu
if (*data != SYNC_NIBBLE) return 2; // chyba magickeho kodu ramce
 
// Prijmi cislo kanalu
if (prijmi_nibble(&datovy, kanal)) return 1; // chyba timeout
if (!datovy) return 3; // chyba typu nibblu
 
// Prijmi data
if (prijmi_nibble(&datovy, data)) return 1; // chyba timeout
if (!datovy) return 3; // chyba typu nibblu
 
// Prijmi zabezpeceni
if (prijmi_nibble(&datovy, &suma)) return 1; // chyba timeout
if (!datovy) return 3; // chyba typu nibblu
 
// Zkontroluj kontrolni soucet
 
 
//lcd_gotoxy(1,1);
//printf(lcd_putc,"R:%3U %3U %3U ",*kanal,*data,suma);
//delay_ms(1000);
 
 
if (((*kanal+*data) & 0b1111) != suma) return 3; // chyba kontrolniho souctu
 
return 0;
}
 
 
 
int8 x,y;
int8 xc,yc; // pocitadla aktualizace x a y
int e1,e2,e3,e4; // pocitadla chyb - ladici
 
void main()
{
lcd_init(); // zinicializuj LCD display
delay_ms(5);
printf(lcd_putc,"Ahoj...");
delay_ms(300);
 
x = 0;
y = 0;
xc=0;
yc=0;
e1=0;
e2=0;
e3=0;
e4=0;
 
while (true)
{
int8 kanal, data, e;
/* int8 kanal, data, suma;
int1 tmp;
int8 datovy;
 
decoder:
 
if (prijmi_nibble(&datovy,&kanal)) goto decoder;
if (datovy) goto decoder;
 
// if (kanal!=15) {e1++; goto decoder;};
if (prijmi_nibble(&datovy, &kanal)) goto decoder; // nacti identifikator osy
 
if (prijmi_nibble(&datovy, &data)) goto decoder; // nacti 1. nibble; pri chybe zacni znovu
if (prijmi_nibble(&datovy, &suma)) goto decoder; // nacti 2. nibble; pri chybe zacni znovu
if (((kanal+data) & 0b1111) != suma) {e1++; goto decoder;} // zacni znovu, pokud jsou ruzne nibble
 
*/
e = prijmi_ramec(&kanal,&data);
//lcd_gotoxy(1,1);
//printf(lcd_putc,"Q:%3U %3U %3U ",kanal,data,e);
//delay_ms(1000);
if (!e)
switch (kanal) // rozeskoc se podle adresy osy
{
case OSA_X:
{
x=data;
xc++;
break;
};
case OSA_Y:
{
y=data;
yc++;
break;
};
case TLs:
{
e4++;
break;
};
};
 
// ladici vypisy
lcd_gotoxy(1,1); // vytiskni X a Y
printf(lcd_putc,"X%2U %3U%3U%3U ", x, xc, e1, e);
lcd_gotoxy(1,2);
printf(lcd_putc,"Y%2U %3U%3U%3U ", y, yc, e3, data);
 
// ovladani serv
output_high(SERVO_X);
delay_ms(1);
for (data=x; data--; data>0)
delay_us(65);
output_low(SERVO_X);
 
output_high(SERVO_Y);
delay_ms(1);
for (data=y; data--; data>0)
delay_us(65);
output_low(SERVO_Y);
 
for (data=30-x-y; data--; data>0)
delay_us(65);
 
}
}
 
 
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/05/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
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/05/MAIN.ERR
0,0 → 1,0
No Errors
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/05/MAIN.H
0,0 → 1,4
#include <16F84.h>
#use delay(clock=4000000)
#fuses XT,NOWDT,PUT
 
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/05/MAIN.HEX
0,0 → 1,89
:1000000000308A00CE2900000A108A100A118207E7
:1000100028340C34013406340A108A100A1182077D
:10002000413468346F346A3400341C308400000872
:100030000319292801308D008C018C0B1D288D0B94
:100040001C284A308C008C0B232800000000800BF9
:100050001A2800340608C339A300220D8C008C0D29
:10006000FC308C050C083C392304860006148316EA
:100070000610000083120610831606108312003447
:10008000A008031D4528861046288614831686106E
:100090008312A10E2108A2002A20A10E2108A2008D
:1000A0002A200D308C008C0B5328003414309C0017
:1000B0001520C3308316860583128610831686109A
:1000C0008312061083160610831299011908023C48
:1000D000031C722802309C0015200330A2002A2045
:1000E000990A66280D308C008C0B74280230A2000F
:1000F0002A200D308C008C0B7B2899011908023CBA
:10010000031C8E28190804209A00A0011A08A100D7
:10011000402002309C001520990A7E28D229013007
:100120001C029E001D08023C031D982840309E07BB
:100130001E0880389F00A0011F08A1004020003445
:100140001B088C000C300C020319B3280A300C0277
:100150000319BB280D300C020319C12808300C020A
:100160000319C628CB28A0010130A100402002308D
:100170009C001520D72801309C0002309D008F2064
:10018000D72801309C009D008F20D728A001103077
:10019000A1004020D7281B081F3C031CD128073092
:1001A0009B050130A0001B08A1004020D728003487
:1001B0001E088400800104309F009F080319EE2868
:1001C000831685158312851DE72804309F0029308A
:1001D0008C008C0BE92800009F03DD288316851511
:1001E0008312851DEE28DD308C008C0BF528000075
:1001F00000001D08840083168515003083128519C0
:10020000013080009F011F08033C031C2829A630F1
:100210008C008C0B092900001E0884000310000CC0
:100220008C008000831685158312851D1C291E08ED
:10023000840008300007800020182029051121299A
:1002400005158316051101308312A0069F0A0329A4
:1002500000308D0000341B309D001A089E00D8200D
:100260008D080319362901308D0086299B08031D4E
:100270002B291A08840000080F3C03194229023078
:100280008D0086291B309D0019089E00D8208D08FE
:1002900003194D2901308D0086299B08031D532920
:1002A00003308D0086291B309D001A089E00D8203F
:1002B0008D0803195E2901308D0086299B08031DD6
:1002C000642903308D0086291B309D001C309E0060
:1002D000D8208D0803196F2901308D0086299B08CD
:1002E000031D752903308D00862919088400000834
:1002F0009D001A08840000081D070F391C0203190D
:10030000842903308D00862900308D00FA291C08CD
:100310008D011B0203188F291B088C009B298C015F
:1003200008309D009B0D8C0D1C080C0203188C00DE
:100330008D0D9D0B922900340D0819089B00643027
:100340009C0087210C0899000D083030031DAF294F
:100350001A189A159A19B5291A1A2030B1299A1122
:100360001A128D070D089B00A02019089B000A3067
:100370009C0087210C0899000D083030031DC4290A
:100380009A19C8291A1A20308D070D089B00A02041
:100390003030990719089B00A020003484011F30D9
:1003A0008305562805309C001520990119080C205A
:1003B000990A9B00A02004301902031DD62903309E
:1003C0009A002E309B00A0209A0BE1290230990060
:1003D00096309C001520990BE8298E018F01900121
:1003E0009101920193019401950116309900173003
:1003F0009A002B290D0898009808031D102A013037
:100400001602FD3E0318102A033EA82A17088E0084
:10041000900A102A17088F00910A102A950A102AAC
:1004200001309C009D008F2058309B00A0200E08BA
:10043000990011309A009C2120309B00A0201008C8
:10044000990010309A009C211208990010309A00EF
:100450009C211808990010309A009C2120309B00A4
:10046000A02020309B00A02001309C0002309D0085
:100470008F2059309B00A0200F08990011309A005E
:100480009C2120309B00A0201108990010309A0078
:100490009C211408990010309A009C21170899009B
:1004A00010309A009C2120309B00A02020309B001F
:1004B000A020831605108312051401309C0015201E
:1004C0000E08970017089703003A0319712A153090
:1004D0008C008C0B692A00009708031D702A0030DD
:1004E000622A831605108312051083168510831265
:1004F000851401309C0015200F08970017089703FA
:10050000003A03198D2A15308C008C0B852A0000C7
:100510009708031D8C2A00307E2A831685108312CB
:1005200085100E081E3C8D000F080D02970017085D
:100530009703003A0319A62A15308C008C0B9E2ACB
:1005400000009708031DA52A0030972AF5296300AB
:0E0550000A108A140A118207062A0A2A0E2AA5
:02400E00F13F80
:00000001FF
;PIC16F84
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/05/MAIN.LST
0,0 → 1,1175
CCS PCW C Compiler, Version 3.110, 15448
 
Filename: d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\main.LST
 
ROM used: 687 (67%)
Largest free fragment is 337
RAM used: 12 (18%) at main() level
25 (37%) worst case
Stack: 5 locations
 
*
0000: MOVLW 00
0001: MOVWF 0A
0002: GOTO 1CE
0003: NOP
.................... // Prijimac
....................
.................... #DEFINE DEBUG PIN_A2 // ladici pomocne synchronizacni impulzy
....................
.................... #include "main.h"
.................... #include <16F84.h>
.................... //////// Standard Header file for the PIC16F84 device ////////////////
.................... #device PIC16F84
.................... #list
....................
.................... #use delay(clock=4000000)
*
0015: MOVLW 1C
0016: MOVWF 04
0017: MOVF 00,W
0018: BTFSC 03.2
0019: GOTO 029
001A: MOVLW 01
001B: MOVWF 0D
001C: CLRF 0C
001D: DECFSZ 0C,F
001E: GOTO 01D
001F: DECFSZ 0D,F
0020: GOTO 01C
0021: MOVLW 4A
0022: MOVWF 0C
0023: DECFSZ 0C,F
0024: GOTO 023
0025: NOP
0026: NOP
0027: DECFSZ 00,F
0028: GOTO 01A
0029: RETLW 00
.................... #fuses XT,NOWDT,PUT
....................
....................
.................... #include "..\common.h"
.................... #DEFINE OSA_X 1 // adresy os
.................... #DEFINE OSA_Y 2
.................... #DEFINE TLs 3
.................... #DEFINE IMPULS 250 // sirka impulsu
.................... #DEFINE SYNC_NIBBLE 0b1111 // magiske cislo sync niblu
....................
....................
.................... #DEFINE LCD_RS PIN_B1 // rizeni registru LCD displeje
.................... #DEFINE LCD_E PIN_B0 // enable LCD displeje
.................... #DEFINE LCD_DATA_LSB PIN_B2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
.................... #INCLUDE "MYLCD.C"
.................... // LCD modul pro ovladani dvouradkoveho LCD modulu se standardnim Hitachi radicem
.................... // (c)miho 2002
.................... //
.................... // Historie:
.................... //
.................... // 0.0 Uvodni verze se snadnou definici portu LCD displeje
.................... //
.................... //
.................... // Funkce:
.................... //
.................... // lcd_init() inicializuje LCD displej a porty, nutno volat jako prvni
.................... //
.................... // lcd_putc(c) zapis snaku do lcd displeje, zpracovava nasledujici ridici znaky
.................... // \f = \x0C - nova stranka - smazani displeje
.................... // \n = \x0A - odradkovani (prechod na druhou radku)
.................... // \b = \x08 - backspace - posunuti kurzoru o 1 pozici zpet
.................... // \r = \x0D - goto home to position 1,1
.................... // \0 .. \7 - definovatelne znaky v pozicich 0 az 7 v CGRAM
.................... // \20 .. \27 - alternativne zapsane znaky (oktalove) v pozicich 0 az 7 CGRAM
.................... // Pozor na to, ze funkce printf konci tisk pokud narazi na \0 (konec retezce)
.................... //
.................... // lcd_gotoxy(x,y) presune kurzor na uvedenou adresu
.................... // nekontroluje parametry
.................... //
.................... // lcd_cursor_on zapne kurzor
.................... // lcd_cursor_off vypne kurzor
.................... //
.................... // lcd_define_char(Index, Def) Makro, ktere definuje znaky od pozice Index obsahem definicniho
.................... // retezce Def. Kazdych 8 znaku retezce Def definuje dalsi znak v CGRAM.
.................... // Kapacita CGRAM je celkem 8 znaku s indexem 0 az 7.
.................... // Na konci se provede lcd_gotoxy(1,1).
.................... // Na konci teto knihovny je priklad pouziti definovanych znaku
.................... //
.................... // Definice portu:
.................... //
.................... // #DEFINE LCD_RS PIN_B2 // rizeni registru LCD displeje
.................... // #DEFINE LCD_E PIN_B1 // enable LCD displeje
.................... // #DEFINE LCD_DATA_LSB PIN_C2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
....................
....................
....................
....................
.................... // Privatni sekce, cist jen v pripade, ze neco nefunguje
....................
....................
....................
....................
.................... // Generovane defince portu pro ucely teto knihovny aby kod generoval spravne IO operace a soucasne
.................... // bylo mozne jednoduse deklarovat pripojene piny LCD displeje pri pouziti teto knihovny. Problem spociva
.................... // v tom, ze se musi spravne ridit smery portu a soucasne datovy port zabira jen 4 bity ze zadaneho portu
.................... //
.................... #DEFINE LCD_SHIFT (LCD_DATA_LSB&7) // pocet bitu posuvu dataoveho kanalu v datovem portu
.................... #DEFINE LCD_PORT (LCD_DATA_LSB>>3) // adresa LCD datoveho portu
.................... #DEFINE LCD_TRIS (LCD_PORT+0x80) // adresa prislusneho TRIS registru
.................... #DEFINE LCD_MASK (0xF<<LCD_SHIFT) // maska platnych bitu
.................... //
.................... #IF LCD_SHIFT>4 // kontrola mezi
.................... #ERROR LCD data port LSB bit not in range 0..4
.................... #ENDIF
....................
....................
.................... // Definice konstant pro LCD display
.................... //
.................... #define LCD_CURSOR_ON_ 0x0E // kurzor jako blikajici radka pod znakem
.................... #define LCD_CURSOR_OFF_ 0x0C // zadny kurzor
.................... #define LCD_LINE_2 0x40 // adresa 1. znaku 2. radky
....................
....................
.................... // Definice rezimu LCD displeje
.................... //
.................... BYTE const LCD_INIT_STRING[4] =
.................... {
.................... 0x28, // intrfejs 4 bity, 2 radky, font 5x7
.................... LCD_CURSOR_OFF_, // display on, kurzor off,
.................... 0x01, // clear displeje
.................... 0x06 // inkrement pozice kurzoru (posun kurzoru doprava)
.................... };
*
0004: BCF 0A.0
0005: BCF 0A.1
0006: BCF 0A.2
0007: ADDWF 02,F
0008: RETLW 28
0009: RETLW 0C
000A: RETLW 01
000B: RETLW 06
....................
....................
.................... // Odesle nibble do displeje (posle data a klikne signalem e)
.................... //
.................... void lcd_send_nibble( BYTE n )
.................... {
.................... *LCD_PORT = (*LCD_PORT & ~LCD_MASK) | ((n << LCD_SHIFT) & LCD_MASK); // nastav datove bity portu a ostatni zachovej
*
002A: MOVF 06,W
002B: ANDLW C3
002C: MOVWF 23
002D: RLF 22,W
002E: MOVWF 0C
002F: RLF 0C,F
0030: MOVLW FC
0031: ANDWF 0C,F
0032: MOVF 0C,W
0033: ANDLW 3C
0034: IORWF 23,W
0035: MOVWF 06
.................... output_bit(LCD_E,1); // vzestupna hrana
0036: BSF 06.0
0037: BSF 03.5
0038: BCF 06.0
.................... delay_us(1); // pockej alespon 450ns od e nebo alespon 195ns od dat
0039: NOP
.................... output_bit(LCD_E,0); // sestupna hrana (minimalni perioda e je 1us)
003A: BCF 03.5
003B: BCF 06.0
003C: BSF 03.5
003D: BCF 06.0
003E: BCF 03.5
003F: RETLW 00
.................... }
....................
....................
.................... // Odesle bajt do registru LCD
.................... //
.................... // Pokud je Adr=0 .. instrukcni registr
.................... // Pokud je Adr=1 .. datovy registr
.................... //
.................... void lcd_send_byte( BOOLEAN Adr, BYTE n )
.................... {
.................... output_bit(LCD_RS,Adr); // vyber registr
0040: MOVF 20,F
0041: BTFSS 03.2
0042: GOTO 045
0043: BCF 06.1
0044: GOTO 046
0045: BSF 06.1
0046: BSF 03.5
0047: BCF 06.1
.................... swap(n);
0048: BCF 03.5
0049: SWAPF 21,F
.................... lcd_send_nibble(n); // posli horni pulku bajtu
004A: MOVF 21,W
004B: MOVWF 22
004C: CALL 02A
.................... swap(n);
004D: SWAPF 21,F
.................... lcd_send_nibble(n); // posli spodni pulku bajtu
004E: MOVF 21,W
004F: MOVWF 22
0050: CALL 02A
.................... delay_us(40); // minimalni doba na provedeni prikazu
0051: MOVLW 0D
0052: MOVWF 0C
0053: DECFSZ 0C,F
0054: GOTO 053
0055: RETLW 00
.................... }
....................
....................
.................... // Provede inicializaci LCD displeje, smaze obsah a nastavi mod displeje
.................... //
.................... // Tato procedura se musi volat pred pouzitim ostatnich lcd_ procedur
.................... //
.................... void lcd_init()
.................... {
....................
.................... int i; // pocitadlo cyklu
....................
.................... delay_ms(20); // spozdeni pro provedeni startu displeje po zapnuti napajeni
0056: MOVLW 14
0057: MOVWF 1C
0058: CALL 015
....................
.................... *LCD_TRIS = *LCD_TRIS & ~LCD_MASK; // nuluj odpovidajici bity tris registru datoveho portu LCD
0059: MOVLW C3
005A: BSF 03.5
005B: ANDWF 06,F
....................
.................... output_bit(LCD_RS,0); // nastav jako vystup a nastav klidovy stav
005C: BCF 03.5
005D: BCF 06.1
005E: BSF 03.5
005F: BCF 06.1
.................... output_bit(LCD_E,0); // nastav jako vystup a nastav klidovy stav
0060: BCF 03.5
0061: BCF 06.0
0062: BSF 03.5
0063: BCF 06.0
....................
.................... for (i=0; i<3; i++) // nastav lcd do rezimu 8 bitu sbernice
0064: BCF 03.5
0065: CLRF 19
0066: MOVF 19,W
0067: SUBLW 02
0068: BTFSS 03.0
0069: GOTO 072
.................... {
.................... delay_ms(2); // muze byt rozdelany prenos dat (2x 4 bity) nebo pomaly povel
006A: MOVLW 02
006B: MOVWF 1C
006C: CALL 015
.................... lcd_send_nibble(3); // rezim 8 bitu
006D: MOVLW 03
006E: MOVWF 22
006F: CALL 02A
.................... }
0070: INCF 19,F
0071: GOTO 066
....................
.................... delay_us(40); // cas na zpracovani
0072: MOVLW 0D
0073: MOVWF 0C
0074: DECFSZ 0C,F
0075: GOTO 074
.................... lcd_send_nibble(2); // nastav rezim 4 bitu (plati od nasledujiciho prenosu)
0076: MOVLW 02
0077: MOVWF 22
0078: CALL 02A
.................... delay_us(40); // cas na zpracovani
0079: MOVLW 0D
007A: MOVWF 0C
007B: DECFSZ 0C,F
007C: GOTO 07B
....................
.................... for (i=0;i<3;i++) // proved inicializaci (nastaveni modu, smazani apod)
007D: CLRF 19
007E: MOVF 19,W
007F: SUBLW 02
0080: BTFSS 03.0
0081: GOTO 08E
.................... {
.................... lcd_send_byte(0,LCD_INIT_STRING[i]);
0082: MOVF 19,W
0083: CALL 004
0084: MOVWF 1A
0085: CLRF 20
0086: MOVF 1A,W
0087: MOVWF 21
0088: CALL 040
.................... delay_ms(2);
0089: MOVLW 02
008A: MOVWF 1C
008B: CALL 015
.................... }
008C: INCF 19,F
008D: GOTO 07E
008E: GOTO 1D2 (RETURN)
.................... }
....................
....................
.................... // Proved presun kurzoru
.................... //
.................... // Pozice 1.1 je domu
.................... //
.................... void lcd_gotoxy( BYTE x, BYTE y)
.................... {
....................
.................... BYTE Adr;
....................
.................... Adr=x-1;
008F: MOVLW 01
0090: SUBWF 1C,W
0091: MOVWF 1E
.................... if(y==2)
0092: MOVF 1D,W
0093: SUBLW 02
0094: BTFSS 03.2
0095: GOTO 098
.................... Adr+=LCD_LINE_2;
0096: MOVLW 40
0097: ADDWF 1E,F
....................
.................... lcd_send_byte(0,0x80|Adr);
0098: MOVF 1E,W
0099: IORLW 80
009A: MOVWF 1F
009B: CLRF 20
009C: MOVF 1F,W
009D: MOVWF 21
009E: CALL 040
009F: RETLW 00
.................... }
....................
....................
.................... // Zapis znaku na displej, zpracovani ridicich znaku
.................... //
.................... void lcd_putc( char c)
.................... {
....................
.................... switch (c)
00A0: MOVF 1B,W
00A1: MOVWF 0C
00A2: MOVLW 0C
00A3: SUBWF 0C,W
00A4: BTFSC 03.2
00A5: GOTO 0B3
00A6: MOVLW 0A
00A7: SUBWF 0C,W
00A8: BTFSC 03.2
00A9: GOTO 0BB
00AA: MOVLW 0D
00AB: SUBWF 0C,W
00AC: BTFSC 03.2
00AD: GOTO 0C1
00AE: MOVLW 08
00AF: SUBWF 0C,W
00B0: BTFSC 03.2
00B1: GOTO 0C6
00B2: GOTO 0CB
.................... {
.................... case '\f' : lcd_send_byte(0,1); // smaz displej
00B3: CLRF 20
00B4: MOVLW 01
00B5: MOVWF 21
00B6: CALL 040
.................... delay_ms(2);
00B7: MOVLW 02
00B8: MOVWF 1C
00B9: CALL 015
.................... break;
00BA: GOTO 0D7
.................... case '\n' : lcd_gotoxy(1,2); break; // presun se na 1. znak 2. radky
00BB: MOVLW 01
00BC: MOVWF 1C
00BD: MOVLW 02
00BE: MOVWF 1D
00BF: CALL 08F
00C0: GOTO 0D7
.................... case '\r' : lcd_gotoxy(1,1); break; // presun home
00C1: MOVLW 01
00C2: MOVWF 1C
00C3: MOVWF 1D
00C4: CALL 08F
00C5: GOTO 0D7
.................... case '\b' : lcd_send_byte(0,0x10); break; // posun kurzor o 1 zpet
00C6: CLRF 20
00C7: MOVLW 10
00C8: MOVWF 21
00C9: CALL 040
00CA: GOTO 0D7
.................... default : if (c<0x20) c&=0x7; // preklopeni definovatelnych znaku na rozsah 0 az 0x1F
00CB: MOVF 1B,W
00CC: SUBLW 1F
00CD: BTFSS 03.0
00CE: GOTO 0D1
00CF: MOVLW 07
00D0: ANDWF 1B,F
.................... lcd_send_byte(1,c); break; // zapis znak
00D1: MOVLW 01
00D2: MOVWF 20
00D3: MOVF 1B,W
00D4: MOVWF 21
00D5: CALL 040
00D6: GOTO 0D7
.................... }
00D7: RETLW 00
.................... }
....................
....................
.................... // Zapni kurzor
.................... //
.................... void lcd_cursor_on()
.................... {
.................... lcd_send_byte(0,LCD_CURSOR_ON_);
.................... }
....................
....................
.................... // Vypni kurzor
.................... //
.................... void lcd_cursor_off()
.................... {
.................... lcd_send_byte(0,LCD_CURSOR_OFF_);
.................... }
....................
....................
.................... // Definice vlastnich fontu
.................... //
.................... // Vlastnich definic muze byt jen 8 do pozic 0 az 7 pameti CGRAM radice lcd displeje
.................... // Pro snadne definovani jsou pripraveny nasledujici definice a na konci souboru je uveden
.................... // priklad pouziti definovanych znaku.
....................
....................
.................... // Pomocna procedura pro posilani ridicich dat do radice displeje
.................... //
.................... void lcd_putc2(int Data)
.................... {
.................... lcd_send_byte(1,Data);
.................... }
....................
....................
.................... // Pomocne definice pro programovani obsahu CGRAM
.................... //
.................... #DEFINE lcd_define_start(Code) lcd_send_byte(0,0x40+(Code<<3)); delay_ms(2)
.................... #DEFINE lcd_define_def(String) printf(lcd_putc2,String);
.................... #DEFINE lcd_define_end() lcd_send_byte(0,3); delay_ms(2)
....................
....................
.................... // Vlastni vykonne makro pro definovani fontu do pozice Index CGRAM s definicnim retezcem Def
.................... //
.................... #DEFINE lcd_define_char(Index, Def) lcd_define_start(Index); lcd_define_def(Def); lcd_define_end();
....................
....................
.................... // Pripravene definice fontu vybranych znaku
.................... // V tabulce nesmi byt 00 (konec retezce v printf()), misto toho davame 80
.................... //
.................... #DEFINE LCD_CHAR_BAT100 "\x0E\x1F\x1F\x1F\x1F\x1F\x1F\x1F" /* symbol plne baterie */
.................... #DEFINE LCD_CHAR_BAT50 "\x0E\x1F\x11\x11\x13\x17\x1F\x1F" /* symbol polovicni baterie */
.................... #DEFINE LCD_CHAR_BAT0 "\x0E\x1F\x11\x11\x11\x11\x11\x1F" /* symbol vybite baterie */
.................... #DEFINE LCD_CHAR_LUA "\x04\x0E\x11\x11\x1F\x11\x11\x80" /* A s carkou */
.................... #DEFINE LCD_CHAR_LLA "\x01\x02\x0E\x01\x1F\x11\x0F\x80" /* a s carkou */
.................... #DEFINE LCD_CHAR_HUC "\x0A\x0E\x11\x10\x10\x11\x0E\x80" /* C s hackem */
.................... #DEFINE LCD_CHAR_HLC "\x0A\x04\x0E\x10\x10\x11\x0E\x80" /* c s hackem */
.................... #DEFINE LCD_CHAR_HUD "\x0A\x1C\x12\x11\x11\x12\x1C\x80" /* D s hackem */
.................... #DEFINE LCD_CHAR_HLD "\x05\x03\x0D\x13\x11\x11\x0F\x80" /* d s hackem */
.................... #DEFINE LCD_CHAR_LUE "\x04\x1F\x10\x10\x1E\x10\x1F\x80" /* E s carkou */
.................... #DEFINE LCD_CHAR_LLE "\x01\x02\x0E\x11\x1F\x10\x0E\x80" /* e s carkou */
.................... #DEFINE LCD_CHAR_HUE "\x0A\x1F\x10\x1E\x10\x10\x1F\x80" /* E s hackem */
.................... #DEFINE LCD_CHAR_HLE "\x0A\x04\x0E\x11\x1F\x10\x0E\x80" /* e s hackem */
.................... #DEFINE LCD_CHAR_LUI "\x04\x0E\x04\x04\x04\x04\x0E\x80" /* I s carkou */
.................... #DEFINE LCD_CHAR_LLI "\x02\x04\x80\x0C\x04\x04\x0E\x80" /* i s carkou */
.................... #DEFINE LCD_CHAR_HUN "\x0A\x15\x11\x19\x15\x13\x11\x80" /* N s hackem */
.................... #DEFINE LCD_CHAR_HLN "\x0A\x04\x16\x19\x11\x11\x11\x80" /* n s hackem */
.................... #DEFINE LCD_CHAR_LUO "\x04\x0E\x11\x11\x11\x11\x0E\x80" /* O s carkou */
.................... #DEFINE LCD_CHAR_LLO "\x02\x04\x0E\x11\x11\x11\x0E\x80" /* o s carkou */
.................... #DEFINE LCD_CHAR_HUR "\x0A\x1E\x11\x1E\x14\x12\x11\x80" /* R s hackem */
.................... #DEFINE LCD_CHAR_HLR "\x0A\x04\x16\x19\x10\x10\x10\x80" /* r s hackem */
.................... #DEFINE LCD_CHAR_HUS "\x0A\x0F\x10\x0E\x01\x01\x1E\x80" /* S s hackem */
.................... #DEFINE LCD_CHAR_HLS "\x0A\x04\x0E\x10\x0E\x01\x1E\x80" /* s s hackem */
.................... #DEFINE LCD_CHAR_HUT "\x0A\x1F\x04\x04\x04\x04\x04\x80" /* T s hackem */
.................... #DEFINE LCD_CHAR_HLT "\x0A\x0C\x1C\x08\x08\x09\x06\x80" /* t s hackem */
.................... #DEFINE LCD_CHAR_LUU "\x02\x15\x11\x11\x11\x11\x0E\x80" /* U s carkou */
.................... #DEFINE LCD_CHAR_LLU "\x02\x04\x11\x11\x11\x13\x0D\x80" /* u s carkou */
.................... #DEFINE LCD_CHAR_CUU "\x06\x17\x11\x11\x11\x11\x0E\x80" /* U s krouzkem */
.................... #DEFINE LCD_CHAR_CLU "\x06\x06\x11\x11\x11\x11\x0E\x80" /* u s krouzkem */
.................... #DEFINE LCD_CHAR_LUY "\x02\x15\x11\x0A\x04\x04\x04\x80" /* Y s carkou */
.................... #DEFINE LCD_CHAR_LLY "\x02\x04\x11\x11\x0F\x01\x0E\x80" /* y s carkou */
.................... #DEFINE LCD_CHAR_HUZ "\x0A\x1F\x01\x02\x04\x08\x1F\x80" /* Z s hackem */
.................... #DEFINE LCD_CHAR_HLZ "\x0A\x04\x1F\x02\x04\x08\x1F\x80" /* z s hackem */
....................
....................
.................... // Priklad pouziti definovanych znaku
.................... //
.................... //
.................... //void lcd_sample()
.................... //{
.................... // lcd_define_char(0,LCD_CHAR_BAT50); // Priklad definice znaku baterie do pozice 0
.................... // lcd_define_char(2,LCD_CHAR_HLE LCD_CHAR_LUI); // Priklad definice znaku e s hackem a I s carkou od pozice 2
.................... // // vsimnete si, ze neni carka mezi retezci s definici (oba retezce definuji
.................... // // jediny definicni retezec)
.................... // printf(lcd_putc,"\fZnaky:\20\22\23"); // priklad vypisu znaku z pozice 0, 2 a 3
.................... // delay_ms(1000);
.................... // lcd_define_char(0,LCD_CHAR_BAT0); // Predefinovani tvaru znaku v pozici 0
.................... // delay_ms(1000);
.................... //}
....................
....................
.................... #DEFINE PRIJIMAC PIN_A3 // pin na ktery je pripojen prijimac
.................... #DEFINE SERVO_X PIN_A0 // pin na ktery je pripojeno servo
.................... #DEFINE SERVO_Y PIN_A1
....................
....................
.................... // Prijme datovy nibble vcetne zasynchronizovani
.................... // Chybi dodelat timeout
.................... int8 prijmi_nibble(int8* datovy, int8* data)
.................... {
.................... int8 i;
....................
.................... #IFDEF DEBUG
.................... int1 tmp;
.................... #ENDIF
....................
.................... *data=0;
00D8: MOVF 1E,W
00D9: MOVWF 04
00DA: CLRF 00
....................
.................... // Cekam na dlouhou nulu
.................... for (i=4; i>0; i--)
00DB: MOVLW 04
00DC: MOVWF 1F
00DD: MOVF 1F,F
00DE: BTFSC 03.2
00DF: GOTO 0EE
.................... {
.................... if (input(PRIJIMAC)) i=4;
00E0: BSF 03.5
00E1: BSF 05.3
00E2: BCF 03.5
00E3: BTFSS 05.3
00E4: GOTO 0E7
00E5: MOVLW 04
00E6: MOVWF 1F
.................... delay_us(IMPULS/2);
00E7: MOVLW 29
00E8: MOVWF 0C
00E9: DECFSZ 0C,F
00EA: GOTO 0E9
00EB: NOP
.................... }
00EC: DECF 1F,F
00ED: GOTO 0DD
....................
.................... // Cekam na jednicku (start ramce)
.................... for (; !input(PRIJIMAC); )
00EE: BSF 03.5
00EF: BSF 05.3
00F0: BCF 03.5
00F1: BTFSS 05.3
.................... {
.................... }
00F2: GOTO 0EE
....................
.................... // Ctu typ nibblu
.................... delay_us(2*IMPULS+2*IMPULS/3);
00F3: MOVLW DD
00F4: MOVWF 0C
00F5: DECFSZ 0C,F
00F6: GOTO 0F5
00F7: NOP
00F8: NOP
.................... *datovy=input(PRIJIMAC);
00F9: MOVF 1D,W
00FA: MOVWF 04
00FB: BSF 03.5
00FC: BSF 05.3
00FD: MOVLW 00
00FE: BCF 03.5
00FF: BTFSC 05.3
0100: MOVLW 01
0101: MOVWF 00
....................
.................... // Prenasim bity
.................... for (i=0; i<4; i++)
0102: CLRF 1F
0103: MOVF 1F,W
0104: SUBLW 03
0105: BTFSS 03.0
0106: GOTO 128
.................... {
.................... delay_us(2*IMPULS);
0107: MOVLW A6
0108: MOVWF 0C
0109: DECFSZ 0C,F
010A: GOTO 109
010B: NOP
.................... *data >>= 1;
010C: MOVF 1E,W
010D: MOVWF 04
010E: BCF 03.0
010F: RRF 00,W
0110: MOVWF 0C
0111: MOVWF 00
.................... if (input(PRIJIMAC)) *data +=0b1000;
0112: BSF 03.5
0113: BSF 05.3
0114: BCF 03.5
0115: BTFSS 05.3
0116: GOTO 11C
0117: MOVF 1E,W
0118: MOVWF 04
0119: MOVLW 08
011A: ADDWF 00,W
011B: MOVWF 00
....................
.................... #IFDEF DEBUG
.................... output_bit(DEBUG,tmp);
011C: BTFSC 20.0
011D: GOTO 120
011E: BCF 05.2
011F: GOTO 121
0120: BSF 05.2
0121: BSF 03.5
0122: BCF 05.2
.................... tmp=!tmp;
0123: MOVLW 01
0124: BCF 03.5
0125: XORWF 20,F
.................... #ELSE
.................... delay_us(20);
.................... #ENDIF
.................... }
0126: INCF 1F,F
0127: GOTO 103
....................
.................... return FALSE;
0128: MOVLW 00
0129: MOVWF 0D
012A: RETLW 00
.................... }
....................
....................
.................... // Prijme datovy ramec
.................... // Pokud nastane chyba vraci TRUE
.................... int8 prijmi_ramec(int8* kanal, int8* data)
.................... {
.................... int8 datovy;
.................... int8 suma;
....................
.................... // Cekej na synchronizacni nibble
.................... do
.................... {
.................... if (prijmi_nibble(&datovy, data)) return 1; // chyba timout
012B: MOVLW 1B
012C: MOVWF 1D
012D: MOVF 1A,W
012E: MOVWF 1E
012F: CALL 0D8
0130: MOVF 0D,F
0131: BTFSC 03.2
0132: GOTO 136
0133: MOVLW 01
0134: MOVWF 0D
0135: GOTO 186
.................... }
.................... while(datovy);
0136: MOVF 1B,F
0137: BTFSS 03.2
0138: GOTO 12B
....................
.................... // Zkontroluj magickou hodnotu
.................... if (*data != SYNC_NIBBLE) return 2; // chyba magickeho kodu ramce
0139: MOVF 1A,W
013A: MOVWF 04
013B: MOVF 00,W
013C: SUBLW 0F
013D: BTFSC 03.2
013E: GOTO 142
013F: MOVLW 02
0140: MOVWF 0D
0141: GOTO 186
....................
.................... // Prijmi cislo kanalu
.................... if (prijmi_nibble(&datovy, kanal)) return 1; // chyba timeout
0142: MOVLW 1B
0143: MOVWF 1D
0144: MOVF 19,W
0145: MOVWF 1E
0146: CALL 0D8
0147: MOVF 0D,F
0148: BTFSC 03.2
0149: GOTO 14D
014A: MOVLW 01
014B: MOVWF 0D
014C: GOTO 186
.................... if (!datovy) return 3; // chyba typu nibblu
014D: MOVF 1B,F
014E: BTFSS 03.2
014F: GOTO 153
0150: MOVLW 03
0151: MOVWF 0D
0152: GOTO 186
....................
.................... // Prijmi data
.................... if (prijmi_nibble(&datovy, data)) return 1; // chyba timeout
0153: MOVLW 1B
0154: MOVWF 1D
0155: MOVF 1A,W
0156: MOVWF 1E
0157: CALL 0D8
0158: MOVF 0D,F
0159: BTFSC 03.2
015A: GOTO 15E
015B: MOVLW 01
015C: MOVWF 0D
015D: GOTO 186
.................... if (!datovy) return 3; // chyba typu nibblu
015E: MOVF 1B,F
015F: BTFSS 03.2
0160: GOTO 164
0161: MOVLW 03
0162: MOVWF 0D
0163: GOTO 186
....................
.................... // Prijmi zabezpeceni
.................... if (prijmi_nibble(&datovy, &suma)) return 1; // chyba timeout
0164: MOVLW 1B
0165: MOVWF 1D
0166: MOVLW 1C
0167: MOVWF 1E
0168: CALL 0D8
0169: MOVF 0D,F
016A: BTFSC 03.2
016B: GOTO 16F
016C: MOVLW 01
016D: MOVWF 0D
016E: GOTO 186
.................... if (!datovy) return 3; // chyba typu nibblu
016F: MOVF 1B,F
0170: BTFSS 03.2
0171: GOTO 175
0172: MOVLW 03
0173: MOVWF 0D
0174: GOTO 186
....................
.................... // Zkontroluj kontrolni soucet
....................
....................
.................... //lcd_gotoxy(1,1);
.................... //printf(lcd_putc,"R:%3U %3U %3U ",*kanal,*data,suma);
.................... //delay_ms(1000);
....................
....................
.................... if (((*kanal+*data) & 0b1111) != suma) return 3; // chyba kontrolniho souctu
0175: MOVF 19,W
0176: MOVWF 04
0177: MOVF 00,W
0178: MOVWF 1D
0179: MOVF 1A,W
017A: MOVWF 04
017B: MOVF 00,W
017C: ADDWF 1D,W
017D: ANDLW 0F
017E: SUBWF 1C,W
017F: BTFSC 03.2
0180: GOTO 184
0181: MOVLW 03
0182: MOVWF 0D
0183: GOTO 186
....................
.................... return 0;
0184: MOVLW 00
0185: MOVWF 0D
0186: GOTO 1FA (RETURN)
.................... }
....................
....................
....................
.................... int8 x,y;
.................... int8 xc,yc; // pocitadla aktualizace x a y
.................... int e1,e2,e3,e4; // pocitadla chyb - ladici
....................
.................... void main()
.................... {
*
01CE: CLRF 04
01CF: MOVLW 1F
01D0: ANDWF 03,F
.................... lcd_init(); // zinicializuj LCD display
01D1: GOTO 056
.................... delay_ms(5);
01D2: MOVLW 05
01D3: MOVWF 1C
01D4: CALL 015
.................... printf(lcd_putc,"Ahoj...");
*
000C: BCF 0A.0
000D: BCF 0A.1
000E: BCF 0A.2
000F: ADDWF 02,F
0010: RETLW 41
0011: RETLW 68
0012: RETLW 6F
0013: RETLW 6A
0014: RETLW 00
*
01D5: CLRF 19
01D6: MOVF 19,W
01D7: CALL 00C
01D8: INCF 19,F
01D9: MOVWF 1B
01DA: CALL 0A0
01DB: MOVLW 04
01DC: SUBWF 19,W
01DD: BTFSS 03.2
01DE: GOTO 1D6
01DF: MOVLW 03
01E0: MOVWF 1A
01E1: MOVLW 2E
01E2: MOVWF 1B
01E3: CALL 0A0
01E4: DECFSZ 1A,F
01E5: GOTO 1E1
.................... delay_ms(300);
01E6: MOVLW 02
01E7: MOVWF 19
01E8: MOVLW 96
01E9: MOVWF 1C
01EA: CALL 015
01EB: DECFSZ 19,F
01EC: GOTO 1E8
....................
.................... x = 0;
01ED: CLRF 0E
.................... y = 0;
01EE: CLRF 0F
.................... xc=0;
01EF: CLRF 10
.................... yc=0;
01F0: CLRF 11
.................... e1=0;
01F1: CLRF 12
.................... e2=0;
01F2: CLRF 13
.................... e3=0;
01F3: CLRF 14
.................... e4=0;
01F4: CLRF 15
....................
.................... while (true)
.................... {
.................... int8 kanal, data, e;
.................... /* int8 kanal, data, suma;
.................... int1 tmp;
.................... int8 datovy;
....................
.................... decoder:
....................
.................... if (prijmi_nibble(&datovy,&kanal)) goto decoder;
.................... if (datovy) goto decoder;
....................
.................... // if (kanal!=15) {e1++; goto decoder;};
.................... if (prijmi_nibble(&datovy, &kanal)) goto decoder; // nacti identifikator osy
....................
.................... if (prijmi_nibble(&datovy, &data)) goto decoder; // nacti 1. nibble; pri chybe zacni znovu
.................... if (prijmi_nibble(&datovy, &suma)) goto decoder; // nacti 2. nibble; pri chybe zacni znovu
.................... if (((kanal+data) & 0b1111) != suma) {e1++; goto decoder;} // zacni znovu, pokud jsou ruzne nibble
....................
.................... */
.................... e = prijmi_ramec(&kanal,&data);
01F5: MOVLW 16
01F6: MOVWF 19
01F7: MOVLW 17
01F8: MOVWF 1A
01F9: GOTO 12B
01FA: MOVF 0D,W
01FB: MOVWF 18
.................... //lcd_gotoxy(1,1);
.................... //printf(lcd_putc,"Q:%3U %3U %3U ",kanal,data,e);
.................... //delay_ms(1000);
.................... if (!e)
01FC: MOVF 18,F
01FD: BTFSS 03.2
01FE: GOTO 210
.................... switch (kanal) // rozeskoc se podle adresy osy
01FF: MOVLW 01
0200: SUBWF 16,W
0201: ADDLW FD
0202: BTFSC 03.0
0203: GOTO 210
0204: ADDLW 03
0205: GOTO 2A8
.................... {
.................... case OSA_X:
.................... {
.................... x=data;
0206: MOVF 17,W
0207: MOVWF 0E
.................... xc++;
0208: INCF 10,F
.................... break;
0209: GOTO 210
.................... };
.................... case OSA_Y:
.................... {
.................... y=data;
020A: MOVF 17,W
020B: MOVWF 0F
.................... yc++;
020C: INCF 11,F
.................... break;
020D: GOTO 210
.................... };
.................... case TLs:
.................... {
.................... e4++;
020E: INCF 15,F
.................... break;
020F: GOTO 210
.................... };
.................... };
*
02A8: BCF 0A.0
02A9: BSF 0A.1
02AA: BCF 0A.2
02AB: ADDWF 02,F
02AC: GOTO 206
02AD: GOTO 20A
02AE: GOTO 20E
....................
.................... // ladici vypisy
.................... lcd_gotoxy(1,1); // vytiskni X a Y
*
0210: MOVLW 01
0211: MOVWF 1C
0212: MOVWF 1D
0213: CALL 08F
.................... printf(lcd_putc,"X%2U %3U%3U%3U ", x, xc, e1, e);
*
019C: MOVF 0D,W
019D: MOVF 19,W
019E: MOVWF 1B
019F: MOVLW 64
01A0: MOVWF 1C
01A1: CALL 187
01A2: MOVF 0C,W
01A3: MOVWF 19
01A4: MOVF 0D,W
01A5: MOVLW 30
01A6: BTFSS 03.2
01A7: GOTO 1AF
01A8: BTFSC 1A.0
01A9: BSF 1A.3
01AA: BTFSC 1A.3
01AB: GOTO 1B5
01AC: BTFSC 1A.4
01AD: MOVLW 20
01AE: GOTO 1B1
01AF: BCF 1A.3
01B0: BCF 1A.4
01B1: ADDWF 0D,F
01B2: MOVF 0D,W
01B3: MOVWF 1B
01B4: CALL 0A0
01B5: MOVF 19,W
01B6: MOVWF 1B
01B7: MOVLW 0A
01B8: MOVWF 1C
01B9: CALL 187
01BA: MOVF 0C,W
01BB: MOVWF 19
01BC: MOVF 0D,W
01BD: MOVLW 30
01BE: BTFSS 03.2
01BF: GOTO 1C4
01C0: BTFSC 1A.3
01C1: GOTO 1C8
01C2: BTFSC 1A.4
01C3: MOVLW 20
01C4: ADDWF 0D,F
01C5: MOVF 0D,W
01C6: MOVWF 1B
01C7: CALL 0A0
01C8: MOVLW 30
01C9: ADDWF 19,F
01CA: MOVF 19,W
01CB: MOVWF 1B
01CC: CALL 0A0
01CD: RETLW 00
*
0214: MOVLW 58
0215: MOVWF 1B
0216: CALL 0A0
0217: MOVF 0E,W
0218: MOVWF 19
0219: MOVLW 11
021A: MOVWF 1A
021B: CALL 19C
021C: MOVLW 20
021D: MOVWF 1B
021E: CALL 0A0
021F: MOVF 10,W
0220: MOVWF 19
0221: MOVLW 10
0222: MOVWF 1A
0223: CALL 19C
0224: MOVF 12,W
0225: MOVWF 19
0226: MOVLW 10
0227: MOVWF 1A
0228: CALL 19C
0229: MOVF 18,W
022A: MOVWF 19
022B: MOVLW 10
022C: MOVWF 1A
022D: CALL 19C
022E: MOVLW 20
022F: MOVWF 1B
0230: CALL 0A0
0231: MOVLW 20
0232: MOVWF 1B
0233: CALL 0A0
.................... lcd_gotoxy(1,2);
0234: MOVLW 01
0235: MOVWF 1C
0236: MOVLW 02
0237: MOVWF 1D
0238: CALL 08F
.................... printf(lcd_putc,"Y%2U %3U%3U%3U ", y, yc, e3, data);
0239: MOVLW 59
023A: MOVWF 1B
023B: CALL 0A0
023C: MOVF 0F,W
023D: MOVWF 19
023E: MOVLW 11
023F: MOVWF 1A
0240: CALL 19C
0241: MOVLW 20
0242: MOVWF 1B
0243: CALL 0A0
0244: MOVF 11,W
0245: MOVWF 19
0246: MOVLW 10
0247: MOVWF 1A
0248: CALL 19C
0249: MOVF 14,W
024A: MOVWF 19
024B: MOVLW 10
024C: MOVWF 1A
024D: CALL 19C
024E: MOVF 17,W
024F: MOVWF 19
0250: MOVLW 10
0251: MOVWF 1A
0252: CALL 19C
0253: MOVLW 20
0254: MOVWF 1B
0255: CALL 0A0
0256: MOVLW 20
0257: MOVWF 1B
0258: CALL 0A0
....................
.................... // ovladani serv
.................... output_high(SERVO_X);
0259: BSF 03.5
025A: BCF 05.0
025B: BCF 03.5
025C: BSF 05.0
.................... delay_ms(1);
025D: MOVLW 01
025E: MOVWF 1C
025F: CALL 015
.................... for (data=x; data--; data>0)
0260: MOVF 0E,W
0261: MOVWF 17
0262: MOVF 17,W
0263: DECF 17,F
0264: XORLW 00
0265: BTFSC 03.2
0266: GOTO 271
.................... delay_us(65);
0267: MOVLW 15
0268: MOVWF 0C
0269: DECFSZ 0C,F
026A: GOTO 269
026B: NOP
026C: MOVF 17,F
026D: BTFSS 03.2
026E: GOTO 270
026F: MOVLW 00
0270: GOTO 262
.................... output_low(SERVO_X);
0271: BSF 03.5
0272: BCF 05.0
0273: BCF 03.5
0274: BCF 05.0
....................
.................... output_high(SERVO_Y);
0275: BSF 03.5
0276: BCF 05.1
0277: BCF 03.5
0278: BSF 05.1
.................... delay_ms(1);
0279: MOVLW 01
027A: MOVWF 1C
027B: CALL 015
.................... for (data=y; data--; data>0)
027C: MOVF 0F,W
027D: MOVWF 17
027E: MOVF 17,W
027F: DECF 17,F
0280: XORLW 00
0281: BTFSC 03.2
0282: GOTO 28D
.................... delay_us(65);
0283: MOVLW 15
0284: MOVWF 0C
0285: DECFSZ 0C,F
0286: GOTO 285
0287: NOP
0288: MOVF 17,F
0289: BTFSS 03.2
028A: GOTO 28C
028B: MOVLW 00
028C: GOTO 27E
.................... output_low(SERVO_Y);
028D: BSF 03.5
028E: BCF 05.1
028F: BCF 03.5
0290: BCF 05.1
....................
.................... for (data=30-x-y; data--; data>0)
0291: MOVF 0E,W
0292: SUBLW 1E
0293: MOVWF 0D
0294: MOVF 0F,W
0295: SUBWF 0D,W
0296: MOVWF 17
0297: MOVF 17,W
0298: DECF 17,F
0299: XORLW 00
029A: BTFSC 03.2
029B: GOTO 2A6
.................... delay_us(65);
029C: MOVLW 15
029D: MOVWF 0C
029E: DECFSZ 0C,F
029F: GOTO 29E
02A0: NOP
02A1: MOVF 17,F
02A2: BTFSS 03.2
02A3: GOTO 2A5
02A4: MOVLW 00
02A5: GOTO 297
....................
.................... }
02A6: GOTO 1F5
.................... }
....................
02A7: SLEEP
....................
....................
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/05/MAIN.PJT
0,0 → 1,32
[PROJECT]
Target=main.HEX
Development_Mode=
Processor=0x684A
ToolSuite=CCS
 
[Directories]
Include=C:\Program Files\PICC\Devices;C:\Program Files\PICC\Dri;
Library=
LinkerScript=
 
[Target Data]
FileList=main.c;
BuildTool=CCSC
OptionString=-p +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
 
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/05/MAIN.STA
0,0 → 1,42
 
ROM used: 687 (67%)
337 (33%) including unused fragments
 
1 Average locations per line
5 Average locations per statement
 
RAM used: 12 (18%) at main() level
25 (37%) worst case
 
Lines Stmts % Files
----- ----- --- -----
201 88 66 d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\main.c
5 0 0 d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\main.h
111 0 0 C:\Program Files\PICC\Devices\16F84.h
6 0 0 d:\@kaklik\programy\pic_c\prenos\letadlo\common.h
272 46 21 d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\MYLCD.C
----- -----
1190 268 Total
 
Page ROM % RAM Functions:
---- --- --- --- ----------
0 21 3 1 delay_ms
0 8 1 0 @const22
0 22 3 3 lcd_send_nibble
0 22 3 2 lcd_send_byte
0 57 8 2 lcd_init
0 17 2 4 lcd_gotoxy
0 56 8 1 lcd_putc
0 83 12 6 prijmi_nibble
0 92 13 7 prijmi_ramec
0 218 32 2 main
0 9 1 0 @const10159
0 7 1 0 @goto10180
0 21 3 3 @DIV88
0 50 7 2 @PRINTF_U_150
 
Segment Used Free
--------- ---- ----
0000-0003 4 0
0004-03FF 683 337
 
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/05/MAIN.SYM
0,0 → 1,72
00C @SCRATCH
00D @SCRATCH
00D _RETURN_
00E x
00F y
010 xc
011 yc
012 e1
013 e2
014 e3
015 e4
016 kanal
017 Data
018 e
019 lcd_init.i
019 prijmi_ramec.kanal
019 @PRINTF_U_150.P1
019 main.@SCRATCH
01A prijmi_ramec.Data
01A @PRINTF_U_150.P1
01A lcd_init.@SCRATCH
01A main.@SCRATCH
01B lcd_putc.c
01B prijmi_ramec.datovy
01B @DIV88.P1
01C delay_ms.P1
01C lcd_gotoxy.x
01C prijmi_ramec.suma
01C @DIV88.P1
01D lcd_gotoxy.y
01D prijmi_nibble.datovy
01D prijmi_ramec.@SCRATCH
01D @DIV88.@SCRATCH
01E lcd_gotoxy.Adr
01E prijmi_nibble.Data
01E prijmi_ramec.@SCRATCH
01F prijmi_nibble.i
01F lcd_gotoxy.@SCRATCH
01F prijmi_ramec.@SCRATCH
020 lcd_send_byte.Adr
020.0 prijmi_nibble.tmp
021 lcd_send_byte.n
021 prijmi_nibble.@SCRATCH
022 lcd_send_nibble.n
022 prijmi_nibble.@SCRATCH
023 lcd_send_nibble.@SCRATCH
024 lcd_send_nibble.@SCRATCH
delay_us.P1
-002 LCD_INIT_STRING
lcd_putc2.Data
 
0015 delay_ms
0004 @const22
002A lcd_send_nibble
0040 lcd_send_byte
0056 lcd_init
008F lcd_gotoxy
00A0 lcd_putc
00D8 prijmi_nibble
012B prijmi_ramec
01CE main
000C @const10159
02A8 @goto10180
0187 @DIV88
019C @PRINTF_U_150
 
Project Files:
d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\main.c
d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\main.h
C:\Program Files\PICC\Devices\16F84.h
d:\@kaklik\programy\pic_c\prenos\letadlo\common.h
d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\MYLCD.C
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/05/MAIN.TRE
0,0 → 1,702
ÀÄmain
ÀÄmain 0/218 Ram=2
ÃÄ??0??
ÃÄlcd_init 0/57 Ram=2
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@const22 0/8 Ram=0
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄdelay_ms 0/21 Ram=1
ÃÄdelay_ms 0/21 Ram=1
ÃÄ@const10159 0/9 Ram=0
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄdelay_ms 0/21 Ram=1
ÃÄprijmi_ramec 0/92 Ram=7
³ ÃÄprijmi_nibble 0/83 Ram=6
³ ÃÄprijmi_nibble 0/83 Ram=6
³ ÃÄprijmi_nibble 0/83 Ram=6
³ ÀÄprijmi_nibble 0/83 Ram=6
ÃÄ@goto10180 0/7 Ram=0
ÃÄlcd_gotoxy 0/17 Ram=4
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_150 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_150 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_150 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_150 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_gotoxy 0/17 Ram=4
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_150 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_150 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_150 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_150 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄdelay_ms 0/21 Ram=1
ÀÄdelay_ms 0/21 Ram=1
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/05/MYLCD.C
0,0 → 1,271
// LCD modul pro ovladani dvouradkoveho LCD modulu se standardnim Hitachi radicem
// (c)miho 2002
//
// Historie:
//
// 0.0 Uvodni verze se snadnou definici portu LCD displeje
//
//
// Funkce:
//
// lcd_init() inicializuje LCD displej a porty, nutno volat jako prvni
//
// lcd_putc(c) zapis snaku do lcd displeje, zpracovava nasledujici ridici znaky
// \f = \x0C - nova stranka - smazani displeje
// \n = \x0A - odradkovani (prechod na druhou radku)
// \b = \x08 - backspace - posunuti kurzoru o 1 pozici zpet
// \r = \x0D - goto home to position 1,1
// \0 .. \7 - definovatelne znaky v pozicich 0 az 7 v CGRAM
// \20 .. \27 - alternativne zapsane znaky (oktalove) v pozicich 0 az 7 CGRAM
// Pozor na to, ze funkce printf konci tisk pokud narazi na \0 (konec retezce)
//
// lcd_gotoxy(x,y) presune kurzor na uvedenou adresu
// nekontroluje parametry
//
// lcd_cursor_on zapne kurzor
// lcd_cursor_off vypne kurzor
//
// lcd_define_char(Index, Def) Makro, ktere definuje znaky od pozice Index obsahem definicniho
// retezce Def. Kazdych 8 znaku retezce Def definuje dalsi znak v CGRAM.
// Kapacita CGRAM je celkem 8 znaku s indexem 0 az 7.
// Na konci se provede lcd_gotoxy(1,1).
// Na konci teto knihovny je priklad pouziti definovanych znaku
//
// Definice portu:
//
// #DEFINE LCD_RS PIN_B2 // rizeni registru LCD displeje
// #DEFINE LCD_E PIN_B1 // enable LCD displeje
// #DEFINE LCD_DATA_LSB PIN_C2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
 
 
 
 
// Privatni sekce, cist jen v pripade, ze neco nefunguje
 
 
 
 
// Generovane defince portu pro ucely teto knihovny aby kod generoval spravne IO operace a soucasne
// bylo mozne jednoduse deklarovat pripojene piny LCD displeje pri pouziti teto knihovny. Problem spociva
// v tom, ze se musi spravne ridit smery portu a soucasne datovy port zabira jen 4 bity ze zadaneho portu
//
#DEFINE LCD_SHIFT (LCD_DATA_LSB&7) // pocet bitu posuvu dataoveho kanalu v datovem portu
#DEFINE LCD_PORT (LCD_DATA_LSB>>3) // adresa LCD datoveho portu
#DEFINE LCD_TRIS (LCD_PORT+0x80) // adresa prislusneho TRIS registru
#DEFINE LCD_MASK (0xF<<LCD_SHIFT) // maska platnych bitu
//
#IF LCD_SHIFT>4 // kontrola mezi
#ERROR LCD data port LSB bit not in range 0..4
#ENDIF
 
 
// Definice konstant pro LCD display
//
#define LCD_CURSOR_ON_ 0x0E // kurzor jako blikajici radka pod znakem
#define LCD_CURSOR_OFF_ 0x0C // zadny kurzor
#define LCD_LINE_2 0x40 // adresa 1. znaku 2. radky
 
 
// Definice rezimu LCD displeje
//
BYTE const LCD_INIT_STRING[4] =
{
0x28, // intrfejs 4 bity, 2 radky, font 5x7
LCD_CURSOR_OFF_, // display on, kurzor off,
0x01, // clear displeje
0x06 // inkrement pozice kurzoru (posun kurzoru doprava)
};
 
 
// Odesle nibble do displeje (posle data a klikne signalem e)
//
void lcd_send_nibble( BYTE n )
{
*LCD_PORT = (*LCD_PORT & ~LCD_MASK) | ((n << LCD_SHIFT) & LCD_MASK); // nastav datove bity portu a ostatni zachovej
output_bit(LCD_E,1); // vzestupna hrana
delay_us(1); // pockej alespon 450ns od e nebo alespon 195ns od dat
output_bit(LCD_E,0); // sestupna hrana (minimalni perioda e je 1us)
}
 
 
// Odesle bajt do registru LCD
//
// Pokud je Adr=0 .. instrukcni registr
// Pokud je Adr=1 .. datovy registr
//
void lcd_send_byte( BOOLEAN Adr, BYTE n )
{
output_bit(LCD_RS,Adr); // vyber registr
swap(n);
lcd_send_nibble(n); // posli horni pulku bajtu
swap(n);
lcd_send_nibble(n); // posli spodni pulku bajtu
delay_us(40); // minimalni doba na provedeni prikazu
}
 
 
// Provede inicializaci LCD displeje, smaze obsah a nastavi mod displeje
//
// Tato procedura se musi volat pred pouzitim ostatnich lcd_ procedur
//
void lcd_init()
{
 
int i; // pocitadlo cyklu
 
delay_ms(20); // spozdeni pro provedeni startu displeje po zapnuti napajeni
 
*LCD_TRIS = *LCD_TRIS & ~LCD_MASK; // nuluj odpovidajici bity tris registru datoveho portu LCD
 
output_bit(LCD_RS,0); // nastav jako vystup a nastav klidovy stav
output_bit(LCD_E,0); // nastav jako vystup a nastav klidovy stav
 
for (i=0; i<3; i++) // nastav lcd do rezimu 8 bitu sbernice
{
delay_ms(2); // muze byt rozdelany prenos dat (2x 4 bity) nebo pomaly povel
lcd_send_nibble(3); // rezim 8 bitu
}
 
delay_us(40); // cas na zpracovani
lcd_send_nibble(2); // nastav rezim 4 bitu (plati od nasledujiciho prenosu)
delay_us(40); // cas na zpracovani
 
for (i=0;i<3;i++) // proved inicializaci (nastaveni modu, smazani apod)
{
lcd_send_byte(0,LCD_INIT_STRING[i]);
delay_ms(2);
}
}
 
 
// Proved presun kurzoru
//
// Pozice 1.1 je domu
//
void lcd_gotoxy( BYTE x, BYTE y)
{
 
BYTE Adr;
 
Adr=x-1;
if(y==2)
Adr+=LCD_LINE_2;
 
lcd_send_byte(0,0x80|Adr);
}
 
 
// Zapis znaku na displej, zpracovani ridicich znaku
//
void lcd_putc( char c)
{
 
switch (c)
{
case '\f' : lcd_send_byte(0,1); // smaz displej
delay_ms(2);
break;
case '\n' : lcd_gotoxy(1,2); break; // presun se na 1. znak 2. radky
case '\r' : lcd_gotoxy(1,1); break; // presun home
case '\b' : lcd_send_byte(0,0x10); break; // posun kurzor o 1 zpet
default : if (c<0x20) c&=0x7; // preklopeni definovatelnych znaku na rozsah 0 az 0x1F
lcd_send_byte(1,c); break; // zapis znak
}
}
 
 
// Zapni kurzor
//
void lcd_cursor_on()
{
lcd_send_byte(0,LCD_CURSOR_ON_);
}
 
 
// Vypni kurzor
//
void lcd_cursor_off()
{
lcd_send_byte(0,LCD_CURSOR_OFF_);
}
 
 
// Definice vlastnich fontu
//
// Vlastnich definic muze byt jen 8 do pozic 0 az 7 pameti CGRAM radice lcd displeje
// Pro snadne definovani jsou pripraveny nasledujici definice a na konci souboru je uveden
// priklad pouziti definovanych znaku.
 
 
// Pomocna procedura pro posilani ridicich dat do radice displeje
//
void lcd_putc2(int Data)
{
lcd_send_byte(1,Data);
}
 
 
// Pomocne definice pro programovani obsahu CGRAM
//
#DEFINE lcd_define_start(Code) lcd_send_byte(0,0x40+(Code<<3)); delay_ms(2)
#DEFINE lcd_define_def(String) printf(lcd_putc2,String);
#DEFINE lcd_define_end() lcd_send_byte(0,3); delay_ms(2)
 
 
// Vlastni vykonne makro pro definovani fontu do pozice Index CGRAM s definicnim retezcem Def
//
#DEFINE lcd_define_char(Index, Def) lcd_define_start(Index); lcd_define_def(Def); lcd_define_end();
 
 
// Pripravene definice fontu vybranych znaku
// V tabulce nesmi byt 00 (konec retezce v printf()), misto toho davame 80
//
#DEFINE LCD_CHAR_BAT100 "\x0E\x1F\x1F\x1F\x1F\x1F\x1F\x1F" /* symbol plne baterie */
#DEFINE LCD_CHAR_BAT50 "\x0E\x1F\x11\x11\x13\x17\x1F\x1F" /* symbol polovicni baterie */
#DEFINE LCD_CHAR_BAT0 "\x0E\x1F\x11\x11\x11\x11\x11\x1F" /* symbol vybite baterie */
#DEFINE LCD_CHAR_LUA "\x04\x0E\x11\x11\x1F\x11\x11\x80" /* A s carkou */
#DEFINE LCD_CHAR_LLA "\x01\x02\x0E\x01\x1F\x11\x0F\x80" /* a s carkou */
#DEFINE LCD_CHAR_HUC "\x0A\x0E\x11\x10\x10\x11\x0E\x80" /* C s hackem */
#DEFINE LCD_CHAR_HLC "\x0A\x04\x0E\x10\x10\x11\x0E\x80" /* c s hackem */
#DEFINE LCD_CHAR_HUD "\x0A\x1C\x12\x11\x11\x12\x1C\x80" /* D s hackem */
#DEFINE LCD_CHAR_HLD "\x05\x03\x0D\x13\x11\x11\x0F\x80" /* d s hackem */
#DEFINE LCD_CHAR_LUE "\x04\x1F\x10\x10\x1E\x10\x1F\x80" /* E s carkou */
#DEFINE LCD_CHAR_LLE "\x01\x02\x0E\x11\x1F\x10\x0E\x80" /* e s carkou */
#DEFINE LCD_CHAR_HUE "\x0A\x1F\x10\x1E\x10\x10\x1F\x80" /* E s hackem */
#DEFINE LCD_CHAR_HLE "\x0A\x04\x0E\x11\x1F\x10\x0E\x80" /* e s hackem */
#DEFINE LCD_CHAR_LUI "\x04\x0E\x04\x04\x04\x04\x0E\x80" /* I s carkou */
#DEFINE LCD_CHAR_LLI "\x02\x04\x80\x0C\x04\x04\x0E\x80" /* i s carkou */
#DEFINE LCD_CHAR_HUN "\x0A\x15\x11\x19\x15\x13\x11\x80" /* N s hackem */
#DEFINE LCD_CHAR_HLN "\x0A\x04\x16\x19\x11\x11\x11\x80" /* n s hackem */
#DEFINE LCD_CHAR_LUO "\x04\x0E\x11\x11\x11\x11\x0E\x80" /* O s carkou */
#DEFINE LCD_CHAR_LLO "\x02\x04\x0E\x11\x11\x11\x0E\x80" /* o s carkou */
#DEFINE LCD_CHAR_HUR "\x0A\x1E\x11\x1E\x14\x12\x11\x80" /* R s hackem */
#DEFINE LCD_CHAR_HLR "\x0A\x04\x16\x19\x10\x10\x10\x80" /* r s hackem */
#DEFINE LCD_CHAR_HUS "\x0A\x0F\x10\x0E\x01\x01\x1E\x80" /* S s hackem */
#DEFINE LCD_CHAR_HLS "\x0A\x04\x0E\x10\x0E\x01\x1E\x80" /* s s hackem */
#DEFINE LCD_CHAR_HUT "\x0A\x1F\x04\x04\x04\x04\x04\x80" /* T s hackem */
#DEFINE LCD_CHAR_HLT "\x0A\x0C\x1C\x08\x08\x09\x06\x80" /* t s hackem */
#DEFINE LCD_CHAR_LUU "\x02\x15\x11\x11\x11\x11\x0E\x80" /* U s carkou */
#DEFINE LCD_CHAR_LLU "\x02\x04\x11\x11\x11\x13\x0D\x80" /* u s carkou */
#DEFINE LCD_CHAR_CUU "\x06\x17\x11\x11\x11\x11\x0E\x80" /* U s krouzkem */
#DEFINE LCD_CHAR_CLU "\x06\x06\x11\x11\x11\x11\x0E\x80" /* u s krouzkem */
#DEFINE LCD_CHAR_LUY "\x02\x15\x11\x0A\x04\x04\x04\x80" /* Y s carkou */
#DEFINE LCD_CHAR_LLY "\x02\x04\x11\x11\x0F\x01\x0E\x80" /* y s carkou */
#DEFINE LCD_CHAR_HUZ "\x0A\x1F\x01\x02\x04\x08\x1F\x80" /* Z s hackem */
#DEFINE LCD_CHAR_HLZ "\x0A\x04\x1F\x02\x04\x08\x1F\x80" /* z s hackem */
 
 
// Priklad pouziti definovanych znaku
//
//
//void lcd_sample()
//{
// lcd_define_char(0,LCD_CHAR_BAT50); // Priklad definice znaku baterie do pozice 0
// lcd_define_char(2,LCD_CHAR_HLE LCD_CHAR_LUI); // Priklad definice znaku e s hackem a I s carkou od pozice 2
// // vsimnete si, ze neni carka mezi retezci s definici (oba retezce definuji
// // jediny definicni retezec)
// printf(lcd_putc,"\fZnaky:\20\22\23"); // priklad vypisu znaku z pozice 0, 2 a 3
// delay_ms(1000);
// lcd_define_char(0,LCD_CHAR_BAT0); // Predefinovani tvaru znaku v pozici 0
// delay_ms(1000);
//}
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/05/PRG.BAT
0,0 → 1,6
call picpgr stop
call picpgr erase pic16f84
call picpgr program main.hex hex pic16f84
call picpgr run
pause
call picpgr stop
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/05/PRG.PIF
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
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/05/RUN.BAT
0,0 → 1,5
call picpgr run
pause
call picpgr stop
pause
run.bat
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/05/VC.MNU
0,0 → 1,4
R: Run
picpgr run
S: Stop
picpgr stop
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/05/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
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/06/!____!.TXT
0,0 → 1,0
chodici verze
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/06/A.BAT
0,0 → 1,6
call picpgr stop
call picpgr erase pic16F84
call picpgr program main.hex hex pic16F84
call picpgr run
pause
call picpgr stop
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/06/MAIN.BAK
0,0 → 1,182
// Prijimac
 
#DEFINE DEBUG PIN_A2 // ladici pomocne synchronizacni impulzy
 
#include "main.h"
#include "..\common.h"
 
#DEFINE LCD_RS PIN_B1 // rizeni registru LCD displeje
#DEFINE LCD_E PIN_B0 // enable LCD displeje
#DEFINE LCD_DATA_LSB PIN_B2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
#INCLUDE "MYLCD.C"
 
#DEFINE PRIJIMAC PIN_A3 // pin na ktery je pripojen prijimac
#DEFINE SERVO_X PIN_A0 // pin na ktery je pripojeno servo
#DEFINE SERVO_Y PIN_A1
 
 
// Prijme datovy nibble vcetne zasynchronizovani
// Chybi dodelat timeout
int8 prijmi_nibble(int8* datovy, int8* data)
{
int8 i;
 
#IFDEF DEBUG
int1 tmp;
#ENDIF
 
*data=0;
 
// Cekam na dlouhou nulu
for (i=4; i>0; i--)
{
if (input(PRIJIMAC)) i=4;
delay_us(IMPULS/2);
}
 
// Cekam na jednicku (start ramce)
for (; !input(PRIJIMAC); )
{
}
 
// Ctu typ nibblu
delay_us(2*IMPULS+2*IMPULS/3);
*datovy=input(PRIJIMAC);
 
// Prenasim bity
for (i=0; i<4; i++)
{
delay_us(2*IMPULS);
*data >>= 1;
if (input(PRIJIMAC)) *data +=0b1000;
 
#IFDEF DEBUG
output_bit(DEBUG,tmp);
tmp=!tmp;
#ELSE
delay_us(20);
#ENDIF
}
 
return FALSE;
}
 
 
// Prijme datovy ramec
// Pokud nastane chyba vraci TRUE
int8 prijmi_ramec(int8* kanal, int8* data)
{
int8 datovy;
int8 suma;
 
// Cekej na synchronizacni nibble
do
{
if (prijmi_nibble(&datovy, data)) return 1; // chyba timout
}
while(datovy);
 
// Zkontroluj magickou hodnotu
if (*data != SYNC_NIBBLE) return 2; // chyba magickeho kodu ramce
 
// Prijmi cislo kanalu
if (prijmi_nibble(&datovy, kanal)) return 1; // chyba timeout
if (!datovy) return 3; // chyba typu nibblu
 
// Prijmi data
if (prijmi_nibble(&datovy, data)) return 1; // chyba timeout
if (!datovy) return 3; // chyba typu nibblu
 
// Prijmi zabezpeceni
if (prijmi_nibble(&datovy, &suma)) return 1; // chyba timeout
if (!datovy) return 3; // chyba typu nibblu
 
// Zkontroluj kontrolni soucet
 
 
//lcd_gotoxy(1,1);
//printf(lcd_putc,"R:%3U %3U %3U ",*kanal,*data,suma);
//delay_ms(1000);
 
 
if (((*kanal+*data) & 0b1111) != suma) return 3; // chyba kontrolniho souctu
 
return 0;
}
 
 
 
int8 x,y;
int8 xc,yc; // pocitadla aktualizace x a y
int e1,e2,e3,e4; // pocitadla chyb - ladici
 
void main()
{
lcd_init(); // zinicializuj LCD display
delay_ms(5);
printf(lcd_putc,"Ahoj...");
delay_ms(300);
 
x = 0;
y = 0;
xc=0;
yc=0;
e1=0;
e2=0;
e3=0;
e4=0;
 
while (true)
{
int8 kanal, data;
 
if (prijmi_ramec(&kanal,&data))
{
switch (kanal) // rozeskoc se podle adresy osy
{
case OSA_X:
{
x=data;
xc++;
break;
};
case OSA_Y:
{
y=data;
yc++;
break;
};
case TLs:
{
e4++;
break;
};
};
 
// ladici vypisy
lcd_gotoxy(1,1); // vytiskni X a Y
printf(lcd_putc,"X%2U %3U%3U%3U ", x, xc, e1, e2);
lcd_gotoxy(1,2);
printf(lcd_putc,"Y%2U %3U%3U%3U ", y, yc, e3, e4);
 
// ovladani serv
output_high(SERVO_X);
delay_ms(1);
for (data=x; data--; data>0)
delay_us(65);
output_low(SERVO_X);
 
output_high(SERVO_Y);
delay_ms(1);
for (data=y; data--; data>0)
delay_us(65);
output_low(SERVO_Y);
 
for (data=30-x-y; data--; data>0)
delay_us(65);
 
}
}
}
 
 
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/06/MAIN.C
0,0 → 1,177
// Prijimac
 
#DEFINE DEBUG PIN_A2 // ladici pomocne synchronizacni impulzy
 
#include "main.h"
#include "..\common.h"
 
#DEFINE LCD_RS PIN_B1 // rizeni registru LCD displeje
#DEFINE LCD_E PIN_B0 // enable LCD displeje
#DEFINE LCD_DATA_LSB PIN_B2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
#INCLUDE "MYLCD.C"
 
#DEFINE PRIJIMAC PIN_A3 // pin na ktery je pripojen prijimac
#DEFINE SERVO_X PIN_A0 // pin na ktery je pripojeno servo
#DEFINE SERVO_Y PIN_A1
 
 
// Prijme datovy nibble vcetne zasynchronizovani
// Chybi dodelat timeout
int8 prijmi_nibble(int8* datovy, int8* data)
{
int8 i;
 
#IFDEF DEBUG
int1 tmp;
#ENDIF
 
*data=0;
 
// Cekam na dlouhou nulu
for (i=4; i>0; i--)
{
if (input(PRIJIMAC)) i=4;
delay_us(IMPULS/2);
}
 
// Cekam na jednicku (start ramce)
for (; !input(PRIJIMAC); )
{
}
 
// Ctu typ nibblu
delay_us(2*IMPULS+2*IMPULS/3);
*datovy=input(PRIJIMAC);
 
// Prenasim bity
for (i=0; i<4; i++)
{
delay_us(2*IMPULS);
*data >>= 1;
if (input(PRIJIMAC)) *data +=0b1000;
 
#IFDEF DEBUG
output_bit(DEBUG,tmp);
tmp=!tmp;
#ELSE
delay_us(20);
#ENDIF
}
 
return FALSE;
}
 
 
// Prijme datovy ramec
// Pokud nastane chyba vraci kod chyby
int8 prijmi_ramec(int8* kanal, int8* data)
{
int8 datovy;
int8 suma;
 
// Cekej na synchronizacni nibble
do
{
if (prijmi_nibble(&datovy, data)) return 1; // chyba timout
}
while(datovy);
 
// Zkontroluj magickou hodnotu
if (*data != SYNC_NIBBLE) return 2; // chyba magickeho kodu ramce
 
// Prijmi cislo kanalu
if (prijmi_nibble(&datovy, kanal)) return 1; // chyba timeout
if (!datovy) return 3; // chyba typu nibblu
 
// Prijmi data
if (prijmi_nibble(&datovy, data)) return 1; // chyba timeout
if (!datovy) return 3; // chyba typu nibblu
 
// Prijmi zabezpeceni
if (prijmi_nibble(&datovy, &suma)) return 1; // chyba timeout
if (!datovy) return 3; // chyba typu nibblu
 
// Zkontroluj kontrolni soucet
if (((*kanal+*data) & 0b1111) != suma) return 3; // chyba kontrolniho souctu
 
return 0;
}
 
 
 
int8 x,y;
int8 xc,yc; // pocitadla aktualizace x a y
int e1,e2,e3,e4; // pocitadla chyb - ladici
 
void main()
{
lcd_init(); // zinicializuj LCD display
delay_ms(5);
printf(lcd_putc,"Ahoj...");
delay_ms(300);
 
x = 0;
y = 0;
xc = 0;
yc = 0;
e1 = 0;
e2 = 0;
e3 = 0;
e4 = 0;
 
while (true)
{
int8 kanal, data;
 
if (prijmi_ramec(&kanal,&data))
e1++;
else
{
switch (kanal) // rozeskoc se podle adresy osy
{
case OSA_X:
{
x=data;
xc++;
break;
};
case OSA_Y:
{
y=data;
yc++;
break;
};
case TLs:
{
e4++;
break;
};
};
 
// ladici vypisy
lcd_gotoxy(1,1); // vytiskni X a Y
printf(lcd_putc,"X%2U %3U%3U%3U ", x, xc, e1, e2);
lcd_gotoxy(1,2);
printf(lcd_putc,"Y%2U %3U%3U%3U ", y, yc, e3, e4);
 
// ovladani serv
output_high(SERVO_X);
delay_ms(1);
for (data=x; data--; data>0)
delay_us(65);
output_low(SERVO_X);
 
output_high(SERVO_Y);
delay_ms(1);
for (data=y; data--; data>0)
delay_us(65);
output_low(SERVO_Y);
 
for (data=30-x-y; data--; data>0)
delay_us(65);
 
}
}
}
 
 
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/06/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
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/06/MAIN.ERR
0,0 → 1,0
No Errors
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/06/MAIN.H
0,0 → 1,4
#include <16F84.h>
#use delay(clock=4000000)
#fuses XT,NOWDT,PUT
 
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/06/MAIN.HEX
0,0 → 1,89
:1000000000308A00CE2900000A108A100A118207E7
:1000100028340C34013406340A108A100A1182077D
:10002000413468346F346A3400341B308400000873
:100030000319292801308D008C018C0B1D288D0B94
:100040001C284A308C008C0B232800000000800BF9
:100050001A2800340608C339A200210D8C008C0D2B
:10006000FC308C050C083C392204860006148316EB
:100070000610000083120610831606108312003447
:100080009F08031D4528861046288614831686106F
:100090008312A00E2008A1002A20A00E2008A10093
:1000A0002A200D308C008C0B5328003414309B0018
:1000B0001520C3308316860583128610831686109A
:1000C0008312061083160610831298011808023C4A
:1000D000031C722802309B0015200330A1002A2047
:1000E000980A66280D308C008C0B74280230A10011
:1000F0002A200D308C008C0B7B2898011808023CBC
:10010000031C8E281808042099009F011908A000DC
:10011000402002309B001520980A7E28D229013009
:100120001B029D001C08023C031D982840309D07BF
:100130001D0880389E009F011E08A000402000344A
:100140001A088C000C300C020319B3280A300C0278
:100150000319BB280D300C020319C12808300C020A
:100160000319C628CB289F010130A000402002308F
:100170009B001520D72801309B0002309C008F2067
:10018000D72801309B009C008F20D7289F0110307A
:10019000A0004020D7281A081F3C031CD128073094
:1001A0009A0501309F001A08A0004020D72800348B
:1001B0001D088400800104309E009E080319EE286B
:1001C000831685158312851DE72804309E0029308B
:1001D0008C008C0BE92800009E03DD288316851512
:1001E0008312851DEE28DD308C008C0BF528000075
:1001F00000001C08840083168515003083128519C1
:10020000013080009E011E08033C031C2829A630F3
:100210008C008C0B092900001D0884000310000CC1
:100220008C008000831685158312851D1C291D08EE
:1002300084000830000780001F182029051121299B
:10024000051583160511013083129F069E0A0329A6
:1002500000308D0000341A309C0019089D00D82011
:100260008D080319362901308D0086299A08031D4F
:100270002B291908840000080F3C03194229023079
:100280008D0086291A309C0018089D00D8208D0802
:1002900003194D2901308D0086299A08031D532921
:1002A00003308D0086291A309C0019089D00D82043
:1002B0008D0803195E2901308D0086299A08031DD7
:1002C000642903308D0086291A309C001B309D0064
:1002D000D8208D0803196F2901308D0086299A08CE
:1002E000031D752903308D00862918088400000835
:1002F0009C001908840000081C070F391B02031911
:10030000842903308D00862900308D00FA291B08CE
:100310008D011A0203188F291A088C009B298C0161
:1003200008309C009A0D8C0D1B080C0203188C00E1
:100330008D0D9C0B922900340D0818089A0064302A
:100340009B0087210C0898000D083030031DAF2951
:10035000191899159919B529191A2030B129991127
:1003600019128D070D089A00A02018089A000A306B
:100370009B0087210C0898000D083030031DC4290C
:100380009919C829191A20308D070D089A00A02044
:100390003030980718089A00A020003484011F30DC
:1003A0008305562805309B001520980118080C205D
:1003B000980A9A00A02004301802031DD6290330A1
:1003C00099002E309A00A020990BE1290230980064
:1003D00096309B001520980BE8298E018F01900123
:1003E0009101920193019401950116309800173004
:1003F00099002B298D080319FF29920AA62A01309A
:100400001602FD3E0318102A033EA82A17088E0084
:10041000900A102A17088F00910A102A950A102AAC
:1004200001309B009C008F2058309A00A0200E08BD
:100430009800113099009C2120309A00A0201008CB
:100440009800103099009C211208980010309900F3
:100450009C2113089800103099009C2120309A00AC
:10046000A02020309A00A02001309B0002309C0088
:100470008F2059309A00A0200F0898001130990061
:100480009C2120309A00A02011089800103099007B
:100490009C2114089800103099009C2115089800A0
:1004A000103099009C2120309A00A02020309A0022
:1004B000A020831605108312051401309B0015201F
:1004C0000E08970017089703003A0319712A153090
:1004D0008C008C0B692A00009708031D702A0030DD
:1004E000622A831605108312051083168510831265
:1004F000851401309B0015200F08970017089703FB
:10050000003A03198D2A15308C008C0B852A0000C7
:100510009708031D8C2A00307E2A831685108312CB
:1005200085100E081E3C8D000F080D02970017085D
:100530009703003A0319A62A15308C008C0B9E2ACB
:1005400000009708031DA52A0030972AF5296300AB
:0E0550000A108A140A118207062A0A2A0E2AA5
:02400E00F13F80
:00000001FF
;PIC16F84
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/06/MAIN.LST
0,0 → 1,1152
CCS PCW C Compiler, Version 3.110, 15448
 
Filename: d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\main.LST
 
ROM used: 687 (67%)
Largest free fragment is 337
RAM used: 12 (18%) at main() level
24 (35%) worst case
Stack: 5 locations
 
*
0000: MOVLW 00
0001: MOVWF 0A
0002: GOTO 1CE
0003: NOP
.................... // Prijimac
....................
.................... #DEFINE DEBUG PIN_A2 // ladici pomocne synchronizacni impulzy
....................
.................... #include "main.h"
.................... #include <16F84.h>
.................... //////// Standard Header file for the PIC16F84 device ////////////////
.................... #device PIC16F84
.................... #list
....................
.................... #use delay(clock=4000000)
*
0015: MOVLW 1B
0016: MOVWF 04
0017: MOVF 00,W
0018: BTFSC 03.2
0019: GOTO 029
001A: MOVLW 01
001B: MOVWF 0D
001C: CLRF 0C
001D: DECFSZ 0C,F
001E: GOTO 01D
001F: DECFSZ 0D,F
0020: GOTO 01C
0021: MOVLW 4A
0022: MOVWF 0C
0023: DECFSZ 0C,F
0024: GOTO 023
0025: NOP
0026: NOP
0027: DECFSZ 00,F
0028: GOTO 01A
0029: RETLW 00
.................... #fuses XT,NOWDT,PUT
....................
....................
.................... #include "..\common.h"
.................... #DEFINE OSA_X 1 // adresy os
.................... #DEFINE OSA_Y 2
.................... #DEFINE TLs 3
.................... #DEFINE IMPULS 250 // sirka impulsu
.................... #DEFINE SYNC_NIBBLE 0b1111 // magiske cislo sync niblu
....................
....................
.................... #DEFINE LCD_RS PIN_B1 // rizeni registru LCD displeje
.................... #DEFINE LCD_E PIN_B0 // enable LCD displeje
.................... #DEFINE LCD_DATA_LSB PIN_B2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
.................... #INCLUDE "MYLCD.C"
.................... // LCD modul pro ovladani dvouradkoveho LCD modulu se standardnim Hitachi radicem
.................... // (c)miho 2002
.................... //
.................... // Historie:
.................... //
.................... // 0.0 Uvodni verze se snadnou definici portu LCD displeje
.................... //
.................... //
.................... // Funkce:
.................... //
.................... // lcd_init() inicializuje LCD displej a porty, nutno volat jako prvni
.................... //
.................... // lcd_putc(c) zapis snaku do lcd displeje, zpracovava nasledujici ridici znaky
.................... // \f = \x0C - nova stranka - smazani displeje
.................... // \n = \x0A - odradkovani (prechod na druhou radku)
.................... // \b = \x08 - backspace - posunuti kurzoru o 1 pozici zpet
.................... // \r = \x0D - goto home to position 1,1
.................... // \0 .. \7 - definovatelne znaky v pozicich 0 az 7 v CGRAM
.................... // \20 .. \27 - alternativne zapsane znaky (oktalove) v pozicich 0 az 7 CGRAM
.................... // Pozor na to, ze funkce printf konci tisk pokud narazi na \0 (konec retezce)
.................... //
.................... // lcd_gotoxy(x,y) presune kurzor na uvedenou adresu
.................... // nekontroluje parametry
.................... //
.................... // lcd_cursor_on zapne kurzor
.................... // lcd_cursor_off vypne kurzor
.................... //
.................... // lcd_define_char(Index, Def) Makro, ktere definuje znaky od pozice Index obsahem definicniho
.................... // retezce Def. Kazdych 8 znaku retezce Def definuje dalsi znak v CGRAM.
.................... // Kapacita CGRAM je celkem 8 znaku s indexem 0 az 7.
.................... // Na konci se provede lcd_gotoxy(1,1).
.................... // Na konci teto knihovny je priklad pouziti definovanych znaku
.................... //
.................... // Definice portu:
.................... //
.................... // #DEFINE LCD_RS PIN_B2 // rizeni registru LCD displeje
.................... // #DEFINE LCD_E PIN_B1 // enable LCD displeje
.................... // #DEFINE LCD_DATA_LSB PIN_C2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
....................
....................
....................
....................
.................... // Privatni sekce, cist jen v pripade, ze neco nefunguje
....................
....................
....................
....................
.................... // Generovane defince portu pro ucely teto knihovny aby kod generoval spravne IO operace a soucasne
.................... // bylo mozne jednoduse deklarovat pripojene piny LCD displeje pri pouziti teto knihovny. Problem spociva
.................... // v tom, ze se musi spravne ridit smery portu a soucasne datovy port zabira jen 4 bity ze zadaneho portu
.................... //
.................... #DEFINE LCD_SHIFT (LCD_DATA_LSB&7) // pocet bitu posuvu dataoveho kanalu v datovem portu
.................... #DEFINE LCD_PORT (LCD_DATA_LSB>>3) // adresa LCD datoveho portu
.................... #DEFINE LCD_TRIS (LCD_PORT+0x80) // adresa prislusneho TRIS registru
.................... #DEFINE LCD_MASK (0xF<<LCD_SHIFT) // maska platnych bitu
.................... //
.................... #IF LCD_SHIFT>4 // kontrola mezi
.................... #ERROR LCD data port LSB bit not in range 0..4
.................... #ENDIF
....................
....................
.................... // Definice konstant pro LCD display
.................... //
.................... #define LCD_CURSOR_ON_ 0x0E // kurzor jako blikajici radka pod znakem
.................... #define LCD_CURSOR_OFF_ 0x0C // zadny kurzor
.................... #define LCD_LINE_2 0x40 // adresa 1. znaku 2. radky
....................
....................
.................... // Definice rezimu LCD displeje
.................... //
.................... BYTE const LCD_INIT_STRING[4] =
.................... {
.................... 0x28, // intrfejs 4 bity, 2 radky, font 5x7
.................... LCD_CURSOR_OFF_, // display on, kurzor off,
.................... 0x01, // clear displeje
.................... 0x06 // inkrement pozice kurzoru (posun kurzoru doprava)
.................... };
*
0004: BCF 0A.0
0005: BCF 0A.1
0006: BCF 0A.2
0007: ADDWF 02,F
0008: RETLW 28
0009: RETLW 0C
000A: RETLW 01
000B: RETLW 06
....................
....................
.................... // Odesle nibble do displeje (posle data a klikne signalem e)
.................... //
.................... void lcd_send_nibble( BYTE n )
.................... {
.................... *LCD_PORT = (*LCD_PORT & ~LCD_MASK) | ((n << LCD_SHIFT) & LCD_MASK); // nastav datove bity portu a ostatni zachovej
*
002A: MOVF 06,W
002B: ANDLW C3
002C: MOVWF 22
002D: RLF 21,W
002E: MOVWF 0C
002F: RLF 0C,F
0030: MOVLW FC
0031: ANDWF 0C,F
0032: MOVF 0C,W
0033: ANDLW 3C
0034: IORWF 22,W
0035: MOVWF 06
.................... output_bit(LCD_E,1); // vzestupna hrana
0036: BSF 06.0
0037: BSF 03.5
0038: BCF 06.0
.................... delay_us(1); // pockej alespon 450ns od e nebo alespon 195ns od dat
0039: NOP
.................... output_bit(LCD_E,0); // sestupna hrana (minimalni perioda e je 1us)
003A: BCF 03.5
003B: BCF 06.0
003C: BSF 03.5
003D: BCF 06.0
003E: BCF 03.5
003F: RETLW 00
.................... }
....................
....................
.................... // Odesle bajt do registru LCD
.................... //
.................... // Pokud je Adr=0 .. instrukcni registr
.................... // Pokud je Adr=1 .. datovy registr
.................... //
.................... void lcd_send_byte( BOOLEAN Adr, BYTE n )
.................... {
.................... output_bit(LCD_RS,Adr); // vyber registr
0040: MOVF 1F,F
0041: BTFSS 03.2
0042: GOTO 045
0043: BCF 06.1
0044: GOTO 046
0045: BSF 06.1
0046: BSF 03.5
0047: BCF 06.1
.................... swap(n);
0048: BCF 03.5
0049: SWAPF 20,F
.................... lcd_send_nibble(n); // posli horni pulku bajtu
004A: MOVF 20,W
004B: MOVWF 21
004C: CALL 02A
.................... swap(n);
004D: SWAPF 20,F
.................... lcd_send_nibble(n); // posli spodni pulku bajtu
004E: MOVF 20,W
004F: MOVWF 21
0050: CALL 02A
.................... delay_us(40); // minimalni doba na provedeni prikazu
0051: MOVLW 0D
0052: MOVWF 0C
0053: DECFSZ 0C,F
0054: GOTO 053
0055: RETLW 00
.................... }
....................
....................
.................... // Provede inicializaci LCD displeje, smaze obsah a nastavi mod displeje
.................... //
.................... // Tato procedura se musi volat pred pouzitim ostatnich lcd_ procedur
.................... //
.................... void lcd_init()
.................... {
....................
.................... int i; // pocitadlo cyklu
....................
.................... delay_ms(20); // spozdeni pro provedeni startu displeje po zapnuti napajeni
0056: MOVLW 14
0057: MOVWF 1B
0058: CALL 015
....................
.................... *LCD_TRIS = *LCD_TRIS & ~LCD_MASK; // nuluj odpovidajici bity tris registru datoveho portu LCD
0059: MOVLW C3
005A: BSF 03.5
005B: ANDWF 06,F
....................
.................... output_bit(LCD_RS,0); // nastav jako vystup a nastav klidovy stav
005C: BCF 03.5
005D: BCF 06.1
005E: BSF 03.5
005F: BCF 06.1
.................... output_bit(LCD_E,0); // nastav jako vystup a nastav klidovy stav
0060: BCF 03.5
0061: BCF 06.0
0062: BSF 03.5
0063: BCF 06.0
....................
.................... for (i=0; i<3; i++) // nastav lcd do rezimu 8 bitu sbernice
0064: BCF 03.5
0065: CLRF 18
0066: MOVF 18,W
0067: SUBLW 02
0068: BTFSS 03.0
0069: GOTO 072
.................... {
.................... delay_ms(2); // muze byt rozdelany prenos dat (2x 4 bity) nebo pomaly povel
006A: MOVLW 02
006B: MOVWF 1B
006C: CALL 015
.................... lcd_send_nibble(3); // rezim 8 bitu
006D: MOVLW 03
006E: MOVWF 21
006F: CALL 02A
.................... }
0070: INCF 18,F
0071: GOTO 066
....................
.................... delay_us(40); // cas na zpracovani
0072: MOVLW 0D
0073: MOVWF 0C
0074: DECFSZ 0C,F
0075: GOTO 074
.................... lcd_send_nibble(2); // nastav rezim 4 bitu (plati od nasledujiciho prenosu)
0076: MOVLW 02
0077: MOVWF 21
0078: CALL 02A
.................... delay_us(40); // cas na zpracovani
0079: MOVLW 0D
007A: MOVWF 0C
007B: DECFSZ 0C,F
007C: GOTO 07B
....................
.................... for (i=0;i<3;i++) // proved inicializaci (nastaveni modu, smazani apod)
007D: CLRF 18
007E: MOVF 18,W
007F: SUBLW 02
0080: BTFSS 03.0
0081: GOTO 08E
.................... {
.................... lcd_send_byte(0,LCD_INIT_STRING[i]);
0082: MOVF 18,W
0083: CALL 004
0084: MOVWF 19
0085: CLRF 1F
0086: MOVF 19,W
0087: MOVWF 20
0088: CALL 040
.................... delay_ms(2);
0089: MOVLW 02
008A: MOVWF 1B
008B: CALL 015
.................... }
008C: INCF 18,F
008D: GOTO 07E
008E: GOTO 1D2 (RETURN)
.................... }
....................
....................
.................... // Proved presun kurzoru
.................... //
.................... // Pozice 1.1 je domu
.................... //
.................... void lcd_gotoxy( BYTE x, BYTE y)
.................... {
....................
.................... BYTE Adr;
....................
.................... Adr=x-1;
008F: MOVLW 01
0090: SUBWF 1B,W
0091: MOVWF 1D
.................... if(y==2)
0092: MOVF 1C,W
0093: SUBLW 02
0094: BTFSS 03.2
0095: GOTO 098
.................... Adr+=LCD_LINE_2;
0096: MOVLW 40
0097: ADDWF 1D,F
....................
.................... lcd_send_byte(0,0x80|Adr);
0098: MOVF 1D,W
0099: IORLW 80
009A: MOVWF 1E
009B: CLRF 1F
009C: MOVF 1E,W
009D: MOVWF 20
009E: CALL 040
009F: RETLW 00
.................... }
....................
....................
.................... // Zapis znaku na displej, zpracovani ridicich znaku
.................... //
.................... void lcd_putc( char c)
.................... {
....................
.................... switch (c)
00A0: MOVF 1A,W
00A1: MOVWF 0C
00A2: MOVLW 0C
00A3: SUBWF 0C,W
00A4: BTFSC 03.2
00A5: GOTO 0B3
00A6: MOVLW 0A
00A7: SUBWF 0C,W
00A8: BTFSC 03.2
00A9: GOTO 0BB
00AA: MOVLW 0D
00AB: SUBWF 0C,W
00AC: BTFSC 03.2
00AD: GOTO 0C1
00AE: MOVLW 08
00AF: SUBWF 0C,W
00B0: BTFSC 03.2
00B1: GOTO 0C6
00B2: GOTO 0CB
.................... {
.................... case '\f' : lcd_send_byte(0,1); // smaz displej
00B3: CLRF 1F
00B4: MOVLW 01
00B5: MOVWF 20
00B6: CALL 040
.................... delay_ms(2);
00B7: MOVLW 02
00B8: MOVWF 1B
00B9: CALL 015
.................... break;
00BA: GOTO 0D7
.................... case '\n' : lcd_gotoxy(1,2); break; // presun se na 1. znak 2. radky
00BB: MOVLW 01
00BC: MOVWF 1B
00BD: MOVLW 02
00BE: MOVWF 1C
00BF: CALL 08F
00C0: GOTO 0D7
.................... case '\r' : lcd_gotoxy(1,1); break; // presun home
00C1: MOVLW 01
00C2: MOVWF 1B
00C3: MOVWF 1C
00C4: CALL 08F
00C5: GOTO 0D7
.................... case '\b' : lcd_send_byte(0,0x10); break; // posun kurzor o 1 zpet
00C6: CLRF 1F
00C7: MOVLW 10
00C8: MOVWF 20
00C9: CALL 040
00CA: GOTO 0D7
.................... default : if (c<0x20) c&=0x7; // preklopeni definovatelnych znaku na rozsah 0 az 0x1F
00CB: MOVF 1A,W
00CC: SUBLW 1F
00CD: BTFSS 03.0
00CE: GOTO 0D1
00CF: MOVLW 07
00D0: ANDWF 1A,F
.................... lcd_send_byte(1,c); break; // zapis znak
00D1: MOVLW 01
00D2: MOVWF 1F
00D3: MOVF 1A,W
00D4: MOVWF 20
00D5: CALL 040
00D6: GOTO 0D7
.................... }
00D7: RETLW 00
.................... }
....................
....................
.................... // Zapni kurzor
.................... //
.................... void lcd_cursor_on()
.................... {
.................... lcd_send_byte(0,LCD_CURSOR_ON_);
.................... }
....................
....................
.................... // Vypni kurzor
.................... //
.................... void lcd_cursor_off()
.................... {
.................... lcd_send_byte(0,LCD_CURSOR_OFF_);
.................... }
....................
....................
.................... // Definice vlastnich fontu
.................... //
.................... // Vlastnich definic muze byt jen 8 do pozic 0 az 7 pameti CGRAM radice lcd displeje
.................... // Pro snadne definovani jsou pripraveny nasledujici definice a na konci souboru je uveden
.................... // priklad pouziti definovanych znaku.
....................
....................
.................... // Pomocna procedura pro posilani ridicich dat do radice displeje
.................... //
.................... void lcd_putc2(int Data)
.................... {
.................... lcd_send_byte(1,Data);
.................... }
....................
....................
.................... // Pomocne definice pro programovani obsahu CGRAM
.................... //
.................... #DEFINE lcd_define_start(Code) lcd_send_byte(0,0x40+(Code<<3)); delay_ms(2)
.................... #DEFINE lcd_define_def(String) printf(lcd_putc2,String);
.................... #DEFINE lcd_define_end() lcd_send_byte(0,3); delay_ms(2)
....................
....................
.................... // Vlastni vykonne makro pro definovani fontu do pozice Index CGRAM s definicnim retezcem Def
.................... //
.................... #DEFINE lcd_define_char(Index, Def) lcd_define_start(Index); lcd_define_def(Def); lcd_define_end();
....................
....................
.................... // Pripravene definice fontu vybranych znaku
.................... // V tabulce nesmi byt 00 (konec retezce v printf()), misto toho davame 80
.................... //
.................... #DEFINE LCD_CHAR_BAT100 "\x0E\x1F\x1F\x1F\x1F\x1F\x1F\x1F" /* symbol plne baterie */
.................... #DEFINE LCD_CHAR_BAT50 "\x0E\x1F\x11\x11\x13\x17\x1F\x1F" /* symbol polovicni baterie */
.................... #DEFINE LCD_CHAR_BAT0 "\x0E\x1F\x11\x11\x11\x11\x11\x1F" /* symbol vybite baterie */
.................... #DEFINE LCD_CHAR_LUA "\x04\x0E\x11\x11\x1F\x11\x11\x80" /* A s carkou */
.................... #DEFINE LCD_CHAR_LLA "\x01\x02\x0E\x01\x1F\x11\x0F\x80" /* a s carkou */
.................... #DEFINE LCD_CHAR_HUC "\x0A\x0E\x11\x10\x10\x11\x0E\x80" /* C s hackem */
.................... #DEFINE LCD_CHAR_HLC "\x0A\x04\x0E\x10\x10\x11\x0E\x80" /* c s hackem */
.................... #DEFINE LCD_CHAR_HUD "\x0A\x1C\x12\x11\x11\x12\x1C\x80" /* D s hackem */
.................... #DEFINE LCD_CHAR_HLD "\x05\x03\x0D\x13\x11\x11\x0F\x80" /* d s hackem */
.................... #DEFINE LCD_CHAR_LUE "\x04\x1F\x10\x10\x1E\x10\x1F\x80" /* E s carkou */
.................... #DEFINE LCD_CHAR_LLE "\x01\x02\x0E\x11\x1F\x10\x0E\x80" /* e s carkou */
.................... #DEFINE LCD_CHAR_HUE "\x0A\x1F\x10\x1E\x10\x10\x1F\x80" /* E s hackem */
.................... #DEFINE LCD_CHAR_HLE "\x0A\x04\x0E\x11\x1F\x10\x0E\x80" /* e s hackem */
.................... #DEFINE LCD_CHAR_LUI "\x04\x0E\x04\x04\x04\x04\x0E\x80" /* I s carkou */
.................... #DEFINE LCD_CHAR_LLI "\x02\x04\x80\x0C\x04\x04\x0E\x80" /* i s carkou */
.................... #DEFINE LCD_CHAR_HUN "\x0A\x15\x11\x19\x15\x13\x11\x80" /* N s hackem */
.................... #DEFINE LCD_CHAR_HLN "\x0A\x04\x16\x19\x11\x11\x11\x80" /* n s hackem */
.................... #DEFINE LCD_CHAR_LUO "\x04\x0E\x11\x11\x11\x11\x0E\x80" /* O s carkou */
.................... #DEFINE LCD_CHAR_LLO "\x02\x04\x0E\x11\x11\x11\x0E\x80" /* o s carkou */
.................... #DEFINE LCD_CHAR_HUR "\x0A\x1E\x11\x1E\x14\x12\x11\x80" /* R s hackem */
.................... #DEFINE LCD_CHAR_HLR "\x0A\x04\x16\x19\x10\x10\x10\x80" /* r s hackem */
.................... #DEFINE LCD_CHAR_HUS "\x0A\x0F\x10\x0E\x01\x01\x1E\x80" /* S s hackem */
.................... #DEFINE LCD_CHAR_HLS "\x0A\x04\x0E\x10\x0E\x01\x1E\x80" /* s s hackem */
.................... #DEFINE LCD_CHAR_HUT "\x0A\x1F\x04\x04\x04\x04\x04\x80" /* T s hackem */
.................... #DEFINE LCD_CHAR_HLT "\x0A\x0C\x1C\x08\x08\x09\x06\x80" /* t s hackem */
.................... #DEFINE LCD_CHAR_LUU "\x02\x15\x11\x11\x11\x11\x0E\x80" /* U s carkou */
.................... #DEFINE LCD_CHAR_LLU "\x02\x04\x11\x11\x11\x13\x0D\x80" /* u s carkou */
.................... #DEFINE LCD_CHAR_CUU "\x06\x17\x11\x11\x11\x11\x0E\x80" /* U s krouzkem */
.................... #DEFINE LCD_CHAR_CLU "\x06\x06\x11\x11\x11\x11\x0E\x80" /* u s krouzkem */
.................... #DEFINE LCD_CHAR_LUY "\x02\x15\x11\x0A\x04\x04\x04\x80" /* Y s carkou */
.................... #DEFINE LCD_CHAR_LLY "\x02\x04\x11\x11\x0F\x01\x0E\x80" /* y s carkou */
.................... #DEFINE LCD_CHAR_HUZ "\x0A\x1F\x01\x02\x04\x08\x1F\x80" /* Z s hackem */
.................... #DEFINE LCD_CHAR_HLZ "\x0A\x04\x1F\x02\x04\x08\x1F\x80" /* z s hackem */
....................
....................
.................... // Priklad pouziti definovanych znaku
.................... //
.................... //
.................... //void lcd_sample()
.................... //{
.................... // lcd_define_char(0,LCD_CHAR_BAT50); // Priklad definice znaku baterie do pozice 0
.................... // lcd_define_char(2,LCD_CHAR_HLE LCD_CHAR_LUI); // Priklad definice znaku e s hackem a I s carkou od pozice 2
.................... // // vsimnete si, ze neni carka mezi retezci s definici (oba retezce definuji
.................... // // jediny definicni retezec)
.................... // printf(lcd_putc,"\fZnaky:\20\22\23"); // priklad vypisu znaku z pozice 0, 2 a 3
.................... // delay_ms(1000);
.................... // lcd_define_char(0,LCD_CHAR_BAT0); // Predefinovani tvaru znaku v pozici 0
.................... // delay_ms(1000);
.................... //}
....................
....................
.................... #DEFINE PRIJIMAC PIN_A3 // pin na ktery je pripojen prijimac
.................... #DEFINE SERVO_X PIN_A0 // pin na ktery je pripojeno servo
.................... #DEFINE SERVO_Y PIN_A1
....................
....................
.................... // Prijme datovy nibble vcetne zasynchronizovani
.................... // Chybi dodelat timeout
.................... int8 prijmi_nibble(int8* datovy, int8* data)
.................... {
.................... int8 i;
....................
.................... #IFDEF DEBUG
.................... int1 tmp;
.................... #ENDIF
....................
.................... *data=0;
00D8: MOVF 1D,W
00D9: MOVWF 04
00DA: CLRF 00
....................
.................... // Cekam na dlouhou nulu
.................... for (i=4; i>0; i--)
00DB: MOVLW 04
00DC: MOVWF 1E
00DD: MOVF 1E,F
00DE: BTFSC 03.2
00DF: GOTO 0EE
.................... {
.................... if (input(PRIJIMAC)) i=4;
00E0: BSF 03.5
00E1: BSF 05.3
00E2: BCF 03.5
00E3: BTFSS 05.3
00E4: GOTO 0E7
00E5: MOVLW 04
00E6: MOVWF 1E
.................... delay_us(IMPULS/2);
00E7: MOVLW 29
00E8: MOVWF 0C
00E9: DECFSZ 0C,F
00EA: GOTO 0E9
00EB: NOP
.................... }
00EC: DECF 1E,F
00ED: GOTO 0DD
....................
.................... // Cekam na jednicku (start ramce)
.................... for (; !input(PRIJIMAC); )
00EE: BSF 03.5
00EF: BSF 05.3
00F0: BCF 03.5
00F1: BTFSS 05.3
.................... {
.................... }
00F2: GOTO 0EE
....................
.................... // Ctu typ nibblu
.................... delay_us(2*IMPULS+2*IMPULS/3);
00F3: MOVLW DD
00F4: MOVWF 0C
00F5: DECFSZ 0C,F
00F6: GOTO 0F5
00F7: NOP
00F8: NOP
.................... *datovy=input(PRIJIMAC);
00F9: MOVF 1C,W
00FA: MOVWF 04
00FB: BSF 03.5
00FC: BSF 05.3
00FD: MOVLW 00
00FE: BCF 03.5
00FF: BTFSC 05.3
0100: MOVLW 01
0101: MOVWF 00
....................
.................... // Prenasim bity
.................... for (i=0; i<4; i++)
0102: CLRF 1E
0103: MOVF 1E,W
0104: SUBLW 03
0105: BTFSS 03.0
0106: GOTO 128
.................... {
.................... delay_us(2*IMPULS);
0107: MOVLW A6
0108: MOVWF 0C
0109: DECFSZ 0C,F
010A: GOTO 109
010B: NOP
.................... *data >>= 1;
010C: MOVF 1D,W
010D: MOVWF 04
010E: BCF 03.0
010F: RRF 00,W
0110: MOVWF 0C
0111: MOVWF 00
.................... if (input(PRIJIMAC)) *data +=0b1000;
0112: BSF 03.5
0113: BSF 05.3
0114: BCF 03.5
0115: BTFSS 05.3
0116: GOTO 11C
0117: MOVF 1D,W
0118: MOVWF 04
0119: MOVLW 08
011A: ADDWF 00,W
011B: MOVWF 00
....................
.................... #IFDEF DEBUG
.................... output_bit(DEBUG,tmp);
011C: BTFSC 1F.0
011D: GOTO 120
011E: BCF 05.2
011F: GOTO 121
0120: BSF 05.2
0121: BSF 03.5
0122: BCF 05.2
.................... tmp=!tmp;
0123: MOVLW 01
0124: BCF 03.5
0125: XORWF 1F,F
.................... #ELSE
.................... delay_us(20);
.................... #ENDIF
.................... }
0126: INCF 1E,F
0127: GOTO 103
....................
.................... return FALSE;
0128: MOVLW 00
0129: MOVWF 0D
012A: RETLW 00
.................... }
....................
....................
.................... // Prijme datovy ramec
.................... // Pokud nastane chyba vraci kod chyby
.................... int8 prijmi_ramec(int8* kanal, int8* data)
.................... {
.................... int8 datovy;
.................... int8 suma;
....................
.................... // Cekej na synchronizacni nibble
.................... do
.................... {
.................... if (prijmi_nibble(&datovy, data)) return 1; // chyba timout
012B: MOVLW 1A
012C: MOVWF 1C
012D: MOVF 19,W
012E: MOVWF 1D
012F: CALL 0D8
0130: MOVF 0D,F
0131: BTFSC 03.2
0132: GOTO 136
0133: MOVLW 01
0134: MOVWF 0D
0135: GOTO 186
.................... }
.................... while(datovy);
0136: MOVF 1A,F
0137: BTFSS 03.2
0138: GOTO 12B
....................
.................... // Zkontroluj magickou hodnotu
.................... if (*data != SYNC_NIBBLE) return 2; // chyba magickeho kodu ramce
0139: MOVF 19,W
013A: MOVWF 04
013B: MOVF 00,W
013C: SUBLW 0F
013D: BTFSC 03.2
013E: GOTO 142
013F: MOVLW 02
0140: MOVWF 0D
0141: GOTO 186
....................
.................... // Prijmi cislo kanalu
.................... if (prijmi_nibble(&datovy, kanal)) return 1; // chyba timeout
0142: MOVLW 1A
0143: MOVWF 1C
0144: MOVF 18,W
0145: MOVWF 1D
0146: CALL 0D8
0147: MOVF 0D,F
0148: BTFSC 03.2
0149: GOTO 14D
014A: MOVLW 01
014B: MOVWF 0D
014C: GOTO 186
.................... if (!datovy) return 3; // chyba typu nibblu
014D: MOVF 1A,F
014E: BTFSS 03.2
014F: GOTO 153
0150: MOVLW 03
0151: MOVWF 0D
0152: GOTO 186
....................
.................... // Prijmi data
.................... if (prijmi_nibble(&datovy, data)) return 1; // chyba timeout
0153: MOVLW 1A
0154: MOVWF 1C
0155: MOVF 19,W
0156: MOVWF 1D
0157: CALL 0D8
0158: MOVF 0D,F
0159: BTFSC 03.2
015A: GOTO 15E
015B: MOVLW 01
015C: MOVWF 0D
015D: GOTO 186
.................... if (!datovy) return 3; // chyba typu nibblu
015E: MOVF 1A,F
015F: BTFSS 03.2
0160: GOTO 164
0161: MOVLW 03
0162: MOVWF 0D
0163: GOTO 186
....................
.................... // Prijmi zabezpeceni
.................... if (prijmi_nibble(&datovy, &suma)) return 1; // chyba timeout
0164: MOVLW 1A
0165: MOVWF 1C
0166: MOVLW 1B
0167: MOVWF 1D
0168: CALL 0D8
0169: MOVF 0D,F
016A: BTFSC 03.2
016B: GOTO 16F
016C: MOVLW 01
016D: MOVWF 0D
016E: GOTO 186
.................... if (!datovy) return 3; // chyba typu nibblu
016F: MOVF 1A,F
0170: BTFSS 03.2
0171: GOTO 175
0172: MOVLW 03
0173: MOVWF 0D
0174: GOTO 186
....................
.................... // Zkontroluj kontrolni soucet
.................... if (((*kanal+*data) & 0b1111) != suma) return 3; // chyba kontrolniho souctu
0175: MOVF 18,W
0176: MOVWF 04
0177: MOVF 00,W
0178: MOVWF 1C
0179: MOVF 19,W
017A: MOVWF 04
017B: MOVF 00,W
017C: ADDWF 1C,W
017D: ANDLW 0F
017E: SUBWF 1B,W
017F: BTFSC 03.2
0180: GOTO 184
0181: MOVLW 03
0182: MOVWF 0D
0183: GOTO 186
....................
.................... return 0;
0184: MOVLW 00
0185: MOVWF 0D
0186: GOTO 1FA (RETURN)
.................... }
....................
....................
....................
.................... int8 x,y;
.................... int8 xc,yc; // pocitadla aktualizace x a y
.................... int e1,e2,e3,e4; // pocitadla chyb - ladici
....................
.................... void main()
.................... {
*
01CE: CLRF 04
01CF: MOVLW 1F
01D0: ANDWF 03,F
.................... lcd_init(); // zinicializuj LCD display
01D1: GOTO 056
.................... delay_ms(5);
01D2: MOVLW 05
01D3: MOVWF 1B
01D4: CALL 015
.................... printf(lcd_putc,"Ahoj...");
*
000C: BCF 0A.0
000D: BCF 0A.1
000E: BCF 0A.2
000F: ADDWF 02,F
0010: RETLW 41
0011: RETLW 68
0012: RETLW 6F
0013: RETLW 6A
0014: RETLW 00
*
01D5: CLRF 18
01D6: MOVF 18,W
01D7: CALL 00C
01D8: INCF 18,F
01D9: MOVWF 1A
01DA: CALL 0A0
01DB: MOVLW 04
01DC: SUBWF 18,W
01DD: BTFSS 03.2
01DE: GOTO 1D6
01DF: MOVLW 03
01E0: MOVWF 19
01E1: MOVLW 2E
01E2: MOVWF 1A
01E3: CALL 0A0
01E4: DECFSZ 19,F
01E5: GOTO 1E1
.................... delay_ms(300);
01E6: MOVLW 02
01E7: MOVWF 18
01E8: MOVLW 96
01E9: MOVWF 1B
01EA: CALL 015
01EB: DECFSZ 18,F
01EC: GOTO 1E8
....................
.................... x = 0;
01ED: CLRF 0E
.................... y = 0;
01EE: CLRF 0F
.................... xc = 0;
01EF: CLRF 10
.................... yc = 0;
01F0: CLRF 11
.................... e1 = 0;
01F1: CLRF 12
.................... e2 = 0;
01F2: CLRF 13
.................... e3 = 0;
01F3: CLRF 14
.................... e4 = 0;
01F4: CLRF 15
....................
.................... while (true)
.................... {
.................... int8 kanal, data;
....................
.................... if (prijmi_ramec(&kanal,&data))
01F5: MOVLW 16
01F6: MOVWF 18
01F7: MOVLW 17
01F8: MOVWF 19
01F9: GOTO 12B
01FA: MOVF 0D,F
01FB: BTFSC 03.2
01FC: GOTO 1FF
.................... e1++;
01FD: INCF 12,F
.................... else
01FE: GOTO 2A6
.................... {
.................... switch (kanal) // rozeskoc se podle adresy osy
01FF: MOVLW 01
0200: SUBWF 16,W
0201: ADDLW FD
0202: BTFSC 03.0
0203: GOTO 210
0204: ADDLW 03
0205: GOTO 2A8
.................... {
.................... case OSA_X:
.................... {
.................... x=data;
0206: MOVF 17,W
0207: MOVWF 0E
.................... xc++;
0208: INCF 10,F
.................... break;
0209: GOTO 210
.................... };
.................... case OSA_Y:
.................... {
.................... y=data;
020A: MOVF 17,W
020B: MOVWF 0F
.................... yc++;
020C: INCF 11,F
.................... break;
020D: GOTO 210
.................... };
.................... case TLs:
.................... {
.................... e4++;
020E: INCF 15,F
.................... break;
020F: GOTO 210
.................... };
.................... };
*
02A8: BCF 0A.0
02A9: BSF 0A.1
02AA: BCF 0A.2
02AB: ADDWF 02,F
02AC: GOTO 206
02AD: GOTO 20A
02AE: GOTO 20E
....................
.................... // ladici vypisy
.................... lcd_gotoxy(1,1); // vytiskni X a Y
*
0210: MOVLW 01
0211: MOVWF 1B
0212: MOVWF 1C
0213: CALL 08F
.................... printf(lcd_putc,"X%2U %3U%3U%3U ", x, xc, e1, e2);
*
019C: MOVF 0D,W
019D: MOVF 18,W
019E: MOVWF 1A
019F: MOVLW 64
01A0: MOVWF 1B
01A1: CALL 187
01A2: MOVF 0C,W
01A3: MOVWF 18
01A4: MOVF 0D,W
01A5: MOVLW 30
01A6: BTFSS 03.2
01A7: GOTO 1AF
01A8: BTFSC 19.0
01A9: BSF 19.3
01AA: BTFSC 19.3
01AB: GOTO 1B5
01AC: BTFSC 19.4
01AD: MOVLW 20
01AE: GOTO 1B1
01AF: BCF 19.3
01B0: BCF 19.4
01B1: ADDWF 0D,F
01B2: MOVF 0D,W
01B3: MOVWF 1A
01B4: CALL 0A0
01B5: MOVF 18,W
01B6: MOVWF 1A
01B7: MOVLW 0A
01B8: MOVWF 1B
01B9: CALL 187
01BA: MOVF 0C,W
01BB: MOVWF 18
01BC: MOVF 0D,W
01BD: MOVLW 30
01BE: BTFSS 03.2
01BF: GOTO 1C4
01C0: BTFSC 19.3
01C1: GOTO 1C8
01C2: BTFSC 19.4
01C3: MOVLW 20
01C4: ADDWF 0D,F
01C5: MOVF 0D,W
01C6: MOVWF 1A
01C7: CALL 0A0
01C8: MOVLW 30
01C9: ADDWF 18,F
01CA: MOVF 18,W
01CB: MOVWF 1A
01CC: CALL 0A0
01CD: RETLW 00
*
0214: MOVLW 58
0215: MOVWF 1A
0216: CALL 0A0
0217: MOVF 0E,W
0218: MOVWF 18
0219: MOVLW 11
021A: MOVWF 19
021B: CALL 19C
021C: MOVLW 20
021D: MOVWF 1A
021E: CALL 0A0
021F: MOVF 10,W
0220: MOVWF 18
0221: MOVLW 10
0222: MOVWF 19
0223: CALL 19C
0224: MOVF 12,W
0225: MOVWF 18
0226: MOVLW 10
0227: MOVWF 19
0228: CALL 19C
0229: MOVF 13,W
022A: MOVWF 18
022B: MOVLW 10
022C: MOVWF 19
022D: CALL 19C
022E: MOVLW 20
022F: MOVWF 1A
0230: CALL 0A0
0231: MOVLW 20
0232: MOVWF 1A
0233: CALL 0A0
.................... lcd_gotoxy(1,2);
0234: MOVLW 01
0235: MOVWF 1B
0236: MOVLW 02
0237: MOVWF 1C
0238: CALL 08F
.................... printf(lcd_putc,"Y%2U %3U%3U%3U ", y, yc, e3, e4);
0239: MOVLW 59
023A: MOVWF 1A
023B: CALL 0A0
023C: MOVF 0F,W
023D: MOVWF 18
023E: MOVLW 11
023F: MOVWF 19
0240: CALL 19C
0241: MOVLW 20
0242: MOVWF 1A
0243: CALL 0A0
0244: MOVF 11,W
0245: MOVWF 18
0246: MOVLW 10
0247: MOVWF 19
0248: CALL 19C
0249: MOVF 14,W
024A: MOVWF 18
024B: MOVLW 10
024C: MOVWF 19
024D: CALL 19C
024E: MOVF 15,W
024F: MOVWF 18
0250: MOVLW 10
0251: MOVWF 19
0252: CALL 19C
0253: MOVLW 20
0254: MOVWF 1A
0255: CALL 0A0
0256: MOVLW 20
0257: MOVWF 1A
0258: CALL 0A0
....................
.................... // ovladani serv
.................... output_high(SERVO_X);
0259: BSF 03.5
025A: BCF 05.0
025B: BCF 03.5
025C: BSF 05.0
.................... delay_ms(1);
025D: MOVLW 01
025E: MOVWF 1B
025F: CALL 015
.................... for (data=x; data--; data>0)
0260: MOVF 0E,W
0261: MOVWF 17
0262: MOVF 17,W
0263: DECF 17,F
0264: XORLW 00
0265: BTFSC 03.2
0266: GOTO 271
.................... delay_us(65);
0267: MOVLW 15
0268: MOVWF 0C
0269: DECFSZ 0C,F
026A: GOTO 269
026B: NOP
026C: MOVF 17,F
026D: BTFSS 03.2
026E: GOTO 270
026F: MOVLW 00
0270: GOTO 262
.................... output_low(SERVO_X);
0271: BSF 03.5
0272: BCF 05.0
0273: BCF 03.5
0274: BCF 05.0
....................
.................... output_high(SERVO_Y);
0275: BSF 03.5
0276: BCF 05.1
0277: BCF 03.5
0278: BSF 05.1
.................... delay_ms(1);
0279: MOVLW 01
027A: MOVWF 1B
027B: CALL 015
.................... for (data=y; data--; data>0)
027C: MOVF 0F,W
027D: MOVWF 17
027E: MOVF 17,W
027F: DECF 17,F
0280: XORLW 00
0281: BTFSC 03.2
0282: GOTO 28D
.................... delay_us(65);
0283: MOVLW 15
0284: MOVWF 0C
0285: DECFSZ 0C,F
0286: GOTO 285
0287: NOP
0288: MOVF 17,F
0289: BTFSS 03.2
028A: GOTO 28C
028B: MOVLW 00
028C: GOTO 27E
.................... output_low(SERVO_Y);
028D: BSF 03.5
028E: BCF 05.1
028F: BCF 03.5
0290: BCF 05.1
....................
.................... for (data=30-x-y; data--; data>0)
0291: MOVF 0E,W
0292: SUBLW 1E
0293: MOVWF 0D
0294: MOVF 0F,W
0295: SUBWF 0D,W
0296: MOVWF 17
0297: MOVF 17,W
0298: DECF 17,F
0299: XORLW 00
029A: BTFSC 03.2
029B: GOTO 2A6
.................... delay_us(65);
029C: MOVLW 15
029D: MOVWF 0C
029E: DECFSZ 0C,F
029F: GOTO 29E
02A0: NOP
02A1: MOVF 17,F
02A2: BTFSS 03.2
02A3: GOTO 2A5
02A4: MOVLW 00
02A5: GOTO 297
....................
.................... }
.................... }
02A6: GOTO 1F5
.................... }
....................
02A7: SLEEP
....................
....................
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/06/MAIN.PJT
0,0 → 1,32
[PROJECT]
Target=main.HEX
Development_Mode=
Processor=0x684A
ToolSuite=CCS
 
[Directories]
Include=C:\Program Files\PICC\Devices;C:\Program Files\PICC\Dri;
Library=
LinkerScript=
 
[Target Data]
FileList=main.c;
BuildTool=CCSC
OptionString=-p +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
 
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/06/MAIN.STA
0,0 → 1,42
 
ROM used: 687 (67%)
337 (33%) including unused fragments
 
1 Average locations per line
5 Average locations per statement
 
RAM used: 12 (18%) at main() level
24 (35%) worst case
 
Lines Stmts % Files
----- ----- --- -----
178 89 66 d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\main.c
5 0 0 d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\main.h
111 0 0 C:\Program Files\PICC\Devices\16F84.h
6 0 0 d:\@kaklik\programy\pic_c\prenos\letadlo\common.h
272 46 21 d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\MYLCD.C
----- -----
1144 270 Total
 
Page ROM % RAM Functions:
---- --- --- --- ----------
0 21 3 1 delay_ms
0 8 1 0 @const22
0 22 3 3 lcd_send_nibble
0 22 3 2 lcd_send_byte
0 57 8 2 lcd_init
0 17 2 4 lcd_gotoxy
0 56 8 1 lcd_putc
0 83 12 6 prijmi_nibble
0 92 13 7 prijmi_ramec
0 218 32 2 main
0 9 1 0 @const10159
0 7 1 0 @goto10182
0 21 3 3 @DIV88
0 50 7 2 @PRINTF_U_150
 
Segment Used Free
--------- ---- ----
0000-0003 4 0
0004-03FF 683 337
 
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/06/MAIN.SYM
0,0 → 1,71
00C @SCRATCH
00D @SCRATCH
00D _RETURN_
00E x
00F y
010 xc
011 yc
012 e1
013 e2
014 e3
015 e4
016 kanal
017 Data
018 lcd_init.i
018 prijmi_ramec.kanal
018 @PRINTF_U_150.P1
018 main.@SCRATCH
019 prijmi_ramec.Data
019 @PRINTF_U_150.P1
019 lcd_init.@SCRATCH
019 main.@SCRATCH
01A lcd_putc.c
01A prijmi_ramec.datovy
01A @DIV88.P1
01B delay_ms.P1
01B lcd_gotoxy.x
01B prijmi_ramec.suma
01B @DIV88.P1
01C lcd_gotoxy.y
01C prijmi_nibble.datovy
01C prijmi_ramec.@SCRATCH
01C @DIV88.@SCRATCH
01D lcd_gotoxy.Adr
01D prijmi_nibble.Data
01D prijmi_ramec.@SCRATCH
01E prijmi_nibble.i
01E lcd_gotoxy.@SCRATCH
01E prijmi_ramec.@SCRATCH
01F lcd_send_byte.Adr
01F.0 prijmi_nibble.tmp
020 lcd_send_byte.n
020 prijmi_nibble.@SCRATCH
021 lcd_send_nibble.n
021 prijmi_nibble.@SCRATCH
022 lcd_send_nibble.@SCRATCH
023 lcd_send_nibble.@SCRATCH
delay_us.P1
-002 LCD_INIT_STRING
lcd_putc2.Data
 
0015 delay_ms
0004 @const22
002A lcd_send_nibble
0040 lcd_send_byte
0056 lcd_init
008F lcd_gotoxy
00A0 lcd_putc
00D8 prijmi_nibble
012B prijmi_ramec
01CE main
000C @const10159
02A8 @goto10182
0187 @DIV88
019C @PRINTF_U_150
 
Project Files:
d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\main.c
d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\main.h
C:\Program Files\PICC\Devices\16F84.h
d:\@kaklik\programy\pic_c\prenos\letadlo\common.h
d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\MYLCD.C
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/06/MAIN.TRE
0,0 → 1,702
ÀÄmain
ÀÄmain 0/218 Ram=2
ÃÄ??0??
ÃÄlcd_init 0/57 Ram=2
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@const22 0/8 Ram=0
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄdelay_ms 0/21 Ram=1
ÃÄdelay_ms 0/21 Ram=1
ÃÄ@const10159 0/9 Ram=0
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄdelay_ms 0/21 Ram=1
ÃÄprijmi_ramec 0/92 Ram=7
³ ÃÄprijmi_nibble 0/83 Ram=6
³ ÃÄprijmi_nibble 0/83 Ram=6
³ ÃÄprijmi_nibble 0/83 Ram=6
³ ÀÄprijmi_nibble 0/83 Ram=6
ÃÄ@goto10182 0/7 Ram=0
ÃÄlcd_gotoxy 0/17 Ram=4
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_150 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_150 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_150 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_150 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_gotoxy 0/17 Ram=4
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_150 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_150 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_150 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_150 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄdelay_ms 0/21 Ram=1
ÀÄdelay_ms 0/21 Ram=1
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/06/MYLCD.C
0,0 → 1,271
// LCD modul pro ovladani dvouradkoveho LCD modulu se standardnim Hitachi radicem
// (c)miho 2002
//
// Historie:
//
// 0.0 Uvodni verze se snadnou definici portu LCD displeje
//
//
// Funkce:
//
// lcd_init() inicializuje LCD displej a porty, nutno volat jako prvni
//
// lcd_putc(c) zapis snaku do lcd displeje, zpracovava nasledujici ridici znaky
// \f = \x0C - nova stranka - smazani displeje
// \n = \x0A - odradkovani (prechod na druhou radku)
// \b = \x08 - backspace - posunuti kurzoru o 1 pozici zpet
// \r = \x0D - goto home to position 1,1
// \0 .. \7 - definovatelne znaky v pozicich 0 az 7 v CGRAM
// \20 .. \27 - alternativne zapsane znaky (oktalove) v pozicich 0 az 7 CGRAM
// Pozor na to, ze funkce printf konci tisk pokud narazi na \0 (konec retezce)
//
// lcd_gotoxy(x,y) presune kurzor na uvedenou adresu
// nekontroluje parametry
//
// lcd_cursor_on zapne kurzor
// lcd_cursor_off vypne kurzor
//
// lcd_define_char(Index, Def) Makro, ktere definuje znaky od pozice Index obsahem definicniho
// retezce Def. Kazdych 8 znaku retezce Def definuje dalsi znak v CGRAM.
// Kapacita CGRAM je celkem 8 znaku s indexem 0 az 7.
// Na konci se provede lcd_gotoxy(1,1).
// Na konci teto knihovny je priklad pouziti definovanych znaku
//
// Definice portu:
//
// #DEFINE LCD_RS PIN_B2 // rizeni registru LCD displeje
// #DEFINE LCD_E PIN_B1 // enable LCD displeje
// #DEFINE LCD_DATA_LSB PIN_C2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
 
 
 
 
// Privatni sekce, cist jen v pripade, ze neco nefunguje
 
 
 
 
// Generovane defince portu pro ucely teto knihovny aby kod generoval spravne IO operace a soucasne
// bylo mozne jednoduse deklarovat pripojene piny LCD displeje pri pouziti teto knihovny. Problem spociva
// v tom, ze se musi spravne ridit smery portu a soucasne datovy port zabira jen 4 bity ze zadaneho portu
//
#DEFINE LCD_SHIFT (LCD_DATA_LSB&7) // pocet bitu posuvu dataoveho kanalu v datovem portu
#DEFINE LCD_PORT (LCD_DATA_LSB>>3) // adresa LCD datoveho portu
#DEFINE LCD_TRIS (LCD_PORT+0x80) // adresa prislusneho TRIS registru
#DEFINE LCD_MASK (0xF<<LCD_SHIFT) // maska platnych bitu
//
#IF LCD_SHIFT>4 // kontrola mezi
#ERROR LCD data port LSB bit not in range 0..4
#ENDIF
 
 
// Definice konstant pro LCD display
//
#define LCD_CURSOR_ON_ 0x0E // kurzor jako blikajici radka pod znakem
#define LCD_CURSOR_OFF_ 0x0C // zadny kurzor
#define LCD_LINE_2 0x40 // adresa 1. znaku 2. radky
 
 
// Definice rezimu LCD displeje
//
BYTE const LCD_INIT_STRING[4] =
{
0x28, // intrfejs 4 bity, 2 radky, font 5x7
LCD_CURSOR_OFF_, // display on, kurzor off,
0x01, // clear displeje
0x06 // inkrement pozice kurzoru (posun kurzoru doprava)
};
 
 
// Odesle nibble do displeje (posle data a klikne signalem e)
//
void lcd_send_nibble( BYTE n )
{
*LCD_PORT = (*LCD_PORT & ~LCD_MASK) | ((n << LCD_SHIFT) & LCD_MASK); // nastav datove bity portu a ostatni zachovej
output_bit(LCD_E,1); // vzestupna hrana
delay_us(1); // pockej alespon 450ns od e nebo alespon 195ns od dat
output_bit(LCD_E,0); // sestupna hrana (minimalni perioda e je 1us)
}
 
 
// Odesle bajt do registru LCD
//
// Pokud je Adr=0 .. instrukcni registr
// Pokud je Adr=1 .. datovy registr
//
void lcd_send_byte( BOOLEAN Adr, BYTE n )
{
output_bit(LCD_RS,Adr); // vyber registr
swap(n);
lcd_send_nibble(n); // posli horni pulku bajtu
swap(n);
lcd_send_nibble(n); // posli spodni pulku bajtu
delay_us(40); // minimalni doba na provedeni prikazu
}
 
 
// Provede inicializaci LCD displeje, smaze obsah a nastavi mod displeje
//
// Tato procedura se musi volat pred pouzitim ostatnich lcd_ procedur
//
void lcd_init()
{
 
int i; // pocitadlo cyklu
 
delay_ms(20); // spozdeni pro provedeni startu displeje po zapnuti napajeni
 
*LCD_TRIS = *LCD_TRIS & ~LCD_MASK; // nuluj odpovidajici bity tris registru datoveho portu LCD
 
output_bit(LCD_RS,0); // nastav jako vystup a nastav klidovy stav
output_bit(LCD_E,0); // nastav jako vystup a nastav klidovy stav
 
for (i=0; i<3; i++) // nastav lcd do rezimu 8 bitu sbernice
{
delay_ms(2); // muze byt rozdelany prenos dat (2x 4 bity) nebo pomaly povel
lcd_send_nibble(3); // rezim 8 bitu
}
 
delay_us(40); // cas na zpracovani
lcd_send_nibble(2); // nastav rezim 4 bitu (plati od nasledujiciho prenosu)
delay_us(40); // cas na zpracovani
 
for (i=0;i<3;i++) // proved inicializaci (nastaveni modu, smazani apod)
{
lcd_send_byte(0,LCD_INIT_STRING[i]);
delay_ms(2);
}
}
 
 
// Proved presun kurzoru
//
// Pozice 1.1 je domu
//
void lcd_gotoxy( BYTE x, BYTE y)
{
 
BYTE Adr;
 
Adr=x-1;
if(y==2)
Adr+=LCD_LINE_2;
 
lcd_send_byte(0,0x80|Adr);
}
 
 
// Zapis znaku na displej, zpracovani ridicich znaku
//
void lcd_putc( char c)
{
 
switch (c)
{
case '\f' : lcd_send_byte(0,1); // smaz displej
delay_ms(2);
break;
case '\n' : lcd_gotoxy(1,2); break; // presun se na 1. znak 2. radky
case '\r' : lcd_gotoxy(1,1); break; // presun home
case '\b' : lcd_send_byte(0,0x10); break; // posun kurzor o 1 zpet
default : if (c<0x20) c&=0x7; // preklopeni definovatelnych znaku na rozsah 0 az 0x1F
lcd_send_byte(1,c); break; // zapis znak
}
}
 
 
// Zapni kurzor
//
void lcd_cursor_on()
{
lcd_send_byte(0,LCD_CURSOR_ON_);
}
 
 
// Vypni kurzor
//
void lcd_cursor_off()
{
lcd_send_byte(0,LCD_CURSOR_OFF_);
}
 
 
// Definice vlastnich fontu
//
// Vlastnich definic muze byt jen 8 do pozic 0 az 7 pameti CGRAM radice lcd displeje
// Pro snadne definovani jsou pripraveny nasledujici definice a na konci souboru je uveden
// priklad pouziti definovanych znaku.
 
 
// Pomocna procedura pro posilani ridicich dat do radice displeje
//
void lcd_putc2(int Data)
{
lcd_send_byte(1,Data);
}
 
 
// Pomocne definice pro programovani obsahu CGRAM
//
#DEFINE lcd_define_start(Code) lcd_send_byte(0,0x40+(Code<<3)); delay_ms(2)
#DEFINE lcd_define_def(String) printf(lcd_putc2,String);
#DEFINE lcd_define_end() lcd_send_byte(0,3); delay_ms(2)
 
 
// Vlastni vykonne makro pro definovani fontu do pozice Index CGRAM s definicnim retezcem Def
//
#DEFINE lcd_define_char(Index, Def) lcd_define_start(Index); lcd_define_def(Def); lcd_define_end();
 
 
// Pripravene definice fontu vybranych znaku
// V tabulce nesmi byt 00 (konec retezce v printf()), misto toho davame 80
//
#DEFINE LCD_CHAR_BAT100 "\x0E\x1F\x1F\x1F\x1F\x1F\x1F\x1F" /* symbol plne baterie */
#DEFINE LCD_CHAR_BAT50 "\x0E\x1F\x11\x11\x13\x17\x1F\x1F" /* symbol polovicni baterie */
#DEFINE LCD_CHAR_BAT0 "\x0E\x1F\x11\x11\x11\x11\x11\x1F" /* symbol vybite baterie */
#DEFINE LCD_CHAR_LUA "\x04\x0E\x11\x11\x1F\x11\x11\x80" /* A s carkou */
#DEFINE LCD_CHAR_LLA "\x01\x02\x0E\x01\x1F\x11\x0F\x80" /* a s carkou */
#DEFINE LCD_CHAR_HUC "\x0A\x0E\x11\x10\x10\x11\x0E\x80" /* C s hackem */
#DEFINE LCD_CHAR_HLC "\x0A\x04\x0E\x10\x10\x11\x0E\x80" /* c s hackem */
#DEFINE LCD_CHAR_HUD "\x0A\x1C\x12\x11\x11\x12\x1C\x80" /* D s hackem */
#DEFINE LCD_CHAR_HLD "\x05\x03\x0D\x13\x11\x11\x0F\x80" /* d s hackem */
#DEFINE LCD_CHAR_LUE "\x04\x1F\x10\x10\x1E\x10\x1F\x80" /* E s carkou */
#DEFINE LCD_CHAR_LLE "\x01\x02\x0E\x11\x1F\x10\x0E\x80" /* e s carkou */
#DEFINE LCD_CHAR_HUE "\x0A\x1F\x10\x1E\x10\x10\x1F\x80" /* E s hackem */
#DEFINE LCD_CHAR_HLE "\x0A\x04\x0E\x11\x1F\x10\x0E\x80" /* e s hackem */
#DEFINE LCD_CHAR_LUI "\x04\x0E\x04\x04\x04\x04\x0E\x80" /* I s carkou */
#DEFINE LCD_CHAR_LLI "\x02\x04\x80\x0C\x04\x04\x0E\x80" /* i s carkou */
#DEFINE LCD_CHAR_HUN "\x0A\x15\x11\x19\x15\x13\x11\x80" /* N s hackem */
#DEFINE LCD_CHAR_HLN "\x0A\x04\x16\x19\x11\x11\x11\x80" /* n s hackem */
#DEFINE LCD_CHAR_LUO "\x04\x0E\x11\x11\x11\x11\x0E\x80" /* O s carkou */
#DEFINE LCD_CHAR_LLO "\x02\x04\x0E\x11\x11\x11\x0E\x80" /* o s carkou */
#DEFINE LCD_CHAR_HUR "\x0A\x1E\x11\x1E\x14\x12\x11\x80" /* R s hackem */
#DEFINE LCD_CHAR_HLR "\x0A\x04\x16\x19\x10\x10\x10\x80" /* r s hackem */
#DEFINE LCD_CHAR_HUS "\x0A\x0F\x10\x0E\x01\x01\x1E\x80" /* S s hackem */
#DEFINE LCD_CHAR_HLS "\x0A\x04\x0E\x10\x0E\x01\x1E\x80" /* s s hackem */
#DEFINE LCD_CHAR_HUT "\x0A\x1F\x04\x04\x04\x04\x04\x80" /* T s hackem */
#DEFINE LCD_CHAR_HLT "\x0A\x0C\x1C\x08\x08\x09\x06\x80" /* t s hackem */
#DEFINE LCD_CHAR_LUU "\x02\x15\x11\x11\x11\x11\x0E\x80" /* U s carkou */
#DEFINE LCD_CHAR_LLU "\x02\x04\x11\x11\x11\x13\x0D\x80" /* u s carkou */
#DEFINE LCD_CHAR_CUU "\x06\x17\x11\x11\x11\x11\x0E\x80" /* U s krouzkem */
#DEFINE LCD_CHAR_CLU "\x06\x06\x11\x11\x11\x11\x0E\x80" /* u s krouzkem */
#DEFINE LCD_CHAR_LUY "\x02\x15\x11\x0A\x04\x04\x04\x80" /* Y s carkou */
#DEFINE LCD_CHAR_LLY "\x02\x04\x11\x11\x0F\x01\x0E\x80" /* y s carkou */
#DEFINE LCD_CHAR_HUZ "\x0A\x1F\x01\x02\x04\x08\x1F\x80" /* Z s hackem */
#DEFINE LCD_CHAR_HLZ "\x0A\x04\x1F\x02\x04\x08\x1F\x80" /* z s hackem */
 
 
// Priklad pouziti definovanych znaku
//
//
//void lcd_sample()
//{
// lcd_define_char(0,LCD_CHAR_BAT50); // Priklad definice znaku baterie do pozice 0
// lcd_define_char(2,LCD_CHAR_HLE LCD_CHAR_LUI); // Priklad definice znaku e s hackem a I s carkou od pozice 2
// // vsimnete si, ze neni carka mezi retezci s definici (oba retezce definuji
// // jediny definicni retezec)
// printf(lcd_putc,"\fZnaky:\20\22\23"); // priklad vypisu znaku z pozice 0, 2 a 3
// delay_ms(1000);
// lcd_define_char(0,LCD_CHAR_BAT0); // Predefinovani tvaru znaku v pozici 0
// delay_ms(1000);
//}
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/06/PRG.BAT
0,0 → 1,6
call picpgr stop
call picpgr erase pic16f84
call picpgr program main.hex hex pic16f84
call picpgr run
pause
call picpgr stop
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/06/PRG.PIF
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
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/06/RUN.BAT
0,0 → 1,5
call picpgr run
pause
call picpgr stop
pause
run.bat
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/06/VC.MNU
0,0 → 1,4
R: Run
picpgr run
S: Stop
picpgr stop
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/06/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
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/main.c
0,0 → 1,185
// Prijimac
 
#DEFINE DEBUG PIN_A4 // ladici pomocne synchronizacni impulzy
 
#include "main.h"
#include "..\common.h"
 
#DEFINE LCD_RS PIN_B1 // rizeni registru LCD displeje
#DEFINE LCD_E PIN_B0 // enable LCD displeje
#DEFINE LCD_DATA_LSB PIN_B2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
#INCLUDE "MYLCD.C"
 
#DEFINE PRIJIMAC PIN_A3 // pin na ktery je pripojen prijimac
#DEFINE SERVO_X PIN_A0 // pin na ktery je pripojeno servo
#DEFINE SERVO_Y PIN_A1
 
// Prijme datovy nibble vcetne zasynchronizovani
// Chybi dodelat timeout
int8 prijmi_nibble(int8* datovy, int8* data)
{
int8 i;
 
#IFDEF DEBUG
int1 tmp;
#ENDIF
 
*data=0;
 
// Cekam na dlouhou nulu
for (i=4; i>0; i--)
{
if (input(PRIJIMAC)) i=4;
delay_us(IMPULS/2);
}
 
// Cekam na jednicku (start ramce)
for (; !input(PRIJIMAC); )
{
}
 
// Ctu typ nibblu
delay_us(2*IMPULS+2*IMPULS/3);
*datovy=input(PRIJIMAC);
 
// Prenasim bity
for (i=0; i<4; i++)
{
delay_us(2*IMPULS);
*data >>= 1;
if (input(PRIJIMAC)) *data +=0b1000;
 
#IFDEF DEBUG
output_bit(DEBUG,tmp);
tmp=!tmp;
#ELSE
delay_us(20);
#ENDIF
}
 
return FALSE;
}
 
 
// Prijme datovy ramec
// Pokud nastane chyba vraci kod chyby
int8 prijmi_ramec(int8* kanal, int8* data)
{
int8 datovy;
int8 suma;
 
// Cekej na synchronizacni nibble
do
{
if (prijmi_nibble(&datovy, data)) return 1; // chyba timout
}
while(datovy);
 
// Zkontroluj magickou hodnotu
if (*data != SYNC_NIBBLE) return 2; // chyba magickeho kodu ramce
 
// Prijmi cislo kanalu
if (prijmi_nibble(&datovy, kanal)) return 1; // chyba timeout
if (!datovy) return 3; // chyba typu nibblu
 
// Prijmi data
if (prijmi_nibble(&datovy, data)) return 1; // chyba timeout
if (!datovy) return 3; // chyba typu nibblu
 
// Prijmi zabezpeceni
if (prijmi_nibble(&datovy, &suma)) return 1; // chyba timeout
if (!datovy) return 3; // chyba typu nibblu
 
// Zkontroluj kontrolni soucet
if (((*kanal+*data) & 0b1111) != suma) return 3; // chyba kontrolniho souctu
 
return 0;
}
 
 
 
int8 x,y,tlacitka;
int8 xc,yc; // pocitadla aktualizace x a y
int e1,e2,e3,e4; // pocitadla chyb - ladici
 
void main()
{
lcd_init(); // zinicializuj LCD display
delay_ms(5);
printf(lcd_putc,"Ahoj...");
delay_ms(300);
 
x = 0;
y = 0;
xc = 0;
yc = 0;
e1 = 0;
e2 = 0;
e3 = 0;
e4 = 0;
 
while (true)
{
int8 kanal, data;
 
if (prijmi_ramec(&kanal,&data))
e1++;
else
{
switch (kanal) // rozeskoc se podle adresy osy
{
case OSA_X:
{
x=data;
xc++;
break;
};
case OSA_Y:
{
y=data;
yc++;
break;
};
case TLs:
{
tlacitka=data;
break;
};
};
if (true==bit_test(tlacitka,1))
{
output_high(pin_A2);
}
else output_low(pin_A2);
 
// ladici vypisy
lcd_gotoxy(1,1); // vytiskni X a Y
printf(lcd_putc,"X%2U %3U%3U%3U ", x, xc, e1, e2);
lcd_gotoxy(1,2);
printf(lcd_putc,"Y%2U %3U%3U%3U ", y, yc, e3, tlacitka);
 
// ovladani serv
output_high(SERVO_X);
delay_ms(1);
for (data=x; data--; data>0)
delay_us(65);
output_low(SERVO_X);
 
output_high(SERVO_Y);
delay_ms(1);
for (data=y; data--; data>0)
delay_us(65);
output_low(SERVO_Y);
 
for (data=30-x-y; data--; data>0)
delay_us(65);
 
}
}
}
 
 
/schemata/prenos/letadlo/SW/prijimac/ostra_bez_ladicich_impulsu/zaloha/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
/schemata/prenos/letadlo/SW/prijimac/prg.PIF
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
/schemata/prenos/letadlo/SW/prijimac/prg.bat
0,0 → 1,6
call picpgr stop
call picpgr erase pic16f84
call picpgr program main.hex hex pic16f84
call picpgr run
pause
call picpgr stop
/schemata/prenos/letadlo/SW/prijimac/prijimac.BAK
0,0 → 1,85
 
//#DEFINE DEBUG PIN_A4 // ladici pomocne synchronizacni impulzy
 
// Prijme datovy nibble vcetne zasynchronizovani
// Chybi dodelat timeout
int8 prijmi_nibble(int8* datovy, int8* data)
{
int8 i;
 
#IFDEF DEBUG
int1 tmp;
#ENDIF
 
*data=0;
 
// Cekam na dlouhou nulu
for (i=4; i>0; i--)
{
if (input(PRIJIMAC)) i=4;
delay_us(IMPULS/2);
}
 
// Cekam na jednicku (start ramce)
for (; !input(PRIJIMAC); )
{
}
 
// Ctu typ nibblu
delay_us(2*IMPULS+2*IMPULS/3);
*datovy=input(PRIJIMAC);
 
// Prenasim bity
for (i=0; i<4; i++)
{
delay_us(2*IMPULS);
*data >>= 1;
if (input(PRIJIMAC)) *data +=0b1000;
 
#IFDEF DEBUG
output_bit(DEBUG,tmp);
tmp=!tmp;
#ELSE
delay_us(20);
#ENDIF
}
 
return FALSE;
}
 
 
// Prijme datovy ramec
// Pokud nastane chyba vraci kod chyby
int8 prijmi_ramec(int8* kanal, int8* data)
{
int8 datovy;
int8 suma;
 
// Cekej na synchronizacni nibble
do
{
if (prijmi_nibble(&datovy, data)) return 1; // chyba timout
}
while(datovy);
 
// Zkontroluj magickou hodnotu
if (*data != SYNC_NIBBLE) return 2; // chyba magickeho kodu ramce
 
// Prijmi cislo kanalu
if (prijmi_nibble(&datovy, kanal)) return 1; // chyba timeout
if (!datovy) return 3; // chyba typu nibblu
 
// Prijmi data
if (prijmi_nibble(&datovy, data)) return 1; // chyba timeout
if (!datovy) return 3; // chyba typu nibblu
 
// Prijmi zabezpeceni
if (prijmi_nibble(&datovy, &suma)) return 1; // chyba timeout
if (!datovy) return 3; // chyba typu nibblu
 
// Zkontroluj kontrolni soucet
if (((*kanal+*data) & 0b1111) != suma) return 3; // chyba kontrolniho souctu
 
return 0;
}
 
/schemata/prenos/letadlo/SW/prijimac/prijimac.c
0,0 → 1,87
 
//#DEFINE DEBUG PIN_A4 // ladici pomocne synchronizacni impulzy
 
//#DEFINE PRIJIMAC PIN_A3 // pin na ktery je pripojen prijimac
 
// Prijme datovy nibble vcetne zasynchronizovani
// Chybi dodelat timeout
int8 prijmi_nibble(int8* datovy, int8* data)
{
int8 i;
 
#IFDEF DEBUG
int1 tmp;
#ENDIF
 
*data=0;
 
// Cekam na dlouhou nulu
for (i=4; i>0; i--)
{
if (input(PRIJIMAC)) i=4;
delay_us(IMPULS/2);
}
 
// Cekam na jednicku (start ramce)
for (; !input(PRIJIMAC); )
{
}
 
// Ctu typ nibblu
delay_us(2*IMPULS+2*IMPULS/3);
*datovy=input(PRIJIMAC);
 
// Prenasim bity
for (i=0; i<4; i++)
{
delay_us(2*IMPULS);
*data >>= 1;
if (input(PRIJIMAC)) *data +=0b1000;
 
#IFDEF DEBUG
output_bit(DEBUG,tmp);
tmp=!tmp;
#ELSE
delay_us(20);
#ENDIF
}
 
return FALSE;
}
 
 
// Prijme datovy ramec
// Pokud nastane chyba vraci kod chyby
int8 prijmi_ramec(int8* kanal, int8* data)
{
int8 datovy;
int8 suma;
 
// Cekej na synchronizacni nibble
do
{
if (prijmi_nibble(&datovy, data)) return 1; // chyba timout
}
while(datovy);
 
// Zkontroluj magickou hodnotu
if (*data != SYNC_NIBBLE) return 2; // chyba magickeho kodu ramce
 
// Prijmi cislo kanalu
if (prijmi_nibble(&datovy, kanal)) return 1; // chyba timeout
if (!datovy) return 3; // chyba typu nibblu
 
// Prijmi data
if (prijmi_nibble(&datovy, data)) return 1; // chyba timeout
if (!datovy) return 3; // chyba typu nibblu
 
// Prijmi zabezpeceni
if (prijmi_nibble(&datovy, &suma)) return 1; // chyba timeout
if (!datovy) return 3; // chyba typu nibblu
 
// Zkontroluj kontrolni soucet
if (((*kanal+*data) & 0b1111) != suma) return 3; // chyba kontrolniho souctu
 
return 0;
}
 
/schemata/prenos/letadlo/SW/prijimac/run.bat
0,0 → 1,5
call picpgr run
pause
call picpgr stop
pause
run.bat
/schemata/prenos/letadlo/SW/prijimac/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
/schemata/prenos/letadlo/SW/prijimac/x.BAK
--- x.c (nonexistent)
+++ x.c (revision 6)
@@ -0,0 +1 @@
+#use rs232(baud=9600,parity=N,xmit=PIN_A3,rcv=PIN_A2,stream=,bits=8)
/schemata/prenos/letadlo/SW/prijimac/zaloha/01/MAIN.BAK
0,0 → 1,163
#include "main.h"
#include "..\common.h"
 
#DEFINE LCD_RS PIN_B1 // rizeni registru LCD displeje
#DEFINE LCD_E PIN_B0 // enable LCD displeje
#DEFINE LCD_DATA_LSB PIN_B2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
#INCLUDE "MYLCD.C"
#DEFINE PRIJIMAC PIN_A3 // pin na ktery je pripojen prijimac
#DEFINE SERVO_X PIN_A0 // pin na ktery je pripojeno servo
#DEFINE SERVO_Y PIN_A1
 
int8 bit,x,y;
int counter; // pocitadlo 1 a 0 v detektoru
int x_old=0,y_old;
 
void servo(int uhel, int souradnice)
{
if (X==souradnice) output_high(SERVO_X); else output_high(SERVO_Y);
 
delay_us(62.5*uhel);
 
if (SERVO_X==souradnice) output_low(SERVO_X); else output_low(SERVO_Y);
// delay_ms(10);
}
 
int8 prijmout(int8* bit)
{
// || |
// |--|_____ 1
// |
// |-|__|-|_ 0
 
while (!input(PRIJIMAC)) ; // cekej na jednicku
delay_us(IMPULS/4); // presvec se, jestli je stale 1 po 1/4 impulsu
if (!input(PRIJIMAC)) return(false); // vrat chybu, kdyz neni stale 1
delay_us(3*IMPULS); // pockej na rozhodovaci misto
if (input(PRIJIMAC)) *bit=0; else *bit=1; // dekoduj 1 nebo 0
delay_us(IMPULS); // pockej na konec znaku
 
output_bit(PIN_A0, *bit); // kontrolni vystup
 
return(true); // vrat, ze se cteni povedlo
}
 
int8 read_nibble(int8* value)
{
int8 n; // citac
int8 bit; // pomocna promenna
 
*value=0;
for (n=1; n<=4; n++) // prijmi 4 bity
{
*value >>= 1; // posun jiz prectene do leva
if (0==prijmout(&bit)) return(false); // prijmi bit; pri chybe cteni vrat chybu
*value |= bit << 3; // pridej bit do nibblu
};
return(true); // vrat 1, jako ,ze je vse O.K.
}
 
/*void dekodovat(void)
{
int8 osa, hodnota, kontrola;
 
counter=4;
 
decoder:
 
counter=0; // vynuluj citac
do // vyhledej synchronizacni jednicky
{
if (!prijmout(&bit)) goto decoder; // prijmi bit; pri chybe zacni znovu
if (1==bit) counter++; else goto decoder; // kdyz je bit 1, tak zvys citac; jinak zacni znovu
} while(counter<4); // pockej na 4 jednicky
 
if (!read_nibble(&osa)) goto decoder; // nacti identifikator osy
 
if (!read_nibble(&hodnota)) goto decoder; // nacti 1. nibble; pri chybe zacni znovu
if (!read_nibble(&kontrola)) goto decoder; // nacti 2. nibble; pri chybe zacni znovu
if (hodnota != kontrola) goto decoder; // zacni znovu, pokud jsou ruzne nibble
 
switch (osa) // rozeskoc se podle adresy osy
{
case OSA_X:
{
x=hodnota;
break;
};
case OSA_Y:
{
y=hodnota;
break;
};
case TLs:
{
break;
};
};
}
*/
void main()
{
lcd_init(); // zinicializuj LCD display
 
while (true)
{
int8 osa, hodnota, kontrola;
 
counter=4;
 
decoder:
 
servo(x_old,SERVO_X);
servo(y_old,SERVO_Y);
 
counter=0; // vynuluj citac
do // vyhledej synchronizacni jednicky
{
if (!prijmout(&bit)) goto decoder; // prijmi bit; pri chybe zacni znovu
if (1==bit) counter++; else goto decoder; // kdyz je bit 1, tak zvys citac; jinak zacni znovu
} while(counter<4); // pockej na 4 jednicky
 
if (!read_nibble(&osa)) goto decoder; // nacti identifikator osy
 
if (!read_nibble(&hodnota)) goto decoder; // nacti 1. nibble; pri chybe zacni znovu
if (!read_nibble(&kontrola)) goto decoder; // nacti 2. nibble; pri chybe zacni znovu
if (hodnota != kontrola) goto decoder; // zacni znovu, pokud jsou ruzne nibble
 
switch (osa) // rozeskoc se podle adresy osy
{
case OSA_X:
{
x=hodnota;
x_old=x;
break;
};
case OSA_Y:
{
y=hodnota;
y_old=y
break;
};
case TLs:
{
break;
};
};
 
 
lcd_gotoxy(1,1); // vytiskni X a Y
printf(lcd_putc,"X: %U ", x);
lcd_gotoxy(1,2);
printf(lcd_putc,"Y: %U ", y);
}
}
 
 
/schemata/prenos/letadlo/SW/prijimac/zaloha/01/MAIN.C
0,0 → 1,164
#include "main.h"
#include "..\common.h"
 
#DEFINE LCD_RS PIN_B1 // rizeni registru LCD displeje
#DEFINE LCD_E PIN_B0 // enable LCD displeje
#DEFINE LCD_DATA_LSB PIN_B2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
#INCLUDE "MYLCD.C"
#DEFINE PRIJIMAC PIN_A3 // pin na ktery je pripojen prijimac
#DEFINE SERVO_X PIN_A0 // pin na ktery je pripojeno servo
#DEFINE SERVO_Y PIN_A1
 
int8 bit,x,y;
int counter; // pocitadlo 1 a 0 v detektoru
int x_old=0,y_old;
 
void servo(int uhel, int souradnice)
{
if (X==souradnice) output_high(SERVO_X); else output_high(SERVO_Y);
 
delay_us(62.5*uhel);
 
if (SERVO_X==souradnice) output_low(SERVO_X); else output_low(SERVO_Y);
// delay_ms(10);
}
 
int8 prijmout(int8* bit)
{
// || |
// |--|_____ 1
// |
// |-|__|-|_ 0
 
while (!input(PRIJIMAC)) ; // cekej na jednicku
delay_us(IMPULS/4); // presvec se, jestli je stale 1 po 1/4 impulsu
if (!input(PRIJIMAC)) return(false); // vrat chybu, kdyz neni stale 1
delay_us(3*IMPULS); // pockej na rozhodovaci misto
if (input(PRIJIMAC)) *bit=0; else *bit=1; // dekoduj 1 nebo 0
delay_us(IMPULS); // pockej na konec znaku
 
output_bit(PIN_A0, *bit); // kontrolni vystup
 
return(true); // vrat, ze se cteni povedlo
}
 
int8 read_nibble(int8* value)
{
int8 n; // citac
int8 bit; // pomocna promenna
 
*value=0;
for (n=1; n<=4; n++) // prijmi 4 bity
{
*value >>= 1; // posun jiz prectene do leva
if (0==prijmout(&bit)) return(false); // prijmi bit; pri chybe cteni vrat chybu
*value |= bit << 3; // pridej bit do nibblu
};
return(true); // vrat 1, jako ,ze je vse O.K.
}
 
/*void dekodovat(void)
{
int8 osa, hodnota, kontrola;
 
counter=4;
 
decoder:
 
counter=0; // vynuluj citac
do // vyhledej synchronizacni jednicky
{
if (!prijmout(&bit)) goto decoder; // prijmi bit; pri chybe zacni znovu
if (1==bit) counter++; else goto decoder; // kdyz je bit 1, tak zvys citac; jinak zacni znovu
} while(counter<4); // pockej na 4 jednicky
 
if (!read_nibble(&osa)) goto decoder; // nacti identifikator osy
 
if (!read_nibble(&hodnota)) goto decoder; // nacti 1. nibble; pri chybe zacni znovu
if (!read_nibble(&kontrola)) goto decoder; // nacti 2. nibble; pri chybe zacni znovu
if (hodnota != kontrola) goto decoder; // zacni znovu, pokud jsou ruzne nibble
 
switch (osa) // rozeskoc se podle adresy osy
{
case OSA_X:
{
x=hodnota;
break;
};
case OSA_Y:
{
y=hodnota;
break;
};
case TLs:
{
break;
};
};
}
*/
void main()
{
lcd_init(); // zinicializuj LCD display
 
while (true)
{
int8 osa, hodnota, kontrola;
 
counter=4;
 
decoder:
 
servo(x_old,SERVO_X);
servo(y_old,SERVO_Y);
 
counter=0; // vynuluj citac
do // vyhledej synchronizacni jednicky
{
if (!prijmout(&bit)) goto decoder; // prijmi bit; pri chybe zacni znovu
if (1==bit) counter++; else goto decoder; // kdyz je bit 1, tak zvys citac; jinak zacni znovu
} while(counter<4); // pockej na 4 jednicky
 
if (!read_nibble(&osa)) goto decoder; // nacti identifikator osy
 
if (!read_nibble(&hodnota)) goto decoder; // nacti 1. nibble; pri chybe zacni znovu
if (!read_nibble(&kontrola)) goto decoder; // nacti 2. nibble; pri chybe zacni znovu
if (hodnota != kontrola) goto decoder; // zacni znovu, pokud jsou ruzne nibble
 
switch (osa) // rozeskoc se podle adresy osy
{
case OSA_X:
{
x=hodnota;
x_old=x;
break;
};
case OSA_Y:
{
y=hodnota;
y_old=y;
break;
};
case TLs:
{
break;
};
};
 
 
lcd_gotoxy(1,1); // vytiskni X a Y
printf(lcd_putc,"X: %U ", x);
lcd_gotoxy(1,2);
printf(lcd_putc,"Y: %U ", y);
}
}
 
 
/schemata/prenos/letadlo/SW/prijimac/zaloha/01/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
/schemata/prenos/letadlo/SW/prijimac/zaloha/01/MAIN.ERR
0,0 → 1,0
No Errors
/schemata/prenos/letadlo/SW/prijimac/zaloha/01/MAIN.H
0,0 → 1,4
#include <16F84.h>
#use delay(clock=4000000)
#fuses XT,NOWDT,PUT
 
/schemata/prenos/letadlo/SW/prijimac/zaloha/01/MAIN.HEX
0,0 → 1,95
:1000000000308A00512A00000A108A100A11820763
:1000100028340C34013406341A30840000080319E3
:10002000202801308D008C018C0B14288D0B132897
:100030004A308C008C0B1A2800000000800B11281D
:1000400000340608C339A100200D8C008C0DFC3053
:100050008C050C083C392104860006148316061012
:1000600000008312061083160610831200349E08C7
:10007000031D3C2886103D288614831686108312A3
:100080009F0E1F08A00021209F0E1F08A000212006
:100090000D308C008C0B4A28003414309A000C2050
:1000A000C33083168605831286108316861083124A
:1000B000061083160610831297011708023C031CD2
:1000C000692802309A000C200330A0002120970AF2
:1000D0005D280D308C008C0B6B280230A000212095
:1000E0000D308C008C0B722897011708023C031C02
:1000F00085281708042098009E0118089F003720C3
:1001000002309A000C20970A7528562A8E308C00EF
:100110001A088D0019088E008F018D08031D9A287A
:100120000E088D008E0108308C028D08031D9A2860
:100130008C01A22803108D1BA1288E0D8D0D8C0320
:100140009A288D1300003A29190803191529A100CE
:100150001D0803191529A107031CAF28B6287F30F5
:10016000A102031C152903191529BA288130A107FA
:100170000318152921088C008D018E018F011A08A2
:10018000A500A5171B08A4001C08A3001830A10097
:10019000A201231CE32820088F07031CD5288E0A00
:1001A000031DD5288D0A0319A2171F088E07031CEB
:1001B000DC288D0A0319A2171E089B009B171B0839
:1001C0008D070318A217A20D8D0C8E0C8F0CA50C99
:1001D000A40CA30C0310A10BC82801308C07031832
:1001E00015298D1BFA28A50D8F0D8E0D8D0D8C03F5
:1001F00003191529A51F0B298F0A031D0B298E0A28
:10020000031D0B298D0A031D0B298D0C8E0C8F0CE1
:100210008C0A031915291A08A2001E08A206A21F9B
:1002200013298D1719298D1319298C018D018E0120
:100230008F01000049291D308400FC308005800CAE
:10024000800C00080319282926290000800B252985
:10025000542918080F02031D322983160510831232
:100260000514362983168510831285149A01170800
:10027000990086289C019B017A309A00843099006D
:100280000F08A0000E089F000D089E000C089D009E
:10029000A4280C0899000D089A000E089B000F086E
:1002A0009C000C089D001B291808283C031D5D2993
:1002B0008316051083120510612983168510831299
:1002C00085100034831685158312851D622914302C
:1002D0008C008C0B69290000831685158312851903
:1002E000742900308D009829F9308C008C0B762908
:1002F00000000000831685158312851D83291A08C6
:100300008400800187291A0884000130800053305E
:100310008C008C0B89291A0884008008031D9229FF
:1003200005109329051483160510013083128D00E2
:100330000034170884008001013098001808043C3C
:10034000031CBE29170884000310000C8C008000D9
:1003500019309A0062218D08031DB12900308D00EB
:10036000C02917088400190D8C008C0D8C0DF830F5
:100370008C050C0800048000980A9E2901308D002D
:10038000003401301A029C001B08023C031DCA29DC
:1003900040309C071C0880389D009E011D089F006E
:1003A0003720003419088C000C300C020319E529A1
:1003B0000A300C020319ED290D300C020319F32940
:1003C00008300C020319F829FD299E0101309F0015
:1003D000372002309A000C20092A01309A0002309E
:1003E0009B00C121092A01309A009B00C121092AE2
:1003F0009E0110309F003720092A19081F3C031C5A
:10040000032A0730990501309E0019089F00372004
:10041000092A00341A088D0119020318122A190832
:100420008C001E2A8C0108309B00990D8C0D1A0837
:100430000C0203188C008D0D9B0B152A00340D083F
:100440001708990064309A000A220C0897000D08DA
:100450003030031D322A181898159819382A181A9E
:100460002030342A981118128D070D089900D221D6
:10047000170899000A309A000A220C0897000D0804
:100480003030031D472A98194B2A181A20308D073F
:100490000D089900D2213030970717089900D22112
:1004A000003484011F30830592014D2804309100EF
:1004B0001208970028309800292113089700293046
:1004C0009800292191010E309A0062218D08031DA8
:1004D0006A2A582A0E0B6E2A910A6F2A582A110886
:1004E000033C0318632A1430970099218D08031DDB
:1004F0007A2A582A1530970099218D08031D812AE0
:10050000582A1630970099218D08031D882A582AE9
:100510001608150203198D2A582A1408FD3E0318DF
:100520009E2A033ED32A15088F000F0892009E2AA8
:1005300015089000100893009E2A9E2A01309A0008
:100540009B00C12158309900D2213A309900D22124
:1005500020309900D2210F089700183098001F22F0
:100560000630970020309900D221970BB22A013033
:100570009A0002309B00C12159309900D2213A30B3
:100580009900D22120309900D2211008970018300C
:1005900098001F220630970020309900D221970B37
:1005A000CC2A562A63000A108A140A118207932A59
:0405B000982A9D2ABE
:02400E00F13F80
:00000001FF
;PIC16F84
/schemata/prenos/letadlo/SW/prijimac/zaloha/01/MAIN.LST
0,0 → 1,1033
CCS PCW C Compiler, Version 3.110, 15448
 
Filename: d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\main.LST
 
ROM used: 730 (71%)
Largest free fragment is 294
RAM used: 9 (13%) at main() level
26 (38%) worst case
Stack: 5 locations
 
*
0000: MOVLW 00
0001: MOVWF 0A
0002: GOTO 251
0003: NOP
.................... #include "main.h"
.................... #include <16F84.h>
.................... //////// Standard Header file for the PIC16F84 device ////////////////
.................... #device PIC16F84
.................... #list
....................
.................... #use delay(clock=4000000)
*
000C: MOVLW 1A
000D: MOVWF 04
000E: MOVF 00,W
000F: BTFSC 03.2
0010: GOTO 020
0011: MOVLW 01
0012: MOVWF 0D
0013: CLRF 0C
0014: DECFSZ 0C,F
0015: GOTO 014
0016: DECFSZ 0D,F
0017: GOTO 013
0018: MOVLW 4A
0019: MOVWF 0C
001A: DECFSZ 0C,F
001B: GOTO 01A
001C: NOP
001D: NOP
001E: DECFSZ 00,F
001F: GOTO 011
0020: RETLW 00
*
011B: MOVLW 1D
011C: MOVWF 04
011D: MOVLW FC
011E: ANDWF 00,F
011F: RRF 00,F
0120: RRF 00,F
0121: MOVF 00,W
0122: BTFSC 03.2
0123: GOTO 128
0124: GOTO 126
0125: NOP
0126: DECFSZ 00,F
0127: GOTO 125
0128: GOTO 154 (RETURN)
.................... #fuses XT,NOWDT,PUT
....................
....................
.................... #include "..\common.h"
.................... #DEFINE OSA_X 0 // adresy os
.................... #DEFINE OSA_Y 1
.................... #DEFINE TLs 2
.................... #DEFINE IMPULS 250 // sirka impulsu
....................
....................
.................... #DEFINE LCD_RS PIN_B1 // rizeni registru LCD displeje
.................... #DEFINE LCD_E PIN_B0 // enable LCD displeje
.................... #DEFINE LCD_DATA_LSB PIN_B2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
.................... #INCLUDE "MYLCD.C"
.................... // LCD modul pro ovladani dvouradkoveho LCD modulu se standardnim Hitachi radicem
.................... // (c)miho 2002
.................... //
.................... // Historie:
.................... //
.................... // 0.0 Uvodni verze se snadnou definici portu LCD displeje
.................... //
.................... //
.................... // Funkce:
.................... //
.................... // lcd_init() inicializuje LCD displej a porty, nutno volat jako prvni
.................... //
.................... // lcd_putc(c) zapis snaku do lcd displeje, zpracovava nasledujici ridici znaky
.................... // \f = \x0C - nova stranka - smazani displeje
.................... // \n = \x0A - odradkovani (prechod na druhou radku)
.................... // \b = \x08 - backspace - posunuti kurzoru o 1 pozici zpet
.................... // \r = \x0D - goto home to position 1,1
.................... // \0 .. \7 - definovatelne znaky v pozicich 0 az 7 v CGRAM
.................... // \20 .. \27 - alternativne zapsane znaky (oktalove) v pozicich 0 az 7 CGRAM
.................... // Pozor na to, ze funkce printf konci tisk pokud narazi na \0 (konec retezce)
.................... //
.................... // lcd_gotoxy(x,y) presune kurzor na uvedenou adresu
.................... // nekontroluje parametry
.................... //
.................... // lcd_cursor_on zapne kurzor
.................... // lcd_cursor_off vypne kurzor
.................... //
.................... // lcd_define_char(Index, Def) Makro, ktere definuje znaky od pozice Index obsahem definicniho
.................... // retezce Def. Kazdych 8 znaku retezce Def definuje dalsi znak v CGRAM.
.................... // Kapacita CGRAM je celkem 8 znaku s indexem 0 az 7.
.................... // Na konci se provede lcd_gotoxy(1,1).
.................... // Na konci teto knihovny je priklad pouziti definovanych znaku
.................... //
.................... // Definice portu:
.................... //
.................... // #DEFINE LCD_RS PIN_B2 // rizeni registru LCD displeje
.................... // #DEFINE LCD_E PIN_B1 // enable LCD displeje
.................... // #DEFINE LCD_DATA_LSB PIN_C2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
....................
....................
....................
....................
.................... // Privatni sekce, cist jen v pripade, ze neco nefunguje
....................
....................
....................
....................
.................... // Generovane defince portu pro ucely teto knihovny aby kod generoval spravne IO operace a soucasne
.................... // bylo mozne jednoduse deklarovat pripojene piny LCD displeje pri pouziti teto knihovny. Problem spociva
.................... // v tom, ze se musi spravne ridit smery portu a soucasne datovy port zabira jen 4 bity ze zadaneho portu
.................... //
.................... #DEFINE LCD_SHIFT (LCD_DATA_LSB&7) // pocet bitu posuvu dataoveho kanalu v datovem portu
.................... #DEFINE LCD_PORT (LCD_DATA_LSB>>3) // adresa LCD datoveho portu
.................... #DEFINE LCD_TRIS (LCD_PORT+0x80) // adresa prislusneho TRIS registru
.................... #DEFINE LCD_MASK (0xF<<LCD_SHIFT) // maska platnych bitu
.................... //
.................... #IF LCD_SHIFT>4 // kontrola mezi
.................... #ERROR LCD data port LSB bit not in range 0..4
.................... #ENDIF
....................
....................
.................... // Definice konstant pro LCD display
.................... //
.................... #define LCD_CURSOR_ON_ 0x0E // kurzor jako blikajici radka pod znakem
.................... #define LCD_CURSOR_OFF_ 0x0C // zadny kurzor
.................... #define LCD_LINE_2 0x40 // adresa 1. znaku 2. radky
....................
....................
.................... // Definice rezimu LCD displeje
.................... //
.................... BYTE const LCD_INIT_STRING[4] =
.................... {
.................... 0x28, // intrfejs 4 bity, 2 radky, font 5x7
.................... LCD_CURSOR_OFF_, // display on, kurzor off,
.................... 0x01, // clear displeje
.................... 0x06 // inkrement pozice kurzoru (posun kurzoru doprava)
.................... };
*
0004: BCF 0A.0
0005: BCF 0A.1
0006: BCF 0A.2
0007: ADDWF 02,F
0008: RETLW 28
0009: RETLW 0C
000A: RETLW 01
000B: RETLW 06
....................
....................
.................... // Odesle nibble do displeje (posle data a klikne signalem e)
.................... //
.................... void lcd_send_nibble( BYTE n )
.................... {
.................... *LCD_PORT = (*LCD_PORT & ~LCD_MASK) | ((n << LCD_SHIFT) & LCD_MASK); // nastav datove bity portu a ostatni zachovej
*
0021: MOVF 06,W
0022: ANDLW C3
0023: MOVWF 21
0024: RLF 20,W
0025: MOVWF 0C
0026: RLF 0C,F
0027: MOVLW FC
0028: ANDWF 0C,F
0029: MOVF 0C,W
002A: ANDLW 3C
002B: IORWF 21,W
002C: MOVWF 06
.................... output_bit(LCD_E,1); // vzestupna hrana
002D: BSF 06.0
002E: BSF 03.5
002F: BCF 06.0
.................... delay_us(1); // pockej alespon 450ns od e nebo alespon 195ns od dat
0030: NOP
.................... output_bit(LCD_E,0); // sestupna hrana (minimalni perioda e je 1us)
0031: BCF 03.5
0032: BCF 06.0
0033: BSF 03.5
0034: BCF 06.0
0035: BCF 03.5
0036: RETLW 00
.................... }
....................
....................
.................... // Odesle bajt do registru LCD
.................... //
.................... // Pokud je Adr=0 .. instrukcni registr
.................... // Pokud je Adr=1 .. datovy registr
.................... //
.................... void lcd_send_byte( BOOLEAN Adr, BYTE n )
.................... {
.................... output_bit(LCD_RS,Adr); // vyber registr
0037: MOVF 1E,F
0038: BTFSS 03.2
0039: GOTO 03C
003A: BCF 06.1
003B: GOTO 03D
003C: BSF 06.1
003D: BSF 03.5
003E: BCF 06.1
.................... swap(n);
003F: BCF 03.5
0040: SWAPF 1F,F
.................... lcd_send_nibble(n); // posli horni pulku bajtu
0041: MOVF 1F,W
0042: MOVWF 20
0043: CALL 021
.................... swap(n);
0044: SWAPF 1F,F
.................... lcd_send_nibble(n); // posli spodni pulku bajtu
0045: MOVF 1F,W
0046: MOVWF 20
0047: CALL 021
.................... delay_us(40); // minimalni doba na provedeni prikazu
0048: MOVLW 0D
0049: MOVWF 0C
004A: DECFSZ 0C,F
004B: GOTO 04A
004C: RETLW 00
.................... }
....................
....................
.................... // Provede inicializaci LCD displeje, smaze obsah a nastavi mod displeje
.................... //
.................... // Tato procedura se musi volat pred pouzitim ostatnich lcd_ procedur
.................... //
.................... void lcd_init()
.................... {
....................
.................... int i; // pocitadlo cyklu
....................
.................... delay_ms(20); // spozdeni pro provedeni startu displeje po zapnuti napajeni
004D: MOVLW 14
004E: MOVWF 1A
004F: CALL 00C
....................
.................... *LCD_TRIS = *LCD_TRIS & ~LCD_MASK; // nuluj odpovidajici bity tris registru datoveho portu LCD
0050: MOVLW C3
0051: BSF 03.5
0052: ANDWF 06,F
....................
.................... output_bit(LCD_RS,0); // nastav jako vystup a nastav klidovy stav
0053: BCF 03.5
0054: BCF 06.1
0055: BSF 03.5
0056: BCF 06.1
.................... output_bit(LCD_E,0); // nastav jako vystup a nastav klidovy stav
0057: BCF 03.5
0058: BCF 06.0
0059: BSF 03.5
005A: BCF 06.0
....................
.................... for (i=0; i<3; i++) // nastav lcd do rezimu 8 bitu sbernice
005B: BCF 03.5
005C: CLRF 17
005D: MOVF 17,W
005E: SUBLW 02
005F: BTFSS 03.0
0060: GOTO 069
.................... {
.................... delay_ms(2); // muze byt rozdelany prenos dat (2x 4 bity) nebo pomaly povel
0061: MOVLW 02
0062: MOVWF 1A
0063: CALL 00C
.................... lcd_send_nibble(3); // rezim 8 bitu
0064: MOVLW 03
0065: MOVWF 20
0066: CALL 021
.................... }
0067: INCF 17,F
0068: GOTO 05D
....................
.................... delay_us(40); // cas na zpracovani
0069: MOVLW 0D
006A: MOVWF 0C
006B: DECFSZ 0C,F
006C: GOTO 06B
.................... lcd_send_nibble(2); // nastav rezim 4 bitu (plati od nasledujiciho prenosu)
006D: MOVLW 02
006E: MOVWF 20
006F: CALL 021
.................... delay_us(40); // cas na zpracovani
0070: MOVLW 0D
0071: MOVWF 0C
0072: DECFSZ 0C,F
0073: GOTO 072
....................
.................... for (i=0;i<3;i++) // proved inicializaci (nastaveni modu, smazani apod)
0074: CLRF 17
0075: MOVF 17,W
0076: SUBLW 02
0077: BTFSS 03.0
0078: GOTO 085
.................... {
.................... lcd_send_byte(0,LCD_INIT_STRING[i]);
0079: MOVF 17,W
007A: CALL 004
007B: MOVWF 18
007C: CLRF 1E
007D: MOVF 18,W
007E: MOVWF 1F
007F: CALL 037
.................... delay_ms(2);
0080: MOVLW 02
0081: MOVWF 1A
0082: CALL 00C
.................... }
0083: INCF 17,F
0084: GOTO 075
0085: GOTO 256 (RETURN)
.................... }
....................
....................
.................... // Proved presun kurzoru
.................... //
.................... // Pozice 1.1 je domu
.................... //
.................... void lcd_gotoxy( BYTE x, BYTE y)
.................... {
....................
.................... BYTE Adr;
....................
.................... Adr=x-1;
*
01C1: MOVLW 01
01C2: SUBWF 1A,W
01C3: MOVWF 1C
.................... if(y==2)
01C4: MOVF 1B,W
01C5: SUBLW 02
01C6: BTFSS 03.2
01C7: GOTO 1CA
.................... Adr+=LCD_LINE_2;
01C8: MOVLW 40
01C9: ADDWF 1C,F
....................
.................... lcd_send_byte(0,0x80|Adr);
01CA: MOVF 1C,W
01CB: IORLW 80
01CC: MOVWF 1D
01CD: CLRF 1E
01CE: MOVF 1D,W
01CF: MOVWF 1F
01D0: CALL 037
01D1: RETLW 00
.................... }
....................
....................
.................... // Zapis znaku na displej, zpracovani ridicich znaku
.................... //
.................... void lcd_putc( char c)
.................... {
....................
.................... switch (c)
01D2: MOVF 19,W
01D3: MOVWF 0C
01D4: MOVLW 0C
01D5: SUBWF 0C,W
01D6: BTFSC 03.2
01D7: GOTO 1E5
01D8: MOVLW 0A
01D9: SUBWF 0C,W
01DA: BTFSC 03.2
01DB: GOTO 1ED
01DC: MOVLW 0D
01DD: SUBWF 0C,W
01DE: BTFSC 03.2
01DF: GOTO 1F3
01E0: MOVLW 08
01E1: SUBWF 0C,W
01E2: BTFSC 03.2
01E3: GOTO 1F8
01E4: GOTO 1FD
.................... {
.................... case '\f' : lcd_send_byte(0,1); // smaz displej
01E5: CLRF 1E
01E6: MOVLW 01
01E7: MOVWF 1F
01E8: CALL 037
.................... delay_ms(2);
01E9: MOVLW 02
01EA: MOVWF 1A
01EB: CALL 00C
.................... break;
01EC: GOTO 209
.................... case '\n' : lcd_gotoxy(1,2); break; // presun se na 1. znak 2. radky
01ED: MOVLW 01
01EE: MOVWF 1A
01EF: MOVLW 02
01F0: MOVWF 1B
01F1: CALL 1C1
01F2: GOTO 209
.................... case '\r' : lcd_gotoxy(1,1); break; // presun home
01F3: MOVLW 01
01F4: MOVWF 1A
01F5: MOVWF 1B
01F6: CALL 1C1
01F7: GOTO 209
.................... case '\b' : lcd_send_byte(0,0x10); break; // posun kurzor o 1 zpet
01F8: CLRF 1E
01F9: MOVLW 10
01FA: MOVWF 1F
01FB: CALL 037
01FC: GOTO 209
.................... default : if (c<0x20) c&=0x7; // preklopeni definovatelnych znaku na rozsah 0 az 0x1F
01FD: MOVF 19,W
01FE: SUBLW 1F
01FF: BTFSS 03.0
0200: GOTO 203
0201: MOVLW 07
0202: ANDWF 19,F
.................... lcd_send_byte(1,c); break; // zapis znak
0203: MOVLW 01
0204: MOVWF 1E
0205: MOVF 19,W
0206: MOVWF 1F
0207: CALL 037
0208: GOTO 209
.................... }
0209: RETLW 00
.................... }
....................
....................
.................... // Zapni kurzor
.................... //
.................... void lcd_cursor_on()
.................... {
.................... lcd_send_byte(0,LCD_CURSOR_ON_);
.................... }
....................
....................
.................... // Vypni kurzor
.................... //
.................... void lcd_cursor_off()
.................... {
.................... lcd_send_byte(0,LCD_CURSOR_OFF_);
.................... }
....................
....................
.................... // Definice vlastnich fontu
.................... //
.................... // Vlastnich definic muze byt jen 8 do pozic 0 az 7 pameti CGRAM radice lcd displeje
.................... // Pro snadne definovani jsou pripraveny nasledujici definice a na konci souboru je uveden
.................... // priklad pouziti definovanych znaku.
....................
....................
.................... // Pomocna procedura pro posilani ridicich dat do radice displeje
.................... //
.................... void lcd_putc2(int Data)
.................... {
.................... lcd_send_byte(1,Data);
.................... }
....................
....................
.................... // Pomocne definice pro programovani obsahu CGRAM
.................... //
.................... #DEFINE lcd_define_start(Code) lcd_send_byte(0,0x40+(Code<<3)); delay_ms(2)
.................... #DEFINE lcd_define_def(String) printf(lcd_putc2,String);
.................... #DEFINE lcd_define_end() lcd_send_byte(0,3); delay_ms(2)
....................
....................
.................... // Vlastni vykonne makro pro definovani fontu do pozice Index CGRAM s definicnim retezcem Def
.................... //
.................... #DEFINE lcd_define_char(Index, Def) lcd_define_start(Index); lcd_define_def(Def); lcd_define_end();
....................
....................
.................... // Pripravene definice fontu vybranych znaku
.................... // V tabulce nesmi byt 00 (konec retezce v printf()), misto toho davame 80
.................... //
.................... #DEFINE LCD_CHAR_BAT100 "\x0E\x1F\x1F\x1F\x1F\x1F\x1F\x1F" /* symbol plne baterie */
.................... #DEFINE LCD_CHAR_BAT50 "\x0E\x1F\x11\x11\x13\x17\x1F\x1F" /* symbol polovicni baterie */
.................... #DEFINE LCD_CHAR_BAT0 "\x0E\x1F\x11\x11\x11\x11\x11\x1F" /* symbol vybite baterie */
.................... #DEFINE LCD_CHAR_LUA "\x04\x0E\x11\x11\x1F\x11\x11\x80" /* A s carkou */
.................... #DEFINE LCD_CHAR_LLA "\x01\x02\x0E\x01\x1F\x11\x0F\x80" /* a s carkou */
.................... #DEFINE LCD_CHAR_HUC "\x0A\x0E\x11\x10\x10\x11\x0E\x80" /* C s hackem */
.................... #DEFINE LCD_CHAR_HLC "\x0A\x04\x0E\x10\x10\x11\x0E\x80" /* c s hackem */
.................... #DEFINE LCD_CHAR_HUD "\x0A\x1C\x12\x11\x11\x12\x1C\x80" /* D s hackem */
.................... #DEFINE LCD_CHAR_HLD "\x05\x03\x0D\x13\x11\x11\x0F\x80" /* d s hackem */
.................... #DEFINE LCD_CHAR_LUE "\x04\x1F\x10\x10\x1E\x10\x1F\x80" /* E s carkou */
.................... #DEFINE LCD_CHAR_LLE "\x01\x02\x0E\x11\x1F\x10\x0E\x80" /* e s carkou */
.................... #DEFINE LCD_CHAR_HUE "\x0A\x1F\x10\x1E\x10\x10\x1F\x80" /* E s hackem */
.................... #DEFINE LCD_CHAR_HLE "\x0A\x04\x0E\x11\x1F\x10\x0E\x80" /* e s hackem */
.................... #DEFINE LCD_CHAR_LUI "\x04\x0E\x04\x04\x04\x04\x0E\x80" /* I s carkou */
.................... #DEFINE LCD_CHAR_LLI "\x02\x04\x80\x0C\x04\x04\x0E\x80" /* i s carkou */
.................... #DEFINE LCD_CHAR_HUN "\x0A\x15\x11\x19\x15\x13\x11\x80" /* N s hackem */
.................... #DEFINE LCD_CHAR_HLN "\x0A\x04\x16\x19\x11\x11\x11\x80" /* n s hackem */
.................... #DEFINE LCD_CHAR_LUO "\x04\x0E\x11\x11\x11\x11\x0E\x80" /* O s carkou */
.................... #DEFINE LCD_CHAR_LLO "\x02\x04\x0E\x11\x11\x11\x0E\x80" /* o s carkou */
.................... #DEFINE LCD_CHAR_HUR "\x0A\x1E\x11\x1E\x14\x12\x11\x80" /* R s hackem */
.................... #DEFINE LCD_CHAR_HLR "\x0A\x04\x16\x19\x10\x10\x10\x80" /* r s hackem */
.................... #DEFINE LCD_CHAR_HUS "\x0A\x0F\x10\x0E\x01\x01\x1E\x80" /* S s hackem */
.................... #DEFINE LCD_CHAR_HLS "\x0A\x04\x0E\x10\x0E\x01\x1E\x80" /* s s hackem */
.................... #DEFINE LCD_CHAR_HUT "\x0A\x1F\x04\x04\x04\x04\x04\x80" /* T s hackem */
.................... #DEFINE LCD_CHAR_HLT "\x0A\x0C\x1C\x08\x08\x09\x06\x80" /* t s hackem */
.................... #DEFINE LCD_CHAR_LUU "\x02\x15\x11\x11\x11\x11\x0E\x80" /* U s carkou */
.................... #DEFINE LCD_CHAR_LLU "\x02\x04\x11\x11\x11\x13\x0D\x80" /* u s carkou */
.................... #DEFINE LCD_CHAR_CUU "\x06\x17\x11\x11\x11\x11\x0E\x80" /* U s krouzkem */
.................... #DEFINE LCD_CHAR_CLU "\x06\x06\x11\x11\x11\x11\x0E\x80" /* u s krouzkem */
.................... #DEFINE LCD_CHAR_LUY "\x02\x15\x11\x0A\x04\x04\x04\x80" /* Y s carkou */
.................... #DEFINE LCD_CHAR_LLY "\x02\x04\x11\x11\x0F\x01\x0E\x80" /* y s carkou */
.................... #DEFINE LCD_CHAR_HUZ "\x0A\x1F\x01\x02\x04\x08\x1F\x80" /* Z s hackem */
.................... #DEFINE LCD_CHAR_HLZ "\x0A\x04\x1F\x02\x04\x08\x1F\x80" /* z s hackem */
....................
....................
.................... // Priklad pouziti definovanych znaku
.................... //
.................... //
.................... //void lcd_sample()
.................... //{
.................... // lcd_define_char(0,LCD_CHAR_BAT50); // Priklad definice znaku baterie do pozice 0
.................... // lcd_define_char(2,LCD_CHAR_HLE LCD_CHAR_LUI); // Priklad definice znaku e s hackem a I s carkou od pozice 2
.................... // // vsimnete si, ze neni carka mezi retezci s definici (oba retezce definuji
.................... // // jediny definicni retezec)
.................... // printf(lcd_putc,"\fZnaky:\20\22\23"); // priklad vypisu znaku z pozice 0, 2 a 3
.................... // delay_ms(1000);
.................... // lcd_define_char(0,LCD_CHAR_BAT0); // Predefinovani tvaru znaku v pozici 0
.................... // delay_ms(1000);
.................... //}
....................
.................... #DEFINE PRIJIMAC PIN_A3 // pin na ktery je pripojen prijimac
.................... #DEFINE SERVO_X PIN_A0 // pin na ktery je pripojeno servo
.................... #DEFINE SERVO_Y PIN_A1
....................
.................... int8 bit,x,y;
.................... int counter; // pocitadlo 1 a 0 v detektoru
.................... int x_old=0,y_old;
....................
.................... void servo(int uhel, int souradnice)
.................... {
....................
....................
.................... if (X==souradnice) output_high(SERVO_X); else output_high(SERVO_Y);
*
0129: MOVF 18,W
012A: SUBWF 0F,W
012B: BTFSS 03.2
012C: GOTO 132
012D: BSF 03.5
012E: BCF 05.0
012F: BCF 03.5
0130: BSF 05.0
0131: GOTO 136
0132: BSF 03.5
0133: BCF 05.1
0134: BCF 03.5
0135: BSF 05.1
....................
.................... delay_us(62.5*uhel);
0136: CLRF 1A
0137: MOVF 17,W
0138: MOVWF 19
0139: GOTO 086
013A: CLRF 1C
013B: CLRF 1B
013C: MOVLW 7A
013D: MOVWF 1A
013E: MOVLW 84
013F: MOVWF 19
0140: MOVF 0F,W
0141: MOVWF 20
0142: MOVF 0E,W
0143: MOVWF 1F
0144: MOVF 0D,W
0145: MOVWF 1E
0146: MOVF 0C,W
0147: MOVWF 1D
0148: GOTO 0A4
0149: MOVF 0C,W
014A: MOVWF 19
014B: MOVF 0D,W
014C: MOVWF 1A
014D: MOVF 0E,W
014E: MOVWF 1B
014F: MOVF 0F,W
0150: MOVWF 1C
0151: MOVF 0C,W
0152: MOVWF 1D
0153: GOTO 11B
....................
.................... if (SERVO_X==souradnice) output_low(SERVO_X); else output_low(SERVO_Y);
0154: MOVF 18,W
0155: SUBLW 28
0156: BTFSS 03.2
0157: GOTO 15D
0158: BSF 03.5
0159: BCF 05.0
015A: BCF 03.5
015B: BCF 05.0
015C: GOTO 161
015D: BSF 03.5
015E: BCF 05.1
015F: BCF 03.5
0160: BCF 05.1
0161: RETLW 00
.................... // delay_ms(10);
....................
....................
.................... }
....................
.................... int8 prijmout(int8* bit)
.................... {
.................... // || |
.................... // |--|_____ 1
.................... // |
.................... // |-|__|-|_ 0
....................
.................... while (!input(PRIJIMAC)) ; // cekej na jednicku
0162: BSF 03.5
0163: BSF 05.3
0164: BCF 03.5
0165: BTFSS 05.3
0166: GOTO 162
.................... delay_us(IMPULS/4); // presvec se, jestli je stale 1 po 1/4 impulsu
0167: MOVLW 14
0168: MOVWF 0C
0169: DECFSZ 0C,F
016A: GOTO 169
016B: NOP
.................... if (!input(PRIJIMAC)) return(false); // vrat chybu, kdyz neni stale 1
016C: BSF 03.5
016D: BSF 05.3
016E: BCF 03.5
016F: BTFSC 05.3
0170: GOTO 174
0171: MOVLW 00
0172: MOVWF 0D
0173: GOTO 198
.................... delay_us(3*IMPULS); // pockej na rozhodovaci misto
0174: MOVLW F9
0175: MOVWF 0C
0176: DECFSZ 0C,F
0177: GOTO 176
0178: NOP
0179: NOP
.................... if (input(PRIJIMAC)) *bit=0; else *bit=1; // dekoduj 1 nebo 0
017A: BSF 03.5
017B: BSF 05.3
017C: BCF 03.5
017D: BTFSS 05.3
017E: GOTO 183
017F: MOVF 1A,W
0180: MOVWF 04
0181: CLRF 00
0182: GOTO 187
0183: MOVF 1A,W
0184: MOVWF 04
0185: MOVLW 01
0186: MOVWF 00
.................... delay_us(IMPULS); // pockej na konec znaku
0187: MOVLW 53
0188: MOVWF 0C
0189: DECFSZ 0C,F
018A: GOTO 189
....................
.................... output_bit(PIN_A0, *bit); // kontrolni vystup
018B: MOVF 1A,W
018C: MOVWF 04
018D: MOVF 00,F
018E: BTFSS 03.2
018F: GOTO 192
0190: BCF 05.0
0191: GOTO 193
0192: BSF 05.0
0193: BSF 03.5
0194: BCF 05.0
....................
.................... return(true); // vrat, ze se cteni povedlo
0195: MOVLW 01
0196: BCF 03.5
0197: MOVWF 0D
0198: RETLW 00
.................... }
....................
.................... int8 read_nibble(int8* value)
.................... {
.................... int8 n; // citac
.................... int8 bit; // pomocna promenna
....................
.................... *value=0;
0199: MOVF 17,W
019A: MOVWF 04
019B: CLRF 00
.................... for (n=1; n<=4; n++) // prijmi 4 bity
019C: MOVLW 01
019D: MOVWF 18
019E: MOVF 18,W
019F: SUBLW 04
01A0: BTFSS 03.0
01A1: GOTO 1BE
.................... {
.................... *value >>= 1; // posun jiz prectene do leva
01A2: MOVF 17,W
01A3: MOVWF 04
01A4: BCF 03.0
01A5: RRF 00,W
01A6: MOVWF 0C
01A7: MOVWF 00
.................... if (0==prijmout(&bit)) return(false); // prijmi bit; pri chybe cteni vrat chybu
01A8: MOVLW 19
01A9: MOVWF 1A
01AA: CALL 162
01AB: MOVF 0D,F
01AC: BTFSS 03.2
01AD: GOTO 1B1
01AE: MOVLW 00
01AF: MOVWF 0D
01B0: GOTO 1C0
.................... *value |= bit << 3; // pridej bit do nibblu
01B1: MOVF 17,W
01B2: MOVWF 04
01B3: RLF 19,W
01B4: MOVWF 0C
01B5: RLF 0C,F
01B6: RLF 0C,F
01B7: MOVLW F8
01B8: ANDWF 0C,F
01B9: MOVF 0C,W
01BA: IORWF 00,W
01BB: MOVWF 00
.................... };
01BC: INCF 18,F
01BD: GOTO 19E
.................... return(true); // vrat 1, jako ,ze je vse O.K.
01BE: MOVLW 01
01BF: MOVWF 0D
01C0: RETLW 00
.................... }
....................
.................... /*void dekodovat(void)
.................... {
.................... int8 osa, hodnota, kontrola;
....................
.................... counter=4;
....................
.................... decoder:
....................
.................... counter=0; // vynuluj citac
.................... do // vyhledej synchronizacni jednicky
.................... {
.................... if (!prijmout(&bit)) goto decoder; // prijmi bit; pri chybe zacni znovu
.................... if (1==bit) counter++; else goto decoder; // kdyz je bit 1, tak zvys citac; jinak zacni znovu
.................... } while(counter<4); // pockej na 4 jednicky
....................
.................... if (!read_nibble(&osa)) goto decoder; // nacti identifikator osy
....................
.................... if (!read_nibble(&hodnota)) goto decoder; // nacti 1. nibble; pri chybe zacni znovu
.................... if (!read_nibble(&kontrola)) goto decoder; // nacti 2. nibble; pri chybe zacni znovu
.................... if (hodnota != kontrola) goto decoder; // zacni znovu, pokud jsou ruzne nibble
....................
.................... switch (osa) // rozeskoc se podle adresy osy
.................... {
.................... case OSA_X:
.................... {
.................... x=hodnota;
.................... break;
.................... };
.................... case OSA_Y:
.................... {
.................... y=hodnota;
.................... break;
.................... };
.................... case TLs:
.................... {
.................... break;
.................... };
.................... };
.................... }
.................... */
.................... void main()
.................... {
*
0251: CLRF 04
0252: MOVLW 1F
0253: ANDWF 03,F
0254: CLRF 12
.................... lcd_init(); // zinicializuj LCD display
0255: GOTO 04D
....................
.................... while (true)
.................... {
.................... int8 osa, hodnota, kontrola;
....................
.................... counter=4;
0256: MOVLW 04
0257: MOVWF 11
....................
.................... decoder:
....................
.................... servo(x_old,SERVO_X);
0258: MOVF 12,W
0259: MOVWF 17
025A: MOVLW 28
025B: MOVWF 18
025C: CALL 129
....................
.................... servo(y_old,SERVO_Y);
025D: MOVF 13,W
025E: MOVWF 17
025F: MOVLW 29
0260: MOVWF 18
0261: CALL 129
....................
.................... counter=0; // vynuluj citac
0262: CLRF 11
.................... do // vyhledej synchronizacni jednicky
.................... {
.................... if (!prijmout(&bit)) goto decoder; // prijmi bit; pri chybe zacni znovu
0263: MOVLW 0E
0264: MOVWF 1A
0265: CALL 162
0266: MOVF 0D,F
0267: BTFSS 03.2
0268: GOTO 26A
0269: GOTO 258
.................... if (1==bit) counter++; else goto decoder; // kdyz je bit 1, tak zvys citac; jinak zacni znovu
026A: DECFSZ 0E,W
026B: GOTO 26E
026C: INCF 11,F
026D: GOTO 26F
026E: GOTO 258
.................... } while(counter<4); // pockej na 4 jednicky
026F: MOVF 11,W
0270: SUBLW 03
0271: BTFSC 03.0
0272: GOTO 263
....................
.................... if (!read_nibble(&osa)) goto decoder; // nacti identifikator osy
0273: MOVLW 14
0274: MOVWF 17
0275: CALL 199
0276: MOVF 0D,F
0277: BTFSS 03.2
0278: GOTO 27A
0279: GOTO 258
....................
.................... if (!read_nibble(&hodnota)) goto decoder; // nacti 1. nibble; pri chybe zacni znovu
027A: MOVLW 15
027B: MOVWF 17
027C: CALL 199
027D: MOVF 0D,F
027E: BTFSS 03.2
027F: GOTO 281
0280: GOTO 258
.................... if (!read_nibble(&kontrola)) goto decoder; // nacti 2. nibble; pri chybe zacni znovu
0281: MOVLW 16
0282: MOVWF 17
0283: CALL 199
0284: MOVF 0D,F
0285: BTFSS 03.2
0286: GOTO 288
0287: GOTO 258
.................... if (hodnota != kontrola) goto decoder; // zacni znovu, pokud jsou ruzne nibble
0288: MOVF 16,W
0289: SUBWF 15,W
028A: BTFSC 03.2
028B: GOTO 28D
028C: GOTO 258
....................
.................... switch (osa) // rozeskoc se podle adresy osy
028D: MOVF 14,W
028E: ADDLW FD
028F: BTFSC 03.0
0290: GOTO 29E
0291: ADDLW 03
0292: GOTO 2D3
.................... {
.................... case OSA_X:
.................... {
....................
.................... x=hodnota;
0293: MOVF 15,W
0294: MOVWF 0F
.................... x_old=x;
0295: MOVF 0F,W
0296: MOVWF 12
....................
.................... break;
0297: GOTO 29E
.................... };
.................... case OSA_Y:
.................... {
.................... y=hodnota;
0298: MOVF 15,W
0299: MOVWF 10
.................... y_old=y;
029A: MOVF 10,W
029B: MOVWF 13
....................
.................... break;
029C: GOTO 29E
.................... };
.................... case TLs:
.................... {
.................... break;
029D: GOTO 29E
.................... };
.................... };
*
02D3: BCF 0A.0
02D4: BSF 0A.1
02D5: BCF 0A.2
02D6: ADDWF 02,F
02D7: GOTO 293
02D8: GOTO 298
02D9: GOTO 29D
....................
....................
.................... lcd_gotoxy(1,1); // vytiskni X a Y
*
029E: MOVLW 01
029F: MOVWF 1A
02A0: MOVWF 1B
02A1: CALL 1C1
.................... printf(lcd_putc,"X: %U ", x);
*
021F: MOVF 0D,W
0220: MOVF 17,W
0221: MOVWF 19
0222: MOVLW 64
0223: MOVWF 1A
0224: CALL 20A
0225: MOVF 0C,W
0226: MOVWF 17
0227: MOVF 0D,W
0228: MOVLW 30
0229: BTFSS 03.2
022A: GOTO 232
022B: BTFSC 18.0
022C: BSF 18.3
022D: BTFSC 18.3
022E: GOTO 238
022F: BTFSC 18.4
0230: MOVLW 20
0231: GOTO 234
0232: BCF 18.3
0233: BCF 18.4
0234: ADDWF 0D,F
0235: MOVF 0D,W
0236: MOVWF 19
0237: CALL 1D2
0238: MOVF 17,W
0239: MOVWF 19
023A: MOVLW 0A
023B: MOVWF 1A
023C: CALL 20A
023D: MOVF 0C,W
023E: MOVWF 17
023F: MOVF 0D,W
0240: MOVLW 30
0241: BTFSS 03.2
0242: GOTO 247
0243: BTFSC 18.3
0244: GOTO 24B
0245: BTFSC 18.4
0246: MOVLW 20
0247: ADDWF 0D,F
0248: MOVF 0D,W
0249: MOVWF 19
024A: CALL 1D2
024B: MOVLW 30
024C: ADDWF 17,F
024D: MOVF 17,W
024E: MOVWF 19
024F: CALL 1D2
0250: RETLW 00
*
02A2: MOVLW 58
02A3: MOVWF 19
02A4: CALL 1D2
02A5: MOVLW 3A
02A6: MOVWF 19
02A7: CALL 1D2
02A8: MOVLW 20
02A9: MOVWF 19
02AA: CALL 1D2
02AB: MOVF 0F,W
02AC: MOVWF 17
02AD: MOVLW 18
02AE: MOVWF 18
02AF: CALL 21F
02B0: MOVLW 06
02B1: MOVWF 17
02B2: MOVLW 20
02B3: MOVWF 19
02B4: CALL 1D2
02B5: DECFSZ 17,F
02B6: GOTO 2B2
.................... lcd_gotoxy(1,2);
02B7: MOVLW 01
02B8: MOVWF 1A
02B9: MOVLW 02
02BA: MOVWF 1B
02BB: CALL 1C1
.................... printf(lcd_putc,"Y: %U ", y);
02BC: MOVLW 59
02BD: MOVWF 19
02BE: CALL 1D2
02BF: MOVLW 3A
02C0: MOVWF 19
02C1: CALL 1D2
02C2: MOVLW 20
02C3: MOVWF 19
02C4: CALL 1D2
02C5: MOVF 10,W
02C6: MOVWF 17
02C7: MOVLW 18
02C8: MOVWF 18
02C9: CALL 21F
02CA: MOVLW 06
02CB: MOVWF 17
02CC: MOVLW 20
02CD: MOVWF 19
02CE: CALL 1D2
02CF: DECFSZ 17,F
02D0: GOTO 2CC
.................... }
02D1: GOTO 256
.................... }
....................
02D2: SLEEP
....................
....................
/schemata/prenos/letadlo/SW/prijimac/zaloha/01/MAIN.PJT
0,0 → 1,32
[PROJECT]
Target=main.HEX
Development_Mode=
Processor=0x684A
ToolSuite=CCS
 
[Directories]
Include=C:\Program Files\PICC\Devices;C:\Program Files\PICC\Dri;
Library=
LinkerScript=
 
[Target Data]
FileList=main.c;
BuildTool=CCSC
OptionString=-p +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
 
/schemata/prenos/letadlo/SW/prijimac/zaloha/01/MAIN.STA
0,0 → 1,45
 
ROM used: 730 (71%)
294 (29%) including unused fragments
 
1 Average locations per line
6 Average locations per statement
 
RAM used: 9 (13%) at main() level
26 (38%) worst case
 
Lines Stmts % Files
----- ----- --- -----
165 70 60 d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\main.c
5 0 0 d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\main.h
111 0 0 C:\Program Files\PICC\Devices\16F84.h
5 0 0 d:\@kaklik\programy\pic_c\prenos\letadlo\common.h
272 46 25 d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\MYLCD.C
----- -----
1116 232 Total
 
Page ROM % RAM Functions:
---- --- --- --- ----------
0 21 3 1 delay_ms
0 14 2 1 delay_us
0 8 1 0 @const22
0 22 3 3 lcd_send_nibble
0 22 3 2 lcd_send_byte
0 57 8 2 lcd_init
0 17 2 4 lcd_gotoxy
0 56 8 1 lcd_putc
0 57 8 6 servo
0 30 4 2 @ITOF
0 119 16 13 @MULFF
0 55 8 2 prijmout
0 40 5 5 read_nibble
0 130 18 1 main
0 7 1 0 @goto10184
0 21 3 3 @DIV88
0 50 7 2 @PRINTF_U_148
 
Segment Used Free
--------- ---- ----
0000-0003 4 0
0004-03FF 726 294
 
/schemata/prenos/letadlo/SW/prijimac/zaloha/01/MAIN.SYM
0,0 → 1,81
00C @SCRATCH
00D @SCRATCH
00D _RETURN_
00E bit
00F x
010 y
011 counter
012 x_old
013 y_old
014 osa
015 hodnota
016 kontrola
017 lcd_init.i
017 servo.uhel
017 read_nibble.value
017 @PRINTF_U_148.P1
017 main.@SCRATCH
018 servo.souradnice
018 read_nibble.n
018 @PRINTF_U_148.P1
018 lcd_init.@SCRATCH
019 lcd_putc.c
019-01A @ITOF.P1
019-01C @MULFF.P2
019 read_nibble.bit
019 @DIV88.P1
019 servo.@SCRATCH
01A delay_ms.P1
01A lcd_gotoxy.x
01A prijmout.bit
01A @DIV88.P1
01A servo.@SCRATCH
01A read_nibble.@SCRATCH
01B lcd_gotoxy.y
01B servo.@SCRATCH
01B prijmout.@SCRATCH
01B read_nibble.@SCRATCH
01B @DIV88.@SCRATCH
01C lcd_gotoxy.Adr
01C servo.@SCRATCH
01D delay_us.P1
01D-020 @MULFF.P2
01D lcd_gotoxy.@SCRATCH
01E lcd_send_byte.Adr
01F lcd_send_byte.n
020 lcd_send_nibble.n
021 lcd_send_nibble.@SCRATCH
021 @MULFF.@SCRATCH
022 lcd_send_nibble.@SCRATCH
022 @MULFF.@SCRATCH
023 @MULFF.@SCRATCH
024 @MULFF.@SCRATCH
025 @MULFF.@SCRATCH
-002 LCD_INIT_STRING
lcd_putc2.Data
 
000C delay_ms
011B delay_us
0004 @const22
0021 lcd_send_nibble
0037 lcd_send_byte
004D lcd_init
01C1 lcd_gotoxy
01D2 lcd_putc
0129 servo
0086 @ITOF
00A4 @MULFF
0162 prijmout
0199 read_nibble
0251 main
02D3 @goto10184
020A @DIV88
021F @PRINTF_U_148
0258 decoder
 
Project Files:
d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\main.c
d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\main.h
C:\Program Files\PICC\Devices\16F84.h
d:\@kaklik\programy\pic_c\prenos\letadlo\common.h
d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\MYLCD.C
/schemata/prenos/letadlo/SW/prijimac/zaloha/01/MAIN.TRE
0,0 → 1,309
ÀÄmain
ÀÄmain 0/130 Ram=1
ÃÄ??0??
ÃÄlcd_init 0/57 Ram=2
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@const22 0/8 Ram=0
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄdelay_ms 0/21 Ram=1
ÃÄservo 0/57 Ram=6
³ ÃÄ@ITOF 0/30 Ram=2
³ ÃÄ@MULFF 0/119 Ram=13
³ ÀÄdelay_us 0/14 Ram=1
ÃÄservo 0/57 Ram=6
³ ÃÄ@ITOF 0/30 Ram=2
³ ÃÄ@MULFF 0/119 Ram=13
³ ÀÄdelay_us 0/14 Ram=1
ÃÄprijmout 0/55 Ram=2
ÃÄread_nibble 0/40 Ram=5
³ ÀÄprijmout 0/55 Ram=2
ÃÄread_nibble 0/40 Ram=5
³ ÀÄprijmout 0/55 Ram=2
ÃÄread_nibble 0/40 Ram=5
³ ÀÄprijmout 0/55 Ram=2
ÃÄ@goto10184 0/7 Ram=0
ÃÄlcd_gotoxy 0/17 Ram=4
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_148 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_gotoxy 0/17 Ram=4
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_148 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÀÄlcd_putc 0/56 Ram=1
ÃÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄdelay_ms 0/21 Ram=1
ÃÄlcd_gotoxy 0/17 Ram=4
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_gotoxy 0/17 Ram=4
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÀÄlcd_send_byte 0/22 Ram=2
ÃÄlcd_send_nibble 0/22 Ram=3
ÀÄlcd_send_nibble 0/22 Ram=3
/schemata/prenos/letadlo/SW/prijimac/zaloha/01/MYLCD.BAK
0,0 → 1,271
// LCD modul pro ovladani dvouradkoveho LCD modulu se standardnim Hitachi radicem
// (c)miho 2002
//
// Historie:
//
// 0.0 Uvodni verze se snadnou definici portu LCD displeje
//
//
// Funkce:
//
// lcd_init() inicializuje LCD displej a porty, nutno volat jako prvni
//
// lcd_putc(c) zapis snaku do lcd displeje, zpracovava nasledujici ridici znaky
// \f = \x0C - nova stranka - smazani displeje
// \n = \x0A - odradkovani (prechod na druhou radku)
// \b = \x08 - backspace - posunuti kurzoru o 1 pozici zpet
// \r = \x0D - goto home to position 1,1
// \0 .. \7 - definovatelne znaky v pozicich 0 az 7 v CGRAM
// \20 .. \27 - alternativne zapsane znaky (oktalove) v pozicich 0 az 7 CGRAM
// Pozor na to, ze funkce printf konci tisk pokud narazi na \0 (konec retezce)
//
// lcd_gotoxy(x,y) presune kurzor na uvedenou adresu
// nekontroluje parametry
//
// lcd_cursor_on zapne kurzor
// lcd_cursor_off vypne kurzor
//
// lcd_define_char(Index, Def) Makro, ktere definuje znaky od pozice Index obsahem definicniho
// retezce Def. Kazdych 8 znaku retezce Def definuje dalsi znak v CGRAM.
// Kapacita CGRAM je celkem 8 znaku s indexem 0 az 7.
// Na konci se provede lcd_gotoxy(1,1).
// Na konci teto knihovny je priklad pouziti definovanych znaku
//
// Definice portu:
//
// #DEFINE LCD_RS PIN_B2 // rizeni registru LCD displeje
// #DEFINE LCD_E PIN_B1 // enable LCD displeje
// #DEFINE LCD_DATA_LSB PIN_C2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
 
 
 
 
// Privatni sekce, cist jen v pripade, ze neco nefunguje
 
 
 
 
// Generovane defince portu pro ucely teto knihovny aby kod generoval spravne IO operace a soucasne
// bylo mozne jednoduse deklarovat pripojene piny LCD displeje pri pouziti teto knihovny. Problem spociva
// v tom, ze se musi spravne ridit smery portu a soucasne datovy port zabira jen 4 bity ze zadaneho portu
//
#DEFINE LCD_SHIFT (LCD_DATA_LSB&7) // pocet bitu posuvu dataoveho kanalu v datovem portu
#DEFINE LCD_PORT (LCD_DATA_LSB>>3) // adresa LCD datoveho portu
#DEFINE LCD_TRIS (LCD_PORT+0x80) // adresa prislusneho TRIS registru
#DEFINE LCD_MASK (0xF<<LCD_SHIFT) // maska platnych bitu
//
#IF LCD_SHIFT>4 // kontrola mezi
#ERROR LCD data port LSB bit not in range 0..4
#ENDIF
 
 
// Definice konstant pro LCD display
//
#define LCD_CURSOR_ON_ 0x0E // kurzor jako blikajici radka pod znakem
#define LCD_CURSOR_OFF_ 0x0C // zadny kurzor
#define LCD_LINE_2 0x40 // adresa 1. znaku 2. radky
 
 
// Definice rezimu LCD displeje
//
BYTE const LCD_INIT_STRING[4] =
{
0x28, // intrfejs 4 bity, 2 radky, font 5x7
LCD_CURSOR_OFF_, // display on, kurzor off,
0x01, // clear displeje
0x06 // inkrement pozice kurzoru (posun kurzoru doprava)
};
 
 
// Odesle nibble do displeje (posle data a klikne signalem e)
//
void lcd_send_nibble( BYTE n )
{
*LCD_PORT = (*LCD_PORT & ~LCD_MASK) | ((n << LCD_SHIFT) & LCD_MASK); // nastav datove bity portu a ostatni zachovej
output_bit(LCD_E,1); // vzestupna hrana
delay_us(1); // pockej alespon 450ns od e nebo alespon 195ns od dat
output_bit(LCD_E,0); // sestupna hrana (minimalni perioda e je 1us)
}
 
 
// Odesle bajt do registru LCD
//
// Pokud je Adr=0 .. instrukcni registr
// Pokud je Adr=1 .. datovy registr
//
void lcd_send_byte( BOOLEAN Adr, BYTE n )
{
output_bit(LCD_RS,Adr); // vyber registr
swap(n);
lcd_send_nibble(n); // posli horni pulku bajtu
swap(n);
lcd_send_nibble(n); // posli spodni pulku bajtu
delay_us(40); // minimalni doba na provedeni prikazu
}
 
 
// Provede inicializaci LCD displeje, smaze obsah a nastavi mod displeje
//
// Tato procedura se musi volat pred pouzitim ostatnich lcd_ procedur
//
void lcd_init()
{
 
int i; // pocitadlo cyklu
 
delay_ms(20); // spozdeni pro provedeni startu displeje po zapnuti napajeni
 
*LCD_TRIS = *LCD_TRIS & ~LCD_MASK; // nuluj odpovidajici bity tris registru datoveho portu LCD
 
output_bit(PIN_B2,0); // nastav jako vystup a nastav klidovy stav
output_bit(PIN_B1,0); // nastav jako vystup a nastav klidovy stav
 
for (i=0; i<3; i++) // nastav lcd do rezimu 8 bitu sbernice
{
delay_ms(2); // muze byt rozdelany prenos dat (2x 4 bity) nebo pomaly povel
lcd_send_nibble(3); // rezim 8 bitu
}
 
delay_us(40); // cas na zpracovani
lcd_send_nibble(2); // nastav rezim 4 bitu (plati od nasledujiciho prenosu)
delay_us(40); // cas na zpracovani
 
for (i=0;i<3;i++) // proved inicializaci (nastaveni modu, smazani apod)
{
lcd_send_byte(0,LCD_INIT_STRING[i]);
delay_ms(2);
}
}
 
 
// Proved presun kurzoru
//
// Pozice 1.1 je domu
//
void lcd_gotoxy( BYTE x, BYTE y)
{
 
BYTE Adr;
 
Adr=x-1;
if(y==2)
Adr+=LCD_LINE_2;
 
lcd_send_byte(0,0x80|Adr);
}
 
 
// Zapis znaku na displej, zpracovani ridicich znaku
//
void lcd_putc( char c)
{
 
switch (c)
{
case '\f' : lcd_send_byte(0,1); // smaz displej
delay_ms(2);
break;
case '\n' : lcd_gotoxy(1,2); break; // presun se na 1. znak 2. radky
case '\r' : lcd_gotoxy(1,1); break; // presun home
case '\b' : lcd_send_byte(0,0x10); break; // posun kurzor o 1 zpet
default : if (c<0x20) c&=0x7; // preklopeni definovatelnych znaku na rozsah 0 az 0x1F
lcd_send_byte(1,c); break; // zapis znak
}
}
 
 
// Zapni kurzor
//
void lcd_cursor_on()
{
lcd_send_byte(0,LCD_CURSOR_ON_);
}
 
 
// Vypni kurzor
//
void lcd_cursor_off()
{
lcd_send_byte(0,LCD_CURSOR_OFF_);
}
 
 
// Definice vlastnich fontu
//
// Vlastnich definic muze byt jen 8 do pozic 0 az 7 pameti CGRAM radice lcd displeje
// Pro snadne definovani jsou pripraveny nasledujici definice a na konci souboru je uveden
// priklad pouziti definovanych znaku.
 
 
// Pomocna procedura pro posilani ridicich dat do radice displeje
//
void lcd_putc2(int Data)
{
lcd_send_byte(1,Data);
}
 
 
// Pomocne definice pro programovani obsahu CGRAM
//
#DEFINE lcd_define_start(Code) lcd_send_byte(0,0x40+(Code<<3)); delay_ms(2)
#DEFINE lcd_define_def(String) printf(lcd_putc2,String);
#DEFINE lcd_define_end() lcd_send_byte(0,3); delay_ms(2)
 
 
// Vlastni vykonne makro pro definovani fontu do pozice Index CGRAM s definicnim retezcem Def
//
#DEFINE lcd_define_char(Index, Def) lcd_define_start(Index); lcd_define_def(Def); lcd_define_end();
 
 
// Pripravene definice fontu vybranych znaku
// V tabulce nesmi byt 00 (konec retezce v printf()), misto toho davame 80
//
#DEFINE LCD_CHAR_BAT100 "\x0E\x1F\x1F\x1F\x1F\x1F\x1F\x1F" /* symbol plne baterie */
#DEFINE LCD_CHAR_BAT50 "\x0E\x1F\x11\x11\x13\x17\x1F\x1F" /* symbol polovicni baterie */
#DEFINE LCD_CHAR_BAT0 "\x0E\x1F\x11\x11\x11\x11\x11\x1F" /* symbol vybite baterie */
#DEFINE LCD_CHAR_LUA "\x04\x0E\x11\x11\x1F\x11\x11\x80" /* A s carkou */
#DEFINE LCD_CHAR_LLA "\x01\x02\x0E\x01\x1F\x11\x0F\x80" /* a s carkou */
#DEFINE LCD_CHAR_HUC "\x0A\x0E\x11\x10\x10\x11\x0E\x80" /* C s hackem */
#DEFINE LCD_CHAR_HLC "\x0A\x04\x0E\x10\x10\x11\x0E\x80" /* c s hackem */
#DEFINE LCD_CHAR_HUD "\x0A\x1C\x12\x11\x11\x12\x1C\x80" /* D s hackem */
#DEFINE LCD_CHAR_HLD "\x05\x03\x0D\x13\x11\x11\x0F\x80" /* d s hackem */
#DEFINE LCD_CHAR_LUE "\x04\x1F\x10\x10\x1E\x10\x1F\x80" /* E s carkou */
#DEFINE LCD_CHAR_LLE "\x01\x02\x0E\x11\x1F\x10\x0E\x80" /* e s carkou */
#DEFINE LCD_CHAR_HUE "\x0A\x1F\x10\x1E\x10\x10\x1F\x80" /* E s hackem */
#DEFINE LCD_CHAR_HLE "\x0A\x04\x0E\x11\x1F\x10\x0E\x80" /* e s hackem */
#DEFINE LCD_CHAR_LUI "\x04\x0E\x04\x04\x04\x04\x0E\x80" /* I s carkou */
#DEFINE LCD_CHAR_LLI "\x02\x04\x80\x0C\x04\x04\x0E\x80" /* i s carkou */
#DEFINE LCD_CHAR_HUN "\x0A\x15\x11\x19\x15\x13\x11\x80" /* N s hackem */
#DEFINE LCD_CHAR_HLN "\x0A\x04\x16\x19\x11\x11\x11\x80" /* n s hackem */
#DEFINE LCD_CHAR_LUO "\x04\x0E\x11\x11\x11\x11\x0E\x80" /* O s carkou */
#DEFINE LCD_CHAR_LLO "\x02\x04\x0E\x11\x11\x11\x0E\x80" /* o s carkou */
#DEFINE LCD_CHAR_HUR "\x0A\x1E\x11\x1E\x14\x12\x11\x80" /* R s hackem */
#DEFINE LCD_CHAR_HLR "\x0A\x04\x16\x19\x10\x10\x10\x80" /* r s hackem */
#DEFINE LCD_CHAR_HUS "\x0A\x0F\x10\x0E\x01\x01\x1E\x80" /* S s hackem */
#DEFINE LCD_CHAR_HLS "\x0A\x04\x0E\x10\x0E\x01\x1E\x80" /* s s hackem */
#DEFINE LCD_CHAR_HUT "\x0A\x1F\x04\x04\x04\x04\x04\x80" /* T s hackem */
#DEFINE LCD_CHAR_HLT "\x0A\x0C\x1C\x08\x08\x09\x06\x80" /* t s hackem */
#DEFINE LCD_CHAR_LUU "\x02\x15\x11\x11\x11\x11\x0E\x80" /* U s carkou */
#DEFINE LCD_CHAR_LLU "\x02\x04\x11\x11\x11\x13\x0D\x80" /* u s carkou */
#DEFINE LCD_CHAR_CUU "\x06\x17\x11\x11\x11\x11\x0E\x80" /* U s krouzkem */
#DEFINE LCD_CHAR_CLU "\x06\x06\x11\x11\x11\x11\x0E\x80" /* u s krouzkem */
#DEFINE LCD_CHAR_LUY "\x02\x15\x11\x0A\x04\x04\x04\x80" /* Y s carkou */
#DEFINE LCD_CHAR_LLY "\x02\x04\x11\x11\x0F\x01\x0E\x80" /* y s carkou */
#DEFINE LCD_CHAR_HUZ "\x0A\x1F\x01\x02\x04\x08\x1F\x80" /* Z s hackem */
#DEFINE LCD_CHAR_HLZ "\x0A\x04\x1F\x02\x04\x08\x1F\x80" /* z s hackem */
 
 
// Priklad pouziti definovanych znaku
//
//
//void lcd_sample()
//{
// lcd_define_char(0,LCD_CHAR_BAT50); // Priklad definice znaku baterie do pozice 0
// lcd_define_char(2,LCD_CHAR_HLE LCD_CHAR_LUI); // Priklad definice znaku e s hackem a I s carkou od pozice 2
// // vsimnete si, ze neni carka mezi retezci s definici (oba retezce definuji
// // jediny definicni retezec)
// printf(lcd_putc,"\fZnaky:\20\22\23"); // priklad vypisu znaku z pozice 0, 2 a 3
// delay_ms(1000);
// lcd_define_char(0,LCD_CHAR_BAT0); // Predefinovani tvaru znaku v pozici 0
// delay_ms(1000);
//}
/schemata/prenos/letadlo/SW/prijimac/zaloha/01/MYLCD.C
0,0 → 1,271
// LCD modul pro ovladani dvouradkoveho LCD modulu se standardnim Hitachi radicem
// (c)miho 2002
//
// Historie:
//
// 0.0 Uvodni verze se snadnou definici portu LCD displeje
//
//
// Funkce:
//
// lcd_init() inicializuje LCD displej a porty, nutno volat jako prvni
//
// lcd_putc(c) zapis snaku do lcd displeje, zpracovava nasledujici ridici znaky
// \f = \x0C - nova stranka - smazani displeje
// \n = \x0A - odradkovani (prechod na druhou radku)
// \b = \x08 - backspace - posunuti kurzoru o 1 pozici zpet
// \r = \x0D - goto home to position 1,1
// \0 .. \7 - definovatelne znaky v pozicich 0 az 7 v CGRAM
// \20 .. \27 - alternativne zapsane znaky (oktalove) v pozicich 0 az 7 CGRAM
// Pozor na to, ze funkce printf konci tisk pokud narazi na \0 (konec retezce)
//
// lcd_gotoxy(x,y) presune kurzor na uvedenou adresu
// nekontroluje parametry
//
// lcd_cursor_on zapne kurzor
// lcd_cursor_off vypne kurzor
//
// lcd_define_char(Index, Def) Makro, ktere definuje znaky od pozice Index obsahem definicniho
// retezce Def. Kazdych 8 znaku retezce Def definuje dalsi znak v CGRAM.
// Kapacita CGRAM je celkem 8 znaku s indexem 0 az 7.
// Na konci se provede lcd_gotoxy(1,1).
// Na konci teto knihovny je priklad pouziti definovanych znaku
//
// Definice portu:
//
// #DEFINE LCD_RS PIN_B2 // rizeni registru LCD displeje
// #DEFINE LCD_E PIN_B1 // enable LCD displeje
// #DEFINE LCD_DATA_LSB PIN_C2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
 
 
 
 
// Privatni sekce, cist jen v pripade, ze neco nefunguje
 
 
 
 
// Generovane defince portu pro ucely teto knihovny aby kod generoval spravne IO operace a soucasne
// bylo mozne jednoduse deklarovat pripojene piny LCD displeje pri pouziti teto knihovny. Problem spociva
// v tom, ze se musi spravne ridit smery portu a soucasne datovy port zabira jen 4 bity ze zadaneho portu
//
#DEFINE LCD_SHIFT (LCD_DATA_LSB&7) // pocet bitu posuvu dataoveho kanalu v datovem portu
#DEFINE LCD_PORT (LCD_DATA_LSB>>3) // adresa LCD datoveho portu
#DEFINE LCD_TRIS (LCD_PORT+0x80) // adresa prislusneho TRIS registru
#DEFINE LCD_MASK (0xF<<LCD_SHIFT) // maska platnych bitu
//
#IF LCD_SHIFT>4 // kontrola mezi
#ERROR LCD data port LSB bit not in range 0..4
#ENDIF
 
 
// Definice konstant pro LCD display
//
#define LCD_CURSOR_ON_ 0x0E // kurzor jako blikajici radka pod znakem
#define LCD_CURSOR_OFF_ 0x0C // zadny kurzor
#define LCD_LINE_2 0x40 // adresa 1. znaku 2. radky
 
 
// Definice rezimu LCD displeje
//
BYTE const LCD_INIT_STRING[4] =
{
0x28, // intrfejs 4 bity, 2 radky, font 5x7
LCD_CURSOR_OFF_, // display on, kurzor off,
0x01, // clear displeje
0x06 // inkrement pozice kurzoru (posun kurzoru doprava)
};
 
 
// Odesle nibble do displeje (posle data a klikne signalem e)
//
void lcd_send_nibble( BYTE n )
{
*LCD_PORT = (*LCD_PORT & ~LCD_MASK) | ((n << LCD_SHIFT) & LCD_MASK); // nastav datove bity portu a ostatni zachovej
output_bit(LCD_E,1); // vzestupna hrana
delay_us(1); // pockej alespon 450ns od e nebo alespon 195ns od dat
output_bit(LCD_E,0); // sestupna hrana (minimalni perioda e je 1us)
}
 
 
// Odesle bajt do registru LCD
//
// Pokud je Adr=0 .. instrukcni registr
// Pokud je Adr=1 .. datovy registr
//
void lcd_send_byte( BOOLEAN Adr, BYTE n )
{
output_bit(LCD_RS,Adr); // vyber registr
swap(n);
lcd_send_nibble(n); // posli horni pulku bajtu
swap(n);
lcd_send_nibble(n); // posli spodni pulku bajtu
delay_us(40); // minimalni doba na provedeni prikazu
}
 
 
// Provede inicializaci LCD displeje, smaze obsah a nastavi mod displeje
//
// Tato procedura se musi volat pred pouzitim ostatnich lcd_ procedur
//
void lcd_init()
{
 
int i; // pocitadlo cyklu
 
delay_ms(20); // spozdeni pro provedeni startu displeje po zapnuti napajeni
 
*LCD_TRIS = *LCD_TRIS & ~LCD_MASK; // nuluj odpovidajici bity tris registru datoveho portu LCD
 
output_bit(LCD_RS,0); // nastav jako vystup a nastav klidovy stav
output_bit(LCD_E,0); // nastav jako vystup a nastav klidovy stav
 
for (i=0; i<3; i++) // nastav lcd do rezimu 8 bitu sbernice
{
delay_ms(2); // muze byt rozdelany prenos dat (2x 4 bity) nebo pomaly povel
lcd_send_nibble(3); // rezim 8 bitu
}
 
delay_us(40); // cas na zpracovani
lcd_send_nibble(2); // nastav rezim 4 bitu (plati od nasledujiciho prenosu)
delay_us(40); // cas na zpracovani
 
for (i=0;i<3;i++) // proved inicializaci (nastaveni modu, smazani apod)
{
lcd_send_byte(0,LCD_INIT_STRING[i]);
delay_ms(2);
}
}
 
 
// Proved presun kurzoru
//
// Pozice 1.1 je domu
//
void lcd_gotoxy( BYTE x, BYTE y)
{
 
BYTE Adr;
 
Adr=x-1;
if(y==2)
Adr+=LCD_LINE_2;
 
lcd_send_byte(0,0x80|Adr);
}
 
 
// Zapis znaku na displej, zpracovani ridicich znaku
//
void lcd_putc( char c)
{
 
switch (c)
{
case '\f' : lcd_send_byte(0,1); // smaz displej
delay_ms(2);
break;
case '\n' : lcd_gotoxy(1,2); break; // presun se na 1. znak 2. radky
case '\r' : lcd_gotoxy(1,1); break; // presun home
case '\b' : lcd_send_byte(0,0x10); break; // posun kurzor o 1 zpet
default : if (c<0x20) c&=0x7; // preklopeni definovatelnych znaku na rozsah 0 az 0x1F
lcd_send_byte(1,c); break; // zapis znak
}
}
 
 
// Zapni kurzor
//
void lcd_cursor_on()
{
lcd_send_byte(0,LCD_CURSOR_ON_);
}
 
 
// Vypni kurzor
//
void lcd_cursor_off()
{
lcd_send_byte(0,LCD_CURSOR_OFF_);
}
 
 
// Definice vlastnich fontu
//
// Vlastnich definic muze byt jen 8 do pozic 0 az 7 pameti CGRAM radice lcd displeje
// Pro snadne definovani jsou pripraveny nasledujici definice a na konci souboru je uveden
// priklad pouziti definovanych znaku.
 
 
// Pomocna procedura pro posilani ridicich dat do radice displeje
//
void lcd_putc2(int Data)
{
lcd_send_byte(1,Data);
}
 
 
// Pomocne definice pro programovani obsahu CGRAM
//
#DEFINE lcd_define_start(Code) lcd_send_byte(0,0x40+(Code<<3)); delay_ms(2)
#DEFINE lcd_define_def(String) printf(lcd_putc2,String);
#DEFINE lcd_define_end() lcd_send_byte(0,3); delay_ms(2)
 
 
// Vlastni vykonne makro pro definovani fontu do pozice Index CGRAM s definicnim retezcem Def
//
#DEFINE lcd_define_char(Index, Def) lcd_define_start(Index); lcd_define_def(Def); lcd_define_end();
 
 
// Pripravene definice fontu vybranych znaku
// V tabulce nesmi byt 00 (konec retezce v printf()), misto toho davame 80
//
#DEFINE LCD_CHAR_BAT100 "\x0E\x1F\x1F\x1F\x1F\x1F\x1F\x1F" /* symbol plne baterie */
#DEFINE LCD_CHAR_BAT50 "\x0E\x1F\x11\x11\x13\x17\x1F\x1F" /* symbol polovicni baterie */
#DEFINE LCD_CHAR_BAT0 "\x0E\x1F\x11\x11\x11\x11\x11\x1F" /* symbol vybite baterie */
#DEFINE LCD_CHAR_LUA "\x04\x0E\x11\x11\x1F\x11\x11\x80" /* A s carkou */
#DEFINE LCD_CHAR_LLA "\x01\x02\x0E\x01\x1F\x11\x0F\x80" /* a s carkou */
#DEFINE LCD_CHAR_HUC "\x0A\x0E\x11\x10\x10\x11\x0E\x80" /* C s hackem */
#DEFINE LCD_CHAR_HLC "\x0A\x04\x0E\x10\x10\x11\x0E\x80" /* c s hackem */
#DEFINE LCD_CHAR_HUD "\x0A\x1C\x12\x11\x11\x12\x1C\x80" /* D s hackem */
#DEFINE LCD_CHAR_HLD "\x05\x03\x0D\x13\x11\x11\x0F\x80" /* d s hackem */
#DEFINE LCD_CHAR_LUE "\x04\x1F\x10\x10\x1E\x10\x1F\x80" /* E s carkou */
#DEFINE LCD_CHAR_LLE "\x01\x02\x0E\x11\x1F\x10\x0E\x80" /* e s carkou */
#DEFINE LCD_CHAR_HUE "\x0A\x1F\x10\x1E\x10\x10\x1F\x80" /* E s hackem */
#DEFINE LCD_CHAR_HLE "\x0A\x04\x0E\x11\x1F\x10\x0E\x80" /* e s hackem */
#DEFINE LCD_CHAR_LUI "\x04\x0E\x04\x04\x04\x04\x0E\x80" /* I s carkou */
#DEFINE LCD_CHAR_LLI "\x02\x04\x80\x0C\x04\x04\x0E\x80" /* i s carkou */
#DEFINE LCD_CHAR_HUN "\x0A\x15\x11\x19\x15\x13\x11\x80" /* N s hackem */
#DEFINE LCD_CHAR_HLN "\x0A\x04\x16\x19\x11\x11\x11\x80" /* n s hackem */
#DEFINE LCD_CHAR_LUO "\x04\x0E\x11\x11\x11\x11\x0E\x80" /* O s carkou */
#DEFINE LCD_CHAR_LLO "\x02\x04\x0E\x11\x11\x11\x0E\x80" /* o s carkou */
#DEFINE LCD_CHAR_HUR "\x0A\x1E\x11\x1E\x14\x12\x11\x80" /* R s hackem */
#DEFINE LCD_CHAR_HLR "\x0A\x04\x16\x19\x10\x10\x10\x80" /* r s hackem */
#DEFINE LCD_CHAR_HUS "\x0A\x0F\x10\x0E\x01\x01\x1E\x80" /* S s hackem */
#DEFINE LCD_CHAR_HLS "\x0A\x04\x0E\x10\x0E\x01\x1E\x80" /* s s hackem */
#DEFINE LCD_CHAR_HUT "\x0A\x1F\x04\x04\x04\x04\x04\x80" /* T s hackem */
#DEFINE LCD_CHAR_HLT "\x0A\x0C\x1C\x08\x08\x09\x06\x80" /* t s hackem */
#DEFINE LCD_CHAR_LUU "\x02\x15\x11\x11\x11\x11\x0E\x80" /* U s carkou */
#DEFINE LCD_CHAR_LLU "\x02\x04\x11\x11\x11\x13\x0D\x80" /* u s carkou */
#DEFINE LCD_CHAR_CUU "\x06\x17\x11\x11\x11\x11\x0E\x80" /* U s krouzkem */
#DEFINE LCD_CHAR_CLU "\x06\x06\x11\x11\x11\x11\x0E\x80" /* u s krouzkem */
#DEFINE LCD_CHAR_LUY "\x02\x15\x11\x0A\x04\x04\x04\x80" /* Y s carkou */
#DEFINE LCD_CHAR_LLY "\x02\x04\x11\x11\x0F\x01\x0E\x80" /* y s carkou */
#DEFINE LCD_CHAR_HUZ "\x0A\x1F\x01\x02\x04\x08\x1F\x80" /* Z s hackem */
#DEFINE LCD_CHAR_HLZ "\x0A\x04\x1F\x02\x04\x08\x1F\x80" /* z s hackem */
 
 
// Priklad pouziti definovanych znaku
//
//
//void lcd_sample()
//{
// lcd_define_char(0,LCD_CHAR_BAT50); // Priklad definice znaku baterie do pozice 0
// lcd_define_char(2,LCD_CHAR_HLE LCD_CHAR_LUI); // Priklad definice znaku e s hackem a I s carkou od pozice 2
// // vsimnete si, ze neni carka mezi retezci s definici (oba retezce definuji
// // jediny definicni retezec)
// printf(lcd_putc,"\fZnaky:\20\22\23"); // priklad vypisu znaku z pozice 0, 2 a 3
// delay_ms(1000);
// lcd_define_char(0,LCD_CHAR_BAT0); // Predefinovani tvaru znaku v pozici 0
// delay_ms(1000);
//}
/schemata/prenos/letadlo/SW/prijimac/zaloha/01/PRG.BAT
0,0 → 1,6
call picpgr stop
call picpgr erase pic16c84
call picpgr program main.hex hex pic16c84
call picpgr run
pause
call picpgr stop
/schemata/prenos/letadlo/SW/prijimac/zaloha/01/PRG.PIF
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
/schemata/prenos/letadlo/SW/prijimac/zaloha/01/RUN.BAT
0,0 → 1,5
call picpgr run
pause
call picpgr stop
pause
run.bat
/schemata/prenos/letadlo/SW/prijimac/zaloha/01/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
/schemata/prenos/letadlo/SW/prijimac/zaloha/02/A.BAT
0,0 → 1,6
call picpgr stop
call picpgr erase pic16F84
call picpgr program main.hex hex pic16F84
call picpgr run
pause
call picpgr stop
/schemata/prenos/letadlo/SW/prijimac/zaloha/02/MAIN.C
0,0 → 1,118
#include "main.h"
#include "..\common.h"
 
#DEFINE LCD_RS PIN_B1 // rizeni registru LCD displeje
#DEFINE LCD_E PIN_B0 // enable LCD displeje
#DEFINE LCD_DATA_LSB PIN_B2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
#INCLUDE "MYLCD.C"
 
#DEFINE PRIJIMAC PIN_A3 // pin na ktery je pripojen prijimac
#DEFINE SERVO_X PIN_A0 // pin na ktery je pripojeno servo
#DEFINE SERVO_Y PIN_A1
 
 
int8 prijmout(int8* bit)
{
// || |
// |--|_____ 1
// |
// |-|__|-|_ 0
 
while (!input(PRIJIMAC)) ; // cekej na jednicku
delay_us(IMPULS/4); // presvec se, jestli je stale 1 po 1/4 impulsu
if (!input(PRIJIMAC)) return false; // vrat chybu, kdyz neni stale 1
delay_us(3*IMPULS); // pockej na rozhodovaci misto
if (input(PRIJIMAC)) *bit=0; else *bit=1; // dekoduj 1 nebo 0
delay_us(IMPULS); // pockej na konec znaku
 
return true; // vrat, ze se cteni povedlo
}
 
int8 read_nibble(int8* value)
{
int8 n; // citac
int8 bit; // pomocna promenna
 
*value=0;
for (n=1; n<=4; n++) // prijmi 4 bity
{
*value >>= 1; // posun jiz prectene do leva
if (0==prijmout(&bit)) return(false); // prijmi bit; pri chybe cteni vrat chybu
*value |= bit << 3; // pridej bit do nibblu
};
return(true); // vrat 1, jako ,ze je vse O.K.
}
 
 
int8 bit,x,y;
 
void main()
{
lcd_init(); // zinicializuj LCD display
 
while (true)
{
int8 osa, hodnota, kontrola;
int counter; // pocitadlo 1 a 0 v detektoru
 
counter=4;
 
decoder:
 
counter=0; // vynuluj citac
do // vyhledej synchronizacni jednicky
{
if (!prijmout(&bit)) goto decoder; // prijmi bit; pri chybe zacni znovu
if (1==bit) counter++; else goto decoder; // kdyz je bit 1, tak zvys citac; jinak zacni znovu
} while(counter<4); // pockej na 4 jednicky
 
if (!read_nibble(&osa)) goto decoder; // nacti identifikator osy
 
if (!read_nibble(&hodnota)) goto decoder; // nacti 1. nibble; pri chybe zacni znovu
if (!read_nibble(&kontrola)) goto decoder; // nacti 2. nibble; pri chybe zacni znovu
if (hodnota != kontrola) goto decoder; // zacni znovu, pokud jsou ruzne nibble
 
switch (osa) // rozeskoc se podle adresy osy
{
case OSA_X:
{
x=hodnota;
break;
};
case OSA_Y:
{
y=hodnota;
break;
};
case TLs:
{
break;
};
};
// ladici vypisy
lcd_gotoxy(1,1); // vytiskni X a Y
printf(lcd_putc,"X: %U ", x);
lcd_gotoxy(1,2);
printf(lcd_putc,"Y: %U ", y);
 
// ovladani serv
output_high(SERVO_X);
delay_ms(1);
for (osa=x; osa--; osa>0)
delay_us(65);
output_low(SERVO_X);
 
output_high(SERVO_Y);
delay_ms(1);
for (osa=y; osa--; osa>0)
delay_us(65);
output_low(SERVO_Y);
for (osa=30-x-y; osa--; osa>0)
delay_us(65);
 
}
}
 
 
/schemata/prenos/letadlo/SW/prijimac/zaloha/02/MAIN.H
0,0 → 1,4
#include <16F84.h>
#use delay(clock=4000000)
#fuses XT,NOWDT,PUT
 
/schemata/prenos/letadlo/SW/prijimac/zaloha/02/MAIN.PJT
0,0 → 1,32
[PROJECT]
Target=main.HEX
Development_Mode=
Processor=0x684A
ToolSuite=CCS
 
[Directories]
Include=C:\Program Files\PICC\Devices;C:\Program Files\PICC\Dri;
Library=
LinkerScript=
 
[Target Data]
FileList=main.c;
BuildTool=CCSC
OptionString=-p +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
 
/schemata/prenos/letadlo/SW/prijimac/zaloha/02/MYLCD.C
0,0 → 1,271
// LCD modul pro ovladani dvouradkoveho LCD modulu se standardnim Hitachi radicem
// (c)miho 2002
//
// Historie:
//
// 0.0 Uvodni verze se snadnou definici portu LCD displeje
//
//
// Funkce:
//
// lcd_init() inicializuje LCD displej a porty, nutno volat jako prvni
//
// lcd_putc(c) zapis snaku do lcd displeje, zpracovava nasledujici ridici znaky
// \f = \x0C - nova stranka - smazani displeje
// \n = \x0A - odradkovani (prechod na druhou radku)
// \b = \x08 - backspace - posunuti kurzoru o 1 pozici zpet
// \r = \x0D - goto home to position 1,1
// \0 .. \7 - definovatelne znaky v pozicich 0 az 7 v CGRAM
// \20 .. \27 - alternativne zapsane znaky (oktalove) v pozicich 0 az 7 CGRAM
// Pozor na to, ze funkce printf konci tisk pokud narazi na \0 (konec retezce)
//
// lcd_gotoxy(x,y) presune kurzor na uvedenou adresu
// nekontroluje parametry
//
// lcd_cursor_on zapne kurzor
// lcd_cursor_off vypne kurzor
//
// lcd_define_char(Index, Def) Makro, ktere definuje znaky od pozice Index obsahem definicniho
// retezce Def. Kazdych 8 znaku retezce Def definuje dalsi znak v CGRAM.
// Kapacita CGRAM je celkem 8 znaku s indexem 0 az 7.
// Na konci se provede lcd_gotoxy(1,1).
// Na konci teto knihovny je priklad pouziti definovanych znaku
//
// Definice portu:
//
// #DEFINE LCD_RS PIN_B2 // rizeni registru LCD displeje
// #DEFINE LCD_E PIN_B1 // enable LCD displeje
// #DEFINE LCD_DATA_LSB PIN_C2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
 
 
 
 
// Privatni sekce, cist jen v pripade, ze neco nefunguje
 
 
 
 
// Generovane defince portu pro ucely teto knihovny aby kod generoval spravne IO operace a soucasne
// bylo mozne jednoduse deklarovat pripojene piny LCD displeje pri pouziti teto knihovny. Problem spociva
// v tom, ze se musi spravne ridit smery portu a soucasne datovy port zabira jen 4 bity ze zadaneho portu
//
#DEFINE LCD_SHIFT (LCD_DATA_LSB&7) // pocet bitu posuvu dataoveho kanalu v datovem portu
#DEFINE LCD_PORT (LCD_DATA_LSB>>3) // adresa LCD datoveho portu
#DEFINE LCD_TRIS (LCD_PORT+0x80) // adresa prislusneho TRIS registru
#DEFINE LCD_MASK (0xF<<LCD_SHIFT) // maska platnych bitu
//
#IF LCD_SHIFT>4 // kontrola mezi
#ERROR LCD data port LSB bit not in range 0..4
#ENDIF
 
 
// Definice konstant pro LCD display
//
#define LCD_CURSOR_ON_ 0x0E // kurzor jako blikajici radka pod znakem
#define LCD_CURSOR_OFF_ 0x0C // zadny kurzor
#define LCD_LINE_2 0x40 // adresa 1. znaku 2. radky
 
 
// Definice rezimu LCD displeje
//
BYTE const LCD_INIT_STRING[4] =
{
0x28, // intrfejs 4 bity, 2 radky, font 5x7
LCD_CURSOR_OFF_, // display on, kurzor off,
0x01, // clear displeje
0x06 // inkrement pozice kurzoru (posun kurzoru doprava)
};
 
 
// Odesle nibble do displeje (posle data a klikne signalem e)
//
void lcd_send_nibble( BYTE n )
{
*LCD_PORT = (*LCD_PORT & ~LCD_MASK) | ((n << LCD_SHIFT) & LCD_MASK); // nastav datove bity portu a ostatni zachovej
output_bit(LCD_E,1); // vzestupna hrana
delay_us(1); // pockej alespon 450ns od e nebo alespon 195ns od dat
output_bit(LCD_E,0); // sestupna hrana (minimalni perioda e je 1us)
}
 
 
// Odesle bajt do registru LCD
//
// Pokud je Adr=0 .. instrukcni registr
// Pokud je Adr=1 .. datovy registr
//
void lcd_send_byte( BOOLEAN Adr, BYTE n )
{
output_bit(LCD_RS,Adr); // vyber registr
swap(n);
lcd_send_nibble(n); // posli horni pulku bajtu
swap(n);
lcd_send_nibble(n); // posli spodni pulku bajtu
delay_us(40); // minimalni doba na provedeni prikazu
}
 
 
// Provede inicializaci LCD displeje, smaze obsah a nastavi mod displeje
//
// Tato procedura se musi volat pred pouzitim ostatnich lcd_ procedur
//
void lcd_init()
{
 
int i; // pocitadlo cyklu
 
delay_ms(20); // spozdeni pro provedeni startu displeje po zapnuti napajeni
 
*LCD_TRIS = *LCD_TRIS & ~LCD_MASK; // nuluj odpovidajici bity tris registru datoveho portu LCD
 
output_bit(LCD_RS,0); // nastav jako vystup a nastav klidovy stav
output_bit(LCD_E,0); // nastav jako vystup a nastav klidovy stav
 
for (i=0; i<3; i++) // nastav lcd do rezimu 8 bitu sbernice
{
delay_ms(2); // muze byt rozdelany prenos dat (2x 4 bity) nebo pomaly povel
lcd_send_nibble(3); // rezim 8 bitu
}
 
delay_us(40); // cas na zpracovani
lcd_send_nibble(2); // nastav rezim 4 bitu (plati od nasledujiciho prenosu)
delay_us(40); // cas na zpracovani
 
for (i=0;i<3;i++) // proved inicializaci (nastaveni modu, smazani apod)
{
lcd_send_byte(0,LCD_INIT_STRING[i]);
delay_ms(2);
}
}
 
 
// Proved presun kurzoru
//
// Pozice 1.1 je domu
//
void lcd_gotoxy( BYTE x, BYTE y)
{
 
BYTE Adr;
 
Adr=x-1;
if(y==2)
Adr+=LCD_LINE_2;
 
lcd_send_byte(0,0x80|Adr);
}
 
 
// Zapis znaku na displej, zpracovani ridicich znaku
//
void lcd_putc( char c)
{
 
switch (c)
{
case '\f' : lcd_send_byte(0,1); // smaz displej
delay_ms(2);
break;
case '\n' : lcd_gotoxy(1,2); break; // presun se na 1. znak 2. radky
case '\r' : lcd_gotoxy(1,1); break; // presun home
case '\b' : lcd_send_byte(0,0x10); break; // posun kurzor o 1 zpet
default : if (c<0x20) c&=0x7; // preklopeni definovatelnych znaku na rozsah 0 az 0x1F
lcd_send_byte(1,c); break; // zapis znak
}
}
 
 
// Zapni kurzor
//
void lcd_cursor_on()
{
lcd_send_byte(0,LCD_CURSOR_ON_);
}
 
 
// Vypni kurzor
//
void lcd_cursor_off()
{
lcd_send_byte(0,LCD_CURSOR_OFF_);
}
 
 
// Definice vlastnich fontu
//
// Vlastnich definic muze byt jen 8 do pozic 0 az 7 pameti CGRAM radice lcd displeje
// Pro snadne definovani jsou pripraveny nasledujici definice a na konci souboru je uveden
// priklad pouziti definovanych znaku.
 
 
// Pomocna procedura pro posilani ridicich dat do radice displeje
//
void lcd_putc2(int Data)
{
lcd_send_byte(1,Data);
}
 
 
// Pomocne definice pro programovani obsahu CGRAM
//
#DEFINE lcd_define_start(Code) lcd_send_byte(0,0x40+(Code<<3)); delay_ms(2)
#DEFINE lcd_define_def(String) printf(lcd_putc2,String);
#DEFINE lcd_define_end() lcd_send_byte(0,3); delay_ms(2)
 
 
// Vlastni vykonne makro pro definovani fontu do pozice Index CGRAM s definicnim retezcem Def
//
#DEFINE lcd_define_char(Index, Def) lcd_define_start(Index); lcd_define_def(Def); lcd_define_end();
 
 
// Pripravene definice fontu vybranych znaku
// V tabulce nesmi byt 00 (konec retezce v printf()), misto toho davame 80
//
#DEFINE LCD_CHAR_BAT100 "\x0E\x1F\x1F\x1F\x1F\x1F\x1F\x1F" /* symbol plne baterie */
#DEFINE LCD_CHAR_BAT50 "\x0E\x1F\x11\x11\x13\x17\x1F\x1F" /* symbol polovicni baterie */
#DEFINE LCD_CHAR_BAT0 "\x0E\x1F\x11\x11\x11\x11\x11\x1F" /* symbol vybite baterie */
#DEFINE LCD_CHAR_LUA "\x04\x0E\x11\x11\x1F\x11\x11\x80" /* A s carkou */
#DEFINE LCD_CHAR_LLA "\x01\x02\x0E\x01\x1F\x11\x0F\x80" /* a s carkou */
#DEFINE LCD_CHAR_HUC "\x0A\x0E\x11\x10\x10\x11\x0E\x80" /* C s hackem */
#DEFINE LCD_CHAR_HLC "\x0A\x04\x0E\x10\x10\x11\x0E\x80" /* c s hackem */
#DEFINE LCD_CHAR_HUD "\x0A\x1C\x12\x11\x11\x12\x1C\x80" /* D s hackem */
#DEFINE LCD_CHAR_HLD "\x05\x03\x0D\x13\x11\x11\x0F\x80" /* d s hackem */
#DEFINE LCD_CHAR_LUE "\x04\x1F\x10\x10\x1E\x10\x1F\x80" /* E s carkou */
#DEFINE LCD_CHAR_LLE "\x01\x02\x0E\x11\x1F\x10\x0E\x80" /* e s carkou */
#DEFINE LCD_CHAR_HUE "\x0A\x1F\x10\x1E\x10\x10\x1F\x80" /* E s hackem */
#DEFINE LCD_CHAR_HLE "\x0A\x04\x0E\x11\x1F\x10\x0E\x80" /* e s hackem */
#DEFINE LCD_CHAR_LUI "\x04\x0E\x04\x04\x04\x04\x0E\x80" /* I s carkou */
#DEFINE LCD_CHAR_LLI "\x02\x04\x80\x0C\x04\x04\x0E\x80" /* i s carkou */
#DEFINE LCD_CHAR_HUN "\x0A\x15\x11\x19\x15\x13\x11\x80" /* N s hackem */
#DEFINE LCD_CHAR_HLN "\x0A\x04\x16\x19\x11\x11\x11\x80" /* n s hackem */
#DEFINE LCD_CHAR_LUO "\x04\x0E\x11\x11\x11\x11\x0E\x80" /* O s carkou */
#DEFINE LCD_CHAR_LLO "\x02\x04\x0E\x11\x11\x11\x0E\x80" /* o s carkou */
#DEFINE LCD_CHAR_HUR "\x0A\x1E\x11\x1E\x14\x12\x11\x80" /* R s hackem */
#DEFINE LCD_CHAR_HLR "\x0A\x04\x16\x19\x10\x10\x10\x80" /* r s hackem */
#DEFINE LCD_CHAR_HUS "\x0A\x0F\x10\x0E\x01\x01\x1E\x80" /* S s hackem */
#DEFINE LCD_CHAR_HLS "\x0A\x04\x0E\x10\x0E\x01\x1E\x80" /* s s hackem */
#DEFINE LCD_CHAR_HUT "\x0A\x1F\x04\x04\x04\x04\x04\x80" /* T s hackem */
#DEFINE LCD_CHAR_HLT "\x0A\x0C\x1C\x08\x08\x09\x06\x80" /* t s hackem */
#DEFINE LCD_CHAR_LUU "\x02\x15\x11\x11\x11\x11\x0E\x80" /* U s carkou */
#DEFINE LCD_CHAR_LLU "\x02\x04\x11\x11\x11\x13\x0D\x80" /* u s carkou */
#DEFINE LCD_CHAR_CUU "\x06\x17\x11\x11\x11\x11\x0E\x80" /* U s krouzkem */
#DEFINE LCD_CHAR_CLU "\x06\x06\x11\x11\x11\x11\x0E\x80" /* u s krouzkem */
#DEFINE LCD_CHAR_LUY "\x02\x15\x11\x0A\x04\x04\x04\x80" /* Y s carkou */
#DEFINE LCD_CHAR_LLY "\x02\x04\x11\x11\x0F\x01\x0E\x80" /* y s carkou */
#DEFINE LCD_CHAR_HUZ "\x0A\x1F\x01\x02\x04\x08\x1F\x80" /* Z s hackem */
#DEFINE LCD_CHAR_HLZ "\x0A\x04\x1F\x02\x04\x08\x1F\x80" /* z s hackem */
 
 
// Priklad pouziti definovanych znaku
//
//
//void lcd_sample()
//{
// lcd_define_char(0,LCD_CHAR_BAT50); // Priklad definice znaku baterie do pozice 0
// lcd_define_char(2,LCD_CHAR_HLE LCD_CHAR_LUI); // Priklad definice znaku e s hackem a I s carkou od pozice 2
// // vsimnete si, ze neni carka mezi retezci s definici (oba retezce definuji
// // jediny definicni retezec)
// printf(lcd_putc,"\fZnaky:\20\22\23"); // priklad vypisu znaku z pozice 0, 2 a 3
// delay_ms(1000);
// lcd_define_char(0,LCD_CHAR_BAT0); // Predefinovani tvaru znaku v pozici 0
// delay_ms(1000);
//}
/schemata/prenos/letadlo/SW/prijimac/zaloha/02/PRG.BAT
0,0 → 1,6
call picpgr stop
call picpgr erase pic16f84
call picpgr program main.hex hex pic16f84
call picpgr run
pause
call picpgr stop
/schemata/prenos/letadlo/SW/prijimac/zaloha/02/PRG.PIF
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
/schemata/prenos/letadlo/SW/prijimac/zaloha/02/RUN.BAT
0,0 → 1,5
call picpgr run
pause
call picpgr stop
pause
run.bat
/schemata/prenos/letadlo/SW/prijimac/zaloha/02/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
/schemata/prenos/letadlo/SW/prijimac/zaloha/03/A.BAT
0,0 → 1,6
call picpgr stop
call picpgr erase pic16F84
call picpgr program main.hex hex pic16F84
call picpgr run
pause
call picpgr stop
/schemata/prenos/letadlo/SW/prijimac/zaloha/03/MAIN.BAK
0,0 → 1,174
// Prijimac
 
#include "main.h"
#include "..\common.h"
 
#DEFINE LCD_RS PIN_B1 // rizeni registru LCD displeje
#DEFINE LCD_E PIN_B0 // enable LCD displeje
#DEFINE LCD_DATA_LSB PIN_B2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
#INCLUDE "MYLCD.C"
 
#DEFINE PRIJIMAC PIN_A3 // pin na ktery je pripojen prijimac
#DEFINE SERVO_X PIN_A0 // pin na ktery je pripojeno servo
#DEFINE SERVO_Y PIN_A1
 
 
int8 prijmout(int8* bit)
{
// || |
// |--|_____ 1
// |
// |-|__|-|_ 0
 
while (!input(PRIJIMAC)) ; // cekej na jednicku
delay_us(IMPULS/4); // presvec se, jestli je stale 1 po 1/4 impulsu
if (!input(PRIJIMAC)) return false; // vrat chybu, kdyz neni stale 1
delay_us(3*IMPULS); // pockej na rozhodovaci misto
/// if (input(PRIJIMAC)) *bit=0; else *bit=1; // dekoduj 1 nebo 0
*bit=!input(PRIJIMAC); // dekoduj 1 nebo 0
delay_us(IMPULS); // pockej na konec znaku
 
return true; // vrat, ze se cteni povedlo
}
 
int8 read_nibble(int8* data)
{
int8 i;
int8 d;
 
d=0;
 
// Cekam na dlouhou nulu
for (i=8; i>0; i--)
{
if (input(PRIJIMAC)) i=8;
delay_us(IMPULS/2);
}
 
// Cekam na jednicku (start ramce)
for (; !input(PRIJIMAC); )
{
delay_us(IMPULS/2);
}
 
delay_us(IMPULS/2);
 
// Prenasim bity
for (i=0; i<4; i++)
{
delay_us(2*IMPULS);
d >>= 1;
if (!input(PRIJIMAC)) d +=8;
}
*data = d;
return TRUE;
}
 
int8 read_nibble2(int8* value)
{
int8 n; // citac
int8 bit; // pomocna promenna
 
*value=0;
for (n=1; n<=4; n++) // prijmi 4 bity
{
*value >>= 1; // posun jiz prectene do leva
if (0==prijmout(&bit)) return(false); // prijmi bit; pri chybe cteni vrat chybu
*value |= bit << 3; // pridej bit do nibblu
};
return(true); // vrat 1, jako ,ze je vse O.K.
}
 
 
int8 bit,x,y;
 
void main()
{
lcd_init(); // zinicializuj LCD display
delay_ms(5);
printf(lcd_putc,"Ahoj...");
delay_ms(1000);
 
//while(TRUE)
//{
// read_nibble(&x);
// lcd_gotoxy(1,1); // vytiskni X a Y
// printf(lcd_putc,"O:%d ",x);
//}
 
x = 0;
y = 0;
 
while (true)
{
int8 osa, hodnota, kontrola;
int counter; // pocitadlo 1 a 0 v detektoru
int e1,e2; // pocitadla chyb - ladici
e1=0;
e2=0;
counter=4;
 
decoder:
 
counter=0; // vynuluj citac
// do // vyhledej synchronizacni jednicky
// {
// if (!prijmout(&bit)) goto decoder; // prijmi bit; pri chybe zacni znovu
// if (1==bit) counter++; else goto decoder; // kdyz je bit 1, tak zvys citac; jinak zacni znovu
// } while(counter<4); // pockej na 4 jednicky
if (!read_nibble(&osa)) goto decoder;
if (osa!=15) {e1++; goto decoder;};
if (!read_nibble(&osa)) goto decoder; // nacti identifikator osy
 
if (!read_nibble(&hodnota)) goto decoder; // nacti 1. nibble; pri chybe zacni znovu
if (!read_nibble(&kontrola)) goto decoder; // nacti 2. nibble; pri chybe zacni znovu
if (hodnota != kontrola) {e2++; goto decoder;} // zacni znovu, pokud jsou ruzne nibble
 
switch (osa) // rozeskoc se podle adresy osy
{
case OSA_X:
{
x=hodnota;
break;
};
case OSA_Y:
{
y=hodnota;
break;
};
case TLs:
{
e1++;
break;
};
};
 
// ladici vypisy
lcd_gotoxy(1,1); // vytiskni X a Y
printf(lcd_putc,"X: %U ", x);
lcd_gotoxy(1,2);
printf(lcd_putc,"Y: %U ", y);
 
// ovladani serv
output_high(SERVO_X);
delay_ms(1);
for (osa=x; osa--; osa>0)
delay_us(65);
output_low(SERVO_X);
 
output_high(SERVO_Y);
delay_ms(1);
for (osa=y; osa--; osa>0)
delay_us(65);
output_low(SERVO_Y);
 
for (osa=30-x-y; osa--; osa>0)
delay_us(65);
 
}
}
 
 
/schemata/prenos/letadlo/SW/prijimac/zaloha/03/MAIN.C
0,0 → 1,179
// Prijimac
 
#include "main.h"
#include "..\common.h"
 
#DEFINE LCD_RS PIN_B1 // rizeni registru LCD displeje
#DEFINE LCD_E PIN_B0 // enable LCD displeje
#DEFINE LCD_DATA_LSB PIN_B2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
#INCLUDE "MYLCD.C"
 
#DEFINE PRIJIMAC PIN_A3 // pin na ktery je pripojen prijimac
#DEFINE SERVO_X PIN_A0 // pin na ktery je pripojeno servo
#DEFINE SERVO_Y PIN_A1
 
 
int8 prijmout(int8* bit)
{
// || |
// |--|_____ 1
// |
// |-|__|-|_ 0
 
while (!input(PRIJIMAC)) ; // cekej na jednicku
delay_us(IMPULS/4); // presvec se, jestli je stale 1 po 1/4 impulsu
if (!input(PRIJIMAC)) return false; // vrat chybu, kdyz neni stale 1
delay_us(3*IMPULS); // pockej na rozhodovaci misto
/// if (input(PRIJIMAC)) *bit=0; else *bit=1; // dekoduj 1 nebo 0
*bit=!input(PRIJIMAC); // dekoduj 1 nebo 0
delay_us(IMPULS); // pockej na konec znaku
 
return true; // vrat, ze se cteni povedlo
}
 
int8 read_nibble(int8* data)
{
int8 i;
int8 d;
 
d=0;
 
// Cekam na dlouhou nulu
for (i=8; i>0; i--)
{
if (input(PRIJIMAC)) i=8;
delay_us(IMPULS/2);
}
 
// Cekam na jednicku (start ramce)
for (; !input(PRIJIMAC); )
{
delay_us(IMPULS/2);
}
 
delay_us(IMPULS/2);
 
// Prenasim bity
for (i=0; i<4; i++)
{
delay_us(2*IMPULS);
d >>= 1;
if (!input(PRIJIMAC)) d +=8;
}
*data = d;
return TRUE;
}
 
int8 read_nibble2(int8* value)
{
int8 n; // citac
int8 bit; // pomocna promenna
 
*value=0;
for (n=1; n<=4; n++) // prijmi 4 bity
{
*value >>= 1; // posun jiz prectene do leva
if (0==prijmout(&bit)) return(false); // prijmi bit; pri chybe cteni vrat chybu
*value |= bit << 3; // pridej bit do nibblu
};
return(true); // vrat 1, jako ,ze je vse O.K.
}
 
 
int8 bit,x,y;
int8 xc,yc; // pocitadla aktualizace x a y
 
void main()
{
lcd_init(); // zinicializuj LCD display
delay_ms(5);
printf(lcd_putc,"Ahoj...");
delay_ms(1000);
 
//while(TRUE)
//{
// read_nibble(&x);
// lcd_gotoxy(1,1); // vytiskni X a Y
// printf(lcd_putc,"O:%d ",x);
//}
 
x = 0;
y = 0;
xc=0;
yc=0;
 
while (true)
{
int8 osa, hodnota, kontrola;
int counter; // pocitadlo 1 a 0 v detektoru
int e1,e2; // pocitadla chyb - ladici
e1=0;
e2=0;
counter=4;
 
decoder:
 
counter=0; // vynuluj citac
// do // vyhledej synchronizacni jednicky
// {
// if (!prijmout(&bit)) goto decoder; // prijmi bit; pri chybe zacni znovu
// if (1==bit) counter++; else goto decoder; // kdyz je bit 1, tak zvys citac; jinak zacni znovu
// } while(counter<4); // pockej na 4 jednicky
if (!read_nibble(&osa)) goto decoder;
if (osa!=15) {e1++; goto decoder;};
if (!read_nibble(&osa)) goto decoder; // nacti identifikator osy
 
if (!read_nibble(&hodnota)) goto decoder; // nacti 1. nibble; pri chybe zacni znovu
if (!read_nibble(&kontrola)) goto decoder; // nacti 2. nibble; pri chybe zacni znovu
if (hodnota != kontrola) {e2++; goto decoder;} // zacni znovu, pokud jsou ruzne nibble
 
switch (osa) // rozeskoc se podle adresy osy
{
case OSA_X:
{
x=hodnota;
xc++;
break;
};
case OSA_Y:
{
y=hodnota;
yc++;
break;
};
case TLs:
{
e1++;
break;
};
};
 
// ladici vypisy
lcd_gotoxy(1,1); // vytiskni X a Y
printf(lcd_putc,"X: %U %u %U ", x, xc, e1);
lcd_gotoxy(1,2);
printf(lcd_putc,"Y: %U %U %U ", y, yc, e2);
 
// ovladani serv
output_high(SERVO_X);
delay_ms(1);
for (osa=x; osa--; osa>0)
delay_us(65);
output_low(SERVO_X);
 
output_high(SERVO_Y);
delay_ms(1);
for (osa=y; osa--; osa>0)
delay_us(65);
output_low(SERVO_Y);
 
for (osa=30-x-y; osa--; osa>0)
delay_us(65);
 
}
}
 
 
/schemata/prenos/letadlo/SW/prijimac/zaloha/03/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
/schemata/prenos/letadlo/SW/prijimac/zaloha/03/MAIN.ERR
0,0 → 1,0
No Errors
/schemata/prenos/letadlo/SW/prijimac/zaloha/03/MAIN.H
0,0 → 1,4
#include <16F84.h>
#use delay(clock=4000000)
#fuses XT,NOWDT,PUT
 
/schemata/prenos/letadlo/SW/prijimac/zaloha/03/MAIN.HEX
0,0 → 1,81
:1000000000308A005F2900000A108A100A11820756
:1000100028340C34013406340A108A100A1182077D
:10002000413468346F346A3400341C308400000872
:100030000319292801308D008C018C0B1D288D0B94
:100040001C284A308C008C0B232800000000800BF9
:100050001A2800340608C339A300220D8C008C0D29
:10006000FC308C050C083C392304860006148316EA
:100070000610000083120610831606108312003447
:10008000A008031D4528861046288614831686106E
:100090008312A10E2108A2002A20A10E2108A2008D
:1000A0002A200D308C008C0B5328003414309C0017
:1000B0001520C3308316860583128610831686109A
:1000C0008312061083160610831299011908023C48
:1000D000031C722802309C0015200330A2002A2045
:1000E000990A66280D308C008C0B74280230A2000F
:1000F0002A200D308C008C0B7B2899011908023CBA
:10010000031C8E28190804209A00A0011A08A100D7
:10011000402002309C001520990A7E286329013076
:100120001C029E001D08023C031D982840309E07BB
:100130001E0880389F00A0011F08A1004020003445
:100140001B088C000C300C020319B3280A300C0277
:100150000319BB280D300C020319C12808300C020A
:100160000319C628CB28A0010130A100402002308D
:100170009C001520D72801309C0002309D008F2064
:10018000D72801309C009D008F20D728A001103077
:10019000A1004020D7281B081F3C031CD128073092
:1001A0009B050130A0001B08A1004020D728003487
:1001B0009B0108309A009A080319EC2883168515CC
:1001C0008312851DE52808309A0029308C008C0B9D
:1001D000E72800009A03DB2883168515831285190A
:1001E000F72829308C008C0BF3280000EC282930EC
:1001F0008C008C0BF92800009A011A08033C031CA0
:100200001129A6308C008C0B0329000003109B0CD5
:1002100083168515831285190F2908309B079A0AC2
:10022000FD28190884001B08800001308D0000346F
:100230001C088D011B02031820291B088C002C2987
:100240008C0108309D009B0D8C0D1C080C020318BE
:100250008C008D0D9D0B232900340D0819089B007F
:1002600064309C0018210C0899000D083030031DE3
:1002700040291A189A159A1946291A1A2030422923
:100280009A111A128D070D089B00A02019089B00D7
:100290000A309C0018210C0899000D083030031D0D
:1002A00055299A1959291A1A20308D070D089B00D3
:1002B000A0203030990719089B00A0200034840149
:1002C0001F308305562805309C0015209901190818
:1002D0000C20990A9B00A02004301902031D6729F5
:1002E00003309A002E309B00A0209A0B7229043014
:1002F0009900FA309C001520990B79298F01900103
:1003000091019201970198010430960096011330F3
:100310009900D8208D08031D8E29862913080F3CCB
:1003200003199429970A862913309900D8208D083B
:10033000031D9B29862914309900D8208D08031DA0
:10034000A229862915309900D8208D08031DA929D6
:100350008629150814020319AF29980A8629013045
:100360001302FD3E0318C029033E622A14088F00C1
:10037000910AC02914089000920AC029970AC0293E
:1003800001309C009D008F2058309B00A0203A3007
:100390009B00A02020309B00A0200F08990018305F
:1003A0009A002D2120309B00A020110899001830C0
:1003B0009A002D2120309B00A020170899001830AA
:1003C0009A002D210530990020309B00A020990B28
:1003D000E42901309C0002309D008F2059309B00A1
:1003E000A0203A309B00A02020309B00A0201008C5
:1003F000990018309A002D2120309B00A02012086F
:10040000990018309A002D2120309B00A020180858
:10041000990018309A002D210530990020309B005A
:10042000A020990B0E2A83160510831205140130A3
:100430009C0015200F08930013089303003A03193A
:100440002B2A15308C008C0B232A00009308031DE7
:100450002A2A00301C2A83160510831205108316E1
:1004600085108312851401309C001520100893001C
:1004700013089303003A0319472A15308C008C0B9C
:100480003F2A00009308031D462A0030382A8316AD
:100490008510831285100F081E3C8D0010080D0278
:1004A000930013089303003A0319602A15308C0057
:1004B0008C0B582A00009308031D5F2A0030512A34
:1004C000822963000A108A140A118207B629BA2900
:0204D000BE2943
:02400E00F13F80
:00000001FF
;PIC16F84
/schemata/prenos/letadlo/SW/prijimac/zaloha/03/MAIN.LST
0,0 → 1,1083
CCS PCW C Compiler, Version 3.110, 15448
 
Filename: d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\main.LST
 
ROM used: 617 (60%)
Largest free fragment is 407
RAM used: 9 (13%) at main() level
25 (37%) worst case
Stack: 5 locations
 
*
0000: MOVLW 00
0001: MOVWF 0A
0002: GOTO 15F
0003: NOP
.................... // Prijimac
....................
.................... #include "main.h"
.................... #include <16F84.h>
.................... //////// Standard Header file for the PIC16F84 device ////////////////
.................... #device PIC16F84
.................... #list
....................
.................... #use delay(clock=4000000)
*
0015: MOVLW 1C
0016: MOVWF 04
0017: MOVF 00,W
0018: BTFSC 03.2
0019: GOTO 029
001A: MOVLW 01
001B: MOVWF 0D
001C: CLRF 0C
001D: DECFSZ 0C,F
001E: GOTO 01D
001F: DECFSZ 0D,F
0020: GOTO 01C
0021: MOVLW 4A
0022: MOVWF 0C
0023: DECFSZ 0C,F
0024: GOTO 023
0025: NOP
0026: NOP
0027: DECFSZ 00,F
0028: GOTO 01A
0029: RETLW 00
.................... #fuses XT,NOWDT,PUT
....................
....................
.................... #include "..\common.h"
.................... #DEFINE OSA_X 1 // adresy os
.................... #DEFINE OSA_Y 2
.................... #DEFINE TLs 3
.................... #DEFINE IMPULS 250 // sirka impulsu
....................
....................
.................... #DEFINE LCD_RS PIN_B1 // rizeni registru LCD displeje
.................... #DEFINE LCD_E PIN_B0 // enable LCD displeje
.................... #DEFINE LCD_DATA_LSB PIN_B2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
.................... #INCLUDE "MYLCD.C"
.................... // LCD modul pro ovladani dvouradkoveho LCD modulu se standardnim Hitachi radicem
.................... // (c)miho 2002
.................... //
.................... // Historie:
.................... //
.................... // 0.0 Uvodni verze se snadnou definici portu LCD displeje
.................... //
.................... //
.................... // Funkce:
.................... //
.................... // lcd_init() inicializuje LCD displej a porty, nutno volat jako prvni
.................... //
.................... // lcd_putc(c) zapis snaku do lcd displeje, zpracovava nasledujici ridici znaky
.................... // \f = \x0C - nova stranka - smazani displeje
.................... // \n = \x0A - odradkovani (prechod na druhou radku)
.................... // \b = \x08 - backspace - posunuti kurzoru o 1 pozici zpet
.................... // \r = \x0D - goto home to position 1,1
.................... // \0 .. \7 - definovatelne znaky v pozicich 0 az 7 v CGRAM
.................... // \20 .. \27 - alternativne zapsane znaky (oktalove) v pozicich 0 az 7 CGRAM
.................... // Pozor na to, ze funkce printf konci tisk pokud narazi na \0 (konec retezce)
.................... //
.................... // lcd_gotoxy(x,y) presune kurzor na uvedenou adresu
.................... // nekontroluje parametry
.................... //
.................... // lcd_cursor_on zapne kurzor
.................... // lcd_cursor_off vypne kurzor
.................... //
.................... // lcd_define_char(Index, Def) Makro, ktere definuje znaky od pozice Index obsahem definicniho
.................... // retezce Def. Kazdych 8 znaku retezce Def definuje dalsi znak v CGRAM.
.................... // Kapacita CGRAM je celkem 8 znaku s indexem 0 az 7.
.................... // Na konci se provede lcd_gotoxy(1,1).
.................... // Na konci teto knihovny je priklad pouziti definovanych znaku
.................... //
.................... // Definice portu:
.................... //
.................... // #DEFINE LCD_RS PIN_B2 // rizeni registru LCD displeje
.................... // #DEFINE LCD_E PIN_B1 // enable LCD displeje
.................... // #DEFINE LCD_DATA_LSB PIN_C2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
....................
....................
....................
....................
.................... // Privatni sekce, cist jen v pripade, ze neco nefunguje
....................
....................
....................
....................
.................... // Generovane defince portu pro ucely teto knihovny aby kod generoval spravne IO operace a soucasne
.................... // bylo mozne jednoduse deklarovat pripojene piny LCD displeje pri pouziti teto knihovny. Problem spociva
.................... // v tom, ze se musi spravne ridit smery portu a soucasne datovy port zabira jen 4 bity ze zadaneho portu
.................... //
.................... #DEFINE LCD_SHIFT (LCD_DATA_LSB&7) // pocet bitu posuvu dataoveho kanalu v datovem portu
.................... #DEFINE LCD_PORT (LCD_DATA_LSB>>3) // adresa LCD datoveho portu
.................... #DEFINE LCD_TRIS (LCD_PORT+0x80) // adresa prislusneho TRIS registru
.................... #DEFINE LCD_MASK (0xF<<LCD_SHIFT) // maska platnych bitu
.................... //
.................... #IF LCD_SHIFT>4 // kontrola mezi
.................... #ERROR LCD data port LSB bit not in range 0..4
.................... #ENDIF
....................
....................
.................... // Definice konstant pro LCD display
.................... //
.................... #define LCD_CURSOR_ON_ 0x0E // kurzor jako blikajici radka pod znakem
.................... #define LCD_CURSOR_OFF_ 0x0C // zadny kurzor
.................... #define LCD_LINE_2 0x40 // adresa 1. znaku 2. radky
....................
....................
.................... // Definice rezimu LCD displeje
.................... //
.................... BYTE const LCD_INIT_STRING[4] =
.................... {
.................... 0x28, // intrfejs 4 bity, 2 radky, font 5x7
.................... LCD_CURSOR_OFF_, // display on, kurzor off,
.................... 0x01, // clear displeje
.................... 0x06 // inkrement pozice kurzoru (posun kurzoru doprava)
.................... };
*
0004: BCF 0A.0
0005: BCF 0A.1
0006: BCF 0A.2
0007: ADDWF 02,F
0008: RETLW 28
0009: RETLW 0C
000A: RETLW 01
000B: RETLW 06
....................
....................
.................... // Odesle nibble do displeje (posle data a klikne signalem e)
.................... //
.................... void lcd_send_nibble( BYTE n )
.................... {
.................... *LCD_PORT = (*LCD_PORT & ~LCD_MASK) | ((n << LCD_SHIFT) & LCD_MASK); // nastav datove bity portu a ostatni zachovej
*
002A: MOVF 06,W
002B: ANDLW C3
002C: MOVWF 23
002D: RLF 22,W
002E: MOVWF 0C
002F: RLF 0C,F
0030: MOVLW FC
0031: ANDWF 0C,F
0032: MOVF 0C,W
0033: ANDLW 3C
0034: IORWF 23,W
0035: MOVWF 06
.................... output_bit(LCD_E,1); // vzestupna hrana
0036: BSF 06.0
0037: BSF 03.5
0038: BCF 06.0
.................... delay_us(1); // pockej alespon 450ns od e nebo alespon 195ns od dat
0039: NOP
.................... output_bit(LCD_E,0); // sestupna hrana (minimalni perioda e je 1us)
003A: BCF 03.5
003B: BCF 06.0
003C: BSF 03.5
003D: BCF 06.0
003E: BCF 03.5
003F: RETLW 00
.................... }
....................
....................
.................... // Odesle bajt do registru LCD
.................... //
.................... // Pokud je Adr=0 .. instrukcni registr
.................... // Pokud je Adr=1 .. datovy registr
.................... //
.................... void lcd_send_byte( BOOLEAN Adr, BYTE n )
.................... {
.................... output_bit(LCD_RS,Adr); // vyber registr
0040: MOVF 20,F
0041: BTFSS 03.2
0042: GOTO 045
0043: BCF 06.1
0044: GOTO 046
0045: BSF 06.1
0046: BSF 03.5
0047: BCF 06.1
.................... swap(n);
0048: BCF 03.5
0049: SWAPF 21,F
.................... lcd_send_nibble(n); // posli horni pulku bajtu
004A: MOVF 21,W
004B: MOVWF 22
004C: CALL 02A
.................... swap(n);
004D: SWAPF 21,F
.................... lcd_send_nibble(n); // posli spodni pulku bajtu
004E: MOVF 21,W
004F: MOVWF 22
0050: CALL 02A
.................... delay_us(40); // minimalni doba na provedeni prikazu
0051: MOVLW 0D
0052: MOVWF 0C
0053: DECFSZ 0C,F
0054: GOTO 053
0055: RETLW 00
.................... }
....................
....................
.................... // Provede inicializaci LCD displeje, smaze obsah a nastavi mod displeje
.................... //
.................... // Tato procedura se musi volat pred pouzitim ostatnich lcd_ procedur
.................... //
.................... void lcd_init()
.................... {
....................
.................... int i; // pocitadlo cyklu
....................
.................... delay_ms(20); // spozdeni pro provedeni startu displeje po zapnuti napajeni
0056: MOVLW 14
0057: MOVWF 1C
0058: CALL 015
....................
.................... *LCD_TRIS = *LCD_TRIS & ~LCD_MASK; // nuluj odpovidajici bity tris registru datoveho portu LCD
0059: MOVLW C3
005A: BSF 03.5
005B: ANDWF 06,F
....................
.................... output_bit(LCD_RS,0); // nastav jako vystup a nastav klidovy stav
005C: BCF 03.5
005D: BCF 06.1
005E: BSF 03.5
005F: BCF 06.1
.................... output_bit(LCD_E,0); // nastav jako vystup a nastav klidovy stav
0060: BCF 03.5
0061: BCF 06.0
0062: BSF 03.5
0063: BCF 06.0
....................
.................... for (i=0; i<3; i++) // nastav lcd do rezimu 8 bitu sbernice
0064: BCF 03.5
0065: CLRF 19
0066: MOVF 19,W
0067: SUBLW 02
0068: BTFSS 03.0
0069: GOTO 072
.................... {
.................... delay_ms(2); // muze byt rozdelany prenos dat (2x 4 bity) nebo pomaly povel
006A: MOVLW 02
006B: MOVWF 1C
006C: CALL 015
.................... lcd_send_nibble(3); // rezim 8 bitu
006D: MOVLW 03
006E: MOVWF 22
006F: CALL 02A
.................... }
0070: INCF 19,F
0071: GOTO 066
....................
.................... delay_us(40); // cas na zpracovani
0072: MOVLW 0D
0073: MOVWF 0C
0074: DECFSZ 0C,F
0075: GOTO 074
.................... lcd_send_nibble(2); // nastav rezim 4 bitu (plati od nasledujiciho prenosu)
0076: MOVLW 02
0077: MOVWF 22
0078: CALL 02A
.................... delay_us(40); // cas na zpracovani
0079: MOVLW 0D
007A: MOVWF 0C
007B: DECFSZ 0C,F
007C: GOTO 07B
....................
.................... for (i=0;i<3;i++) // proved inicializaci (nastaveni modu, smazani apod)
007D: CLRF 19
007E: MOVF 19,W
007F: SUBLW 02
0080: BTFSS 03.0
0081: GOTO 08E
.................... {
.................... lcd_send_byte(0,LCD_INIT_STRING[i]);
0082: MOVF 19,W
0083: CALL 004
0084: MOVWF 1A
0085: CLRF 20
0086: MOVF 1A,W
0087: MOVWF 21
0088: CALL 040
.................... delay_ms(2);
0089: MOVLW 02
008A: MOVWF 1C
008B: CALL 015
.................... }
008C: INCF 19,F
008D: GOTO 07E
008E: GOTO 163 (RETURN)
.................... }
....................
....................
.................... // Proved presun kurzoru
.................... //
.................... // Pozice 1.1 je domu
.................... //
.................... void lcd_gotoxy( BYTE x, BYTE y)
.................... {
....................
.................... BYTE Adr;
....................
.................... Adr=x-1;
008F: MOVLW 01
0090: SUBWF 1C,W
0091: MOVWF 1E
.................... if(y==2)
0092: MOVF 1D,W
0093: SUBLW 02
0094: BTFSS 03.2
0095: GOTO 098
.................... Adr+=LCD_LINE_2;
0096: MOVLW 40
0097: ADDWF 1E,F
....................
.................... lcd_send_byte(0,0x80|Adr);
0098: MOVF 1E,W
0099: IORLW 80
009A: MOVWF 1F
009B: CLRF 20
009C: MOVF 1F,W
009D: MOVWF 21
009E: CALL 040
009F: RETLW 00
.................... }
....................
....................
.................... // Zapis znaku na displej, zpracovani ridicich znaku
.................... //
.................... void lcd_putc( char c)
.................... {
....................
.................... switch (c)
00A0: MOVF 1B,W
00A1: MOVWF 0C
00A2: MOVLW 0C
00A3: SUBWF 0C,W
00A4: BTFSC 03.2
00A5: GOTO 0B3
00A6: MOVLW 0A
00A7: SUBWF 0C,W
00A8: BTFSC 03.2
00A9: GOTO 0BB
00AA: MOVLW 0D
00AB: SUBWF 0C,W
00AC: BTFSC 03.2
00AD: GOTO 0C1
00AE: MOVLW 08
00AF: SUBWF 0C,W
00B0: BTFSC 03.2
00B1: GOTO 0C6
00B2: GOTO 0CB
.................... {
.................... case '\f' : lcd_send_byte(0,1); // smaz displej
00B3: CLRF 20
00B4: MOVLW 01
00B5: MOVWF 21
00B6: CALL 040
.................... delay_ms(2);
00B7: MOVLW 02
00B8: MOVWF 1C
00B9: CALL 015
.................... break;
00BA: GOTO 0D7
.................... case '\n' : lcd_gotoxy(1,2); break; // presun se na 1. znak 2. radky
00BB: MOVLW 01
00BC: MOVWF 1C
00BD: MOVLW 02
00BE: MOVWF 1D
00BF: CALL 08F
00C0: GOTO 0D7
.................... case '\r' : lcd_gotoxy(1,1); break; // presun home
00C1: MOVLW 01
00C2: MOVWF 1C
00C3: MOVWF 1D
00C4: CALL 08F
00C5: GOTO 0D7
.................... case '\b' : lcd_send_byte(0,0x10); break; // posun kurzor o 1 zpet
00C6: CLRF 20
00C7: MOVLW 10
00C8: MOVWF 21
00C9: CALL 040
00CA: GOTO 0D7
.................... default : if (c<0x20) c&=0x7; // preklopeni definovatelnych znaku na rozsah 0 az 0x1F
00CB: MOVF 1B,W
00CC: SUBLW 1F
00CD: BTFSS 03.0
00CE: GOTO 0D1
00CF: MOVLW 07
00D0: ANDWF 1B,F
.................... lcd_send_byte(1,c); break; // zapis znak
00D1: MOVLW 01
00D2: MOVWF 20
00D3: MOVF 1B,W
00D4: MOVWF 21
00D5: CALL 040
00D6: GOTO 0D7
.................... }
00D7: RETLW 00
.................... }
....................
....................
.................... // Zapni kurzor
.................... //
.................... void lcd_cursor_on()
.................... {
.................... lcd_send_byte(0,LCD_CURSOR_ON_);
.................... }
....................
....................
.................... // Vypni kurzor
.................... //
.................... void lcd_cursor_off()
.................... {
.................... lcd_send_byte(0,LCD_CURSOR_OFF_);
.................... }
....................
....................
.................... // Definice vlastnich fontu
.................... //
.................... // Vlastnich definic muze byt jen 8 do pozic 0 az 7 pameti CGRAM radice lcd displeje
.................... // Pro snadne definovani jsou pripraveny nasledujici definice a na konci souboru je uveden
.................... // priklad pouziti definovanych znaku.
....................
....................
.................... // Pomocna procedura pro posilani ridicich dat do radice displeje
.................... //
.................... void lcd_putc2(int Data)
.................... {
.................... lcd_send_byte(1,Data);
.................... }
....................
....................
.................... // Pomocne definice pro programovani obsahu CGRAM
.................... //
.................... #DEFINE lcd_define_start(Code) lcd_send_byte(0,0x40+(Code<<3)); delay_ms(2)
.................... #DEFINE lcd_define_def(String) printf(lcd_putc2,String);
.................... #DEFINE lcd_define_end() lcd_send_byte(0,3); delay_ms(2)
....................
....................
.................... // Vlastni vykonne makro pro definovani fontu do pozice Index CGRAM s definicnim retezcem Def
.................... //
.................... #DEFINE lcd_define_char(Index, Def) lcd_define_start(Index); lcd_define_def(Def); lcd_define_end();
....................
....................
.................... // Pripravene definice fontu vybranych znaku
.................... // V tabulce nesmi byt 00 (konec retezce v printf()), misto toho davame 80
.................... //
.................... #DEFINE LCD_CHAR_BAT100 "\x0E\x1F\x1F\x1F\x1F\x1F\x1F\x1F" /* symbol plne baterie */
.................... #DEFINE LCD_CHAR_BAT50 "\x0E\x1F\x11\x11\x13\x17\x1F\x1F" /* symbol polovicni baterie */
.................... #DEFINE LCD_CHAR_BAT0 "\x0E\x1F\x11\x11\x11\x11\x11\x1F" /* symbol vybite baterie */
.................... #DEFINE LCD_CHAR_LUA "\x04\x0E\x11\x11\x1F\x11\x11\x80" /* A s carkou */
.................... #DEFINE LCD_CHAR_LLA "\x01\x02\x0E\x01\x1F\x11\x0F\x80" /* a s carkou */
.................... #DEFINE LCD_CHAR_HUC "\x0A\x0E\x11\x10\x10\x11\x0E\x80" /* C s hackem */
.................... #DEFINE LCD_CHAR_HLC "\x0A\x04\x0E\x10\x10\x11\x0E\x80" /* c s hackem */
.................... #DEFINE LCD_CHAR_HUD "\x0A\x1C\x12\x11\x11\x12\x1C\x80" /* D s hackem */
.................... #DEFINE LCD_CHAR_HLD "\x05\x03\x0D\x13\x11\x11\x0F\x80" /* d s hackem */
.................... #DEFINE LCD_CHAR_LUE "\x04\x1F\x10\x10\x1E\x10\x1F\x80" /* E s carkou */
.................... #DEFINE LCD_CHAR_LLE "\x01\x02\x0E\x11\x1F\x10\x0E\x80" /* e s carkou */
.................... #DEFINE LCD_CHAR_HUE "\x0A\x1F\x10\x1E\x10\x10\x1F\x80" /* E s hackem */
.................... #DEFINE LCD_CHAR_HLE "\x0A\x04\x0E\x11\x1F\x10\x0E\x80" /* e s hackem */
.................... #DEFINE LCD_CHAR_LUI "\x04\x0E\x04\x04\x04\x04\x0E\x80" /* I s carkou */
.................... #DEFINE LCD_CHAR_LLI "\x02\x04\x80\x0C\x04\x04\x0E\x80" /* i s carkou */
.................... #DEFINE LCD_CHAR_HUN "\x0A\x15\x11\x19\x15\x13\x11\x80" /* N s hackem */
.................... #DEFINE LCD_CHAR_HLN "\x0A\x04\x16\x19\x11\x11\x11\x80" /* n s hackem */
.................... #DEFINE LCD_CHAR_LUO "\x04\x0E\x11\x11\x11\x11\x0E\x80" /* O s carkou */
.................... #DEFINE LCD_CHAR_LLO "\x02\x04\x0E\x11\x11\x11\x0E\x80" /* o s carkou */
.................... #DEFINE LCD_CHAR_HUR "\x0A\x1E\x11\x1E\x14\x12\x11\x80" /* R s hackem */
.................... #DEFINE LCD_CHAR_HLR "\x0A\x04\x16\x19\x10\x10\x10\x80" /* r s hackem */
.................... #DEFINE LCD_CHAR_HUS "\x0A\x0F\x10\x0E\x01\x01\x1E\x80" /* S s hackem */
.................... #DEFINE LCD_CHAR_HLS "\x0A\x04\x0E\x10\x0E\x01\x1E\x80" /* s s hackem */
.................... #DEFINE LCD_CHAR_HUT "\x0A\x1F\x04\x04\x04\x04\x04\x80" /* T s hackem */
.................... #DEFINE LCD_CHAR_HLT "\x0A\x0C\x1C\x08\x08\x09\x06\x80" /* t s hackem */
.................... #DEFINE LCD_CHAR_LUU "\x02\x15\x11\x11\x11\x11\x0E\x80" /* U s carkou */
.................... #DEFINE LCD_CHAR_LLU "\x02\x04\x11\x11\x11\x13\x0D\x80" /* u s carkou */
.................... #DEFINE LCD_CHAR_CUU "\x06\x17\x11\x11\x11\x11\x0E\x80" /* U s krouzkem */
.................... #DEFINE LCD_CHAR_CLU "\x06\x06\x11\x11\x11\x11\x0E\x80" /* u s krouzkem */
.................... #DEFINE LCD_CHAR_LUY "\x02\x15\x11\x0A\x04\x04\x04\x80" /* Y s carkou */
.................... #DEFINE LCD_CHAR_LLY "\x02\x04\x11\x11\x0F\x01\x0E\x80" /* y s carkou */
.................... #DEFINE LCD_CHAR_HUZ "\x0A\x1F\x01\x02\x04\x08\x1F\x80" /* Z s hackem */
.................... #DEFINE LCD_CHAR_HLZ "\x0A\x04\x1F\x02\x04\x08\x1F\x80" /* z s hackem */
....................
....................
.................... // Priklad pouziti definovanych znaku
.................... //
.................... //
.................... //void lcd_sample()
.................... //{
.................... // lcd_define_char(0,LCD_CHAR_BAT50); // Priklad definice znaku baterie do pozice 0
.................... // lcd_define_char(2,LCD_CHAR_HLE LCD_CHAR_LUI); // Priklad definice znaku e s hackem a I s carkou od pozice 2
.................... // // vsimnete si, ze neni carka mezi retezci s definici (oba retezce definuji
.................... // // jediny definicni retezec)
.................... // printf(lcd_putc,"\fZnaky:\20\22\23"); // priklad vypisu znaku z pozice 0, 2 a 3
.................... // delay_ms(1000);
.................... // lcd_define_char(0,LCD_CHAR_BAT0); // Predefinovani tvaru znaku v pozici 0
.................... // delay_ms(1000);
.................... //}
....................
....................
.................... #DEFINE PRIJIMAC PIN_A3 // pin na ktery je pripojen prijimac
.................... #DEFINE SERVO_X PIN_A0 // pin na ktery je pripojeno servo
.................... #DEFINE SERVO_Y PIN_A1
....................
....................
.................... int8 prijmout(int8* bit)
.................... {
.................... // || |
.................... // |--|_____ 1
.................... // |
.................... // |-|__|-|_ 0
....................
.................... while (!input(PRIJIMAC)) ; // cekej na jednicku
.................... delay_us(IMPULS/4); // presvec se, jestli je stale 1 po 1/4 impulsu
.................... if (!input(PRIJIMAC)) return false; // vrat chybu, kdyz neni stale 1
.................... delay_us(3*IMPULS); // pockej na rozhodovaci misto
.................... /// if (input(PRIJIMAC)) *bit=0; else *bit=1; // dekoduj 1 nebo 0
.................... *bit=!input(PRIJIMAC); // dekoduj 1 nebo 0
.................... delay_us(IMPULS); // pockej na konec znaku
....................
.................... return true; // vrat, ze se cteni povedlo
.................... }
....................
.................... int8 read_nibble(int8* data)
.................... {
.................... int8 i;
.................... int8 d;
....................
.................... d=0;
00D8: CLRF 1B
....................
.................... // Cekam na dlouhou nulu
.................... for (i=8; i>0; i--)
00D9: MOVLW 08
00DA: MOVWF 1A
00DB: MOVF 1A,F
00DC: BTFSC 03.2
00DD: GOTO 0EC
.................... {
.................... if (input(PRIJIMAC)) i=8;
00DE: BSF 03.5
00DF: BSF 05.3
00E0: BCF 03.5
00E1: BTFSS 05.3
00E2: GOTO 0E5
00E3: MOVLW 08
00E4: MOVWF 1A
.................... delay_us(IMPULS/2);
00E5: MOVLW 29
00E6: MOVWF 0C
00E7: DECFSZ 0C,F
00E8: GOTO 0E7
00E9: NOP
.................... }
00EA: DECF 1A,F
00EB: GOTO 0DB
....................
.................... // Cekam na jednicku (start ramce)
.................... for (; !input(PRIJIMAC); )
00EC: BSF 03.5
00ED: BSF 05.3
00EE: BCF 03.5
00EF: BTFSC 05.3
00F0: GOTO 0F7
.................... {
.................... delay_us(IMPULS/2);
00F1: MOVLW 29
00F2: MOVWF 0C
00F3: DECFSZ 0C,F
00F4: GOTO 0F3
00F5: NOP
.................... }
00F6: GOTO 0EC
....................
.................... delay_us(IMPULS/2);
00F7: MOVLW 29
00F8: MOVWF 0C
00F9: DECFSZ 0C,F
00FA: GOTO 0F9
00FB: NOP
....................
.................... // Prenasim bity
.................... for (i=0; i<4; i++)
00FC: CLRF 1A
00FD: MOVF 1A,W
00FE: SUBLW 03
00FF: BTFSS 03.0
0100: GOTO 111
.................... {
.................... delay_us(2*IMPULS);
0101: MOVLW A6
0102: MOVWF 0C
0103: DECFSZ 0C,F
0104: GOTO 103
0105: NOP
.................... d >>= 1;
0106: BCF 03.0
0107: RRF 1B,F
.................... if (!input(PRIJIMAC)) d +=8;
0108: BSF 03.5
0109: BSF 05.3
010A: BCF 03.5
010B: BTFSC 05.3
010C: GOTO 10F
010D: MOVLW 08
010E: ADDWF 1B,F
.................... }
010F: INCF 1A,F
0110: GOTO 0FD
.................... *data = d;
0111: MOVF 19,W
0112: MOVWF 04
0113: MOVF 1B,W
0114: MOVWF 00
.................... return TRUE;
0115: MOVLW 01
0116: MOVWF 0D
0117: RETLW 00
.................... }
....................
.................... int8 read_nibble2(int8* value)
.................... {
.................... int8 n; // citac
.................... int8 bit; // pomocna promenna
....................
.................... *value=0;
.................... for (n=1; n<=4; n++) // prijmi 4 bity
.................... {
.................... *value >>= 1; // posun jiz prectene do leva
.................... if (0==prijmout(&bit)) return(false); // prijmi bit; pri chybe cteni vrat chybu
.................... *value |= bit << 3; // pridej bit do nibblu
.................... };
.................... return(true); // vrat 1, jako ,ze je vse O.K.
.................... }
....................
....................
.................... int8 bit,x,y;
.................... int8 xc,yc; // pocitadla aktualizace x a y
....................
.................... void main()
.................... {
*
015F: CLRF 04
0160: MOVLW 1F
0161: ANDWF 03,F
.................... lcd_init(); // zinicializuj LCD display
0162: GOTO 056
.................... delay_ms(5);
0163: MOVLW 05
0164: MOVWF 1C
0165: CALL 015
.................... printf(lcd_putc,"Ahoj...");
*
000C: BCF 0A.0
000D: BCF 0A.1
000E: BCF 0A.2
000F: ADDWF 02,F
0010: RETLW 41
0011: RETLW 68
0012: RETLW 6F
0013: RETLW 6A
0014: RETLW 00
*
0166: CLRF 19
0167: MOVF 19,W
0168: CALL 00C
0169: INCF 19,F
016A: MOVWF 1B
016B: CALL 0A0
016C: MOVLW 04
016D: SUBWF 19,W
016E: BTFSS 03.2
016F: GOTO 167
0170: MOVLW 03
0171: MOVWF 1A
0172: MOVLW 2E
0173: MOVWF 1B
0174: CALL 0A0
0175: DECFSZ 1A,F
0176: GOTO 172
.................... delay_ms(1000);
0177: MOVLW 04
0178: MOVWF 19
0179: MOVLW FA
017A: MOVWF 1C
017B: CALL 015
017C: DECFSZ 19,F
017D: GOTO 179
....................
.................... //while(TRUE)
.................... //{
.................... // read_nibble(&x);
.................... // lcd_gotoxy(1,1); // vytiskni X a Y
.................... // printf(lcd_putc,"O:%d ",x);
.................... //}
....................
.................... x = 0;
017E: CLRF 0F
.................... y = 0;
017F: CLRF 10
.................... xc=0;
0180: CLRF 11
.................... yc=0;
0181: CLRF 12
....................
.................... while (true)
.................... {
.................... int8 osa, hodnota, kontrola;
.................... int counter; // pocitadlo 1 a 0 v detektoru
.................... int e1,e2; // pocitadla chyb - ladici
....................
.................... e1=0;
0182: CLRF 17
.................... e2=0;
0183: CLRF 18
....................
.................... counter=4;
0184: MOVLW 04
0185: MOVWF 16
....................
.................... decoder:
....................
.................... counter=0; // vynuluj citac
0186: CLRF 16
.................... // do // vyhledej synchronizacni jednicky
.................... // {
.................... // if (!prijmout(&bit)) goto decoder; // prijmi bit; pri chybe zacni znovu
.................... // if (1==bit) counter++; else goto decoder; // kdyz je bit 1, tak zvys citac; jinak zacni znovu
.................... // } while(counter<4); // pockej na 4 jednicky
.................... if (!read_nibble(&osa)) goto decoder;
0187: MOVLW 13
0188: MOVWF 19
0189: CALL 0D8
018A: MOVF 0D,F
018B: BTFSS 03.2
018C: GOTO 18E
018D: GOTO 186
.................... if (osa!=15) {e1++; goto decoder;};
018E: MOVF 13,W
018F: SUBLW 0F
0190: BTFSC 03.2
0191: GOTO 194
0192: INCF 17,F
0193: GOTO 186
.................... if (!read_nibble(&osa)) goto decoder; // nacti identifikator osy
0194: MOVLW 13
0195: MOVWF 19
0196: CALL 0D8
0197: MOVF 0D,F
0198: BTFSS 03.2
0199: GOTO 19B
019A: GOTO 186
....................
.................... if (!read_nibble(&hodnota)) goto decoder; // nacti 1. nibble; pri chybe zacni znovu
019B: MOVLW 14
019C: MOVWF 19
019D: CALL 0D8
019E: MOVF 0D,F
019F: BTFSS 03.2
01A0: GOTO 1A2
01A1: GOTO 186
.................... if (!read_nibble(&kontrola)) goto decoder; // nacti 2. nibble; pri chybe zacni znovu
01A2: MOVLW 15
01A3: MOVWF 19
01A4: CALL 0D8
01A5: MOVF 0D,F
01A6: BTFSS 03.2
01A7: GOTO 1A9
01A8: GOTO 186
.................... if (hodnota != kontrola) {e2++; goto decoder;} // zacni znovu, pokud jsou ruzne nibble
01A9: MOVF 15,W
01AA: SUBWF 14,W
01AB: BTFSC 03.2
01AC: GOTO 1AF
01AD: INCF 18,F
01AE: GOTO 186
....................
....................
.................... switch (osa) // rozeskoc se podle adresy osy
01AF: MOVLW 01
01B0: SUBWF 13,W
01B1: ADDLW FD
01B2: BTFSC 03.0
01B3: GOTO 1C0
01B4: ADDLW 03
01B5: GOTO 262
.................... {
.................... case OSA_X:
.................... {
.................... x=hodnota;
01B6: MOVF 14,W
01B7: MOVWF 0F
.................... xc++;
01B8: INCF 11,F
.................... break;
01B9: GOTO 1C0
.................... };
.................... case OSA_Y:
.................... {
.................... y=hodnota;
01BA: MOVF 14,W
01BB: MOVWF 10
.................... yc++;
01BC: INCF 12,F
.................... break;
01BD: GOTO 1C0
.................... };
.................... case TLs:
.................... {
.................... e1++;
01BE: INCF 17,F
.................... break;
01BF: GOTO 1C0
.................... };
.................... };
*
0262: BCF 0A.0
0263: BSF 0A.1
0264: BCF 0A.2
0265: ADDWF 02,F
0266: GOTO 1B6
0267: GOTO 1BA
0268: GOTO 1BE
....................
.................... // ladici vypisy
.................... lcd_gotoxy(1,1); // vytiskni X a Y
*
01C0: MOVLW 01
01C1: MOVWF 1C
01C2: MOVWF 1D
01C3: CALL 08F
.................... printf(lcd_putc,"X: %U %u %U ", x, xc, e1);
*
012D: MOVF 0D,W
012E: MOVF 19,W
012F: MOVWF 1B
0130: MOVLW 64
0131: MOVWF 1C
0132: CALL 118
0133: MOVF 0C,W
0134: MOVWF 19
0135: MOVF 0D,W
0136: MOVLW 30
0137: BTFSS 03.2
0138: GOTO 140
0139: BTFSC 1A.0
013A: BSF 1A.3
013B: BTFSC 1A.3
013C: GOTO 146
013D: BTFSC 1A.4
013E: MOVLW 20
013F: GOTO 142
0140: BCF 1A.3
0141: BCF 1A.4
0142: ADDWF 0D,F
0143: MOVF 0D,W
0144: MOVWF 1B
0145: CALL 0A0
0146: MOVF 19,W
0147: MOVWF 1B
0148: MOVLW 0A
0149: MOVWF 1C
014A: CALL 118
014B: MOVF 0C,W
014C: MOVWF 19
014D: MOVF 0D,W
014E: MOVLW 30
014F: BTFSS 03.2
0150: GOTO 155
0151: BTFSC 1A.3
0152: GOTO 159
0153: BTFSC 1A.4
0154: MOVLW 20
0155: ADDWF 0D,F
0156: MOVF 0D,W
0157: MOVWF 1B
0158: CALL 0A0
0159: MOVLW 30
015A: ADDWF 19,F
015B: MOVF 19,W
015C: MOVWF 1B
015D: CALL 0A0
015E: RETLW 00
*
01C4: MOVLW 58
01C5: MOVWF 1B
01C6: CALL 0A0
01C7: MOVLW 3A
01C8: MOVWF 1B
01C9: CALL 0A0
01CA: MOVLW 20
01CB: MOVWF 1B
01CC: CALL 0A0
01CD: MOVF 0F,W
01CE: MOVWF 19
01CF: MOVLW 18
01D0: MOVWF 1A
01D1: CALL 12D
01D2: MOVLW 20
01D3: MOVWF 1B
01D4: CALL 0A0
01D5: MOVF 11,W
01D6: MOVWF 19
01D7: MOVLW 18
01D8: MOVWF 1A
01D9: CALL 12D
01DA: MOVLW 20
01DB: MOVWF 1B
01DC: CALL 0A0
01DD: MOVF 17,W
01DE: MOVWF 19
01DF: MOVLW 18
01E0: MOVWF 1A
01E1: CALL 12D
01E2: MOVLW 05
01E3: MOVWF 19
01E4: MOVLW 20
01E5: MOVWF 1B
01E6: CALL 0A0
01E7: DECFSZ 19,F
01E8: GOTO 1E4
.................... lcd_gotoxy(1,2);
01E9: MOVLW 01
01EA: MOVWF 1C
01EB: MOVLW 02
01EC: MOVWF 1D
01ED: CALL 08F
.................... printf(lcd_putc,"Y: %U %U %U ", y, yc, e2);
01EE: MOVLW 59
01EF: MOVWF 1B
01F0: CALL 0A0
01F1: MOVLW 3A
01F2: MOVWF 1B
01F3: CALL 0A0
01F4: MOVLW 20
01F5: MOVWF 1B
01F6: CALL 0A0
01F7: MOVF 10,W
01F8: MOVWF 19
01F9: MOVLW 18
01FA: MOVWF 1A
01FB: CALL 12D
01FC: MOVLW 20
01FD: MOVWF 1B
01FE: CALL 0A0
01FF: MOVF 12,W
0200: MOVWF 19
0201: MOVLW 18
0202: MOVWF 1A
0203: CALL 12D
0204: MOVLW 20
0205: MOVWF 1B
0206: CALL 0A0
0207: MOVF 18,W
0208: MOVWF 19
0209: MOVLW 18
020A: MOVWF 1A
020B: CALL 12D
020C: MOVLW 05
020D: MOVWF 19
020E: MOVLW 20
020F: MOVWF 1B
0210: CALL 0A0
0211: DECFSZ 19,F
0212: GOTO 20E
....................
.................... // ovladani serv
.................... output_high(SERVO_X);
0213: BSF 03.5
0214: BCF 05.0
0215: BCF 03.5
0216: BSF 05.0
.................... delay_ms(1);
0217: MOVLW 01
0218: MOVWF 1C
0219: CALL 015
.................... for (osa=x; osa--; osa>0)
021A: MOVF 0F,W
021B: MOVWF 13
021C: MOVF 13,W
021D: DECF 13,F
021E: XORLW 00
021F: BTFSC 03.2
0220: GOTO 22B
.................... delay_us(65);
0221: MOVLW 15
0222: MOVWF 0C
0223: DECFSZ 0C,F
0224: GOTO 223
0225: NOP
0226: MOVF 13,F
0227: BTFSS 03.2
0228: GOTO 22A
0229: MOVLW 00
022A: GOTO 21C
.................... output_low(SERVO_X);
022B: BSF 03.5
022C: BCF 05.0
022D: BCF 03.5
022E: BCF 05.0
....................
.................... output_high(SERVO_Y);
022F: BSF 03.5
0230: BCF 05.1
0231: BCF 03.5
0232: BSF 05.1
.................... delay_ms(1);
0233: MOVLW 01
0234: MOVWF 1C
0235: CALL 015
.................... for (osa=y; osa--; osa>0)
0236: MOVF 10,W
0237: MOVWF 13
0238: MOVF 13,W
0239: DECF 13,F
023A: XORLW 00
023B: BTFSC 03.2
023C: GOTO 247
.................... delay_us(65);
023D: MOVLW 15
023E: MOVWF 0C
023F: DECFSZ 0C,F
0240: GOTO 23F
0241: NOP
0242: MOVF 13,F
0243: BTFSS 03.2
0244: GOTO 246
0245: MOVLW 00
0246: GOTO 238
.................... output_low(SERVO_Y);
0247: BSF 03.5
0248: BCF 05.1
0249: BCF 03.5
024A: BCF 05.1
....................
.................... for (osa=30-x-y; osa--; osa>0)
024B: MOVF 0F,W
024C: SUBLW 1E
024D: MOVWF 0D
024E: MOVF 10,W
024F: SUBWF 0D,W
0250: MOVWF 13
0251: MOVF 13,W
0252: DECF 13,F
0253: XORLW 00
0254: BTFSC 03.2
0255: GOTO 260
.................... delay_us(65);
0256: MOVLW 15
0257: MOVWF 0C
0258: DECFSZ 0C,F
0259: GOTO 258
025A: NOP
025B: MOVF 13,F
025C: BTFSS 03.2
025D: GOTO 25F
025E: MOVLW 00
025F: GOTO 251
....................
.................... }
0260: GOTO 182
.................... }
....................
0261: SLEEP
....................
....................
/schemata/prenos/letadlo/SW/prijimac/zaloha/03/MAIN.PJT
0,0 → 1,32
[PROJECT]
Target=main.HEX
Development_Mode=
Processor=0x684A
ToolSuite=CCS
 
[Directories]
Include=C:\Program Files\PICC\Devices;C:\Program Files\PICC\Dri;
Library=
LinkerScript=
 
[Target Data]
FileList=main.c;
BuildTool=CCSC
OptionString=-p +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
 
/schemata/prenos/letadlo/SW/prijimac/zaloha/03/MAIN.STA
0,0 → 1,41
 
ROM used: 617 (60%)
407 (40%) including unused fragments
 
1 Average locations per line
4 Average locations per statement
 
RAM used: 9 (13%) at main() level
25 (37%) worst case
 
Lines Stmts % Files
----- ----- --- -----
180 100 68 d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\main.c
5 0 0 d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\main.h
111 0 0 C:\Program Files\PICC\Devices\16F84.h
5 0 0 d:\@kaklik\programy\pic_c\prenos\letadlo\common.h
272 46 19 d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\MYLCD.C
----- -----
1146 292 Total
 
Page ROM % RAM Functions:
---- --- --- --- ----------
0 21 3 1 delay_ms
0 8 1 0 @const22
0 22 4 3 lcd_send_nibble
0 22 4 2 lcd_send_byte
0 57 9 2 lcd_init
0 17 3 4 lcd_gotoxy
0 56 9 1 lcd_putc
0 64 10 4 read_nibble
0 259 42 2 main
0 9 1 0 @const10152
0 7 1 0 @goto10188
0 21 3 3 @DIV88
0 50 8 2 @PRINTF_U_148
 
Segment Used Free
--------- ---- ----
0000-0003 4 0
0004-03FF 613 407
 
/schemata/prenos/letadlo/SW/prijimac/zaloha/03/MAIN.SYM
0,0 → 1,67
00C @SCRATCH
00D @SCRATCH
00D _RETURN_
00E bit
00F x
010 y
011 xc
012 yc
013 osa
014 hodnota
015 kontrola
016 counter
017 e1
018 e2
019 lcd_init.i
019 read_nibble.Data
019 @PRINTF_U_148.P1
019 main.@SCRATCH
01A read_nibble.i
01A @PRINTF_U_148.P1
01A lcd_init.@SCRATCH
01A main.@SCRATCH
01B lcd_putc.c
01B read_nibble.d
01B @DIV88.P1
01C delay_ms.P1
01C lcd_gotoxy.x
01C @DIV88.P1
01C read_nibble.@SCRATCH
01D lcd_gotoxy.y
01D @DIV88.@SCRATCH
01E lcd_gotoxy.Adr
01F lcd_gotoxy.@SCRATCH
020 lcd_send_byte.Adr
021 lcd_send_byte.n
022 lcd_send_nibble.n
023 lcd_send_nibble.@SCRATCH
024 lcd_send_nibble.@SCRATCH
delay_us.P1
-002 LCD_INIT_STRING
lcd_putc2.Data
prijmout.bit
read_nibble2.value
read_nibble2.n
read_nibble2.bit
 
0015 delay_ms
0004 @const22
002A lcd_send_nibble
0040 lcd_send_byte
0056 lcd_init
008F lcd_gotoxy
00A0 lcd_putc
00D8 read_nibble
015F main
000C @const10152
0262 @goto10188
0118 @DIV88
012D @PRINTF_U_148
0186 decoder
 
Project Files:
d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\main.c
d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\main.h
C:\Program Files\PICC\Devices\16F84.h
d:\@kaklik\programy\pic_c\prenos\letadlo\common.h
d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\MYLCD.C
/schemata/prenos/letadlo/SW/prijimac/zaloha/03/MAIN.TRE
0,0 → 1,657
ÀÄmain
ÀÄmain 0/259 Ram=2
ÃÄ??0??
ÃÄlcd_init 0/57 Ram=2
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@const22 0/8 Ram=0
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄdelay_ms 0/21 Ram=1
ÃÄdelay_ms 0/21 Ram=1
ÃÄ@const10152 0/9 Ram=0
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄdelay_ms 0/21 Ram=1
ÃÄread_nibble 0/64 Ram=4
ÃÄread_nibble 0/64 Ram=4
ÃÄread_nibble 0/64 Ram=4
ÃÄread_nibble 0/64 Ram=4
ÃÄ@goto10188 0/7 Ram=0
ÃÄlcd_gotoxy 0/17 Ram=4
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_148 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_148 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_148 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_gotoxy 0/17 Ram=4
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_148 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_148 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_148 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄdelay_ms 0/21 Ram=1
ÀÄdelay_ms 0/21 Ram=1
/schemata/prenos/letadlo/SW/prijimac/zaloha/03/MYLCD.C
0,0 → 1,271
// LCD modul pro ovladani dvouradkoveho LCD modulu se standardnim Hitachi radicem
// (c)miho 2002
//
// Historie:
//
// 0.0 Uvodni verze se snadnou definici portu LCD displeje
//
//
// Funkce:
//
// lcd_init() inicializuje LCD displej a porty, nutno volat jako prvni
//
// lcd_putc(c) zapis snaku do lcd displeje, zpracovava nasledujici ridici znaky
// \f = \x0C - nova stranka - smazani displeje
// \n = \x0A - odradkovani (prechod na druhou radku)
// \b = \x08 - backspace - posunuti kurzoru o 1 pozici zpet
// \r = \x0D - goto home to position 1,1
// \0 .. \7 - definovatelne znaky v pozicich 0 az 7 v CGRAM
// \20 .. \27 - alternativne zapsane znaky (oktalove) v pozicich 0 az 7 CGRAM
// Pozor na to, ze funkce printf konci tisk pokud narazi na \0 (konec retezce)
//
// lcd_gotoxy(x,y) presune kurzor na uvedenou adresu
// nekontroluje parametry
//
// lcd_cursor_on zapne kurzor
// lcd_cursor_off vypne kurzor
//
// lcd_define_char(Index, Def) Makro, ktere definuje znaky od pozice Index obsahem definicniho
// retezce Def. Kazdych 8 znaku retezce Def definuje dalsi znak v CGRAM.
// Kapacita CGRAM je celkem 8 znaku s indexem 0 az 7.
// Na konci se provede lcd_gotoxy(1,1).
// Na konci teto knihovny je priklad pouziti definovanych znaku
//
// Definice portu:
//
// #DEFINE LCD_RS PIN_B2 // rizeni registru LCD displeje
// #DEFINE LCD_E PIN_B1 // enable LCD displeje
// #DEFINE LCD_DATA_LSB PIN_C2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
 
 
 
 
// Privatni sekce, cist jen v pripade, ze neco nefunguje
 
 
 
 
// Generovane defince portu pro ucely teto knihovny aby kod generoval spravne IO operace a soucasne
// bylo mozne jednoduse deklarovat pripojene piny LCD displeje pri pouziti teto knihovny. Problem spociva
// v tom, ze se musi spravne ridit smery portu a soucasne datovy port zabira jen 4 bity ze zadaneho portu
//
#DEFINE LCD_SHIFT (LCD_DATA_LSB&7) // pocet bitu posuvu dataoveho kanalu v datovem portu
#DEFINE LCD_PORT (LCD_DATA_LSB>>3) // adresa LCD datoveho portu
#DEFINE LCD_TRIS (LCD_PORT+0x80) // adresa prislusneho TRIS registru
#DEFINE LCD_MASK (0xF<<LCD_SHIFT) // maska platnych bitu
//
#IF LCD_SHIFT>4 // kontrola mezi
#ERROR LCD data port LSB bit not in range 0..4
#ENDIF
 
 
// Definice konstant pro LCD display
//
#define LCD_CURSOR_ON_ 0x0E // kurzor jako blikajici radka pod znakem
#define LCD_CURSOR_OFF_ 0x0C // zadny kurzor
#define LCD_LINE_2 0x40 // adresa 1. znaku 2. radky
 
 
// Definice rezimu LCD displeje
//
BYTE const LCD_INIT_STRING[4] =
{
0x28, // intrfejs 4 bity, 2 radky, font 5x7
LCD_CURSOR_OFF_, // display on, kurzor off,
0x01, // clear displeje
0x06 // inkrement pozice kurzoru (posun kurzoru doprava)
};
 
 
// Odesle nibble do displeje (posle data a klikne signalem e)
//
void lcd_send_nibble( BYTE n )
{
*LCD_PORT = (*LCD_PORT & ~LCD_MASK) | ((n << LCD_SHIFT) & LCD_MASK); // nastav datove bity portu a ostatni zachovej
output_bit(LCD_E,1); // vzestupna hrana
delay_us(1); // pockej alespon 450ns od e nebo alespon 195ns od dat
output_bit(LCD_E,0); // sestupna hrana (minimalni perioda e je 1us)
}
 
 
// Odesle bajt do registru LCD
//
// Pokud je Adr=0 .. instrukcni registr
// Pokud je Adr=1 .. datovy registr
//
void lcd_send_byte( BOOLEAN Adr, BYTE n )
{
output_bit(LCD_RS,Adr); // vyber registr
swap(n);
lcd_send_nibble(n); // posli horni pulku bajtu
swap(n);
lcd_send_nibble(n); // posli spodni pulku bajtu
delay_us(40); // minimalni doba na provedeni prikazu
}
 
 
// Provede inicializaci LCD displeje, smaze obsah a nastavi mod displeje
//
// Tato procedura se musi volat pred pouzitim ostatnich lcd_ procedur
//
void lcd_init()
{
 
int i; // pocitadlo cyklu
 
delay_ms(20); // spozdeni pro provedeni startu displeje po zapnuti napajeni
 
*LCD_TRIS = *LCD_TRIS & ~LCD_MASK; // nuluj odpovidajici bity tris registru datoveho portu LCD
 
output_bit(LCD_RS,0); // nastav jako vystup a nastav klidovy stav
output_bit(LCD_E,0); // nastav jako vystup a nastav klidovy stav
 
for (i=0; i<3; i++) // nastav lcd do rezimu 8 bitu sbernice
{
delay_ms(2); // muze byt rozdelany prenos dat (2x 4 bity) nebo pomaly povel
lcd_send_nibble(3); // rezim 8 bitu
}
 
delay_us(40); // cas na zpracovani
lcd_send_nibble(2); // nastav rezim 4 bitu (plati od nasledujiciho prenosu)
delay_us(40); // cas na zpracovani
 
for (i=0;i<3;i++) // proved inicializaci (nastaveni modu, smazani apod)
{
lcd_send_byte(0,LCD_INIT_STRING[i]);
delay_ms(2);
}
}
 
 
// Proved presun kurzoru
//
// Pozice 1.1 je domu
//
void lcd_gotoxy( BYTE x, BYTE y)
{
 
BYTE Adr;
 
Adr=x-1;
if(y==2)
Adr+=LCD_LINE_2;
 
lcd_send_byte(0,0x80|Adr);
}
 
 
// Zapis znaku na displej, zpracovani ridicich znaku
//
void lcd_putc( char c)
{
 
switch (c)
{
case '\f' : lcd_send_byte(0,1); // smaz displej
delay_ms(2);
break;
case '\n' : lcd_gotoxy(1,2); break; // presun se na 1. znak 2. radky
case '\r' : lcd_gotoxy(1,1); break; // presun home
case '\b' : lcd_send_byte(0,0x10); break; // posun kurzor o 1 zpet
default : if (c<0x20) c&=0x7; // preklopeni definovatelnych znaku na rozsah 0 az 0x1F
lcd_send_byte(1,c); break; // zapis znak
}
}
 
 
// Zapni kurzor
//
void lcd_cursor_on()
{
lcd_send_byte(0,LCD_CURSOR_ON_);
}
 
 
// Vypni kurzor
//
void lcd_cursor_off()
{
lcd_send_byte(0,LCD_CURSOR_OFF_);
}
 
 
// Definice vlastnich fontu
//
// Vlastnich definic muze byt jen 8 do pozic 0 az 7 pameti CGRAM radice lcd displeje
// Pro snadne definovani jsou pripraveny nasledujici definice a na konci souboru je uveden
// priklad pouziti definovanych znaku.
 
 
// Pomocna procedura pro posilani ridicich dat do radice displeje
//
void lcd_putc2(int Data)
{
lcd_send_byte(1,Data);
}
 
 
// Pomocne definice pro programovani obsahu CGRAM
//
#DEFINE lcd_define_start(Code) lcd_send_byte(0,0x40+(Code<<3)); delay_ms(2)
#DEFINE lcd_define_def(String) printf(lcd_putc2,String);
#DEFINE lcd_define_end() lcd_send_byte(0,3); delay_ms(2)
 
 
// Vlastni vykonne makro pro definovani fontu do pozice Index CGRAM s definicnim retezcem Def
//
#DEFINE lcd_define_char(Index, Def) lcd_define_start(Index); lcd_define_def(Def); lcd_define_end();
 
 
// Pripravene definice fontu vybranych znaku
// V tabulce nesmi byt 00 (konec retezce v printf()), misto toho davame 80
//
#DEFINE LCD_CHAR_BAT100 "\x0E\x1F\x1F\x1F\x1F\x1F\x1F\x1F" /* symbol plne baterie */
#DEFINE LCD_CHAR_BAT50 "\x0E\x1F\x11\x11\x13\x17\x1F\x1F" /* symbol polovicni baterie */
#DEFINE LCD_CHAR_BAT0 "\x0E\x1F\x11\x11\x11\x11\x11\x1F" /* symbol vybite baterie */
#DEFINE LCD_CHAR_LUA "\x04\x0E\x11\x11\x1F\x11\x11\x80" /* A s carkou */
#DEFINE LCD_CHAR_LLA "\x01\x02\x0E\x01\x1F\x11\x0F\x80" /* a s carkou */
#DEFINE LCD_CHAR_HUC "\x0A\x0E\x11\x10\x10\x11\x0E\x80" /* C s hackem */
#DEFINE LCD_CHAR_HLC "\x0A\x04\x0E\x10\x10\x11\x0E\x80" /* c s hackem */
#DEFINE LCD_CHAR_HUD "\x0A\x1C\x12\x11\x11\x12\x1C\x80" /* D s hackem */
#DEFINE LCD_CHAR_HLD "\x05\x03\x0D\x13\x11\x11\x0F\x80" /* d s hackem */
#DEFINE LCD_CHAR_LUE "\x04\x1F\x10\x10\x1E\x10\x1F\x80" /* E s carkou */
#DEFINE LCD_CHAR_LLE "\x01\x02\x0E\x11\x1F\x10\x0E\x80" /* e s carkou */
#DEFINE LCD_CHAR_HUE "\x0A\x1F\x10\x1E\x10\x10\x1F\x80" /* E s hackem */
#DEFINE LCD_CHAR_HLE "\x0A\x04\x0E\x11\x1F\x10\x0E\x80" /* e s hackem */
#DEFINE LCD_CHAR_LUI "\x04\x0E\x04\x04\x04\x04\x0E\x80" /* I s carkou */
#DEFINE LCD_CHAR_LLI "\x02\x04\x80\x0C\x04\x04\x0E\x80" /* i s carkou */
#DEFINE LCD_CHAR_HUN "\x0A\x15\x11\x19\x15\x13\x11\x80" /* N s hackem */
#DEFINE LCD_CHAR_HLN "\x0A\x04\x16\x19\x11\x11\x11\x80" /* n s hackem */
#DEFINE LCD_CHAR_LUO "\x04\x0E\x11\x11\x11\x11\x0E\x80" /* O s carkou */
#DEFINE LCD_CHAR_LLO "\x02\x04\x0E\x11\x11\x11\x0E\x80" /* o s carkou */
#DEFINE LCD_CHAR_HUR "\x0A\x1E\x11\x1E\x14\x12\x11\x80" /* R s hackem */
#DEFINE LCD_CHAR_HLR "\x0A\x04\x16\x19\x10\x10\x10\x80" /* r s hackem */
#DEFINE LCD_CHAR_HUS "\x0A\x0F\x10\x0E\x01\x01\x1E\x80" /* S s hackem */
#DEFINE LCD_CHAR_HLS "\x0A\x04\x0E\x10\x0E\x01\x1E\x80" /* s s hackem */
#DEFINE LCD_CHAR_HUT "\x0A\x1F\x04\x04\x04\x04\x04\x80" /* T s hackem */
#DEFINE LCD_CHAR_HLT "\x0A\x0C\x1C\x08\x08\x09\x06\x80" /* t s hackem */
#DEFINE LCD_CHAR_LUU "\x02\x15\x11\x11\x11\x11\x0E\x80" /* U s carkou */
#DEFINE LCD_CHAR_LLU "\x02\x04\x11\x11\x11\x13\x0D\x80" /* u s carkou */
#DEFINE LCD_CHAR_CUU "\x06\x17\x11\x11\x11\x11\x0E\x80" /* U s krouzkem */
#DEFINE LCD_CHAR_CLU "\x06\x06\x11\x11\x11\x11\x0E\x80" /* u s krouzkem */
#DEFINE LCD_CHAR_LUY "\x02\x15\x11\x0A\x04\x04\x04\x80" /* Y s carkou */
#DEFINE LCD_CHAR_LLY "\x02\x04\x11\x11\x0F\x01\x0E\x80" /* y s carkou */
#DEFINE LCD_CHAR_HUZ "\x0A\x1F\x01\x02\x04\x08\x1F\x80" /* Z s hackem */
#DEFINE LCD_CHAR_HLZ "\x0A\x04\x1F\x02\x04\x08\x1F\x80" /* z s hackem */
 
 
// Priklad pouziti definovanych znaku
//
//
//void lcd_sample()
//{
// lcd_define_char(0,LCD_CHAR_BAT50); // Priklad definice znaku baterie do pozice 0
// lcd_define_char(2,LCD_CHAR_HLE LCD_CHAR_LUI); // Priklad definice znaku e s hackem a I s carkou od pozice 2
// // vsimnete si, ze neni carka mezi retezci s definici (oba retezce definuji
// // jediny definicni retezec)
// printf(lcd_putc,"\fZnaky:\20\22\23"); // priklad vypisu znaku z pozice 0, 2 a 3
// delay_ms(1000);
// lcd_define_char(0,LCD_CHAR_BAT0); // Predefinovani tvaru znaku v pozici 0
// delay_ms(1000);
//}
/schemata/prenos/letadlo/SW/prijimac/zaloha/03/PRG.BAT
0,0 → 1,6
call picpgr stop
call picpgr erase pic16f84
call picpgr program main.hex hex pic16f84
call picpgr run
pause
call picpgr stop
/schemata/prenos/letadlo/SW/prijimac/zaloha/03/PRG.PIF
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
/schemata/prenos/letadlo/SW/prijimac/zaloha/03/RUN.BAT
0,0 → 1,5
call picpgr run
pause
call picpgr stop
pause
run.bat
/schemata/prenos/letadlo/SW/prijimac/zaloha/03/VC.MNU
0,0 → 1,4
R: Run
picpgr run
S: Stop
picpgr stop
/schemata/prenos/letadlo/SW/prijimac/zaloha/03/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
/schemata/prenos/letadlo/SW/prijimac/zaloha/04/A.BAT
0,0 → 1,6
call picpgr stop
call picpgr erase pic16F84
call picpgr program main.hex hex pic16F84
call picpgr run
pause
call picpgr stop
/schemata/prenos/letadlo/SW/prijimac/zaloha/04/MAIN.BAK
0,0 → 1,170
// Prijimac
 
#include "main.h"
#include "..\common.h"
 
#DEFINE LCD_RS PIN_B1 // rizeni registru LCD displeje
#DEFINE LCD_E PIN_B0 // enable LCD displeje
#DEFINE LCD_DATA_LSB PIN_B2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
#INCLUDE "MYLCD.C"
 
#DEFINE PRIJIMAC PIN_A3 // pin na ktery je pripojen prijimac
#DEFINE SERVO_X PIN_A0 // pin na ktery je pripojeno servo
#DEFINE SERVO_Y PIN_A1
 
 
int8 prijmout(int8* bit)
{
// || |
// |--|_____ 1
// |
// |-|__|-|_ 0
 
while (!input(PRIJIMAC)) ; // cekej na jednicku
delay_us(IMPULS/4); // presvec se, jestli je stale 1 po 1/4 impulsu
if (!input(PRIJIMAC)) return false; // vrat chybu, kdyz neni stale 1
delay_us(3*IMPULS); // pockej na rozhodovaci misto
/// if (input(PRIJIMAC)) *bit=0; else *bit=1; // dekoduj 1 nebo 0
*bit=!input(PRIJIMAC); // dekoduj 1 nebo 0
delay_us(IMPULS); // pockej na konec znaku
 
return true; // vrat, ze se cteni povedlo
}
 
int8 read_nibble(int1* datovy, int8* data)
{
int8 i;
int8 d;
int1 tmp;
 
d=0;
 
// Cekam na dlouhou nulu
for (i=4; i>0; i--)
{
if (input(PRIJIMAC)) i=4;
delay_us(IMPULS/2);
}
 
// Cekam na jednicku (start ramce)
for (; !input(PRIJIMAC); )
{
delay_us(IMPULS/8);
}
 
// delay_us(IMPULS/2);
delay_us(2*IMPULS+IMPULS/2);
*datovy=input(PRIJIMAC);
 
// Prenasim bity
for (i=0; i<4; i++)
{
delay_us(2*IMPULS);
d >>= 1;
if (input(PRIJIMAC)) d +=0b1000;
//output_bit(PIN_A0,tmp);
//tmp=!tmp;
}
// delay_us(2*IMPULS); // cas posledniho datoveho bitu
 
*data = d;
return TRUE;
}
 
 
int8 x,y;
int8 xc,yc; // pocitadla aktualizace x a y
int e1,e2,e3,e4; // pocitadla chyb - ladici
 
void main()
{
lcd_init(); // zinicializuj LCD display
delay_ms(5);
printf(lcd_putc,"Ahoj...");
delay_ms(300);
 
x = 0;
y = 0;
xc=0;
yc=0;
e1=0;
e2=0;
e3=0;
e4=0;
 
while (true)
{
int8 kanal, data, suma;
int1 tmp;
int8 datovy;
 
decoder:
//output_high(PIN_A1);
 
// do // vyhledej synchronizacni jednicky
// {
// if (!prijmout(&bit)) goto decoder; // prijmi bit; pri chybe zacni znovu
// if (1==bit) counter++; else goto decoder; // kdyz je bit 1, tak zvys citac; jinak zacni znovu
// } while(counter<4); // pockej na 4 jednicky
///output_bit(PIN_A1,tmp);
///tmp=!tmp;
if (!read_nibble(&datovy,&kanal)) goto decoder;
if (datovy) goto decoder;
// output_low(PIN_A1);
//output_low(PIN_A1);
 
// if (kanal!=15) {e1++; goto decoder;};
if (!read_nibble(&datovy, &kanal)) goto decoder; // nacti identifikator osy
 
if (!read_nibble(&datovy, &data)) goto decoder; // nacti 1. nibble; pri chybe zacni znovu
if (!read_nibble(&datovy, &suma)) goto decoder; // nacti 2. nibble; pri chybe zacni znovu
if (((kanal+data) & 0b1111) != suma) {e1++; goto decoder;} // zacni znovu, pokud jsou ruzne nibble
 
 
switch (kanal) // rozeskoc se podle adresy osy
{
case OSA_X:
{
x=data;
xc++;
break;
};
case OSA_Y:
{
y=data;
yc++;
break;
};
case TLs:
{
e4++;
break;
};
};
 
// ladici vypisy
lcd_gotoxy(1,1); // vytiskni X a Y
printf(lcd_putc,"X%2U %3U%3U%3U ", x, xc, e1, e2);
lcd_gotoxy(1,2);
printf(lcd_putc,"Y%2U %3U%3U%3U ", y, yc, e3, data);
 
// ovladani serv
output_high(SERVO_X);
delay_ms(1);
for (data=x; data--; data>0)
delay_us(65);
output_low(SERVO_X);
 
output_high(SERVO_Y);
delay_ms(1);
for (data=y; data--; data>0)
delay_us(65);
output_low(SERVO_Y);
 
for (data=30-x-y; data--; data>0)
delay_us(65);
 
}
}
 
 
/schemata/prenos/letadlo/SW/prijimac/zaloha/04/MAIN.C
0,0 → 1,170
// Prijimac
 
#include "main.h"
#include "..\common.h"
 
#DEFINE LCD_RS PIN_B1 // rizeni registru LCD displeje
#DEFINE LCD_E PIN_B0 // enable LCD displeje
#DEFINE LCD_DATA_LSB PIN_B2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
#INCLUDE "MYLCD.C"
 
#DEFINE PRIJIMAC PIN_A3 // pin na ktery je pripojen prijimac
#DEFINE SERVO_X PIN_A0 // pin na ktery je pripojeno servo
#DEFINE SERVO_Y PIN_A1
 
 
int8 prijmout(int8* bit)
{
// || |
// |--|_____ 1
// |
// |-|__|-|_ 0
 
while (!input(PRIJIMAC)) ; // cekej na jednicku
delay_us(IMPULS/4); // presvec se, jestli je stale 1 po 1/4 impulsu
if (!input(PRIJIMAC)) return false; // vrat chybu, kdyz neni stale 1
delay_us(3*IMPULS); // pockej na rozhodovaci misto
/// if (input(PRIJIMAC)) *bit=0; else *bit=1; // dekoduj 1 nebo 0
*bit=!input(PRIJIMAC); // dekoduj 1 nebo 0
delay_us(IMPULS); // pockej na konec znaku
 
return true; // vrat, ze se cteni povedlo
}
 
int8 read_nibble(int1* datovy, int8* data)
{
int8 i;
int8 d;
int1 tmp;
 
d=0;
 
// Cekam na dlouhou nulu
for (i=4; i>0; i--)
{
if (input(PRIJIMAC)) i=4;
delay_us(IMPULS/2);
}
 
// Cekam na jednicku (start ramce)
for (; !input(PRIJIMAC); )
{
delay_us(IMPULS/8);
}
 
// delay_us(IMPULS/2);
delay_us(2*IMPULS+IMPULS/2);
*datovy=input(PRIJIMAC);
 
// Prenasim bity
for (i=0; i<4; i++)
{
delay_us(2*IMPULS);
d >>= 1;
if (input(PRIJIMAC)) d +=0b1000;
output_bit(PIN_A4,tmp);
tmp=!tmp;
}
// delay_us(2*IMPULS); // cas posledniho datoveho bitu
 
*data = d;
return TRUE;
}
 
 
int8 x,y;
int8 xc,yc; // pocitadla aktualizace x a y
int e1,e2,e3,e4; // pocitadla chyb - ladici
 
void main()
{
lcd_init(); // zinicializuj LCD display
delay_ms(5);
printf(lcd_putc,"Ahoj...");
delay_ms(300);
 
x = 0;
y = 0;
xc=0;
yc=0;
e1=0;
e2=0;
e3=0;
e4=0;
 
while (true)
{
int8 kanal, data, suma;
int1 tmp;
int8 datovy;
 
decoder:
//output_high(PIN_A1);
 
// do // vyhledej synchronizacni jednicky
// {
// if (!prijmout(&bit)) goto decoder; // prijmi bit; pri chybe zacni znovu
// if (1==bit) counter++; else goto decoder; // kdyz je bit 1, tak zvys citac; jinak zacni znovu
// } while(counter<4); // pockej na 4 jednicky
///output_bit(PIN_A1,tmp);
///tmp=!tmp;
if (!read_nibble(&datovy,&kanal)) goto decoder;
if (datovy) goto decoder;
// output_low(PIN_A1);
//output_low(PIN_A1);
 
// if (kanal!=15) {e1++; goto decoder;};
if (!read_nibble(&datovy, &kanal)) goto decoder; // nacti identifikator osy
 
if (!read_nibble(&datovy, &data)) goto decoder; // nacti 1. nibble; pri chybe zacni znovu
if (!read_nibble(&datovy, &suma)) goto decoder; // nacti 2. nibble; pri chybe zacni znovu
if (((kanal+data) & 0b1111) != suma) {e1++; goto decoder;} // zacni znovu, pokud jsou ruzne nibble
 
 
switch (kanal) // rozeskoc se podle adresy osy
{
case OSA_X:
{
x=data;
xc++;
break;
};
case OSA_Y:
{
y=data;
yc++;
break;
};
case TLs:
{
e4++;
break;
};
};
 
// ladici vypisy
lcd_gotoxy(1,1); // vytiskni X a Y
printf(lcd_putc,"X%2U %3U%3U%3U ", x, xc, e1, e2);
lcd_gotoxy(1,2);
printf(lcd_putc,"Y%2U %3U%3U%3U ", y, yc, e3, data);
 
// ovladani serv
output_high(SERVO_X);
delay_ms(1);
for (data=x; data--; data>0)
delay_us(65);
output_low(SERVO_X);
 
output_high(SERVO_Y);
delay_ms(1);
for (data=y; data--; data>0)
delay_us(65);
output_low(SERVO_Y);
 
for (data=30-x-y; data--; data>0)
delay_us(65);
 
}
}
 
 
/schemata/prenos/letadlo/SW/prijimac/zaloha/04/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
/schemata/prenos/letadlo/SW/prijimac/zaloha/04/MAIN.ERR
0,0 → 1,0
No Errors
/schemata/prenos/letadlo/SW/prijimac/zaloha/04/MAIN.H
0,0 → 1,4
#include <16F84.h>
#use delay(clock=4000000)
#fuses XT,NOWDT,PUT
 
/schemata/prenos/letadlo/SW/prijimac/zaloha/04/MAIN.HEX
0,0 → 1,82
:1000000000308A00702900000A108A100A11820745
:1000100028340C34013406340A108A100A1182077D
:10002000413468346F346A3400341E308400000870
:100030000319292801308D008C018C0B1D288D0B94
:100040001C284A308C008C0B232800000000800BF9
:100050001A2800340608C339A500240D8C008C0D25
:10006000FC308C050C083C392504860006148316E8
:100070000610000083120610831606108312003447
:10008000A208031D4528861046288614831686106C
:100090008312A30E2308A4002A20A30E2308A40081
:1000A0002A200D308C008C0B5328003414309E0015
:1000B0001520C3308316860583128610831686109A
:1000C000831206108316061083129B011B08023C44
:1000D000031C722802309E0015200330A4002A2041
:1000E0009B0A66280D308C008C0B74280230A4000B
:1000F0002A200D308C008C0B7B289B011B08023CB6
:10010000031C8E281B0804209C00A2011C08A300CD
:10011000402002309E0015209B0A7E287429013061
:100120001E02A0001F08023C031D98284030A007B3
:1001300020088038A100A2012108A300402000343B
:100140001D088C000C300C020319B3280A300C0275
:100150000319BB280D300C020319C12808300C020A
:100160000319C628CB28A2010130A3004020023089
:100170009E001520D72801309E0002309F008F205E
:10018000D72801309E009F008F20D728A201103071
:10019000A3004020D7281D081F3C031CD12807308E
:1001A0009D050130A2001D08A3004020D72800347F
:1001B0009E0104309D009D080319EC2883168515C7
:1001C0008312851DE52804309D0029308C008C0B9E
:1001D000E72800009D03DB28831685158312851907
:1001E000F6280A308C008C0BF328EC28D0308C00D9
:1001F0008C0BF8281B0884008316851500308312A9
:100200008519013080009D011D08033C031C222933
:10021000A6308C008C0B0A29000003109E0C83165C
:1002200085158312851D162908309E071F181A2967
:1002300005121B29051683160512013083129F062D
:100240009D0A04291C0884001E08800001308D00CE
:1002500000341E088D011D02031831291D088C0071
:100260003D298C0108309F009D0D8C0D1E080C024D
:1002700003188C008D0D9F0B342900340D081B08CA
:100280009D0064309E0029210C089B000D08303031
:10029000031D51291C189C159C1957291C1A203024
:1002A00053299C111C128D070D089D00A0201B08CE
:1002B0009D000A309E0029210C089B000D0830305B
:1002C000031D66299C196A291C1A20308D070D0808
:1002D0009D00A02030309B071B089D00A02000340B
:1002E00084011F308305562805309E0015209B0190
:1002F0001B080C209B0A9D00A02004301B02031D3C
:10030000782903309C002E309D00A0209C0B83296F
:1003100002309B0096309E0015209B0B8A298E018F
:100320008F019001910192019301940195011A307E
:100330009B0016309C00D8208D08031DA02997290A
:100340009A080319A42997291A309B0016309C009B
:10035000D8208D08031DAD2997291A309B0017302E
:100360009C00D8208D08031DB62997291A309B00C0
:1003700018309C00D8208D08031DBF299729170825
:1003800016070F3918020319C729920A9729013055
:100390001602FD3E0318D829033E702A17088E0066
:1003A000900AD82917088F00910AD829950AD829C8
:1003B00001309E009F008F2058309D00A0200E0825
:1003C0009B0011309C003E2120309D00A020100891
:1003D0009B0010309C003E2112089B0010309C00B6
:1003E0003E2113089B0010309C003E2120309D00D0
:1003F000A02020309D00A02001309E0002309F00F0
:100400008F2059309D00A0200F089B0011309C00C8
:100410003E2120309D00A02011089B0010309C0040
:100420003E2114089B0010309C003E2117089B00C1
:1004300010309C003E2120309D00A02020309D00E7
:10044000A020831605108312051401309E0015208C
:100450000E08970017089703003A0319392A153038
:100460008C008C0B312A00009708031D382A0030BD
:100470002A2A83160510831205108316851083120D
:10048000851401309E0015200F0897001708970368
:10049000003A0319552A15308C008C0B4D2A0000A8
:1004A0009708031D542A0030462A831685108312AC
:1004B00085100E081E3C8D000F080D0297001708CE
:1004C0009703003A03196E2A15308C008C0B662AAC
:1004D00000009708031D6D2A00305F2A97296300EA
:0E04E0000A108A140A118207CE29D229D629C1
:02400E00F13F80
:00000001FF
;PIC16F84
/schemata/prenos/letadlo/SW/prijimac/zaloha/04/MAIN.LST
0,0 → 1,1088
CCS PCW C Compiler, Version 3.110, 15448
 
Filename: d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\main.LST
 
ROM used: 631 (62%)
Largest free fragment is 393
RAM used: 12 (18%) at main() level
27 (40%) worst case
Stack: 5 locations
 
*
0000: MOVLW 00
0001: MOVWF 0A
0002: GOTO 170
0003: NOP
.................... // Prijimac
....................
.................... #include "main.h"
.................... #include <16F84.h>
.................... //////// Standard Header file for the PIC16F84 device ////////////////
.................... #device PIC16F84
.................... #list
....................
.................... #use delay(clock=4000000)
*
0015: MOVLW 1E
0016: MOVWF 04
0017: MOVF 00,W
0018: BTFSC 03.2
0019: GOTO 029
001A: MOVLW 01
001B: MOVWF 0D
001C: CLRF 0C
001D: DECFSZ 0C,F
001E: GOTO 01D
001F: DECFSZ 0D,F
0020: GOTO 01C
0021: MOVLW 4A
0022: MOVWF 0C
0023: DECFSZ 0C,F
0024: GOTO 023
0025: NOP
0026: NOP
0027: DECFSZ 00,F
0028: GOTO 01A
0029: RETLW 00
.................... #fuses XT,NOWDT,PUT
....................
....................
.................... #include "..\common.h"
.................... #DEFINE OSA_X 1 // adresy os
.................... #DEFINE OSA_Y 2
.................... #DEFINE TLs 3
.................... #DEFINE IMPULS 250 // sirka impulsu
....................
....................
.................... #DEFINE LCD_RS PIN_B1 // rizeni registru LCD displeje
.................... #DEFINE LCD_E PIN_B0 // enable LCD displeje
.................... #DEFINE LCD_DATA_LSB PIN_B2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
.................... #INCLUDE "MYLCD.C"
.................... // LCD modul pro ovladani dvouradkoveho LCD modulu se standardnim Hitachi radicem
.................... // (c)miho 2002
.................... //
.................... // Historie:
.................... //
.................... // 0.0 Uvodni verze se snadnou definici portu LCD displeje
.................... //
.................... //
.................... // Funkce:
.................... //
.................... // lcd_init() inicializuje LCD displej a porty, nutno volat jako prvni
.................... //
.................... // lcd_putc(c) zapis snaku do lcd displeje, zpracovava nasledujici ridici znaky
.................... // \f = \x0C - nova stranka - smazani displeje
.................... // \n = \x0A - odradkovani (prechod na druhou radku)
.................... // \b = \x08 - backspace - posunuti kurzoru o 1 pozici zpet
.................... // \r = \x0D - goto home to position 1,1
.................... // \0 .. \7 - definovatelne znaky v pozicich 0 az 7 v CGRAM
.................... // \20 .. \27 - alternativne zapsane znaky (oktalove) v pozicich 0 az 7 CGRAM
.................... // Pozor na to, ze funkce printf konci tisk pokud narazi na \0 (konec retezce)
.................... //
.................... // lcd_gotoxy(x,y) presune kurzor na uvedenou adresu
.................... // nekontroluje parametry
.................... //
.................... // lcd_cursor_on zapne kurzor
.................... // lcd_cursor_off vypne kurzor
.................... //
.................... // lcd_define_char(Index, Def) Makro, ktere definuje znaky od pozice Index obsahem definicniho
.................... // retezce Def. Kazdych 8 znaku retezce Def definuje dalsi znak v CGRAM.
.................... // Kapacita CGRAM je celkem 8 znaku s indexem 0 az 7.
.................... // Na konci se provede lcd_gotoxy(1,1).
.................... // Na konci teto knihovny je priklad pouziti definovanych znaku
.................... //
.................... // Definice portu:
.................... //
.................... // #DEFINE LCD_RS PIN_B2 // rizeni registru LCD displeje
.................... // #DEFINE LCD_E PIN_B1 // enable LCD displeje
.................... // #DEFINE LCD_DATA_LSB PIN_C2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
....................
....................
....................
....................
.................... // Privatni sekce, cist jen v pripade, ze neco nefunguje
....................
....................
....................
....................
.................... // Generovane defince portu pro ucely teto knihovny aby kod generoval spravne IO operace a soucasne
.................... // bylo mozne jednoduse deklarovat pripojene piny LCD displeje pri pouziti teto knihovny. Problem spociva
.................... // v tom, ze se musi spravne ridit smery portu a soucasne datovy port zabira jen 4 bity ze zadaneho portu
.................... //
.................... #DEFINE LCD_SHIFT (LCD_DATA_LSB&7) // pocet bitu posuvu dataoveho kanalu v datovem portu
.................... #DEFINE LCD_PORT (LCD_DATA_LSB>>3) // adresa LCD datoveho portu
.................... #DEFINE LCD_TRIS (LCD_PORT+0x80) // adresa prislusneho TRIS registru
.................... #DEFINE LCD_MASK (0xF<<LCD_SHIFT) // maska platnych bitu
.................... //
.................... #IF LCD_SHIFT>4 // kontrola mezi
.................... #ERROR LCD data port LSB bit not in range 0..4
.................... #ENDIF
....................
....................
.................... // Definice konstant pro LCD display
.................... //
.................... #define LCD_CURSOR_ON_ 0x0E // kurzor jako blikajici radka pod znakem
.................... #define LCD_CURSOR_OFF_ 0x0C // zadny kurzor
.................... #define LCD_LINE_2 0x40 // adresa 1. znaku 2. radky
....................
....................
.................... // Definice rezimu LCD displeje
.................... //
.................... BYTE const LCD_INIT_STRING[4] =
.................... {
.................... 0x28, // intrfejs 4 bity, 2 radky, font 5x7
.................... LCD_CURSOR_OFF_, // display on, kurzor off,
.................... 0x01, // clear displeje
.................... 0x06 // inkrement pozice kurzoru (posun kurzoru doprava)
.................... };
*
0004: BCF 0A.0
0005: BCF 0A.1
0006: BCF 0A.2
0007: ADDWF 02,F
0008: RETLW 28
0009: RETLW 0C
000A: RETLW 01
000B: RETLW 06
....................
....................
.................... // Odesle nibble do displeje (posle data a klikne signalem e)
.................... //
.................... void lcd_send_nibble( BYTE n )
.................... {
.................... *LCD_PORT = (*LCD_PORT & ~LCD_MASK) | ((n << LCD_SHIFT) & LCD_MASK); // nastav datove bity portu a ostatni zachovej
*
002A: MOVF 06,W
002B: ANDLW C3
002C: MOVWF 25
002D: RLF 24,W
002E: MOVWF 0C
002F: RLF 0C,F
0030: MOVLW FC
0031: ANDWF 0C,F
0032: MOVF 0C,W
0033: ANDLW 3C
0034: IORWF 25,W
0035: MOVWF 06
.................... output_bit(LCD_E,1); // vzestupna hrana
0036: BSF 06.0
0037: BSF 03.5
0038: BCF 06.0
.................... delay_us(1); // pockej alespon 450ns od e nebo alespon 195ns od dat
0039: NOP
.................... output_bit(LCD_E,0); // sestupna hrana (minimalni perioda e je 1us)
003A: BCF 03.5
003B: BCF 06.0
003C: BSF 03.5
003D: BCF 06.0
003E: BCF 03.5
003F: RETLW 00
.................... }
....................
....................
.................... // Odesle bajt do registru LCD
.................... //
.................... // Pokud je Adr=0 .. instrukcni registr
.................... // Pokud je Adr=1 .. datovy registr
.................... //
.................... void lcd_send_byte( BOOLEAN Adr, BYTE n )
.................... {
.................... output_bit(LCD_RS,Adr); // vyber registr
0040: MOVF 22,F
0041: BTFSS 03.2
0042: GOTO 045
0043: BCF 06.1
0044: GOTO 046
0045: BSF 06.1
0046: BSF 03.5
0047: BCF 06.1
.................... swap(n);
0048: BCF 03.5
0049: SWAPF 23,F
.................... lcd_send_nibble(n); // posli horni pulku bajtu
004A: MOVF 23,W
004B: MOVWF 24
004C: CALL 02A
.................... swap(n);
004D: SWAPF 23,F
.................... lcd_send_nibble(n); // posli spodni pulku bajtu
004E: MOVF 23,W
004F: MOVWF 24
0050: CALL 02A
.................... delay_us(40); // minimalni doba na provedeni prikazu
0051: MOVLW 0D
0052: MOVWF 0C
0053: DECFSZ 0C,F
0054: GOTO 053
0055: RETLW 00
.................... }
....................
....................
.................... // Provede inicializaci LCD displeje, smaze obsah a nastavi mod displeje
.................... //
.................... // Tato procedura se musi volat pred pouzitim ostatnich lcd_ procedur
.................... //
.................... void lcd_init()
.................... {
....................
.................... int i; // pocitadlo cyklu
....................
.................... delay_ms(20); // spozdeni pro provedeni startu displeje po zapnuti napajeni
0056: MOVLW 14
0057: MOVWF 1E
0058: CALL 015
....................
.................... *LCD_TRIS = *LCD_TRIS & ~LCD_MASK; // nuluj odpovidajici bity tris registru datoveho portu LCD
0059: MOVLW C3
005A: BSF 03.5
005B: ANDWF 06,F
....................
.................... output_bit(LCD_RS,0); // nastav jako vystup a nastav klidovy stav
005C: BCF 03.5
005D: BCF 06.1
005E: BSF 03.5
005F: BCF 06.1
.................... output_bit(LCD_E,0); // nastav jako vystup a nastav klidovy stav
0060: BCF 03.5
0061: BCF 06.0
0062: BSF 03.5
0063: BCF 06.0
....................
.................... for (i=0; i<3; i++) // nastav lcd do rezimu 8 bitu sbernice
0064: BCF 03.5
0065: CLRF 1B
0066: MOVF 1B,W
0067: SUBLW 02
0068: BTFSS 03.0
0069: GOTO 072
.................... {
.................... delay_ms(2); // muze byt rozdelany prenos dat (2x 4 bity) nebo pomaly povel
006A: MOVLW 02
006B: MOVWF 1E
006C: CALL 015
.................... lcd_send_nibble(3); // rezim 8 bitu
006D: MOVLW 03
006E: MOVWF 24
006F: CALL 02A
.................... }
0070: INCF 1B,F
0071: GOTO 066
....................
.................... delay_us(40); // cas na zpracovani
0072: MOVLW 0D
0073: MOVWF 0C
0074: DECFSZ 0C,F
0075: GOTO 074
.................... lcd_send_nibble(2); // nastav rezim 4 bitu (plati od nasledujiciho prenosu)
0076: MOVLW 02
0077: MOVWF 24
0078: CALL 02A
.................... delay_us(40); // cas na zpracovani
0079: MOVLW 0D
007A: MOVWF 0C
007B: DECFSZ 0C,F
007C: GOTO 07B
....................
.................... for (i=0;i<3;i++) // proved inicializaci (nastaveni modu, smazani apod)
007D: CLRF 1B
007E: MOVF 1B,W
007F: SUBLW 02
0080: BTFSS 03.0
0081: GOTO 08E
.................... {
.................... lcd_send_byte(0,LCD_INIT_STRING[i]);
0082: MOVF 1B,W
0083: CALL 004
0084: MOVWF 1C
0085: CLRF 22
0086: MOVF 1C,W
0087: MOVWF 23
0088: CALL 040
.................... delay_ms(2);
0089: MOVLW 02
008A: MOVWF 1E
008B: CALL 015
.................... }
008C: INCF 1B,F
008D: GOTO 07E
008E: GOTO 174 (RETURN)
.................... }
....................
....................
.................... // Proved presun kurzoru
.................... //
.................... // Pozice 1.1 je domu
.................... //
.................... void lcd_gotoxy( BYTE x, BYTE y)
.................... {
....................
.................... BYTE Adr;
....................
.................... Adr=x-1;
008F: MOVLW 01
0090: SUBWF 1E,W
0091: MOVWF 20
.................... if(y==2)
0092: MOVF 1F,W
0093: SUBLW 02
0094: BTFSS 03.2
0095: GOTO 098
.................... Adr+=LCD_LINE_2;
0096: MOVLW 40
0097: ADDWF 20,F
....................
.................... lcd_send_byte(0,0x80|Adr);
0098: MOVF 20,W
0099: IORLW 80
009A: MOVWF 21
009B: CLRF 22
009C: MOVF 21,W
009D: MOVWF 23
009E: CALL 040
009F: RETLW 00
.................... }
....................
....................
.................... // Zapis znaku na displej, zpracovani ridicich znaku
.................... //
.................... void lcd_putc( char c)
.................... {
....................
.................... switch (c)
00A0: MOVF 1D,W
00A1: MOVWF 0C
00A2: MOVLW 0C
00A3: SUBWF 0C,W
00A4: BTFSC 03.2
00A5: GOTO 0B3
00A6: MOVLW 0A
00A7: SUBWF 0C,W
00A8: BTFSC 03.2
00A9: GOTO 0BB
00AA: MOVLW 0D
00AB: SUBWF 0C,W
00AC: BTFSC 03.2
00AD: GOTO 0C1
00AE: MOVLW 08
00AF: SUBWF 0C,W
00B0: BTFSC 03.2
00B1: GOTO 0C6
00B2: GOTO 0CB
.................... {
.................... case '\f' : lcd_send_byte(0,1); // smaz displej
00B3: CLRF 22
00B4: MOVLW 01
00B5: MOVWF 23
00B6: CALL 040
.................... delay_ms(2);
00B7: MOVLW 02
00B8: MOVWF 1E
00B9: CALL 015
.................... break;
00BA: GOTO 0D7
.................... case '\n' : lcd_gotoxy(1,2); break; // presun se na 1. znak 2. radky
00BB: MOVLW 01
00BC: MOVWF 1E
00BD: MOVLW 02
00BE: MOVWF 1F
00BF: CALL 08F
00C0: GOTO 0D7
.................... case '\r' : lcd_gotoxy(1,1); break; // presun home
00C1: MOVLW 01
00C2: MOVWF 1E
00C3: MOVWF 1F
00C4: CALL 08F
00C5: GOTO 0D7
.................... case '\b' : lcd_send_byte(0,0x10); break; // posun kurzor o 1 zpet
00C6: CLRF 22
00C7: MOVLW 10
00C8: MOVWF 23
00C9: CALL 040
00CA: GOTO 0D7
.................... default : if (c<0x20) c&=0x7; // preklopeni definovatelnych znaku na rozsah 0 az 0x1F
00CB: MOVF 1D,W
00CC: SUBLW 1F
00CD: BTFSS 03.0
00CE: GOTO 0D1
00CF: MOVLW 07
00D0: ANDWF 1D,F
.................... lcd_send_byte(1,c); break; // zapis znak
00D1: MOVLW 01
00D2: MOVWF 22
00D3: MOVF 1D,W
00D4: MOVWF 23
00D5: CALL 040
00D6: GOTO 0D7
.................... }
00D7: RETLW 00
.................... }
....................
....................
.................... // Zapni kurzor
.................... //
.................... void lcd_cursor_on()
.................... {
.................... lcd_send_byte(0,LCD_CURSOR_ON_);
.................... }
....................
....................
.................... // Vypni kurzor
.................... //
.................... void lcd_cursor_off()
.................... {
.................... lcd_send_byte(0,LCD_CURSOR_OFF_);
.................... }
....................
....................
.................... // Definice vlastnich fontu
.................... //
.................... // Vlastnich definic muze byt jen 8 do pozic 0 az 7 pameti CGRAM radice lcd displeje
.................... // Pro snadne definovani jsou pripraveny nasledujici definice a na konci souboru je uveden
.................... // priklad pouziti definovanych znaku.
....................
....................
.................... // Pomocna procedura pro posilani ridicich dat do radice displeje
.................... //
.................... void lcd_putc2(int Data)
.................... {
.................... lcd_send_byte(1,Data);
.................... }
....................
....................
.................... // Pomocne definice pro programovani obsahu CGRAM
.................... //
.................... #DEFINE lcd_define_start(Code) lcd_send_byte(0,0x40+(Code<<3)); delay_ms(2)
.................... #DEFINE lcd_define_def(String) printf(lcd_putc2,String);
.................... #DEFINE lcd_define_end() lcd_send_byte(0,3); delay_ms(2)
....................
....................
.................... // Vlastni vykonne makro pro definovani fontu do pozice Index CGRAM s definicnim retezcem Def
.................... //
.................... #DEFINE lcd_define_char(Index, Def) lcd_define_start(Index); lcd_define_def(Def); lcd_define_end();
....................
....................
.................... // Pripravene definice fontu vybranych znaku
.................... // V tabulce nesmi byt 00 (konec retezce v printf()), misto toho davame 80
.................... //
.................... #DEFINE LCD_CHAR_BAT100 "\x0E\x1F\x1F\x1F\x1F\x1F\x1F\x1F" /* symbol plne baterie */
.................... #DEFINE LCD_CHAR_BAT50 "\x0E\x1F\x11\x11\x13\x17\x1F\x1F" /* symbol polovicni baterie */
.................... #DEFINE LCD_CHAR_BAT0 "\x0E\x1F\x11\x11\x11\x11\x11\x1F" /* symbol vybite baterie */
.................... #DEFINE LCD_CHAR_LUA "\x04\x0E\x11\x11\x1F\x11\x11\x80" /* A s carkou */
.................... #DEFINE LCD_CHAR_LLA "\x01\x02\x0E\x01\x1F\x11\x0F\x80" /* a s carkou */
.................... #DEFINE LCD_CHAR_HUC "\x0A\x0E\x11\x10\x10\x11\x0E\x80" /* C s hackem */
.................... #DEFINE LCD_CHAR_HLC "\x0A\x04\x0E\x10\x10\x11\x0E\x80" /* c s hackem */
.................... #DEFINE LCD_CHAR_HUD "\x0A\x1C\x12\x11\x11\x12\x1C\x80" /* D s hackem */
.................... #DEFINE LCD_CHAR_HLD "\x05\x03\x0D\x13\x11\x11\x0F\x80" /* d s hackem */
.................... #DEFINE LCD_CHAR_LUE "\x04\x1F\x10\x10\x1E\x10\x1F\x80" /* E s carkou */
.................... #DEFINE LCD_CHAR_LLE "\x01\x02\x0E\x11\x1F\x10\x0E\x80" /* e s carkou */
.................... #DEFINE LCD_CHAR_HUE "\x0A\x1F\x10\x1E\x10\x10\x1F\x80" /* E s hackem */
.................... #DEFINE LCD_CHAR_HLE "\x0A\x04\x0E\x11\x1F\x10\x0E\x80" /* e s hackem */
.................... #DEFINE LCD_CHAR_LUI "\x04\x0E\x04\x04\x04\x04\x0E\x80" /* I s carkou */
.................... #DEFINE LCD_CHAR_LLI "\x02\x04\x80\x0C\x04\x04\x0E\x80" /* i s carkou */
.................... #DEFINE LCD_CHAR_HUN "\x0A\x15\x11\x19\x15\x13\x11\x80" /* N s hackem */
.................... #DEFINE LCD_CHAR_HLN "\x0A\x04\x16\x19\x11\x11\x11\x80" /* n s hackem */
.................... #DEFINE LCD_CHAR_LUO "\x04\x0E\x11\x11\x11\x11\x0E\x80" /* O s carkou */
.................... #DEFINE LCD_CHAR_LLO "\x02\x04\x0E\x11\x11\x11\x0E\x80" /* o s carkou */
.................... #DEFINE LCD_CHAR_HUR "\x0A\x1E\x11\x1E\x14\x12\x11\x80" /* R s hackem */
.................... #DEFINE LCD_CHAR_HLR "\x0A\x04\x16\x19\x10\x10\x10\x80" /* r s hackem */
.................... #DEFINE LCD_CHAR_HUS "\x0A\x0F\x10\x0E\x01\x01\x1E\x80" /* S s hackem */
.................... #DEFINE LCD_CHAR_HLS "\x0A\x04\x0E\x10\x0E\x01\x1E\x80" /* s s hackem */
.................... #DEFINE LCD_CHAR_HUT "\x0A\x1F\x04\x04\x04\x04\x04\x80" /* T s hackem */
.................... #DEFINE LCD_CHAR_HLT "\x0A\x0C\x1C\x08\x08\x09\x06\x80" /* t s hackem */
.................... #DEFINE LCD_CHAR_LUU "\x02\x15\x11\x11\x11\x11\x0E\x80" /* U s carkou */
.................... #DEFINE LCD_CHAR_LLU "\x02\x04\x11\x11\x11\x13\x0D\x80" /* u s carkou */
.................... #DEFINE LCD_CHAR_CUU "\x06\x17\x11\x11\x11\x11\x0E\x80" /* U s krouzkem */
.................... #DEFINE LCD_CHAR_CLU "\x06\x06\x11\x11\x11\x11\x0E\x80" /* u s krouzkem */
.................... #DEFINE LCD_CHAR_LUY "\x02\x15\x11\x0A\x04\x04\x04\x80" /* Y s carkou */
.................... #DEFINE LCD_CHAR_LLY "\x02\x04\x11\x11\x0F\x01\x0E\x80" /* y s carkou */
.................... #DEFINE LCD_CHAR_HUZ "\x0A\x1F\x01\x02\x04\x08\x1F\x80" /* Z s hackem */
.................... #DEFINE LCD_CHAR_HLZ "\x0A\x04\x1F\x02\x04\x08\x1F\x80" /* z s hackem */
....................
....................
.................... // Priklad pouziti definovanych znaku
.................... //
.................... //
.................... //void lcd_sample()
.................... //{
.................... // lcd_define_char(0,LCD_CHAR_BAT50); // Priklad definice znaku baterie do pozice 0
.................... // lcd_define_char(2,LCD_CHAR_HLE LCD_CHAR_LUI); // Priklad definice znaku e s hackem a I s carkou od pozice 2
.................... // // vsimnete si, ze neni carka mezi retezci s definici (oba retezce definuji
.................... // // jediny definicni retezec)
.................... // printf(lcd_putc,"\fZnaky:\20\22\23"); // priklad vypisu znaku z pozice 0, 2 a 3
.................... // delay_ms(1000);
.................... // lcd_define_char(0,LCD_CHAR_BAT0); // Predefinovani tvaru znaku v pozici 0
.................... // delay_ms(1000);
.................... //}
....................
....................
.................... #DEFINE PRIJIMAC PIN_A3 // pin na ktery je pripojen prijimac
.................... #DEFINE SERVO_X PIN_A0 // pin na ktery je pripojeno servo
.................... #DEFINE SERVO_Y PIN_A1
....................
....................
.................... int8 prijmout(int8* bit)
.................... {
.................... // || |
.................... // |--|_____ 1
.................... // |
.................... // |-|__|-|_ 0
....................
.................... while (!input(PRIJIMAC)) ; // cekej na jednicku
.................... delay_us(IMPULS/4); // presvec se, jestli je stale 1 po 1/4 impulsu
.................... if (!input(PRIJIMAC)) return false; // vrat chybu, kdyz neni stale 1
.................... delay_us(3*IMPULS); // pockej na rozhodovaci misto
.................... /// if (input(PRIJIMAC)) *bit=0; else *bit=1; // dekoduj 1 nebo 0
.................... *bit=!input(PRIJIMAC); // dekoduj 1 nebo 0
.................... delay_us(IMPULS); // pockej na konec znaku
....................
.................... return true; // vrat, ze se cteni povedlo
.................... }
....................
.................... int8 read_nibble(int1* datovy, int8* data)
.................... {
.................... int8 i;
.................... int8 d;
.................... int1 tmp;
....................
.................... d=0;
00D8: CLRF 1E
....................
.................... // Cekam na dlouhou nulu
.................... for (i=4; i>0; i--)
00D9: MOVLW 04
00DA: MOVWF 1D
00DB: MOVF 1D,F
00DC: BTFSC 03.2
00DD: GOTO 0EC
.................... {
.................... if (input(PRIJIMAC)) i=4;
00DE: BSF 03.5
00DF: BSF 05.3
00E0: BCF 03.5
00E1: BTFSS 05.3
00E2: GOTO 0E5
00E3: MOVLW 04
00E4: MOVWF 1D
.................... delay_us(IMPULS/2);
00E5: MOVLW 29
00E6: MOVWF 0C
00E7: DECFSZ 0C,F
00E8: GOTO 0E7
00E9: NOP
.................... }
00EA: DECF 1D,F
00EB: GOTO 0DB
....................
.................... // Cekam na jednicku (start ramce)
.................... for (; !input(PRIJIMAC); )
00EC: BSF 03.5
00ED: BSF 05.3
00EE: BCF 03.5
00EF: BTFSC 05.3
00F0: GOTO 0F6
.................... {
.................... delay_us(IMPULS/8);
00F1: MOVLW 0A
00F2: MOVWF 0C
00F3: DECFSZ 0C,F
00F4: GOTO 0F3
.................... }
00F5: GOTO 0EC
....................
.................... // delay_us(IMPULS/2);
.................... delay_us(2*IMPULS+IMPULS/2);
00F6: MOVLW D0
00F7: MOVWF 0C
00F8: DECFSZ 0C,F
00F9: GOTO 0F8
.................... *datovy=input(PRIJIMAC);
00FA: MOVF 1B,W
00FB: MOVWF 04
00FC: BSF 03.5
00FD: BSF 05.3
00FE: MOVLW 00
00FF: BCF 03.5
0100: BTFSC 05.3
0101: MOVLW 01
0102: MOVWF 00
....................
.................... // Prenasim bity
.................... for (i=0; i<4; i++)
0103: CLRF 1D
0104: MOVF 1D,W
0105: SUBLW 03
0106: BTFSS 03.0
0107: GOTO 122
.................... {
.................... delay_us(2*IMPULS);
0108: MOVLW A6
0109: MOVWF 0C
010A: DECFSZ 0C,F
010B: GOTO 10A
010C: NOP
.................... d >>= 1;
010D: BCF 03.0
010E: RRF 1E,F
.................... if (input(PRIJIMAC)) d +=0b1000;
010F: BSF 03.5
0110: BSF 05.3
0111: BCF 03.5
0112: BTFSS 05.3
0113: GOTO 116
0114: MOVLW 08
0115: ADDWF 1E,F
.................... output_bit(PIN_A4,tmp);
0116: BTFSC 1F.0
0117: GOTO 11A
0118: BCF 05.4
0119: GOTO 11B
011A: BSF 05.4
011B: BSF 03.5
011C: BCF 05.4
.................... tmp=!tmp;
011D: MOVLW 01
011E: BCF 03.5
011F: XORWF 1F,F
.................... }
0120: INCF 1D,F
0121: GOTO 104
.................... // delay_us(2*IMPULS); // cas posledniho datoveho bitu
....................
.................... *data = d;
0122: MOVF 1C,W
0123: MOVWF 04
0124: MOVF 1E,W
0125: MOVWF 00
.................... return TRUE;
0126: MOVLW 01
0127: MOVWF 0D
0128: RETLW 00
.................... }
....................
....................
.................... int8 x,y;
.................... int8 xc,yc; // pocitadla aktualizace x a y
.................... int e1,e2,e3,e4; // pocitadla chyb - ladici
....................
.................... void main()
.................... {
*
0170: CLRF 04
0171: MOVLW 1F
0172: ANDWF 03,F
.................... lcd_init(); // zinicializuj LCD display
0173: GOTO 056
.................... delay_ms(5);
0174: MOVLW 05
0175: MOVWF 1E
0176: CALL 015
.................... printf(lcd_putc,"Ahoj...");
*
000C: BCF 0A.0
000D: BCF 0A.1
000E: BCF 0A.2
000F: ADDWF 02,F
0010: RETLW 41
0011: RETLW 68
0012: RETLW 6F
0013: RETLW 6A
0014: RETLW 00
*
0177: CLRF 1B
0178: MOVF 1B,W
0179: CALL 00C
017A: INCF 1B,F
017B: MOVWF 1D
017C: CALL 0A0
017D: MOVLW 04
017E: SUBWF 1B,W
017F: BTFSS 03.2
0180: GOTO 178
0181: MOVLW 03
0182: MOVWF 1C
0183: MOVLW 2E
0184: MOVWF 1D
0185: CALL 0A0
0186: DECFSZ 1C,F
0187: GOTO 183
.................... delay_ms(300);
0188: MOVLW 02
0189: MOVWF 1B
018A: MOVLW 96
018B: MOVWF 1E
018C: CALL 015
018D: DECFSZ 1B,F
018E: GOTO 18A
....................
.................... x = 0;
018F: CLRF 0E
.................... y = 0;
0190: CLRF 0F
.................... xc=0;
0191: CLRF 10
.................... yc=0;
0192: CLRF 11
.................... e1=0;
0193: CLRF 12
.................... e2=0;
0194: CLRF 13
.................... e3=0;
0195: CLRF 14
.................... e4=0;
0196: CLRF 15
....................
.................... while (true)
.................... {
.................... int8 kanal, data, suma;
.................... int1 tmp;
.................... int8 datovy;
....................
.................... decoder:
.................... //output_high(PIN_A1);
....................
.................... // do // vyhledej synchronizacni jednicky
.................... // {
.................... // if (!prijmout(&bit)) goto decoder; // prijmi bit; pri chybe zacni znovu
.................... // if (1==bit) counter++; else goto decoder; // kdyz je bit 1, tak zvys citac; jinak zacni znovu
.................... // } while(counter<4); // pockej na 4 jednicky
.................... ///output_bit(PIN_A1,tmp);
.................... ///tmp=!tmp;
.................... if (!read_nibble(&datovy,&kanal)) goto decoder;
0197: MOVLW 1A
0198: MOVWF 1B
0199: MOVLW 16
019A: MOVWF 1C
019B: CALL 0D8
019C: MOVF 0D,F
019D: BTFSS 03.2
019E: GOTO 1A0
019F: GOTO 197
.................... if (datovy) goto decoder;
01A0: MOVF 1A,F
01A1: BTFSC 03.2
01A2: GOTO 1A4
01A3: GOTO 197
.................... // output_low(PIN_A1);
.................... //output_low(PIN_A1);
....................
.................... // if (kanal!=15) {e1++; goto decoder;};
.................... if (!read_nibble(&datovy, &kanal)) goto decoder; // nacti identifikator osy
01A4: MOVLW 1A
01A5: MOVWF 1B
01A6: MOVLW 16
01A7: MOVWF 1C
01A8: CALL 0D8
01A9: MOVF 0D,F
01AA: BTFSS 03.2
01AB: GOTO 1AD
01AC: GOTO 197
....................
.................... if (!read_nibble(&datovy, &data)) goto decoder; // nacti 1. nibble; pri chybe zacni znovu
01AD: MOVLW 1A
01AE: MOVWF 1B
01AF: MOVLW 17
01B0: MOVWF 1C
01B1: CALL 0D8
01B2: MOVF 0D,F
01B3: BTFSS 03.2
01B4: GOTO 1B6
01B5: GOTO 197
.................... if (!read_nibble(&datovy, &suma)) goto decoder; // nacti 2. nibble; pri chybe zacni znovu
01B6: MOVLW 1A
01B7: MOVWF 1B
01B8: MOVLW 18
01B9: MOVWF 1C
01BA: CALL 0D8
01BB: MOVF 0D,F
01BC: BTFSS 03.2
01BD: GOTO 1BF
01BE: GOTO 197
.................... if (((kanal+data) & 0b1111) != suma) {e1++; goto decoder;} // zacni znovu, pokud jsou ruzne nibble
01BF: MOVF 17,W
01C0: ADDWF 16,W
01C1: ANDLW 0F
01C2: SUBWF 18,W
01C3: BTFSC 03.2
01C4: GOTO 1C7
01C5: INCF 12,F
01C6: GOTO 197
....................
....................
.................... switch (kanal) // rozeskoc se podle adresy osy
01C7: MOVLW 01
01C8: SUBWF 16,W
01C9: ADDLW FD
01CA: BTFSC 03.0
01CB: GOTO 1D8
01CC: ADDLW 03
01CD: GOTO 270
.................... {
.................... case OSA_X:
.................... {
.................... x=data;
01CE: MOVF 17,W
01CF: MOVWF 0E
.................... xc++;
01D0: INCF 10,F
.................... break;
01D1: GOTO 1D8
.................... };
.................... case OSA_Y:
.................... {
.................... y=data;
01D2: MOVF 17,W
01D3: MOVWF 0F
.................... yc++;
01D4: INCF 11,F
.................... break;
01D5: GOTO 1D8
.................... };
.................... case TLs:
.................... {
.................... e4++;
01D6: INCF 15,F
.................... break;
01D7: GOTO 1D8
.................... };
.................... };
*
0270: BCF 0A.0
0271: BSF 0A.1
0272: BCF 0A.2
0273: ADDWF 02,F
0274: GOTO 1CE
0275: GOTO 1D2
0276: GOTO 1D6
....................
.................... // ladici vypisy
.................... lcd_gotoxy(1,1); // vytiskni X a Y
*
01D8: MOVLW 01
01D9: MOVWF 1E
01DA: MOVWF 1F
01DB: CALL 08F
.................... printf(lcd_putc,"X%2U %3U%3U%3U ", x, xc, e1, e2);
*
013E: MOVF 0D,W
013F: MOVF 1B,W
0140: MOVWF 1D
0141: MOVLW 64
0142: MOVWF 1E
0143: CALL 129
0144: MOVF 0C,W
0145: MOVWF 1B
0146: MOVF 0D,W
0147: MOVLW 30
0148: BTFSS 03.2
0149: GOTO 151
014A: BTFSC 1C.0
014B: BSF 1C.3
014C: BTFSC 1C.3
014D: GOTO 157
014E: BTFSC 1C.4
014F: MOVLW 20
0150: GOTO 153
0151: BCF 1C.3
0152: BCF 1C.4
0153: ADDWF 0D,F
0154: MOVF 0D,W
0155: MOVWF 1D
0156: CALL 0A0
0157: MOVF 1B,W
0158: MOVWF 1D
0159: MOVLW 0A
015A: MOVWF 1E
015B: CALL 129
015C: MOVF 0C,W
015D: MOVWF 1B
015E: MOVF 0D,W
015F: MOVLW 30
0160: BTFSS 03.2
0161: GOTO 166
0162: BTFSC 1C.3
0163: GOTO 16A
0164: BTFSC 1C.4
0165: MOVLW 20
0166: ADDWF 0D,F
0167: MOVF 0D,W
0168: MOVWF 1D
0169: CALL 0A0
016A: MOVLW 30
016B: ADDWF 1B,F
016C: MOVF 1B,W
016D: MOVWF 1D
016E: CALL 0A0
016F: RETLW 00
*
01DC: MOVLW 58
01DD: MOVWF 1D
01DE: CALL 0A0
01DF: MOVF 0E,W
01E0: MOVWF 1B
01E1: MOVLW 11
01E2: MOVWF 1C
01E3: CALL 13E
01E4: MOVLW 20
01E5: MOVWF 1D
01E6: CALL 0A0
01E7: MOVF 10,W
01E8: MOVWF 1B
01E9: MOVLW 10
01EA: MOVWF 1C
01EB: CALL 13E
01EC: MOVF 12,W
01ED: MOVWF 1B
01EE: MOVLW 10
01EF: MOVWF 1C
01F0: CALL 13E
01F1: MOVF 13,W
01F2: MOVWF 1B
01F3: MOVLW 10
01F4: MOVWF 1C
01F5: CALL 13E
01F6: MOVLW 20
01F7: MOVWF 1D
01F8: CALL 0A0
01F9: MOVLW 20
01FA: MOVWF 1D
01FB: CALL 0A0
.................... lcd_gotoxy(1,2);
01FC: MOVLW 01
01FD: MOVWF 1E
01FE: MOVLW 02
01FF: MOVWF 1F
0200: CALL 08F
.................... printf(lcd_putc,"Y%2U %3U%3U%3U ", y, yc, e3, data);
0201: MOVLW 59
0202: MOVWF 1D
0203: CALL 0A0
0204: MOVF 0F,W
0205: MOVWF 1B
0206: MOVLW 11
0207: MOVWF 1C
0208: CALL 13E
0209: MOVLW 20
020A: MOVWF 1D
020B: CALL 0A0
020C: MOVF 11,W
020D: MOVWF 1B
020E: MOVLW 10
020F: MOVWF 1C
0210: CALL 13E
0211: MOVF 14,W
0212: MOVWF 1B
0213: MOVLW 10
0214: MOVWF 1C
0215: CALL 13E
0216: MOVF 17,W
0217: MOVWF 1B
0218: MOVLW 10
0219: MOVWF 1C
021A: CALL 13E
021B: MOVLW 20
021C: MOVWF 1D
021D: CALL 0A0
021E: MOVLW 20
021F: MOVWF 1D
0220: CALL 0A0
....................
.................... // ovladani serv
.................... output_high(SERVO_X);
0221: BSF 03.5
0222: BCF 05.0
0223: BCF 03.5
0224: BSF 05.0
.................... delay_ms(1);
0225: MOVLW 01
0226: MOVWF 1E
0227: CALL 015
.................... for (data=x; data--; data>0)
0228: MOVF 0E,W
0229: MOVWF 17
022A: MOVF 17,W
022B: DECF 17,F
022C: XORLW 00
022D: BTFSC 03.2
022E: GOTO 239
.................... delay_us(65);
022F: MOVLW 15
0230: MOVWF 0C
0231: DECFSZ 0C,F
0232: GOTO 231
0233: NOP
0234: MOVF 17,F
0235: BTFSS 03.2
0236: GOTO 238
0237: MOVLW 00
0238: GOTO 22A
.................... output_low(SERVO_X);
0239: BSF 03.5
023A: BCF 05.0
023B: BCF 03.5
023C: BCF 05.0
....................
.................... output_high(SERVO_Y);
023D: BSF 03.5
023E: BCF 05.1
023F: BCF 03.5
0240: BSF 05.1
.................... delay_ms(1);
0241: MOVLW 01
0242: MOVWF 1E
0243: CALL 015
.................... for (data=y; data--; data>0)
0244: MOVF 0F,W
0245: MOVWF 17
0246: MOVF 17,W
0247: DECF 17,F
0248: XORLW 00
0249: BTFSC 03.2
024A: GOTO 255
.................... delay_us(65);
024B: MOVLW 15
024C: MOVWF 0C
024D: DECFSZ 0C,F
024E: GOTO 24D
024F: NOP
0250: MOVF 17,F
0251: BTFSS 03.2
0252: GOTO 254
0253: MOVLW 00
0254: GOTO 246
.................... output_low(SERVO_Y);
0255: BSF 03.5
0256: BCF 05.1
0257: BCF 03.5
0258: BCF 05.1
....................
.................... for (data=30-x-y; data--; data>0)
0259: MOVF 0E,W
025A: SUBLW 1E
025B: MOVWF 0D
025C: MOVF 0F,W
025D: SUBWF 0D,W
025E: MOVWF 17
025F: MOVF 17,W
0260: DECF 17,F
0261: XORLW 00
0262: BTFSC 03.2
0263: GOTO 26E
.................... delay_us(65);
0264: MOVLW 15
0265: MOVWF 0C
0266: DECFSZ 0C,F
0267: GOTO 266
0268: NOP
0269: MOVF 17,F
026A: BTFSS 03.2
026B: GOTO 26D
026C: MOVLW 00
026D: GOTO 25F
....................
.................... }
026E: GOTO 197
.................... }
....................
026F: SLEEP
....................
....................
/schemata/prenos/letadlo/SW/prijimac/zaloha/04/MAIN.PJT
0,0 → 1,32
[PROJECT]
Target=main.HEX
Development_Mode=
Processor=0x684A
ToolSuite=CCS
 
[Directories]
Include=C:\Program Files\PICC\Devices;C:\Program Files\PICC\Dri;
Library=
LinkerScript=
 
[Target Data]
FileList=main.c;
BuildTool=CCSC
OptionString=-p +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
 
/schemata/prenos/letadlo/SW/prijimac/zaloha/04/MAIN.STA
0,0 → 1,41
 
ROM used: 631 (62%)
393 (38%) including unused fragments
 
1 Average locations per line
5 Average locations per statement
 
RAM used: 12 (18%) at main() level
27 (40%) worst case
 
Lines Stmts % Files
----- ----- --- -----
171 91 66 d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\main.c
5 0 0 d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\main.h
111 0 0 C:\Program Files\PICC\Devices\16F84.h
5 0 0 d:\@kaklik\programy\pic_c\prenos\letadlo\common.h
272 46 20 d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\MYLCD.C
----- -----
1128 274 Total
 
Page ROM % RAM Functions:
---- --- --- --- ----------
0 21 3 1 delay_ms
0 8 1 0 @const22
0 22 3 3 lcd_send_nibble
0 22 3 2 lcd_send_byte
0 57 9 2 lcd_init
0 17 3 4 lcd_gotoxy
0 56 9 1 lcd_putc
0 81 13 6 read_nibble
0 256 41 2 main
0 9 1 0 @const10145
0 7 1 0 @goto10179
0 21 3 3 @DIV88
0 50 8 2 @PRINTF_U_148
 
Segment Used Free
--------- ---- ----
0000-0003 4 0
0004-03FF 627 393
 
/schemata/prenos/letadlo/SW/prijimac/zaloha/04/MAIN.SYM
0,0 → 1,68
00C @SCRATCH
00D @SCRATCH
00D _RETURN_
00E x
00F y
010 xc
011 yc
012 e1
013 e2
014 e3
015 e4
016 kanal
017 Data
018 suma
019.0 tmp
01A datovy
01B lcd_init.i
01B read_nibble.datovy
01B @PRINTF_U_148.P1
01B main.@SCRATCH
01C read_nibble.Data
01C @PRINTF_U_148.P1
01C lcd_init.@SCRATCH
01C main.@SCRATCH
01D lcd_putc.c
01D read_nibble.i
01D @DIV88.P1
01E delay_ms.P1
01E lcd_gotoxy.x
01E read_nibble.d
01E @DIV88.P1
01F lcd_gotoxy.y
01F.0 read_nibble.tmp
01F @DIV88.@SCRATCH
020 lcd_gotoxy.Adr
020 read_nibble.@SCRATCH
021 lcd_gotoxy.@SCRATCH
022 lcd_send_byte.Adr
023 lcd_send_byte.n
024 lcd_send_nibble.n
025 lcd_send_nibble.@SCRATCH
026 lcd_send_nibble.@SCRATCH
delay_us.P1
-002 LCD_INIT_STRING
lcd_putc2.Data
prijmout.bit
 
0015 delay_ms
0004 @const22
002A lcd_send_nibble
0040 lcd_send_byte
0056 lcd_init
008F lcd_gotoxy
00A0 lcd_putc
00D8 read_nibble
0170 main
000C @const10145
0270 @goto10179
0129 @DIV88
013E @PRINTF_U_148
0197 decoder
 
Project Files:
d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\main.c
d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\main.h
C:\Program Files\PICC\Devices\16F84.h
d:\@kaklik\programy\pic_c\prenos\letadlo\common.h
d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\MYLCD.C
/schemata/prenos/letadlo/SW/prijimac/zaloha/04/MAIN.TRE
0,0 → 1,701
ÀÄmain
ÀÄmain 0/256 Ram=2
ÃÄ??0??
ÃÄlcd_init 0/57 Ram=2
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@const22 0/8 Ram=0
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄdelay_ms 0/21 Ram=1
ÃÄdelay_ms 0/21 Ram=1
ÃÄ@const10145 0/9 Ram=0
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄdelay_ms 0/21 Ram=1
ÃÄread_nibble 0/81 Ram=6
ÃÄread_nibble 0/81 Ram=6
ÃÄread_nibble 0/81 Ram=6
ÃÄread_nibble 0/81 Ram=6
ÃÄ@goto10179 0/7 Ram=0
ÃÄlcd_gotoxy 0/17 Ram=4
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_148 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_148 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_148 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_148 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_gotoxy 0/17 Ram=4
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_148 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_148 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_148 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_148 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄdelay_ms 0/21 Ram=1
ÀÄdelay_ms 0/21 Ram=1
/schemata/prenos/letadlo/SW/prijimac/zaloha/04/MYLCD.C
0,0 → 1,271
// LCD modul pro ovladani dvouradkoveho LCD modulu se standardnim Hitachi radicem
// (c)miho 2002
//
// Historie:
//
// 0.0 Uvodni verze se snadnou definici portu LCD displeje
//
//
// Funkce:
//
// lcd_init() inicializuje LCD displej a porty, nutno volat jako prvni
//
// lcd_putc(c) zapis snaku do lcd displeje, zpracovava nasledujici ridici znaky
// \f = \x0C - nova stranka - smazani displeje
// \n = \x0A - odradkovani (prechod na druhou radku)
// \b = \x08 - backspace - posunuti kurzoru o 1 pozici zpet
// \r = \x0D - goto home to position 1,1
// \0 .. \7 - definovatelne znaky v pozicich 0 az 7 v CGRAM
// \20 .. \27 - alternativne zapsane znaky (oktalove) v pozicich 0 az 7 CGRAM
// Pozor na to, ze funkce printf konci tisk pokud narazi na \0 (konec retezce)
//
// lcd_gotoxy(x,y) presune kurzor na uvedenou adresu
// nekontroluje parametry
//
// lcd_cursor_on zapne kurzor
// lcd_cursor_off vypne kurzor
//
// lcd_define_char(Index, Def) Makro, ktere definuje znaky od pozice Index obsahem definicniho
// retezce Def. Kazdych 8 znaku retezce Def definuje dalsi znak v CGRAM.
// Kapacita CGRAM je celkem 8 znaku s indexem 0 az 7.
// Na konci se provede lcd_gotoxy(1,1).
// Na konci teto knihovny je priklad pouziti definovanych znaku
//
// Definice portu:
//
// #DEFINE LCD_RS PIN_B2 // rizeni registru LCD displeje
// #DEFINE LCD_E PIN_B1 // enable LCD displeje
// #DEFINE LCD_DATA_LSB PIN_C2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
 
 
 
 
// Privatni sekce, cist jen v pripade, ze neco nefunguje
 
 
 
 
// Generovane defince portu pro ucely teto knihovny aby kod generoval spravne IO operace a soucasne
// bylo mozne jednoduse deklarovat pripojene piny LCD displeje pri pouziti teto knihovny. Problem spociva
// v tom, ze se musi spravne ridit smery portu a soucasne datovy port zabira jen 4 bity ze zadaneho portu
//
#DEFINE LCD_SHIFT (LCD_DATA_LSB&7) // pocet bitu posuvu dataoveho kanalu v datovem portu
#DEFINE LCD_PORT (LCD_DATA_LSB>>3) // adresa LCD datoveho portu
#DEFINE LCD_TRIS (LCD_PORT+0x80) // adresa prislusneho TRIS registru
#DEFINE LCD_MASK (0xF<<LCD_SHIFT) // maska platnych bitu
//
#IF LCD_SHIFT>4 // kontrola mezi
#ERROR LCD data port LSB bit not in range 0..4
#ENDIF
 
 
// Definice konstant pro LCD display
//
#define LCD_CURSOR_ON_ 0x0E // kurzor jako blikajici radka pod znakem
#define LCD_CURSOR_OFF_ 0x0C // zadny kurzor
#define LCD_LINE_2 0x40 // adresa 1. znaku 2. radky
 
 
// Definice rezimu LCD displeje
//
BYTE const LCD_INIT_STRING[4] =
{
0x28, // intrfejs 4 bity, 2 radky, font 5x7
LCD_CURSOR_OFF_, // display on, kurzor off,
0x01, // clear displeje
0x06 // inkrement pozice kurzoru (posun kurzoru doprava)
};
 
 
// Odesle nibble do displeje (posle data a klikne signalem e)
//
void lcd_send_nibble( BYTE n )
{
*LCD_PORT = (*LCD_PORT & ~LCD_MASK) | ((n << LCD_SHIFT) & LCD_MASK); // nastav datove bity portu a ostatni zachovej
output_bit(LCD_E,1); // vzestupna hrana
delay_us(1); // pockej alespon 450ns od e nebo alespon 195ns od dat
output_bit(LCD_E,0); // sestupna hrana (minimalni perioda e je 1us)
}
 
 
// Odesle bajt do registru LCD
//
// Pokud je Adr=0 .. instrukcni registr
// Pokud je Adr=1 .. datovy registr
//
void lcd_send_byte( BOOLEAN Adr, BYTE n )
{
output_bit(LCD_RS,Adr); // vyber registr
swap(n);
lcd_send_nibble(n); // posli horni pulku bajtu
swap(n);
lcd_send_nibble(n); // posli spodni pulku bajtu
delay_us(40); // minimalni doba na provedeni prikazu
}
 
 
// Provede inicializaci LCD displeje, smaze obsah a nastavi mod displeje
//
// Tato procedura se musi volat pred pouzitim ostatnich lcd_ procedur
//
void lcd_init()
{
 
int i; // pocitadlo cyklu
 
delay_ms(20); // spozdeni pro provedeni startu displeje po zapnuti napajeni
 
*LCD_TRIS = *LCD_TRIS & ~LCD_MASK; // nuluj odpovidajici bity tris registru datoveho portu LCD
 
output_bit(LCD_RS,0); // nastav jako vystup a nastav klidovy stav
output_bit(LCD_E,0); // nastav jako vystup a nastav klidovy stav
 
for (i=0; i<3; i++) // nastav lcd do rezimu 8 bitu sbernice
{
delay_ms(2); // muze byt rozdelany prenos dat (2x 4 bity) nebo pomaly povel
lcd_send_nibble(3); // rezim 8 bitu
}
 
delay_us(40); // cas na zpracovani
lcd_send_nibble(2); // nastav rezim 4 bitu (plati od nasledujiciho prenosu)
delay_us(40); // cas na zpracovani
 
for (i=0;i<3;i++) // proved inicializaci (nastaveni modu, smazani apod)
{
lcd_send_byte(0,LCD_INIT_STRING[i]);
delay_ms(2);
}
}
 
 
// Proved presun kurzoru
//
// Pozice 1.1 je domu
//
void lcd_gotoxy( BYTE x, BYTE y)
{
 
BYTE Adr;
 
Adr=x-1;
if(y==2)
Adr+=LCD_LINE_2;
 
lcd_send_byte(0,0x80|Adr);
}
 
 
// Zapis znaku na displej, zpracovani ridicich znaku
//
void lcd_putc( char c)
{
 
switch (c)
{
case '\f' : lcd_send_byte(0,1); // smaz displej
delay_ms(2);
break;
case '\n' : lcd_gotoxy(1,2); break; // presun se na 1. znak 2. radky
case '\r' : lcd_gotoxy(1,1); break; // presun home
case '\b' : lcd_send_byte(0,0x10); break; // posun kurzor o 1 zpet
default : if (c<0x20) c&=0x7; // preklopeni definovatelnych znaku na rozsah 0 az 0x1F
lcd_send_byte(1,c); break; // zapis znak
}
}
 
 
// Zapni kurzor
//
void lcd_cursor_on()
{
lcd_send_byte(0,LCD_CURSOR_ON_);
}
 
 
// Vypni kurzor
//
void lcd_cursor_off()
{
lcd_send_byte(0,LCD_CURSOR_OFF_);
}
 
 
// Definice vlastnich fontu
//
// Vlastnich definic muze byt jen 8 do pozic 0 az 7 pameti CGRAM radice lcd displeje
// Pro snadne definovani jsou pripraveny nasledujici definice a na konci souboru je uveden
// priklad pouziti definovanych znaku.
 
 
// Pomocna procedura pro posilani ridicich dat do radice displeje
//
void lcd_putc2(int Data)
{
lcd_send_byte(1,Data);
}
 
 
// Pomocne definice pro programovani obsahu CGRAM
//
#DEFINE lcd_define_start(Code) lcd_send_byte(0,0x40+(Code<<3)); delay_ms(2)
#DEFINE lcd_define_def(String) printf(lcd_putc2,String);
#DEFINE lcd_define_end() lcd_send_byte(0,3); delay_ms(2)
 
 
// Vlastni vykonne makro pro definovani fontu do pozice Index CGRAM s definicnim retezcem Def
//
#DEFINE lcd_define_char(Index, Def) lcd_define_start(Index); lcd_define_def(Def); lcd_define_end();
 
 
// Pripravene definice fontu vybranych znaku
// V tabulce nesmi byt 00 (konec retezce v printf()), misto toho davame 80
//
#DEFINE LCD_CHAR_BAT100 "\x0E\x1F\x1F\x1F\x1F\x1F\x1F\x1F" /* symbol plne baterie */
#DEFINE LCD_CHAR_BAT50 "\x0E\x1F\x11\x11\x13\x17\x1F\x1F" /* symbol polovicni baterie */
#DEFINE LCD_CHAR_BAT0 "\x0E\x1F\x11\x11\x11\x11\x11\x1F" /* symbol vybite baterie */
#DEFINE LCD_CHAR_LUA "\x04\x0E\x11\x11\x1F\x11\x11\x80" /* A s carkou */
#DEFINE LCD_CHAR_LLA "\x01\x02\x0E\x01\x1F\x11\x0F\x80" /* a s carkou */
#DEFINE LCD_CHAR_HUC "\x0A\x0E\x11\x10\x10\x11\x0E\x80" /* C s hackem */
#DEFINE LCD_CHAR_HLC "\x0A\x04\x0E\x10\x10\x11\x0E\x80" /* c s hackem */
#DEFINE LCD_CHAR_HUD "\x0A\x1C\x12\x11\x11\x12\x1C\x80" /* D s hackem */
#DEFINE LCD_CHAR_HLD "\x05\x03\x0D\x13\x11\x11\x0F\x80" /* d s hackem */
#DEFINE LCD_CHAR_LUE "\x04\x1F\x10\x10\x1E\x10\x1F\x80" /* E s carkou */
#DEFINE LCD_CHAR_LLE "\x01\x02\x0E\x11\x1F\x10\x0E\x80" /* e s carkou */
#DEFINE LCD_CHAR_HUE "\x0A\x1F\x10\x1E\x10\x10\x1F\x80" /* E s hackem */
#DEFINE LCD_CHAR_HLE "\x0A\x04\x0E\x11\x1F\x10\x0E\x80" /* e s hackem */
#DEFINE LCD_CHAR_LUI "\x04\x0E\x04\x04\x04\x04\x0E\x80" /* I s carkou */
#DEFINE LCD_CHAR_LLI "\x02\x04\x80\x0C\x04\x04\x0E\x80" /* i s carkou */
#DEFINE LCD_CHAR_HUN "\x0A\x15\x11\x19\x15\x13\x11\x80" /* N s hackem */
#DEFINE LCD_CHAR_HLN "\x0A\x04\x16\x19\x11\x11\x11\x80" /* n s hackem */
#DEFINE LCD_CHAR_LUO "\x04\x0E\x11\x11\x11\x11\x0E\x80" /* O s carkou */
#DEFINE LCD_CHAR_LLO "\x02\x04\x0E\x11\x11\x11\x0E\x80" /* o s carkou */
#DEFINE LCD_CHAR_HUR "\x0A\x1E\x11\x1E\x14\x12\x11\x80" /* R s hackem */
#DEFINE LCD_CHAR_HLR "\x0A\x04\x16\x19\x10\x10\x10\x80" /* r s hackem */
#DEFINE LCD_CHAR_HUS "\x0A\x0F\x10\x0E\x01\x01\x1E\x80" /* S s hackem */
#DEFINE LCD_CHAR_HLS "\x0A\x04\x0E\x10\x0E\x01\x1E\x80" /* s s hackem */
#DEFINE LCD_CHAR_HUT "\x0A\x1F\x04\x04\x04\x04\x04\x80" /* T s hackem */
#DEFINE LCD_CHAR_HLT "\x0A\x0C\x1C\x08\x08\x09\x06\x80" /* t s hackem */
#DEFINE LCD_CHAR_LUU "\x02\x15\x11\x11\x11\x11\x0E\x80" /* U s carkou */
#DEFINE LCD_CHAR_LLU "\x02\x04\x11\x11\x11\x13\x0D\x80" /* u s carkou */
#DEFINE LCD_CHAR_CUU "\x06\x17\x11\x11\x11\x11\x0E\x80" /* U s krouzkem */
#DEFINE LCD_CHAR_CLU "\x06\x06\x11\x11\x11\x11\x0E\x80" /* u s krouzkem */
#DEFINE LCD_CHAR_LUY "\x02\x15\x11\x0A\x04\x04\x04\x80" /* Y s carkou */
#DEFINE LCD_CHAR_LLY "\x02\x04\x11\x11\x0F\x01\x0E\x80" /* y s carkou */
#DEFINE LCD_CHAR_HUZ "\x0A\x1F\x01\x02\x04\x08\x1F\x80" /* Z s hackem */
#DEFINE LCD_CHAR_HLZ "\x0A\x04\x1F\x02\x04\x08\x1F\x80" /* z s hackem */
 
 
// Priklad pouziti definovanych znaku
//
//
//void lcd_sample()
//{
// lcd_define_char(0,LCD_CHAR_BAT50); // Priklad definice znaku baterie do pozice 0
// lcd_define_char(2,LCD_CHAR_HLE LCD_CHAR_LUI); // Priklad definice znaku e s hackem a I s carkou od pozice 2
// // vsimnete si, ze neni carka mezi retezci s definici (oba retezce definuji
// // jediny definicni retezec)
// printf(lcd_putc,"\fZnaky:\20\22\23"); // priklad vypisu znaku z pozice 0, 2 a 3
// delay_ms(1000);
// lcd_define_char(0,LCD_CHAR_BAT0); // Predefinovani tvaru znaku v pozici 0
// delay_ms(1000);
//}
/schemata/prenos/letadlo/SW/prijimac/zaloha/04/PRG.BAT
0,0 → 1,6
call picpgr stop
call picpgr erase pic16f84
call picpgr program main.hex hex pic16f84
call picpgr run
pause
call picpgr stop
/schemata/prenos/letadlo/SW/prijimac/zaloha/04/PRG.PIF
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
/schemata/prenos/letadlo/SW/prijimac/zaloha/04/RUN.BAT
0,0 → 1,5
call picpgr run
pause
call picpgr stop
pause
run.bat
/schemata/prenos/letadlo/SW/prijimac/zaloha/04/VC.MNU
0,0 → 1,4
R: Run
picpgr run
S: Stop
picpgr stop
/schemata/prenos/letadlo/SW/prijimac/zaloha/04/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
/schemata/prenos/letadlo/SW/prijimac/zaloha/05/A.BAT
0,0 → 1,6
call picpgr stop
call picpgr erase pic16F84
call picpgr program main.hex hex pic16F84
call picpgr run
pause
call picpgr stop
/schemata/prenos/letadlo/SW/prijimac/zaloha/05/MAIN.BAK
0,0 → 1,200
// Prijimac
 
#DEFINE DEBUG PIN_A2 // ladici pomocne synchronizacni impulzy
 
#include "main.h"
#include "..\common.h"
 
#DEFINE LCD_RS PIN_B1 // rizeni registru LCD displeje
#DEFINE LCD_E PIN_B0 // enable LCD displeje
#DEFINE LCD_DATA_LSB PIN_B2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
#INCLUDE "MYLCD.C"
 
#DEFINE PRIJIMAC PIN_A3 // pin na ktery je pripojen prijimac
#DEFINE SERVO_X PIN_A0 // pin na ktery je pripojeno servo
#DEFINE SERVO_Y PIN_A1
 
 
// Prijme datovy nibble vcetne zasynchronizovani
// Chybi dodelat timeout
int8 prijmi_nibble(int8* datovy, int8* data)
{
int8 i;
 
#IFDEF DEBUG
int1 tmp;
#ENDIF
 
*data=0;
 
// Cekam na dlouhou nulu
for (i=4; i>0; i--)
{
if (input(PRIJIMAC)) i=4;
delay_us(IMPULS/2);
}
 
// Cekam na jednicku (start ramce)
for (; !input(PRIJIMAC); )
{
}
 
// Ctu typ nibblu
delay_us(2*IMPULS+2*IMPULS/3);
*datovy=input(PRIJIMAC);
 
// Prenasim bity
for (i=0; i<4; i++)
{
delay_us(2*IMPULS);
*data >>= 1;
if (input(PRIJIMAC)) *data +=0b1000;
 
#IFDEF DEBUG
output_bit(DEBUG,tmp);
tmp=!tmp;
#ELSE
delay_us(20);
#ENDIF
}
 
return FALSE;
}
 
 
// Prijme datovy ramec
// Pokud nastane chyba vraci TRUE
int8 prijmi_ramec(int8* kanal, int8* data)
{
int8 datovy;
int8 suma;
 
// Cekej na synchronizacni nibble
do
{
if (prijmi_nibble(&datovy, data)) return 1; // chyba timout
}
while(datovy);
 
// Zkontroluj magickou hodnotu
if (*data != SYNC_NIBBLE) return 2; // chyba magickeho kodu ramce
 
// Prijmi cislo kanalu
if (prijmi_nibble(&datovy, kanal)) return 1; // chyba timeout
if (!datovy) return 3; // chyba typu nibblu
 
// Prijmi data
if (prijmi_nibble(&datovy, data)) return 1; // chyba timeout
if (!datovy) return 3; // chyba typu nibblu
 
// Prijmi zabezpeceni
if (prijmi_nibble(&datovy, &suma)) return 1; // chyba timeout
if (!datovy) return 3; // chyba typu nibblu
 
// Zkontroluj kontrolni soucet
 
 
lcd_gotoxy(1,1);
printf(lcd_putc,"R:%3U %3U %3U ",*kanal,*data,suma);
delay_ms(1000);
 
 
if (((*kanal+*data) & 0b1111) != suma) return 3; // chyba kontrolniho souctu
 
return 0;
}
 
 
 
int8 x,y;
int8 xc,yc; // pocitadla aktualizace x a y
int e1,e2,e3,e4; // pocitadla chyb - ladici
 
void main()
{
lcd_init(); // zinicializuj LCD display
delay_ms(5);
printf(lcd_putc,"Ahoj...");
delay_ms(300);
 
x = 0;
y = 0;
xc=0;
yc=0;
e1=0;
e2=0;
e3=0;
e4=0;
 
while (true)
{
int8 kanal, data, e;
/* int8 kanal, data, suma;
int1 tmp;
int8 datovy;
 
decoder:
 
if (prijmi_nibble(&datovy,&kanal)) goto decoder;
if (datovy) goto decoder;
 
// if (kanal!=15) {e1++; goto decoder;};
if (prijmi_nibble(&datovy, &kanal)) goto decoder; // nacti identifikator osy
 
if (prijmi_nibble(&datovy, &data)) goto decoder; // nacti 1. nibble; pri chybe zacni znovu
if (prijmi_nibble(&datovy, &suma)) goto decoder; // nacti 2. nibble; pri chybe zacni znovu
if (((kanal+data) & 0b1111) != suma) {e1++; goto decoder;} // zacni znovu, pokud jsou ruzne nibble
 
*/
e = prijmi_ramec(&kanal,&data);
//lcd_gotoxy(1,1);
//printf(lcd_putc,"Q:%3U %3U %3U ",kanal,data,e);
//delay_ms(1000);
if (!e)
switch (kanal) // rozeskoc se podle adresy osy
{
case OSA_X:
{
x=data;
xc++;
break;
};
case OSA_Y:
{
y=data;
yc++;
break;
};
case TLs:
{
e4++;
break;
};
};
 
// ladici vypisy
lcd_gotoxy(1,1); // vytiskni X a Y
printf(lcd_putc,"X%2U %3U%3U%3U ", x, xc, e1, e);
lcd_gotoxy(1,2);
printf(lcd_putc,"Y%2U %3U%3U%3U ", y, yc, e3, data);
 
// ovladani serv
output_high(SERVO_X);
delay_ms(1);
for (data=x; data--; data>0)
delay_us(65);
output_low(SERVO_X);
 
output_high(SERVO_Y);
delay_ms(1);
for (data=y; data--; data>0)
delay_us(65);
output_low(SERVO_Y);
 
for (data=30-x-y; data--; data>0)
delay_us(65);
 
}
}
 
 
/schemata/prenos/letadlo/SW/prijimac/zaloha/05/MAIN.C
0,0 → 1,200
// Prijimac
 
#DEFINE DEBUG PIN_A2 // ladici pomocne synchronizacni impulzy
 
#include "main.h"
#include "..\common.h"
 
#DEFINE LCD_RS PIN_B1 // rizeni registru LCD displeje
#DEFINE LCD_E PIN_B0 // enable LCD displeje
#DEFINE LCD_DATA_LSB PIN_B2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
#INCLUDE "MYLCD.C"
 
#DEFINE PRIJIMAC PIN_A3 // pin na ktery je pripojen prijimac
#DEFINE SERVO_X PIN_A0 // pin na ktery je pripojeno servo
#DEFINE SERVO_Y PIN_A1
 
 
// Prijme datovy nibble vcetne zasynchronizovani
// Chybi dodelat timeout
int8 prijmi_nibble(int8* datovy, int8* data)
{
int8 i;
 
#IFDEF DEBUG
int1 tmp;
#ENDIF
 
*data=0;
 
// Cekam na dlouhou nulu
for (i=4; i>0; i--)
{
if (input(PRIJIMAC)) i=4;
delay_us(IMPULS/2);
}
 
// Cekam na jednicku (start ramce)
for (; !input(PRIJIMAC); )
{
}
 
// Ctu typ nibblu
delay_us(2*IMPULS+2*IMPULS/3);
*datovy=input(PRIJIMAC);
 
// Prenasim bity
for (i=0; i<4; i++)
{
delay_us(2*IMPULS);
*data >>= 1;
if (input(PRIJIMAC)) *data +=0b1000;
 
#IFDEF DEBUG
output_bit(DEBUG,tmp);
tmp=!tmp;
#ELSE
delay_us(20);
#ENDIF
}
 
return FALSE;
}
 
 
// Prijme datovy ramec
// Pokud nastane chyba vraci TRUE
int8 prijmi_ramec(int8* kanal, int8* data)
{
int8 datovy;
int8 suma;
 
// Cekej na synchronizacni nibble
do
{
if (prijmi_nibble(&datovy, data)) return 1; // chyba timout
}
while(datovy);
 
// Zkontroluj magickou hodnotu
if (*data != SYNC_NIBBLE) return 2; // chyba magickeho kodu ramce
 
// Prijmi cislo kanalu
if (prijmi_nibble(&datovy, kanal)) return 1; // chyba timeout
if (!datovy) return 3; // chyba typu nibblu
 
// Prijmi data
if (prijmi_nibble(&datovy, data)) return 1; // chyba timeout
if (!datovy) return 3; // chyba typu nibblu
 
// Prijmi zabezpeceni
if (prijmi_nibble(&datovy, &suma)) return 1; // chyba timeout
if (!datovy) return 3; // chyba typu nibblu
 
// Zkontroluj kontrolni soucet
 
 
//lcd_gotoxy(1,1);
//printf(lcd_putc,"R:%3U %3U %3U ",*kanal,*data,suma);
//delay_ms(1000);
 
 
if (((*kanal+*data) & 0b1111) != suma) return 3; // chyba kontrolniho souctu
 
return 0;
}
 
 
 
int8 x,y;
int8 xc,yc; // pocitadla aktualizace x a y
int e1,e2,e3,e4; // pocitadla chyb - ladici
 
void main()
{
lcd_init(); // zinicializuj LCD display
delay_ms(5);
printf(lcd_putc,"Ahoj...");
delay_ms(300);
 
x = 0;
y = 0;
xc=0;
yc=0;
e1=0;
e2=0;
e3=0;
e4=0;
 
while (true)
{
int8 kanal, data, e;
/* int8 kanal, data, suma;
int1 tmp;
int8 datovy;
 
decoder:
 
if (prijmi_nibble(&datovy,&kanal)) goto decoder;
if (datovy) goto decoder;
 
// if (kanal!=15) {e1++; goto decoder;};
if (prijmi_nibble(&datovy, &kanal)) goto decoder; // nacti identifikator osy
 
if (prijmi_nibble(&datovy, &data)) goto decoder; // nacti 1. nibble; pri chybe zacni znovu
if (prijmi_nibble(&datovy, &suma)) goto decoder; // nacti 2. nibble; pri chybe zacni znovu
if (((kanal+data) & 0b1111) != suma) {e1++; goto decoder;} // zacni znovu, pokud jsou ruzne nibble
 
*/
e = prijmi_ramec(&kanal,&data);
//lcd_gotoxy(1,1);
//printf(lcd_putc,"Q:%3U %3U %3U ",kanal,data,e);
//delay_ms(1000);
if (!e)
switch (kanal) // rozeskoc se podle adresy osy
{
case OSA_X:
{
x=data;
xc++;
break;
};
case OSA_Y:
{
y=data;
yc++;
break;
};
case TLs:
{
e4++;
break;
};
};
 
// ladici vypisy
lcd_gotoxy(1,1); // vytiskni X a Y
printf(lcd_putc,"X%2U %3U%3U%3U ", x, xc, e1, e);
lcd_gotoxy(1,2);
printf(lcd_putc,"Y%2U %3U%3U%3U ", y, yc, e3, data);
 
// ovladani serv
output_high(SERVO_X);
delay_ms(1);
for (data=x; data--; data>0)
delay_us(65);
output_low(SERVO_X);
 
output_high(SERVO_Y);
delay_ms(1);
for (data=y; data--; data>0)
delay_us(65);
output_low(SERVO_Y);
 
for (data=30-x-y; data--; data>0)
delay_us(65);
 
}
}
 
 
/schemata/prenos/letadlo/SW/prijimac/zaloha/05/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
/schemata/prenos/letadlo/SW/prijimac/zaloha/05/MAIN.ERR
0,0 → 1,0
No Errors
/schemata/prenos/letadlo/SW/prijimac/zaloha/05/MAIN.H
0,0 → 1,4
#include <16F84.h>
#use delay(clock=4000000)
#fuses XT,NOWDT,PUT
 
/schemata/prenos/letadlo/SW/prijimac/zaloha/05/MAIN.HEX
0,0 → 1,89
:1000000000308A00CE2900000A108A100A118207E7
:1000100028340C34013406340A108A100A1182077D
:10002000413468346F346A3400341C308400000872
:100030000319292801308D008C018C0B1D288D0B94
:100040001C284A308C008C0B232800000000800BF9
:100050001A2800340608C339A300220D8C008C0D29
:10006000FC308C050C083C392304860006148316EA
:100070000610000083120610831606108312003447
:10008000A008031D4528861046288614831686106E
:100090008312A10E2108A2002A20A10E2108A2008D
:1000A0002A200D308C008C0B5328003414309C0017
:1000B0001520C3308316860583128610831686109A
:1000C0008312061083160610831299011908023C48
:1000D000031C722802309C0015200330A2002A2045
:1000E000990A66280D308C008C0B74280230A2000F
:1000F0002A200D308C008C0B7B2899011908023CBA
:10010000031C8E28190804209A00A0011A08A100D7
:10011000402002309C001520990A7E28D229013007
:100120001C029E001D08023C031D982840309E07BB
:100130001E0880389F00A0011F08A1004020003445
:100140001B088C000C300C020319B3280A300C0277
:100150000319BB280D300C020319C12808300C020A
:100160000319C628CB28A0010130A100402002308D
:100170009C001520D72801309C0002309D008F2064
:10018000D72801309C009D008F20D728A001103077
:10019000A1004020D7281B081F3C031CD128073092
:1001A0009B050130A0001B08A1004020D728003487
:1001B0001E088400800104309F009F080319EE2868
:1001C000831685158312851DE72804309F0029308A
:1001D0008C008C0BE92800009F03DD288316851511
:1001E0008312851DEE28DD308C008C0BF528000075
:1001F00000001D08840083168515003083128519C0
:10020000013080009F011F08033C031C2829A630F1
:100210008C008C0B092900001E0884000310000CC0
:100220008C008000831685158312851D1C291E08ED
:10023000840008300007800020182029051121299A
:1002400005158316051101308312A0069F0A0329A4
:1002500000308D0000341B309D001A089E00D8200D
:100260008D080319362901308D0086299B08031D4E
:100270002B291A08840000080F3C03194229023078
:100280008D0086291B309D0019089E00D8208D08FE
:1002900003194D2901308D0086299B08031D532920
:1002A00003308D0086291B309D001A089E00D8203F
:1002B0008D0803195E2901308D0086299B08031DD6
:1002C000642903308D0086291B309D001C309E0060
:1002D000D8208D0803196F2901308D0086299B08CD
:1002E000031D752903308D00862919088400000834
:1002F0009D001A08840000081D070F391C0203190D
:10030000842903308D00862900308D00FA291C08CD
:100310008D011B0203188F291B088C009B298C015F
:1003200008309D009B0D8C0D1C080C0203188C00DE
:100330008D0D9D0B922900340D0819089B00643027
:100340009C0087210C0899000D083030031DAF294F
:100350001A189A159A19B5291A1A2030B1299A1122
:100360001A128D070D089B00A02019089B000A3067
:100370009C0087210C0899000D083030031DC4290A
:100380009A19C8291A1A20308D070D089B00A02041
:100390003030990719089B00A020003484011F30D9
:1003A0008305562805309C001520990119080C205A
:1003B000990A9B00A02004301902031DD62903309E
:1003C0009A002E309B00A0209A0BE1290230990060
:1003D00096309C001520990BE8298E018F01900121
:1003E0009101920193019401950116309900173003
:1003F0009A002B290D0898009808031D102A013037
:100400001602FD3E0318102A033EA82A17088E0084
:10041000900A102A17088F00910A102A950A102AAC
:1004200001309C009D008F2058309B00A0200E08BA
:10043000990011309A009C2120309B00A0201008C8
:10044000990010309A009C211208990010309A00EF
:100450009C211808990010309A009C2120309B00A4
:10046000A02020309B00A02001309C0002309D0085
:100470008F2059309B00A0200F08990011309A005E
:100480009C2120309B00A0201108990010309A0078
:100490009C211408990010309A009C21170899009B
:1004A00010309A009C2120309B00A02020309B001F
:1004B000A020831605108312051401309C0015201E
:1004C0000E08970017089703003A0319712A153090
:1004D0008C008C0B692A00009708031D702A0030DD
:1004E000622A831605108312051083168510831265
:1004F000851401309C0015200F08970017089703FA
:10050000003A03198D2A15308C008C0B852A0000C7
:100510009708031D8C2A00307E2A831685108312CB
:1005200085100E081E3C8D000F080D02970017085D
:100530009703003A0319A62A15308C008C0B9E2ACB
:1005400000009708031DA52A0030972AF5296300AB
:0E0550000A108A140A118207062A0A2A0E2AA5
:02400E00F13F80
:00000001FF
;PIC16F84
/schemata/prenos/letadlo/SW/prijimac/zaloha/05/MAIN.LST
0,0 → 1,1175
CCS PCW C Compiler, Version 3.110, 15448
 
Filename: d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\main.LST
 
ROM used: 687 (67%)
Largest free fragment is 337
RAM used: 12 (18%) at main() level
25 (37%) worst case
Stack: 5 locations
 
*
0000: MOVLW 00
0001: MOVWF 0A
0002: GOTO 1CE
0003: NOP
.................... // Prijimac
....................
.................... #DEFINE DEBUG PIN_A2 // ladici pomocne synchronizacni impulzy
....................
.................... #include "main.h"
.................... #include <16F84.h>
.................... //////// Standard Header file for the PIC16F84 device ////////////////
.................... #device PIC16F84
.................... #list
....................
.................... #use delay(clock=4000000)
*
0015: MOVLW 1C
0016: MOVWF 04
0017: MOVF 00,W
0018: BTFSC 03.2
0019: GOTO 029
001A: MOVLW 01
001B: MOVWF 0D
001C: CLRF 0C
001D: DECFSZ 0C,F
001E: GOTO 01D
001F: DECFSZ 0D,F
0020: GOTO 01C
0021: MOVLW 4A
0022: MOVWF 0C
0023: DECFSZ 0C,F
0024: GOTO 023
0025: NOP
0026: NOP
0027: DECFSZ 00,F
0028: GOTO 01A
0029: RETLW 00
.................... #fuses XT,NOWDT,PUT
....................
....................
.................... #include "..\common.h"
.................... #DEFINE OSA_X 1 // adresy os
.................... #DEFINE OSA_Y 2
.................... #DEFINE TLs 3
.................... #DEFINE IMPULS 250 // sirka impulsu
.................... #DEFINE SYNC_NIBBLE 0b1111 // magiske cislo sync niblu
....................
....................
.................... #DEFINE LCD_RS PIN_B1 // rizeni registru LCD displeje
.................... #DEFINE LCD_E PIN_B0 // enable LCD displeje
.................... #DEFINE LCD_DATA_LSB PIN_B2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
.................... #INCLUDE "MYLCD.C"
.................... // LCD modul pro ovladani dvouradkoveho LCD modulu se standardnim Hitachi radicem
.................... // (c)miho 2002
.................... //
.................... // Historie:
.................... //
.................... // 0.0 Uvodni verze se snadnou definici portu LCD displeje
.................... //
.................... //
.................... // Funkce:
.................... //
.................... // lcd_init() inicializuje LCD displej a porty, nutno volat jako prvni
.................... //
.................... // lcd_putc(c) zapis snaku do lcd displeje, zpracovava nasledujici ridici znaky
.................... // \f = \x0C - nova stranka - smazani displeje
.................... // \n = \x0A - odradkovani (prechod na druhou radku)
.................... // \b = \x08 - backspace - posunuti kurzoru o 1 pozici zpet
.................... // \r = \x0D - goto home to position 1,1
.................... // \0 .. \7 - definovatelne znaky v pozicich 0 az 7 v CGRAM
.................... // \20 .. \27 - alternativne zapsane znaky (oktalove) v pozicich 0 az 7 CGRAM
.................... // Pozor na to, ze funkce printf konci tisk pokud narazi na \0 (konec retezce)
.................... //
.................... // lcd_gotoxy(x,y) presune kurzor na uvedenou adresu
.................... // nekontroluje parametry
.................... //
.................... // lcd_cursor_on zapne kurzor
.................... // lcd_cursor_off vypne kurzor
.................... //
.................... // lcd_define_char(Index, Def) Makro, ktere definuje znaky od pozice Index obsahem definicniho
.................... // retezce Def. Kazdych 8 znaku retezce Def definuje dalsi znak v CGRAM.
.................... // Kapacita CGRAM je celkem 8 znaku s indexem 0 az 7.
.................... // Na konci se provede lcd_gotoxy(1,1).
.................... // Na konci teto knihovny je priklad pouziti definovanych znaku
.................... //
.................... // Definice portu:
.................... //
.................... // #DEFINE LCD_RS PIN_B2 // rizeni registru LCD displeje
.................... // #DEFINE LCD_E PIN_B1 // enable LCD displeje
.................... // #DEFINE LCD_DATA_LSB PIN_C2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
....................
....................
....................
....................
.................... // Privatni sekce, cist jen v pripade, ze neco nefunguje
....................
....................
....................
....................
.................... // Generovane defince portu pro ucely teto knihovny aby kod generoval spravne IO operace a soucasne
.................... // bylo mozne jednoduse deklarovat pripojene piny LCD displeje pri pouziti teto knihovny. Problem spociva
.................... // v tom, ze se musi spravne ridit smery portu a soucasne datovy port zabira jen 4 bity ze zadaneho portu
.................... //
.................... #DEFINE LCD_SHIFT (LCD_DATA_LSB&7) // pocet bitu posuvu dataoveho kanalu v datovem portu
.................... #DEFINE LCD_PORT (LCD_DATA_LSB>>3) // adresa LCD datoveho portu
.................... #DEFINE LCD_TRIS (LCD_PORT+0x80) // adresa prislusneho TRIS registru
.................... #DEFINE LCD_MASK (0xF<<LCD_SHIFT) // maska platnych bitu
.................... //
.................... #IF LCD_SHIFT>4 // kontrola mezi
.................... #ERROR LCD data port LSB bit not in range 0..4
.................... #ENDIF
....................
....................
.................... // Definice konstant pro LCD display
.................... //
.................... #define LCD_CURSOR_ON_ 0x0E // kurzor jako blikajici radka pod znakem
.................... #define LCD_CURSOR_OFF_ 0x0C // zadny kurzor
.................... #define LCD_LINE_2 0x40 // adresa 1. znaku 2. radky
....................
....................
.................... // Definice rezimu LCD displeje
.................... //
.................... BYTE const LCD_INIT_STRING[4] =
.................... {
.................... 0x28, // intrfejs 4 bity, 2 radky, font 5x7
.................... LCD_CURSOR_OFF_, // display on, kurzor off,
.................... 0x01, // clear displeje
.................... 0x06 // inkrement pozice kurzoru (posun kurzoru doprava)
.................... };
*
0004: BCF 0A.0
0005: BCF 0A.1
0006: BCF 0A.2
0007: ADDWF 02,F
0008: RETLW 28
0009: RETLW 0C
000A: RETLW 01
000B: RETLW 06
....................
....................
.................... // Odesle nibble do displeje (posle data a klikne signalem e)
.................... //
.................... void lcd_send_nibble( BYTE n )
.................... {
.................... *LCD_PORT = (*LCD_PORT & ~LCD_MASK) | ((n << LCD_SHIFT) & LCD_MASK); // nastav datove bity portu a ostatni zachovej
*
002A: MOVF 06,W
002B: ANDLW C3
002C: MOVWF 23
002D: RLF 22,W
002E: MOVWF 0C
002F: RLF 0C,F
0030: MOVLW FC
0031: ANDWF 0C,F
0032: MOVF 0C,W
0033: ANDLW 3C
0034: IORWF 23,W
0035: MOVWF 06
.................... output_bit(LCD_E,1); // vzestupna hrana
0036: BSF 06.0
0037: BSF 03.5
0038: BCF 06.0
.................... delay_us(1); // pockej alespon 450ns od e nebo alespon 195ns od dat
0039: NOP
.................... output_bit(LCD_E,0); // sestupna hrana (minimalni perioda e je 1us)
003A: BCF 03.5
003B: BCF 06.0
003C: BSF 03.5
003D: BCF 06.0
003E: BCF 03.5
003F: RETLW 00
.................... }
....................
....................
.................... // Odesle bajt do registru LCD
.................... //
.................... // Pokud je Adr=0 .. instrukcni registr
.................... // Pokud je Adr=1 .. datovy registr
.................... //
.................... void lcd_send_byte( BOOLEAN Adr, BYTE n )
.................... {
.................... output_bit(LCD_RS,Adr); // vyber registr
0040: MOVF 20,F
0041: BTFSS 03.2
0042: GOTO 045
0043: BCF 06.1
0044: GOTO 046
0045: BSF 06.1
0046: BSF 03.5
0047: BCF 06.1
.................... swap(n);
0048: BCF 03.5
0049: SWAPF 21,F
.................... lcd_send_nibble(n); // posli horni pulku bajtu
004A: MOVF 21,W
004B: MOVWF 22
004C: CALL 02A
.................... swap(n);
004D: SWAPF 21,F
.................... lcd_send_nibble(n); // posli spodni pulku bajtu
004E: MOVF 21,W
004F: MOVWF 22
0050: CALL 02A
.................... delay_us(40); // minimalni doba na provedeni prikazu
0051: MOVLW 0D
0052: MOVWF 0C
0053: DECFSZ 0C,F
0054: GOTO 053
0055: RETLW 00
.................... }
....................
....................
.................... // Provede inicializaci LCD displeje, smaze obsah a nastavi mod displeje
.................... //
.................... // Tato procedura se musi volat pred pouzitim ostatnich lcd_ procedur
.................... //
.................... void lcd_init()
.................... {
....................
.................... int i; // pocitadlo cyklu
....................
.................... delay_ms(20); // spozdeni pro provedeni startu displeje po zapnuti napajeni
0056: MOVLW 14
0057: MOVWF 1C
0058: CALL 015
....................
.................... *LCD_TRIS = *LCD_TRIS & ~LCD_MASK; // nuluj odpovidajici bity tris registru datoveho portu LCD
0059: MOVLW C3
005A: BSF 03.5
005B: ANDWF 06,F
....................
.................... output_bit(LCD_RS,0); // nastav jako vystup a nastav klidovy stav
005C: BCF 03.5
005D: BCF 06.1
005E: BSF 03.5
005F: BCF 06.1
.................... output_bit(LCD_E,0); // nastav jako vystup a nastav klidovy stav
0060: BCF 03.5
0061: BCF 06.0
0062: BSF 03.5
0063: BCF 06.0
....................
.................... for (i=0; i<3; i++) // nastav lcd do rezimu 8 bitu sbernice
0064: BCF 03.5
0065: CLRF 19
0066: MOVF 19,W
0067: SUBLW 02
0068: BTFSS 03.0
0069: GOTO 072
.................... {
.................... delay_ms(2); // muze byt rozdelany prenos dat (2x 4 bity) nebo pomaly povel
006A: MOVLW 02
006B: MOVWF 1C
006C: CALL 015
.................... lcd_send_nibble(3); // rezim 8 bitu
006D: MOVLW 03
006E: MOVWF 22
006F: CALL 02A
.................... }
0070: INCF 19,F
0071: GOTO 066
....................
.................... delay_us(40); // cas na zpracovani
0072: MOVLW 0D
0073: MOVWF 0C
0074: DECFSZ 0C,F
0075: GOTO 074
.................... lcd_send_nibble(2); // nastav rezim 4 bitu (plati od nasledujiciho prenosu)
0076: MOVLW 02
0077: MOVWF 22
0078: CALL 02A
.................... delay_us(40); // cas na zpracovani
0079: MOVLW 0D
007A: MOVWF 0C
007B: DECFSZ 0C,F
007C: GOTO 07B
....................
.................... for (i=0;i<3;i++) // proved inicializaci (nastaveni modu, smazani apod)
007D: CLRF 19
007E: MOVF 19,W
007F: SUBLW 02
0080: BTFSS 03.0
0081: GOTO 08E
.................... {
.................... lcd_send_byte(0,LCD_INIT_STRING[i]);
0082: MOVF 19,W
0083: CALL 004
0084: MOVWF 1A
0085: CLRF 20
0086: MOVF 1A,W
0087: MOVWF 21
0088: CALL 040
.................... delay_ms(2);
0089: MOVLW 02
008A: MOVWF 1C
008B: CALL 015
.................... }
008C: INCF 19,F
008D: GOTO 07E
008E: GOTO 1D2 (RETURN)
.................... }
....................
....................
.................... // Proved presun kurzoru
.................... //
.................... // Pozice 1.1 je domu
.................... //
.................... void lcd_gotoxy( BYTE x, BYTE y)
.................... {
....................
.................... BYTE Adr;
....................
.................... Adr=x-1;
008F: MOVLW 01
0090: SUBWF 1C,W
0091: MOVWF 1E
.................... if(y==2)
0092: MOVF 1D,W
0093: SUBLW 02
0094: BTFSS 03.2
0095: GOTO 098
.................... Adr+=LCD_LINE_2;
0096: MOVLW 40
0097: ADDWF 1E,F
....................
.................... lcd_send_byte(0,0x80|Adr);
0098: MOVF 1E,W
0099: IORLW 80
009A: MOVWF 1F
009B: CLRF 20
009C: MOVF 1F,W
009D: MOVWF 21
009E: CALL 040
009F: RETLW 00
.................... }
....................
....................
.................... // Zapis znaku na displej, zpracovani ridicich znaku
.................... //
.................... void lcd_putc( char c)
.................... {
....................
.................... switch (c)
00A0: MOVF 1B,W
00A1: MOVWF 0C
00A2: MOVLW 0C
00A3: SUBWF 0C,W
00A4: BTFSC 03.2
00A5: GOTO 0B3
00A6: MOVLW 0A
00A7: SUBWF 0C,W
00A8: BTFSC 03.2
00A9: GOTO 0BB
00AA: MOVLW 0D
00AB: SUBWF 0C,W
00AC: BTFSC 03.2
00AD: GOTO 0C1
00AE: MOVLW 08
00AF: SUBWF 0C,W
00B0: BTFSC 03.2
00B1: GOTO 0C6
00B2: GOTO 0CB
.................... {
.................... case '\f' : lcd_send_byte(0,1); // smaz displej
00B3: CLRF 20
00B4: MOVLW 01
00B5: MOVWF 21
00B6: CALL 040
.................... delay_ms(2);
00B7: MOVLW 02
00B8: MOVWF 1C
00B9: CALL 015
.................... break;
00BA: GOTO 0D7
.................... case '\n' : lcd_gotoxy(1,2); break; // presun se na 1. znak 2. radky
00BB: MOVLW 01
00BC: MOVWF 1C
00BD: MOVLW 02
00BE: MOVWF 1D
00BF: CALL 08F
00C0: GOTO 0D7
.................... case '\r' : lcd_gotoxy(1,1); break; // presun home
00C1: MOVLW 01
00C2: MOVWF 1C
00C3: MOVWF 1D
00C4: CALL 08F
00C5: GOTO 0D7
.................... case '\b' : lcd_send_byte(0,0x10); break; // posun kurzor o 1 zpet
00C6: CLRF 20
00C7: MOVLW 10
00C8: MOVWF 21
00C9: CALL 040
00CA: GOTO 0D7
.................... default : if (c<0x20) c&=0x7; // preklopeni definovatelnych znaku na rozsah 0 az 0x1F
00CB: MOVF 1B,W
00CC: SUBLW 1F
00CD: BTFSS 03.0
00CE: GOTO 0D1
00CF: MOVLW 07
00D0: ANDWF 1B,F
.................... lcd_send_byte(1,c); break; // zapis znak
00D1: MOVLW 01
00D2: MOVWF 20
00D3: MOVF 1B,W
00D4: MOVWF 21
00D5: CALL 040
00D6: GOTO 0D7
.................... }
00D7: RETLW 00
.................... }
....................
....................
.................... // Zapni kurzor
.................... //
.................... void lcd_cursor_on()
.................... {
.................... lcd_send_byte(0,LCD_CURSOR_ON_);
.................... }
....................
....................
.................... // Vypni kurzor
.................... //
.................... void lcd_cursor_off()
.................... {
.................... lcd_send_byte(0,LCD_CURSOR_OFF_);
.................... }
....................
....................
.................... // Definice vlastnich fontu
.................... //
.................... // Vlastnich definic muze byt jen 8 do pozic 0 az 7 pameti CGRAM radice lcd displeje
.................... // Pro snadne definovani jsou pripraveny nasledujici definice a na konci souboru je uveden
.................... // priklad pouziti definovanych znaku.
....................
....................
.................... // Pomocna procedura pro posilani ridicich dat do radice displeje
.................... //
.................... void lcd_putc2(int Data)
.................... {
.................... lcd_send_byte(1,Data);
.................... }
....................
....................
.................... // Pomocne definice pro programovani obsahu CGRAM
.................... //
.................... #DEFINE lcd_define_start(Code) lcd_send_byte(0,0x40+(Code<<3)); delay_ms(2)
.................... #DEFINE lcd_define_def(String) printf(lcd_putc2,String);
.................... #DEFINE lcd_define_end() lcd_send_byte(0,3); delay_ms(2)
....................
....................
.................... // Vlastni vykonne makro pro definovani fontu do pozice Index CGRAM s definicnim retezcem Def
.................... //
.................... #DEFINE lcd_define_char(Index, Def) lcd_define_start(Index); lcd_define_def(Def); lcd_define_end();
....................
....................
.................... // Pripravene definice fontu vybranych znaku
.................... // V tabulce nesmi byt 00 (konec retezce v printf()), misto toho davame 80
.................... //
.................... #DEFINE LCD_CHAR_BAT100 "\x0E\x1F\x1F\x1F\x1F\x1F\x1F\x1F" /* symbol plne baterie */
.................... #DEFINE LCD_CHAR_BAT50 "\x0E\x1F\x11\x11\x13\x17\x1F\x1F" /* symbol polovicni baterie */
.................... #DEFINE LCD_CHAR_BAT0 "\x0E\x1F\x11\x11\x11\x11\x11\x1F" /* symbol vybite baterie */
.................... #DEFINE LCD_CHAR_LUA "\x04\x0E\x11\x11\x1F\x11\x11\x80" /* A s carkou */
.................... #DEFINE LCD_CHAR_LLA "\x01\x02\x0E\x01\x1F\x11\x0F\x80" /* a s carkou */
.................... #DEFINE LCD_CHAR_HUC "\x0A\x0E\x11\x10\x10\x11\x0E\x80" /* C s hackem */
.................... #DEFINE LCD_CHAR_HLC "\x0A\x04\x0E\x10\x10\x11\x0E\x80" /* c s hackem */
.................... #DEFINE LCD_CHAR_HUD "\x0A\x1C\x12\x11\x11\x12\x1C\x80" /* D s hackem */
.................... #DEFINE LCD_CHAR_HLD "\x05\x03\x0D\x13\x11\x11\x0F\x80" /* d s hackem */
.................... #DEFINE LCD_CHAR_LUE "\x04\x1F\x10\x10\x1E\x10\x1F\x80" /* E s carkou */
.................... #DEFINE LCD_CHAR_LLE "\x01\x02\x0E\x11\x1F\x10\x0E\x80" /* e s carkou */
.................... #DEFINE LCD_CHAR_HUE "\x0A\x1F\x10\x1E\x10\x10\x1F\x80" /* E s hackem */
.................... #DEFINE LCD_CHAR_HLE "\x0A\x04\x0E\x11\x1F\x10\x0E\x80" /* e s hackem */
.................... #DEFINE LCD_CHAR_LUI "\x04\x0E\x04\x04\x04\x04\x0E\x80" /* I s carkou */
.................... #DEFINE LCD_CHAR_LLI "\x02\x04\x80\x0C\x04\x04\x0E\x80" /* i s carkou */
.................... #DEFINE LCD_CHAR_HUN "\x0A\x15\x11\x19\x15\x13\x11\x80" /* N s hackem */
.................... #DEFINE LCD_CHAR_HLN "\x0A\x04\x16\x19\x11\x11\x11\x80" /* n s hackem */
.................... #DEFINE LCD_CHAR_LUO "\x04\x0E\x11\x11\x11\x11\x0E\x80" /* O s carkou */
.................... #DEFINE LCD_CHAR_LLO "\x02\x04\x0E\x11\x11\x11\x0E\x80" /* o s carkou */
.................... #DEFINE LCD_CHAR_HUR "\x0A\x1E\x11\x1E\x14\x12\x11\x80" /* R s hackem */
.................... #DEFINE LCD_CHAR_HLR "\x0A\x04\x16\x19\x10\x10\x10\x80" /* r s hackem */
.................... #DEFINE LCD_CHAR_HUS "\x0A\x0F\x10\x0E\x01\x01\x1E\x80" /* S s hackem */
.................... #DEFINE LCD_CHAR_HLS "\x0A\x04\x0E\x10\x0E\x01\x1E\x80" /* s s hackem */
.................... #DEFINE LCD_CHAR_HUT "\x0A\x1F\x04\x04\x04\x04\x04\x80" /* T s hackem */
.................... #DEFINE LCD_CHAR_HLT "\x0A\x0C\x1C\x08\x08\x09\x06\x80" /* t s hackem */
.................... #DEFINE LCD_CHAR_LUU "\x02\x15\x11\x11\x11\x11\x0E\x80" /* U s carkou */
.................... #DEFINE LCD_CHAR_LLU "\x02\x04\x11\x11\x11\x13\x0D\x80" /* u s carkou */
.................... #DEFINE LCD_CHAR_CUU "\x06\x17\x11\x11\x11\x11\x0E\x80" /* U s krouzkem */
.................... #DEFINE LCD_CHAR_CLU "\x06\x06\x11\x11\x11\x11\x0E\x80" /* u s krouzkem */
.................... #DEFINE LCD_CHAR_LUY "\x02\x15\x11\x0A\x04\x04\x04\x80" /* Y s carkou */
.................... #DEFINE LCD_CHAR_LLY "\x02\x04\x11\x11\x0F\x01\x0E\x80" /* y s carkou */
.................... #DEFINE LCD_CHAR_HUZ "\x0A\x1F\x01\x02\x04\x08\x1F\x80" /* Z s hackem */
.................... #DEFINE LCD_CHAR_HLZ "\x0A\x04\x1F\x02\x04\x08\x1F\x80" /* z s hackem */
....................
....................
.................... // Priklad pouziti definovanych znaku
.................... //
.................... //
.................... //void lcd_sample()
.................... //{
.................... // lcd_define_char(0,LCD_CHAR_BAT50); // Priklad definice znaku baterie do pozice 0
.................... // lcd_define_char(2,LCD_CHAR_HLE LCD_CHAR_LUI); // Priklad definice znaku e s hackem a I s carkou od pozice 2
.................... // // vsimnete si, ze neni carka mezi retezci s definici (oba retezce definuji
.................... // // jediny definicni retezec)
.................... // printf(lcd_putc,"\fZnaky:\20\22\23"); // priklad vypisu znaku z pozice 0, 2 a 3
.................... // delay_ms(1000);
.................... // lcd_define_char(0,LCD_CHAR_BAT0); // Predefinovani tvaru znaku v pozici 0
.................... // delay_ms(1000);
.................... //}
....................
....................
.................... #DEFINE PRIJIMAC PIN_A3 // pin na ktery je pripojen prijimac
.................... #DEFINE SERVO_X PIN_A0 // pin na ktery je pripojeno servo
.................... #DEFINE SERVO_Y PIN_A1
....................
....................
.................... // Prijme datovy nibble vcetne zasynchronizovani
.................... // Chybi dodelat timeout
.................... int8 prijmi_nibble(int8* datovy, int8* data)
.................... {
.................... int8 i;
....................
.................... #IFDEF DEBUG
.................... int1 tmp;
.................... #ENDIF
....................
.................... *data=0;
00D8: MOVF 1E,W
00D9: MOVWF 04
00DA: CLRF 00
....................
.................... // Cekam na dlouhou nulu
.................... for (i=4; i>0; i--)
00DB: MOVLW 04
00DC: MOVWF 1F
00DD: MOVF 1F,F
00DE: BTFSC 03.2
00DF: GOTO 0EE
.................... {
.................... if (input(PRIJIMAC)) i=4;
00E0: BSF 03.5
00E1: BSF 05.3
00E2: BCF 03.5
00E3: BTFSS 05.3
00E4: GOTO 0E7
00E5: MOVLW 04
00E6: MOVWF 1F
.................... delay_us(IMPULS/2);
00E7: MOVLW 29
00E8: MOVWF 0C
00E9: DECFSZ 0C,F
00EA: GOTO 0E9
00EB: NOP
.................... }
00EC: DECF 1F,F
00ED: GOTO 0DD
....................
.................... // Cekam na jednicku (start ramce)
.................... for (; !input(PRIJIMAC); )
00EE: BSF 03.5
00EF: BSF 05.3
00F0: BCF 03.5
00F1: BTFSS 05.3
.................... {
.................... }
00F2: GOTO 0EE
....................
.................... // Ctu typ nibblu
.................... delay_us(2*IMPULS+2*IMPULS/3);
00F3: MOVLW DD
00F4: MOVWF 0C
00F5: DECFSZ 0C,F
00F6: GOTO 0F5
00F7: NOP
00F8: NOP
.................... *datovy=input(PRIJIMAC);
00F9: MOVF 1D,W
00FA: MOVWF 04
00FB: BSF 03.5
00FC: BSF 05.3
00FD: MOVLW 00
00FE: BCF 03.5
00FF: BTFSC 05.3
0100: MOVLW 01
0101: MOVWF 00
....................
.................... // Prenasim bity
.................... for (i=0; i<4; i++)
0102: CLRF 1F
0103: MOVF 1F,W
0104: SUBLW 03
0105: BTFSS 03.0
0106: GOTO 128
.................... {
.................... delay_us(2*IMPULS);
0107: MOVLW A6
0108: MOVWF 0C
0109: DECFSZ 0C,F
010A: GOTO 109
010B: NOP
.................... *data >>= 1;
010C: MOVF 1E,W
010D: MOVWF 04
010E: BCF 03.0
010F: RRF 00,W
0110: MOVWF 0C
0111: MOVWF 00
.................... if (input(PRIJIMAC)) *data +=0b1000;
0112: BSF 03.5
0113: BSF 05.3
0114: BCF 03.5
0115: BTFSS 05.3
0116: GOTO 11C
0117: MOVF 1E,W
0118: MOVWF 04
0119: MOVLW 08
011A: ADDWF 00,W
011B: MOVWF 00
....................
.................... #IFDEF DEBUG
.................... output_bit(DEBUG,tmp);
011C: BTFSC 20.0
011D: GOTO 120
011E: BCF 05.2
011F: GOTO 121
0120: BSF 05.2
0121: BSF 03.5
0122: BCF 05.2
.................... tmp=!tmp;
0123: MOVLW 01
0124: BCF 03.5
0125: XORWF 20,F
.................... #ELSE
.................... delay_us(20);
.................... #ENDIF
.................... }
0126: INCF 1F,F
0127: GOTO 103
....................
.................... return FALSE;
0128: MOVLW 00
0129: MOVWF 0D
012A: RETLW 00
.................... }
....................
....................
.................... // Prijme datovy ramec
.................... // Pokud nastane chyba vraci TRUE
.................... int8 prijmi_ramec(int8* kanal, int8* data)
.................... {
.................... int8 datovy;
.................... int8 suma;
....................
.................... // Cekej na synchronizacni nibble
.................... do
.................... {
.................... if (prijmi_nibble(&datovy, data)) return 1; // chyba timout
012B: MOVLW 1B
012C: MOVWF 1D
012D: MOVF 1A,W
012E: MOVWF 1E
012F: CALL 0D8
0130: MOVF 0D,F
0131: BTFSC 03.2
0132: GOTO 136
0133: MOVLW 01
0134: MOVWF 0D
0135: GOTO 186
.................... }
.................... while(datovy);
0136: MOVF 1B,F
0137: BTFSS 03.2
0138: GOTO 12B
....................
.................... // Zkontroluj magickou hodnotu
.................... if (*data != SYNC_NIBBLE) return 2; // chyba magickeho kodu ramce
0139: MOVF 1A,W
013A: MOVWF 04
013B: MOVF 00,W
013C: SUBLW 0F
013D: BTFSC 03.2
013E: GOTO 142
013F: MOVLW 02
0140: MOVWF 0D
0141: GOTO 186
....................
.................... // Prijmi cislo kanalu
.................... if (prijmi_nibble(&datovy, kanal)) return 1; // chyba timeout
0142: MOVLW 1B
0143: MOVWF 1D
0144: MOVF 19,W
0145: MOVWF 1E
0146: CALL 0D8
0147: MOVF 0D,F
0148: BTFSC 03.2
0149: GOTO 14D
014A: MOVLW 01
014B: MOVWF 0D
014C: GOTO 186
.................... if (!datovy) return 3; // chyba typu nibblu
014D: MOVF 1B,F
014E: BTFSS 03.2
014F: GOTO 153
0150: MOVLW 03
0151: MOVWF 0D
0152: GOTO 186
....................
.................... // Prijmi data
.................... if (prijmi_nibble(&datovy, data)) return 1; // chyba timeout
0153: MOVLW 1B
0154: MOVWF 1D
0155: MOVF 1A,W
0156: MOVWF 1E
0157: CALL 0D8
0158: MOVF 0D,F
0159: BTFSC 03.2
015A: GOTO 15E
015B: MOVLW 01
015C: MOVWF 0D
015D: GOTO 186
.................... if (!datovy) return 3; // chyba typu nibblu
015E: MOVF 1B,F
015F: BTFSS 03.2
0160: GOTO 164
0161: MOVLW 03
0162: MOVWF 0D
0163: GOTO 186
....................
.................... // Prijmi zabezpeceni
.................... if (prijmi_nibble(&datovy, &suma)) return 1; // chyba timeout
0164: MOVLW 1B
0165: MOVWF 1D
0166: MOVLW 1C
0167: MOVWF 1E
0168: CALL 0D8
0169: MOVF 0D,F
016A: BTFSC 03.2
016B: GOTO 16F
016C: MOVLW 01
016D: MOVWF 0D
016E: GOTO 186
.................... if (!datovy) return 3; // chyba typu nibblu
016F: MOVF 1B,F
0170: BTFSS 03.2
0171: GOTO 175
0172: MOVLW 03
0173: MOVWF 0D
0174: GOTO 186
....................
.................... // Zkontroluj kontrolni soucet
....................
....................
.................... //lcd_gotoxy(1,1);
.................... //printf(lcd_putc,"R:%3U %3U %3U ",*kanal,*data,suma);
.................... //delay_ms(1000);
....................
....................
.................... if (((*kanal+*data) & 0b1111) != suma) return 3; // chyba kontrolniho souctu
0175: MOVF 19,W
0176: MOVWF 04
0177: MOVF 00,W
0178: MOVWF 1D
0179: MOVF 1A,W
017A: MOVWF 04
017B: MOVF 00,W
017C: ADDWF 1D,W
017D: ANDLW 0F
017E: SUBWF 1C,W
017F: BTFSC 03.2
0180: GOTO 184
0181: MOVLW 03
0182: MOVWF 0D
0183: GOTO 186
....................
.................... return 0;
0184: MOVLW 00
0185: MOVWF 0D
0186: GOTO 1FA (RETURN)
.................... }
....................
....................
....................
.................... int8 x,y;
.................... int8 xc,yc; // pocitadla aktualizace x a y
.................... int e1,e2,e3,e4; // pocitadla chyb - ladici
....................
.................... void main()
.................... {
*
01CE: CLRF 04
01CF: MOVLW 1F
01D0: ANDWF 03,F
.................... lcd_init(); // zinicializuj LCD display
01D1: GOTO 056
.................... delay_ms(5);
01D2: MOVLW 05
01D3: MOVWF 1C
01D4: CALL 015
.................... printf(lcd_putc,"Ahoj...");
*
000C: BCF 0A.0
000D: BCF 0A.1
000E: BCF 0A.2
000F: ADDWF 02,F
0010: RETLW 41
0011: RETLW 68
0012: RETLW 6F
0013: RETLW 6A
0014: RETLW 00
*
01D5: CLRF 19
01D6: MOVF 19,W
01D7: CALL 00C
01D8: INCF 19,F
01D9: MOVWF 1B
01DA: CALL 0A0
01DB: MOVLW 04
01DC: SUBWF 19,W
01DD: BTFSS 03.2
01DE: GOTO 1D6
01DF: MOVLW 03
01E0: MOVWF 1A
01E1: MOVLW 2E
01E2: MOVWF 1B
01E3: CALL 0A0
01E4: DECFSZ 1A,F
01E5: GOTO 1E1
.................... delay_ms(300);
01E6: MOVLW 02
01E7: MOVWF 19
01E8: MOVLW 96
01E9: MOVWF 1C
01EA: CALL 015
01EB: DECFSZ 19,F
01EC: GOTO 1E8
....................
.................... x = 0;
01ED: CLRF 0E
.................... y = 0;
01EE: CLRF 0F
.................... xc=0;
01EF: CLRF 10
.................... yc=0;
01F0: CLRF 11
.................... e1=0;
01F1: CLRF 12
.................... e2=0;
01F2: CLRF 13
.................... e3=0;
01F3: CLRF 14
.................... e4=0;
01F4: CLRF 15
....................
.................... while (true)
.................... {
.................... int8 kanal, data, e;
.................... /* int8 kanal, data, suma;
.................... int1 tmp;
.................... int8 datovy;
....................
.................... decoder:
....................
.................... if (prijmi_nibble(&datovy,&kanal)) goto decoder;
.................... if (datovy) goto decoder;
....................
.................... // if (kanal!=15) {e1++; goto decoder;};
.................... if (prijmi_nibble(&datovy, &kanal)) goto decoder; // nacti identifikator osy
....................
.................... if (prijmi_nibble(&datovy, &data)) goto decoder; // nacti 1. nibble; pri chybe zacni znovu
.................... if (prijmi_nibble(&datovy, &suma)) goto decoder; // nacti 2. nibble; pri chybe zacni znovu
.................... if (((kanal+data) & 0b1111) != suma) {e1++; goto decoder;} // zacni znovu, pokud jsou ruzne nibble
....................
.................... */
.................... e = prijmi_ramec(&kanal,&data);
01F5: MOVLW 16
01F6: MOVWF 19
01F7: MOVLW 17
01F8: MOVWF 1A
01F9: GOTO 12B
01FA: MOVF 0D,W
01FB: MOVWF 18
.................... //lcd_gotoxy(1,1);
.................... //printf(lcd_putc,"Q:%3U %3U %3U ",kanal,data,e);
.................... //delay_ms(1000);
.................... if (!e)
01FC: MOVF 18,F
01FD: BTFSS 03.2
01FE: GOTO 210
.................... switch (kanal) // rozeskoc se podle adresy osy
01FF: MOVLW 01
0200: SUBWF 16,W
0201: ADDLW FD
0202: BTFSC 03.0
0203: GOTO 210
0204: ADDLW 03
0205: GOTO 2A8
.................... {
.................... case OSA_X:
.................... {
.................... x=data;
0206: MOVF 17,W
0207: MOVWF 0E
.................... xc++;
0208: INCF 10,F
.................... break;
0209: GOTO 210
.................... };
.................... case OSA_Y:
.................... {
.................... y=data;
020A: MOVF 17,W
020B: MOVWF 0F
.................... yc++;
020C: INCF 11,F
.................... break;
020D: GOTO 210
.................... };
.................... case TLs:
.................... {
.................... e4++;
020E: INCF 15,F
.................... break;
020F: GOTO 210
.................... };
.................... };
*
02A8: BCF 0A.0
02A9: BSF 0A.1
02AA: BCF 0A.2
02AB: ADDWF 02,F
02AC: GOTO 206
02AD: GOTO 20A
02AE: GOTO 20E
....................
.................... // ladici vypisy
.................... lcd_gotoxy(1,1); // vytiskni X a Y
*
0210: MOVLW 01
0211: MOVWF 1C
0212: MOVWF 1D
0213: CALL 08F
.................... printf(lcd_putc,"X%2U %3U%3U%3U ", x, xc, e1, e);
*
019C: MOVF 0D,W
019D: MOVF 19,W
019E: MOVWF 1B
019F: MOVLW 64
01A0: MOVWF 1C
01A1: CALL 187
01A2: MOVF 0C,W
01A3: MOVWF 19
01A4: MOVF 0D,W
01A5: MOVLW 30
01A6: BTFSS 03.2
01A7: GOTO 1AF
01A8: BTFSC 1A.0
01A9: BSF 1A.3
01AA: BTFSC 1A.3
01AB: GOTO 1B5
01AC: BTFSC 1A.4
01AD: MOVLW 20
01AE: GOTO 1B1
01AF: BCF 1A.3
01B0: BCF 1A.4
01B1: ADDWF 0D,F
01B2: MOVF 0D,W
01B3: MOVWF 1B
01B4: CALL 0A0
01B5: MOVF 19,W
01B6: MOVWF 1B
01B7: MOVLW 0A
01B8: MOVWF 1C
01B9: CALL 187
01BA: MOVF 0C,W
01BB: MOVWF 19
01BC: MOVF 0D,W
01BD: MOVLW 30
01BE: BTFSS 03.2
01BF: GOTO 1C4
01C0: BTFSC 1A.3
01C1: GOTO 1C8
01C2: BTFSC 1A.4
01C3: MOVLW 20
01C4: ADDWF 0D,F
01C5: MOVF 0D,W
01C6: MOVWF 1B
01C7: CALL 0A0
01C8: MOVLW 30
01C9: ADDWF 19,F
01CA: MOVF 19,W
01CB: MOVWF 1B
01CC: CALL 0A0
01CD: RETLW 00
*
0214: MOVLW 58
0215: MOVWF 1B
0216: CALL 0A0
0217: MOVF 0E,W
0218: MOVWF 19
0219: MOVLW 11
021A: MOVWF 1A
021B: CALL 19C
021C: MOVLW 20
021D: MOVWF 1B
021E: CALL 0A0
021F: MOVF 10,W
0220: MOVWF 19
0221: MOVLW 10
0222: MOVWF 1A
0223: CALL 19C
0224: MOVF 12,W
0225: MOVWF 19
0226: MOVLW 10
0227: MOVWF 1A
0228: CALL 19C
0229: MOVF 18,W
022A: MOVWF 19
022B: MOVLW 10
022C: MOVWF 1A
022D: CALL 19C
022E: MOVLW 20
022F: MOVWF 1B
0230: CALL 0A0
0231: MOVLW 20
0232: MOVWF 1B
0233: CALL 0A0
.................... lcd_gotoxy(1,2);
0234: MOVLW 01
0235: MOVWF 1C
0236: MOVLW 02
0237: MOVWF 1D
0238: CALL 08F
.................... printf(lcd_putc,"Y%2U %3U%3U%3U ", y, yc, e3, data);
0239: MOVLW 59
023A: MOVWF 1B
023B: CALL 0A0
023C: MOVF 0F,W
023D: MOVWF 19
023E: MOVLW 11
023F: MOVWF 1A
0240: CALL 19C
0241: MOVLW 20
0242: MOVWF 1B
0243: CALL 0A0
0244: MOVF 11,W
0245: MOVWF 19
0246: MOVLW 10
0247: MOVWF 1A
0248: CALL 19C
0249: MOVF 14,W
024A: MOVWF 19
024B: MOVLW 10
024C: MOVWF 1A
024D: CALL 19C
024E: MOVF 17,W
024F: MOVWF 19
0250: MOVLW 10
0251: MOVWF 1A
0252: CALL 19C
0253: MOVLW 20
0254: MOVWF 1B
0255: CALL 0A0
0256: MOVLW 20
0257: MOVWF 1B
0258: CALL 0A0
....................
.................... // ovladani serv
.................... output_high(SERVO_X);
0259: BSF 03.5
025A: BCF 05.0
025B: BCF 03.5
025C: BSF 05.0
.................... delay_ms(1);
025D: MOVLW 01
025E: MOVWF 1C
025F: CALL 015
.................... for (data=x; data--; data>0)
0260: MOVF 0E,W
0261: MOVWF 17
0262: MOVF 17,W
0263: DECF 17,F
0264: XORLW 00
0265: BTFSC 03.2
0266: GOTO 271
.................... delay_us(65);
0267: MOVLW 15
0268: MOVWF 0C
0269: DECFSZ 0C,F
026A: GOTO 269
026B: NOP
026C: MOVF 17,F
026D: BTFSS 03.2
026E: GOTO 270
026F: MOVLW 00
0270: GOTO 262
.................... output_low(SERVO_X);
0271: BSF 03.5
0272: BCF 05.0
0273: BCF 03.5
0274: BCF 05.0
....................
.................... output_high(SERVO_Y);
0275: BSF 03.5
0276: BCF 05.1
0277: BCF 03.5
0278: BSF 05.1
.................... delay_ms(1);
0279: MOVLW 01
027A: MOVWF 1C
027B: CALL 015
.................... for (data=y; data--; data>0)
027C: MOVF 0F,W
027D: MOVWF 17
027E: MOVF 17,W
027F: DECF 17,F
0280: XORLW 00
0281: BTFSC 03.2
0282: GOTO 28D
.................... delay_us(65);
0283: MOVLW 15
0284: MOVWF 0C
0285: DECFSZ 0C,F
0286: GOTO 285
0287: NOP
0288: MOVF 17,F
0289: BTFSS 03.2
028A: GOTO 28C
028B: MOVLW 00
028C: GOTO 27E
.................... output_low(SERVO_Y);
028D: BSF 03.5
028E: BCF 05.1
028F: BCF 03.5
0290: BCF 05.1
....................
.................... for (data=30-x-y; data--; data>0)
0291: MOVF 0E,W
0292: SUBLW 1E
0293: MOVWF 0D
0294: MOVF 0F,W
0295: SUBWF 0D,W
0296: MOVWF 17
0297: MOVF 17,W
0298: DECF 17,F
0299: XORLW 00
029A: BTFSC 03.2
029B: GOTO 2A6
.................... delay_us(65);
029C: MOVLW 15
029D: MOVWF 0C
029E: DECFSZ 0C,F
029F: GOTO 29E
02A0: NOP
02A1: MOVF 17,F
02A2: BTFSS 03.2
02A3: GOTO 2A5
02A4: MOVLW 00
02A5: GOTO 297
....................
.................... }
02A6: GOTO 1F5
.................... }
....................
02A7: SLEEP
....................
....................
/schemata/prenos/letadlo/SW/prijimac/zaloha/05/MAIN.PJT
0,0 → 1,32
[PROJECT]
Target=main.HEX
Development_Mode=
Processor=0x684A
ToolSuite=CCS
 
[Directories]
Include=C:\Program Files\PICC\Devices;C:\Program Files\PICC\Dri;
Library=
LinkerScript=
 
[Target Data]
FileList=main.c;
BuildTool=CCSC
OptionString=-p +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
 
/schemata/prenos/letadlo/SW/prijimac/zaloha/05/MAIN.STA
0,0 → 1,42
 
ROM used: 687 (67%)
337 (33%) including unused fragments
 
1 Average locations per line
5 Average locations per statement
 
RAM used: 12 (18%) at main() level
25 (37%) worst case
 
Lines Stmts % Files
----- ----- --- -----
201 88 66 d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\main.c
5 0 0 d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\main.h
111 0 0 C:\Program Files\PICC\Devices\16F84.h
6 0 0 d:\@kaklik\programy\pic_c\prenos\letadlo\common.h
272 46 21 d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\MYLCD.C
----- -----
1190 268 Total
 
Page ROM % RAM Functions:
---- --- --- --- ----------
0 21 3 1 delay_ms
0 8 1 0 @const22
0 22 3 3 lcd_send_nibble
0 22 3 2 lcd_send_byte
0 57 8 2 lcd_init
0 17 2 4 lcd_gotoxy
0 56 8 1 lcd_putc
0 83 12 6 prijmi_nibble
0 92 13 7 prijmi_ramec
0 218 32 2 main
0 9 1 0 @const10159
0 7 1 0 @goto10180
0 21 3 3 @DIV88
0 50 7 2 @PRINTF_U_150
 
Segment Used Free
--------- ---- ----
0000-0003 4 0
0004-03FF 683 337
 
/schemata/prenos/letadlo/SW/prijimac/zaloha/05/MAIN.SYM
0,0 → 1,72
00C @SCRATCH
00D @SCRATCH
00D _RETURN_
00E x
00F y
010 xc
011 yc
012 e1
013 e2
014 e3
015 e4
016 kanal
017 Data
018 e
019 lcd_init.i
019 prijmi_ramec.kanal
019 @PRINTF_U_150.P1
019 main.@SCRATCH
01A prijmi_ramec.Data
01A @PRINTF_U_150.P1
01A lcd_init.@SCRATCH
01A main.@SCRATCH
01B lcd_putc.c
01B prijmi_ramec.datovy
01B @DIV88.P1
01C delay_ms.P1
01C lcd_gotoxy.x
01C prijmi_ramec.suma
01C @DIV88.P1
01D lcd_gotoxy.y
01D prijmi_nibble.datovy
01D prijmi_ramec.@SCRATCH
01D @DIV88.@SCRATCH
01E lcd_gotoxy.Adr
01E prijmi_nibble.Data
01E prijmi_ramec.@SCRATCH
01F prijmi_nibble.i
01F lcd_gotoxy.@SCRATCH
01F prijmi_ramec.@SCRATCH
020 lcd_send_byte.Adr
020.0 prijmi_nibble.tmp
021 lcd_send_byte.n
021 prijmi_nibble.@SCRATCH
022 lcd_send_nibble.n
022 prijmi_nibble.@SCRATCH
023 lcd_send_nibble.@SCRATCH
024 lcd_send_nibble.@SCRATCH
delay_us.P1
-002 LCD_INIT_STRING
lcd_putc2.Data
 
0015 delay_ms
0004 @const22
002A lcd_send_nibble
0040 lcd_send_byte
0056 lcd_init
008F lcd_gotoxy
00A0 lcd_putc
00D8 prijmi_nibble
012B prijmi_ramec
01CE main
000C @const10159
02A8 @goto10180
0187 @DIV88
019C @PRINTF_U_150
 
Project Files:
d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\main.c
d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\main.h
C:\Program Files\PICC\Devices\16F84.h
d:\@kaklik\programy\pic_c\prenos\letadlo\common.h
d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\MYLCD.C
/schemata/prenos/letadlo/SW/prijimac/zaloha/05/MAIN.TRE
0,0 → 1,702
ÀÄmain
ÀÄmain 0/218 Ram=2
ÃÄ??0??
ÃÄlcd_init 0/57 Ram=2
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@const22 0/8 Ram=0
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄdelay_ms 0/21 Ram=1
ÃÄdelay_ms 0/21 Ram=1
ÃÄ@const10159 0/9 Ram=0
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄdelay_ms 0/21 Ram=1
ÃÄprijmi_ramec 0/92 Ram=7
³ ÃÄprijmi_nibble 0/83 Ram=6
³ ÃÄprijmi_nibble 0/83 Ram=6
³ ÃÄprijmi_nibble 0/83 Ram=6
³ ÀÄprijmi_nibble 0/83 Ram=6
ÃÄ@goto10180 0/7 Ram=0
ÃÄlcd_gotoxy 0/17 Ram=4
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_150 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_150 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_150 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_150 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_gotoxy 0/17 Ram=4
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_150 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_150 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_150 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_150 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄdelay_ms 0/21 Ram=1
ÀÄdelay_ms 0/21 Ram=1
/schemata/prenos/letadlo/SW/prijimac/zaloha/05/MYLCD.C
0,0 → 1,271
// LCD modul pro ovladani dvouradkoveho LCD modulu se standardnim Hitachi radicem
// (c)miho 2002
//
// Historie:
//
// 0.0 Uvodni verze se snadnou definici portu LCD displeje
//
//
// Funkce:
//
// lcd_init() inicializuje LCD displej a porty, nutno volat jako prvni
//
// lcd_putc(c) zapis snaku do lcd displeje, zpracovava nasledujici ridici znaky
// \f = \x0C - nova stranka - smazani displeje
// \n = \x0A - odradkovani (prechod na druhou radku)
// \b = \x08 - backspace - posunuti kurzoru o 1 pozici zpet
// \r = \x0D - goto home to position 1,1
// \0 .. \7 - definovatelne znaky v pozicich 0 az 7 v CGRAM
// \20 .. \27 - alternativne zapsane znaky (oktalove) v pozicich 0 az 7 CGRAM
// Pozor na to, ze funkce printf konci tisk pokud narazi na \0 (konec retezce)
//
// lcd_gotoxy(x,y) presune kurzor na uvedenou adresu
// nekontroluje parametry
//
// lcd_cursor_on zapne kurzor
// lcd_cursor_off vypne kurzor
//
// lcd_define_char(Index, Def) Makro, ktere definuje znaky od pozice Index obsahem definicniho
// retezce Def. Kazdych 8 znaku retezce Def definuje dalsi znak v CGRAM.
// Kapacita CGRAM je celkem 8 znaku s indexem 0 az 7.
// Na konci se provede lcd_gotoxy(1,1).
// Na konci teto knihovny je priklad pouziti definovanych znaku
//
// Definice portu:
//
// #DEFINE LCD_RS PIN_B2 // rizeni registru LCD displeje
// #DEFINE LCD_E PIN_B1 // enable LCD displeje
// #DEFINE LCD_DATA_LSB PIN_C2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
 
 
 
 
// Privatni sekce, cist jen v pripade, ze neco nefunguje
 
 
 
 
// Generovane defince portu pro ucely teto knihovny aby kod generoval spravne IO operace a soucasne
// bylo mozne jednoduse deklarovat pripojene piny LCD displeje pri pouziti teto knihovny. Problem spociva
// v tom, ze se musi spravne ridit smery portu a soucasne datovy port zabira jen 4 bity ze zadaneho portu
//
#DEFINE LCD_SHIFT (LCD_DATA_LSB&7) // pocet bitu posuvu dataoveho kanalu v datovem portu
#DEFINE LCD_PORT (LCD_DATA_LSB>>3) // adresa LCD datoveho portu
#DEFINE LCD_TRIS (LCD_PORT+0x80) // adresa prislusneho TRIS registru
#DEFINE LCD_MASK (0xF<<LCD_SHIFT) // maska platnych bitu
//
#IF LCD_SHIFT>4 // kontrola mezi
#ERROR LCD data port LSB bit not in range 0..4
#ENDIF
 
 
// Definice konstant pro LCD display
//
#define LCD_CURSOR_ON_ 0x0E // kurzor jako blikajici radka pod znakem
#define LCD_CURSOR_OFF_ 0x0C // zadny kurzor
#define LCD_LINE_2 0x40 // adresa 1. znaku 2. radky
 
 
// Definice rezimu LCD displeje
//
BYTE const LCD_INIT_STRING[4] =
{
0x28, // intrfejs 4 bity, 2 radky, font 5x7
LCD_CURSOR_OFF_, // display on, kurzor off,
0x01, // clear displeje
0x06 // inkrement pozice kurzoru (posun kurzoru doprava)
};
 
 
// Odesle nibble do displeje (posle data a klikne signalem e)
//
void lcd_send_nibble( BYTE n )
{
*LCD_PORT = (*LCD_PORT & ~LCD_MASK) | ((n << LCD_SHIFT) & LCD_MASK); // nastav datove bity portu a ostatni zachovej
output_bit(LCD_E,1); // vzestupna hrana
delay_us(1); // pockej alespon 450ns od e nebo alespon 195ns od dat
output_bit(LCD_E,0); // sestupna hrana (minimalni perioda e je 1us)
}
 
 
// Odesle bajt do registru LCD
//
// Pokud je Adr=0 .. instrukcni registr
// Pokud je Adr=1 .. datovy registr
//
void lcd_send_byte( BOOLEAN Adr, BYTE n )
{
output_bit(LCD_RS,Adr); // vyber registr
swap(n);
lcd_send_nibble(n); // posli horni pulku bajtu
swap(n);
lcd_send_nibble(n); // posli spodni pulku bajtu
delay_us(40); // minimalni doba na provedeni prikazu
}
 
 
// Provede inicializaci LCD displeje, smaze obsah a nastavi mod displeje
//
// Tato procedura se musi volat pred pouzitim ostatnich lcd_ procedur
//
void lcd_init()
{
 
int i; // pocitadlo cyklu
 
delay_ms(20); // spozdeni pro provedeni startu displeje po zapnuti napajeni
 
*LCD_TRIS = *LCD_TRIS & ~LCD_MASK; // nuluj odpovidajici bity tris registru datoveho portu LCD
 
output_bit(LCD_RS,0); // nastav jako vystup a nastav klidovy stav
output_bit(LCD_E,0); // nastav jako vystup a nastav klidovy stav
 
for (i=0; i<3; i++) // nastav lcd do rezimu 8 bitu sbernice
{
delay_ms(2); // muze byt rozdelany prenos dat (2x 4 bity) nebo pomaly povel
lcd_send_nibble(3); // rezim 8 bitu
}
 
delay_us(40); // cas na zpracovani
lcd_send_nibble(2); // nastav rezim 4 bitu (plati od nasledujiciho prenosu)
delay_us(40); // cas na zpracovani
 
for (i=0;i<3;i++) // proved inicializaci (nastaveni modu, smazani apod)
{
lcd_send_byte(0,LCD_INIT_STRING[i]);
delay_ms(2);
}
}
 
 
// Proved presun kurzoru
//
// Pozice 1.1 je domu
//
void lcd_gotoxy( BYTE x, BYTE y)
{
 
BYTE Adr;
 
Adr=x-1;
if(y==2)
Adr+=LCD_LINE_2;
 
lcd_send_byte(0,0x80|Adr);
}
 
 
// Zapis znaku na displej, zpracovani ridicich znaku
//
void lcd_putc( char c)
{
 
switch (c)
{
case '\f' : lcd_send_byte(0,1); // smaz displej
delay_ms(2);
break;
case '\n' : lcd_gotoxy(1,2); break; // presun se na 1. znak 2. radky
case '\r' : lcd_gotoxy(1,1); break; // presun home
case '\b' : lcd_send_byte(0,0x10); break; // posun kurzor o 1 zpet
default : if (c<0x20) c&=0x7; // preklopeni definovatelnych znaku na rozsah 0 az 0x1F
lcd_send_byte(1,c); break; // zapis znak
}
}
 
 
// Zapni kurzor
//
void lcd_cursor_on()
{
lcd_send_byte(0,LCD_CURSOR_ON_);
}
 
 
// Vypni kurzor
//
void lcd_cursor_off()
{
lcd_send_byte(0,LCD_CURSOR_OFF_);
}
 
 
// Definice vlastnich fontu
//
// Vlastnich definic muze byt jen 8 do pozic 0 az 7 pameti CGRAM radice lcd displeje
// Pro snadne definovani jsou pripraveny nasledujici definice a na konci souboru je uveden
// priklad pouziti definovanych znaku.
 
 
// Pomocna procedura pro posilani ridicich dat do radice displeje
//
void lcd_putc2(int Data)
{
lcd_send_byte(1,Data);
}
 
 
// Pomocne definice pro programovani obsahu CGRAM
//
#DEFINE lcd_define_start(Code) lcd_send_byte(0,0x40+(Code<<3)); delay_ms(2)
#DEFINE lcd_define_def(String) printf(lcd_putc2,String);
#DEFINE lcd_define_end() lcd_send_byte(0,3); delay_ms(2)
 
 
// Vlastni vykonne makro pro definovani fontu do pozice Index CGRAM s definicnim retezcem Def
//
#DEFINE lcd_define_char(Index, Def) lcd_define_start(Index); lcd_define_def(Def); lcd_define_end();
 
 
// Pripravene definice fontu vybranych znaku
// V tabulce nesmi byt 00 (konec retezce v printf()), misto toho davame 80
//
#DEFINE LCD_CHAR_BAT100 "\x0E\x1F\x1F\x1F\x1F\x1F\x1F\x1F" /* symbol plne baterie */
#DEFINE LCD_CHAR_BAT50 "\x0E\x1F\x11\x11\x13\x17\x1F\x1F" /* symbol polovicni baterie */
#DEFINE LCD_CHAR_BAT0 "\x0E\x1F\x11\x11\x11\x11\x11\x1F" /* symbol vybite baterie */
#DEFINE LCD_CHAR_LUA "\x04\x0E\x11\x11\x1F\x11\x11\x80" /* A s carkou */
#DEFINE LCD_CHAR_LLA "\x01\x02\x0E\x01\x1F\x11\x0F\x80" /* a s carkou */
#DEFINE LCD_CHAR_HUC "\x0A\x0E\x11\x10\x10\x11\x0E\x80" /* C s hackem */
#DEFINE LCD_CHAR_HLC "\x0A\x04\x0E\x10\x10\x11\x0E\x80" /* c s hackem */
#DEFINE LCD_CHAR_HUD "\x0A\x1C\x12\x11\x11\x12\x1C\x80" /* D s hackem */
#DEFINE LCD_CHAR_HLD "\x05\x03\x0D\x13\x11\x11\x0F\x80" /* d s hackem */
#DEFINE LCD_CHAR_LUE "\x04\x1F\x10\x10\x1E\x10\x1F\x80" /* E s carkou */
#DEFINE LCD_CHAR_LLE "\x01\x02\x0E\x11\x1F\x10\x0E\x80" /* e s carkou */
#DEFINE LCD_CHAR_HUE "\x0A\x1F\x10\x1E\x10\x10\x1F\x80" /* E s hackem */
#DEFINE LCD_CHAR_HLE "\x0A\x04\x0E\x11\x1F\x10\x0E\x80" /* e s hackem */
#DEFINE LCD_CHAR_LUI "\x04\x0E\x04\x04\x04\x04\x0E\x80" /* I s carkou */
#DEFINE LCD_CHAR_LLI "\x02\x04\x80\x0C\x04\x04\x0E\x80" /* i s carkou */
#DEFINE LCD_CHAR_HUN "\x0A\x15\x11\x19\x15\x13\x11\x80" /* N s hackem */
#DEFINE LCD_CHAR_HLN "\x0A\x04\x16\x19\x11\x11\x11\x80" /* n s hackem */
#DEFINE LCD_CHAR_LUO "\x04\x0E\x11\x11\x11\x11\x0E\x80" /* O s carkou */
#DEFINE LCD_CHAR_LLO "\x02\x04\x0E\x11\x11\x11\x0E\x80" /* o s carkou */
#DEFINE LCD_CHAR_HUR "\x0A\x1E\x11\x1E\x14\x12\x11\x80" /* R s hackem */
#DEFINE LCD_CHAR_HLR "\x0A\x04\x16\x19\x10\x10\x10\x80" /* r s hackem */
#DEFINE LCD_CHAR_HUS "\x0A\x0F\x10\x0E\x01\x01\x1E\x80" /* S s hackem */
#DEFINE LCD_CHAR_HLS "\x0A\x04\x0E\x10\x0E\x01\x1E\x80" /* s s hackem */
#DEFINE LCD_CHAR_HUT "\x0A\x1F\x04\x04\x04\x04\x04\x80" /* T s hackem */
#DEFINE LCD_CHAR_HLT "\x0A\x0C\x1C\x08\x08\x09\x06\x80" /* t s hackem */
#DEFINE LCD_CHAR_LUU "\x02\x15\x11\x11\x11\x11\x0E\x80" /* U s carkou */
#DEFINE LCD_CHAR_LLU "\x02\x04\x11\x11\x11\x13\x0D\x80" /* u s carkou */
#DEFINE LCD_CHAR_CUU "\x06\x17\x11\x11\x11\x11\x0E\x80" /* U s krouzkem */
#DEFINE LCD_CHAR_CLU "\x06\x06\x11\x11\x11\x11\x0E\x80" /* u s krouzkem */
#DEFINE LCD_CHAR_LUY "\x02\x15\x11\x0A\x04\x04\x04\x80" /* Y s carkou */
#DEFINE LCD_CHAR_LLY "\x02\x04\x11\x11\x0F\x01\x0E\x80" /* y s carkou */
#DEFINE LCD_CHAR_HUZ "\x0A\x1F\x01\x02\x04\x08\x1F\x80" /* Z s hackem */
#DEFINE LCD_CHAR_HLZ "\x0A\x04\x1F\x02\x04\x08\x1F\x80" /* z s hackem */
 
 
// Priklad pouziti definovanych znaku
//
//
//void lcd_sample()
//{
// lcd_define_char(0,LCD_CHAR_BAT50); // Priklad definice znaku baterie do pozice 0
// lcd_define_char(2,LCD_CHAR_HLE LCD_CHAR_LUI); // Priklad definice znaku e s hackem a I s carkou od pozice 2
// // vsimnete si, ze neni carka mezi retezci s definici (oba retezce definuji
// // jediny definicni retezec)
// printf(lcd_putc,"\fZnaky:\20\22\23"); // priklad vypisu znaku z pozice 0, 2 a 3
// delay_ms(1000);
// lcd_define_char(0,LCD_CHAR_BAT0); // Predefinovani tvaru znaku v pozici 0
// delay_ms(1000);
//}
/schemata/prenos/letadlo/SW/prijimac/zaloha/05/PRG.BAT
0,0 → 1,6
call picpgr stop
call picpgr erase pic16f84
call picpgr program main.hex hex pic16f84
call picpgr run
pause
call picpgr stop
/schemata/prenos/letadlo/SW/prijimac/zaloha/05/PRG.PIF
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
/schemata/prenos/letadlo/SW/prijimac/zaloha/05/RUN.BAT
0,0 → 1,5
call picpgr run
pause
call picpgr stop
pause
run.bat
/schemata/prenos/letadlo/SW/prijimac/zaloha/05/VC.MNU
0,0 → 1,4
R: Run
picpgr run
S: Stop
picpgr stop
/schemata/prenos/letadlo/SW/prijimac/zaloha/05/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
/schemata/prenos/letadlo/SW/prijimac/zaloha/06/!____!.TXT
0,0 → 1,0
chodici verze
/schemata/prenos/letadlo/SW/prijimac/zaloha/06/A.BAT
0,0 → 1,6
call picpgr stop
call picpgr erase pic16F84
call picpgr program main.hex hex pic16F84
call picpgr run
pause
call picpgr stop
/schemata/prenos/letadlo/SW/prijimac/zaloha/06/MAIN.BAK
0,0 → 1,182
// Prijimac
 
#DEFINE DEBUG PIN_A2 // ladici pomocne synchronizacni impulzy
 
#include "main.h"
#include "..\common.h"
 
#DEFINE LCD_RS PIN_B1 // rizeni registru LCD displeje
#DEFINE LCD_E PIN_B0 // enable LCD displeje
#DEFINE LCD_DATA_LSB PIN_B2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
#INCLUDE "MYLCD.C"
 
#DEFINE PRIJIMAC PIN_A3 // pin na ktery je pripojen prijimac
#DEFINE SERVO_X PIN_A0 // pin na ktery je pripojeno servo
#DEFINE SERVO_Y PIN_A1
 
 
// Prijme datovy nibble vcetne zasynchronizovani
// Chybi dodelat timeout
int8 prijmi_nibble(int8* datovy, int8* data)
{
int8 i;
 
#IFDEF DEBUG
int1 tmp;
#ENDIF
 
*data=0;
 
// Cekam na dlouhou nulu
for (i=4; i>0; i--)
{
if (input(PRIJIMAC)) i=4;
delay_us(IMPULS/2);
}
 
// Cekam na jednicku (start ramce)
for (; !input(PRIJIMAC); )
{
}
 
// Ctu typ nibblu
delay_us(2*IMPULS+2*IMPULS/3);
*datovy=input(PRIJIMAC);
 
// Prenasim bity
for (i=0; i<4; i++)
{
delay_us(2*IMPULS);
*data >>= 1;
if (input(PRIJIMAC)) *data +=0b1000;
 
#IFDEF DEBUG
output_bit(DEBUG,tmp);
tmp=!tmp;
#ELSE
delay_us(20);
#ENDIF
}
 
return FALSE;
}
 
 
// Prijme datovy ramec
// Pokud nastane chyba vraci TRUE
int8 prijmi_ramec(int8* kanal, int8* data)
{
int8 datovy;
int8 suma;
 
// Cekej na synchronizacni nibble
do
{
if (prijmi_nibble(&datovy, data)) return 1; // chyba timout
}
while(datovy);
 
// Zkontroluj magickou hodnotu
if (*data != SYNC_NIBBLE) return 2; // chyba magickeho kodu ramce
 
// Prijmi cislo kanalu
if (prijmi_nibble(&datovy, kanal)) return 1; // chyba timeout
if (!datovy) return 3; // chyba typu nibblu
 
// Prijmi data
if (prijmi_nibble(&datovy, data)) return 1; // chyba timeout
if (!datovy) return 3; // chyba typu nibblu
 
// Prijmi zabezpeceni
if (prijmi_nibble(&datovy, &suma)) return 1; // chyba timeout
if (!datovy) return 3; // chyba typu nibblu
 
// Zkontroluj kontrolni soucet
 
 
//lcd_gotoxy(1,1);
//printf(lcd_putc,"R:%3U %3U %3U ",*kanal,*data,suma);
//delay_ms(1000);
 
 
if (((*kanal+*data) & 0b1111) != suma) return 3; // chyba kontrolniho souctu
 
return 0;
}
 
 
 
int8 x,y;
int8 xc,yc; // pocitadla aktualizace x a y
int e1,e2,e3,e4; // pocitadla chyb - ladici
 
void main()
{
lcd_init(); // zinicializuj LCD display
delay_ms(5);
printf(lcd_putc,"Ahoj...");
delay_ms(300);
 
x = 0;
y = 0;
xc=0;
yc=0;
e1=0;
e2=0;
e3=0;
e4=0;
 
while (true)
{
int8 kanal, data;
 
if (prijmi_ramec(&kanal,&data))
{
switch (kanal) // rozeskoc se podle adresy osy
{
case OSA_X:
{
x=data;
xc++;
break;
};
case OSA_Y:
{
y=data;
yc++;
break;
};
case TLs:
{
e4++;
break;
};
};
 
// ladici vypisy
lcd_gotoxy(1,1); // vytiskni X a Y
printf(lcd_putc,"X%2U %3U%3U%3U ", x, xc, e1, e2);
lcd_gotoxy(1,2);
printf(lcd_putc,"Y%2U %3U%3U%3U ", y, yc, e3, e4);
 
// ovladani serv
output_high(SERVO_X);
delay_ms(1);
for (data=x; data--; data>0)
delay_us(65);
output_low(SERVO_X);
 
output_high(SERVO_Y);
delay_ms(1);
for (data=y; data--; data>0)
delay_us(65);
output_low(SERVO_Y);
 
for (data=30-x-y; data--; data>0)
delay_us(65);
 
}
}
}
 
 
/schemata/prenos/letadlo/SW/prijimac/zaloha/06/MAIN.C
0,0 → 1,177
// Prijimac
 
#DEFINE DEBUG PIN_A2 // ladici pomocne synchronizacni impulzy
 
#include "main.h"
#include "..\common.h"
 
#DEFINE LCD_RS PIN_B1 // rizeni registru LCD displeje
#DEFINE LCD_E PIN_B0 // enable LCD displeje
#DEFINE LCD_DATA_LSB PIN_B2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
#INCLUDE "MYLCD.C"
 
#DEFINE PRIJIMAC PIN_A3 // pin na ktery je pripojen prijimac
#DEFINE SERVO_X PIN_A0 // pin na ktery je pripojeno servo
#DEFINE SERVO_Y PIN_A1
 
 
// Prijme datovy nibble vcetne zasynchronizovani
// Chybi dodelat timeout
int8 prijmi_nibble(int8* datovy, int8* data)
{
int8 i;
 
#IFDEF DEBUG
int1 tmp;
#ENDIF
 
*data=0;
 
// Cekam na dlouhou nulu
for (i=4; i>0; i--)
{
if (input(PRIJIMAC)) i=4;
delay_us(IMPULS/2);
}
 
// Cekam na jednicku (start ramce)
for (; !input(PRIJIMAC); )
{
}
 
// Ctu typ nibblu
delay_us(2*IMPULS+2*IMPULS/3);
*datovy=input(PRIJIMAC);
 
// Prenasim bity
for (i=0; i<4; i++)
{
delay_us(2*IMPULS);
*data >>= 1;
if (input(PRIJIMAC)) *data +=0b1000;
 
#IFDEF DEBUG
output_bit(DEBUG,tmp);
tmp=!tmp;
#ELSE
delay_us(20);
#ENDIF
}
 
return FALSE;
}
 
 
// Prijme datovy ramec
// Pokud nastane chyba vraci kod chyby
int8 prijmi_ramec(int8* kanal, int8* data)
{
int8 datovy;
int8 suma;
 
// Cekej na synchronizacni nibble
do
{
if (prijmi_nibble(&datovy, data)) return 1; // chyba timout
}
while(datovy);
 
// Zkontroluj magickou hodnotu
if (*data != SYNC_NIBBLE) return 2; // chyba magickeho kodu ramce
 
// Prijmi cislo kanalu
if (prijmi_nibble(&datovy, kanal)) return 1; // chyba timeout
if (!datovy) return 3; // chyba typu nibblu
 
// Prijmi data
if (prijmi_nibble(&datovy, data)) return 1; // chyba timeout
if (!datovy) return 3; // chyba typu nibblu
 
// Prijmi zabezpeceni
if (prijmi_nibble(&datovy, &suma)) return 1; // chyba timeout
if (!datovy) return 3; // chyba typu nibblu
 
// Zkontroluj kontrolni soucet
if (((*kanal+*data) & 0b1111) != suma) return 3; // chyba kontrolniho souctu
 
return 0;
}
 
 
 
int8 x,y;
int8 xc,yc; // pocitadla aktualizace x a y
int e1,e2,e3,e4; // pocitadla chyb - ladici
 
void main()
{
lcd_init(); // zinicializuj LCD display
delay_ms(5);
printf(lcd_putc,"Ahoj...");
delay_ms(300);
 
x = 0;
y = 0;
xc = 0;
yc = 0;
e1 = 0;
e2 = 0;
e3 = 0;
e4 = 0;
 
while (true)
{
int8 kanal, data;
 
if (prijmi_ramec(&kanal,&data))
e1++;
else
{
switch (kanal) // rozeskoc se podle adresy osy
{
case OSA_X:
{
x=data;
xc++;
break;
};
case OSA_Y:
{
y=data;
yc++;
break;
};
case TLs:
{
e4++;
break;
};
};
 
// ladici vypisy
lcd_gotoxy(1,1); // vytiskni X a Y
printf(lcd_putc,"X%2U %3U%3U%3U ", x, xc, e1, e2);
lcd_gotoxy(1,2);
printf(lcd_putc,"Y%2U %3U%3U%3U ", y, yc, e3, e4);
 
// ovladani serv
output_high(SERVO_X);
delay_ms(1);
for (data=x; data--; data>0)
delay_us(65);
output_low(SERVO_X);
 
output_high(SERVO_Y);
delay_ms(1);
for (data=y; data--; data>0)
delay_us(65);
output_low(SERVO_Y);
 
for (data=30-x-y; data--; data>0)
delay_us(65);
 
}
}
}
 
 
/schemata/prenos/letadlo/SW/prijimac/zaloha/06/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
/schemata/prenos/letadlo/SW/prijimac/zaloha/06/MAIN.ERR
0,0 → 1,0
No Errors
/schemata/prenos/letadlo/SW/prijimac/zaloha/06/MAIN.H
0,0 → 1,4
#include <16F84.h>
#use delay(clock=4000000)
#fuses XT,NOWDT,PUT
 
/schemata/prenos/letadlo/SW/prijimac/zaloha/06/MAIN.HEX
0,0 → 1,89
:1000000000308A00CE2900000A108A100A118207E7
:1000100028340C34013406340A108A100A1182077D
:10002000413468346F346A3400341B308400000873
:100030000319292801308D008C018C0B1D288D0B94
:100040001C284A308C008C0B232800000000800BF9
:100050001A2800340608C339A200210D8C008C0D2B
:10006000FC308C050C083C392204860006148316EB
:100070000610000083120610831606108312003447
:100080009F08031D4528861046288614831686106F
:100090008312A00E2008A1002A20A00E2008A10093
:1000A0002A200D308C008C0B5328003414309B0018
:1000B0001520C3308316860583128610831686109A
:1000C0008312061083160610831298011808023C4A
:1000D000031C722802309B0015200330A1002A2047
:1000E000980A66280D308C008C0B74280230A10011
:1000F0002A200D308C008C0B7B2898011808023CBC
:10010000031C8E281808042099009F011908A000DC
:10011000402002309B001520980A7E28D229013009
:100120001B029D001C08023C031D982840309D07BF
:100130001D0880389E009F011E08A000402000344A
:100140001A088C000C300C020319B3280A300C0278
:100150000319BB280D300C020319C12808300C020A
:100160000319C628CB289F010130A000402002308F
:100170009B001520D72801309B0002309C008F2067
:10018000D72801309B009C008F20D7289F0110307A
:10019000A0004020D7281A081F3C031CD128073094
:1001A0009A0501309F001A08A0004020D72800348B
:1001B0001D088400800104309E009E080319EE286B
:1001C000831685158312851DE72804309E0029308B
:1001D0008C008C0BE92800009E03DD288316851512
:1001E0008312851DEE28DD308C008C0BF528000075
:1001F00000001C08840083168515003083128519C1
:10020000013080009E011E08033C031C2829A630F3
:100210008C008C0B092900001D0884000310000CC1
:100220008C008000831685158312851D1C291D08EE
:1002300084000830000780001F182029051121299B
:10024000051583160511013083129F069E0A0329A6
:1002500000308D0000341A309C0019089D00D82011
:100260008D080319362901308D0086299A08031D4F
:100270002B291908840000080F3C03194229023079
:100280008D0086291A309C0018089D00D8208D0802
:1002900003194D2901308D0086299A08031D532921
:1002A00003308D0086291A309C0019089D00D82043
:1002B0008D0803195E2901308D0086299A08031DD7
:1002C000642903308D0086291A309C001B309D0064
:1002D000D8208D0803196F2901308D0086299A08CE
:1002E000031D752903308D00862918088400000835
:1002F0009C001908840000081C070F391B02031911
:10030000842903308D00862900308D00FA291B08CE
:100310008D011A0203188F291A088C009B298C0161
:1003200008309C009A0D8C0D1B080C0203188C00E1
:100330008D0D9C0B922900340D0818089A0064302A
:100340009B0087210C0898000D083030031DAF2951
:10035000191899159919B529191A2030B129991127
:1003600019128D070D089A00A02018089A000A306B
:100370009B0087210C0898000D083030031DC4290C
:100380009919C829191A20308D070D089A00A02044
:100390003030980718089A00A020003484011F30DC
:1003A0008305562805309B001520980118080C205D
:1003B000980A9A00A02004301802031DD6290330A1
:1003C00099002E309A00A020990BE1290230980064
:1003D00096309B001520980BE8298E018F01900123
:1003E0009101920193019401950116309800173004
:1003F00099002B298D080319FF29920AA62A01309A
:100400001602FD3E0318102A033EA82A17088E0084
:10041000900A102A17088F00910A102A950A102AAC
:1004200001309B009C008F2058309A00A0200E08BD
:100430009800113099009C2120309A00A0201008CB
:100440009800103099009C211208980010309900F3
:100450009C2113089800103099009C2120309A00AC
:10046000A02020309A00A02001309B0002309C0088
:100470008F2059309A00A0200F0898001130990061
:100480009C2120309A00A02011089800103099007B
:100490009C2114089800103099009C2115089800A0
:1004A000103099009C2120309A00A02020309A0022
:1004B000A020831605108312051401309B0015201F
:1004C0000E08970017089703003A0319712A153090
:1004D0008C008C0B692A00009708031D702A0030DD
:1004E000622A831605108312051083168510831265
:1004F000851401309B0015200F08970017089703FB
:10050000003A03198D2A15308C008C0B852A0000C7
:100510009708031D8C2A00307E2A831685108312CB
:1005200085100E081E3C8D000F080D02970017085D
:100530009703003A0319A62A15308C008C0B9E2ACB
:1005400000009708031DA52A0030972AF5296300AB
:0E0550000A108A140A118207062A0A2A0E2AA5
:02400E00F13F80
:00000001FF
;PIC16F84
/schemata/prenos/letadlo/SW/prijimac/zaloha/06/MAIN.LST
0,0 → 1,1152
CCS PCW C Compiler, Version 3.110, 15448
 
Filename: d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\main.LST
 
ROM used: 687 (67%)
Largest free fragment is 337
RAM used: 12 (18%) at main() level
24 (35%) worst case
Stack: 5 locations
 
*
0000: MOVLW 00
0001: MOVWF 0A
0002: GOTO 1CE
0003: NOP
.................... // Prijimac
....................
.................... #DEFINE DEBUG PIN_A2 // ladici pomocne synchronizacni impulzy
....................
.................... #include "main.h"
.................... #include <16F84.h>
.................... //////// Standard Header file for the PIC16F84 device ////////////////
.................... #device PIC16F84
.................... #list
....................
.................... #use delay(clock=4000000)
*
0015: MOVLW 1B
0016: MOVWF 04
0017: MOVF 00,W
0018: BTFSC 03.2
0019: GOTO 029
001A: MOVLW 01
001B: MOVWF 0D
001C: CLRF 0C
001D: DECFSZ 0C,F
001E: GOTO 01D
001F: DECFSZ 0D,F
0020: GOTO 01C
0021: MOVLW 4A
0022: MOVWF 0C
0023: DECFSZ 0C,F
0024: GOTO 023
0025: NOP
0026: NOP
0027: DECFSZ 00,F
0028: GOTO 01A
0029: RETLW 00
.................... #fuses XT,NOWDT,PUT
....................
....................
.................... #include "..\common.h"
.................... #DEFINE OSA_X 1 // adresy os
.................... #DEFINE OSA_Y 2
.................... #DEFINE TLs 3
.................... #DEFINE IMPULS 250 // sirka impulsu
.................... #DEFINE SYNC_NIBBLE 0b1111 // magiske cislo sync niblu
....................
....................
.................... #DEFINE LCD_RS PIN_B1 // rizeni registru LCD displeje
.................... #DEFINE LCD_E PIN_B0 // enable LCD displeje
.................... #DEFINE LCD_DATA_LSB PIN_B2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
.................... #INCLUDE "MYLCD.C"
.................... // LCD modul pro ovladani dvouradkoveho LCD modulu se standardnim Hitachi radicem
.................... // (c)miho 2002
.................... //
.................... // Historie:
.................... //
.................... // 0.0 Uvodni verze se snadnou definici portu LCD displeje
.................... //
.................... //
.................... // Funkce:
.................... //
.................... // lcd_init() inicializuje LCD displej a porty, nutno volat jako prvni
.................... //
.................... // lcd_putc(c) zapis snaku do lcd displeje, zpracovava nasledujici ridici znaky
.................... // \f = \x0C - nova stranka - smazani displeje
.................... // \n = \x0A - odradkovani (prechod na druhou radku)
.................... // \b = \x08 - backspace - posunuti kurzoru o 1 pozici zpet
.................... // \r = \x0D - goto home to position 1,1
.................... // \0 .. \7 - definovatelne znaky v pozicich 0 az 7 v CGRAM
.................... // \20 .. \27 - alternativne zapsane znaky (oktalove) v pozicich 0 az 7 CGRAM
.................... // Pozor na to, ze funkce printf konci tisk pokud narazi na \0 (konec retezce)
.................... //
.................... // lcd_gotoxy(x,y) presune kurzor na uvedenou adresu
.................... // nekontroluje parametry
.................... //
.................... // lcd_cursor_on zapne kurzor
.................... // lcd_cursor_off vypne kurzor
.................... //
.................... // lcd_define_char(Index, Def) Makro, ktere definuje znaky od pozice Index obsahem definicniho
.................... // retezce Def. Kazdych 8 znaku retezce Def definuje dalsi znak v CGRAM.
.................... // Kapacita CGRAM je celkem 8 znaku s indexem 0 az 7.
.................... // Na konci se provede lcd_gotoxy(1,1).
.................... // Na konci teto knihovny je priklad pouziti definovanych znaku
.................... //
.................... // Definice portu:
.................... //
.................... // #DEFINE LCD_RS PIN_B2 // rizeni registru LCD displeje
.................... // #DEFINE LCD_E PIN_B1 // enable LCD displeje
.................... // #DEFINE LCD_DATA_LSB PIN_C2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
....................
....................
....................
....................
.................... // Privatni sekce, cist jen v pripade, ze neco nefunguje
....................
....................
....................
....................
.................... // Generovane defince portu pro ucely teto knihovny aby kod generoval spravne IO operace a soucasne
.................... // bylo mozne jednoduse deklarovat pripojene piny LCD displeje pri pouziti teto knihovny. Problem spociva
.................... // v tom, ze se musi spravne ridit smery portu a soucasne datovy port zabira jen 4 bity ze zadaneho portu
.................... //
.................... #DEFINE LCD_SHIFT (LCD_DATA_LSB&7) // pocet bitu posuvu dataoveho kanalu v datovem portu
.................... #DEFINE LCD_PORT (LCD_DATA_LSB>>3) // adresa LCD datoveho portu
.................... #DEFINE LCD_TRIS (LCD_PORT+0x80) // adresa prislusneho TRIS registru
.................... #DEFINE LCD_MASK (0xF<<LCD_SHIFT) // maska platnych bitu
.................... //
.................... #IF LCD_SHIFT>4 // kontrola mezi
.................... #ERROR LCD data port LSB bit not in range 0..4
.................... #ENDIF
....................
....................
.................... // Definice konstant pro LCD display
.................... //
.................... #define LCD_CURSOR_ON_ 0x0E // kurzor jako blikajici radka pod znakem
.................... #define LCD_CURSOR_OFF_ 0x0C // zadny kurzor
.................... #define LCD_LINE_2 0x40 // adresa 1. znaku 2. radky
....................
....................
.................... // Definice rezimu LCD displeje
.................... //
.................... BYTE const LCD_INIT_STRING[4] =
.................... {
.................... 0x28, // intrfejs 4 bity, 2 radky, font 5x7
.................... LCD_CURSOR_OFF_, // display on, kurzor off,
.................... 0x01, // clear displeje
.................... 0x06 // inkrement pozice kurzoru (posun kurzoru doprava)
.................... };
*
0004: BCF 0A.0
0005: BCF 0A.1
0006: BCF 0A.2
0007: ADDWF 02,F
0008: RETLW 28
0009: RETLW 0C
000A: RETLW 01
000B: RETLW 06
....................
....................
.................... // Odesle nibble do displeje (posle data a klikne signalem e)
.................... //
.................... void lcd_send_nibble( BYTE n )
.................... {
.................... *LCD_PORT = (*LCD_PORT & ~LCD_MASK) | ((n << LCD_SHIFT) & LCD_MASK); // nastav datove bity portu a ostatni zachovej
*
002A: MOVF 06,W
002B: ANDLW C3
002C: MOVWF 22
002D: RLF 21,W
002E: MOVWF 0C
002F: RLF 0C,F
0030: MOVLW FC
0031: ANDWF 0C,F
0032: MOVF 0C,W
0033: ANDLW 3C
0034: IORWF 22,W
0035: MOVWF 06
.................... output_bit(LCD_E,1); // vzestupna hrana
0036: BSF 06.0
0037: BSF 03.5
0038: BCF 06.0
.................... delay_us(1); // pockej alespon 450ns od e nebo alespon 195ns od dat
0039: NOP
.................... output_bit(LCD_E,0); // sestupna hrana (minimalni perioda e je 1us)
003A: BCF 03.5
003B: BCF 06.0
003C: BSF 03.5
003D: BCF 06.0
003E: BCF 03.5
003F: RETLW 00
.................... }
....................
....................
.................... // Odesle bajt do registru LCD
.................... //
.................... // Pokud je Adr=0 .. instrukcni registr
.................... // Pokud je Adr=1 .. datovy registr
.................... //
.................... void lcd_send_byte( BOOLEAN Adr, BYTE n )
.................... {
.................... output_bit(LCD_RS,Adr); // vyber registr
0040: MOVF 1F,F
0041: BTFSS 03.2
0042: GOTO 045
0043: BCF 06.1
0044: GOTO 046
0045: BSF 06.1
0046: BSF 03.5
0047: BCF 06.1
.................... swap(n);
0048: BCF 03.5
0049: SWAPF 20,F
.................... lcd_send_nibble(n); // posli horni pulku bajtu
004A: MOVF 20,W
004B: MOVWF 21
004C: CALL 02A
.................... swap(n);
004D: SWAPF 20,F
.................... lcd_send_nibble(n); // posli spodni pulku bajtu
004E: MOVF 20,W
004F: MOVWF 21
0050: CALL 02A
.................... delay_us(40); // minimalni doba na provedeni prikazu
0051: MOVLW 0D
0052: MOVWF 0C
0053: DECFSZ 0C,F
0054: GOTO 053
0055: RETLW 00
.................... }
....................
....................
.................... // Provede inicializaci LCD displeje, smaze obsah a nastavi mod displeje
.................... //
.................... // Tato procedura se musi volat pred pouzitim ostatnich lcd_ procedur
.................... //
.................... void lcd_init()
.................... {
....................
.................... int i; // pocitadlo cyklu
....................
.................... delay_ms(20); // spozdeni pro provedeni startu displeje po zapnuti napajeni
0056: MOVLW 14
0057: MOVWF 1B
0058: CALL 015
....................
.................... *LCD_TRIS = *LCD_TRIS & ~LCD_MASK; // nuluj odpovidajici bity tris registru datoveho portu LCD
0059: MOVLW C3
005A: BSF 03.5
005B: ANDWF 06,F
....................
.................... output_bit(LCD_RS,0); // nastav jako vystup a nastav klidovy stav
005C: BCF 03.5
005D: BCF 06.1
005E: BSF 03.5
005F: BCF 06.1
.................... output_bit(LCD_E,0); // nastav jako vystup a nastav klidovy stav
0060: BCF 03.5
0061: BCF 06.0
0062: BSF 03.5
0063: BCF 06.0
....................
.................... for (i=0; i<3; i++) // nastav lcd do rezimu 8 bitu sbernice
0064: BCF 03.5
0065: CLRF 18
0066: MOVF 18,W
0067: SUBLW 02
0068: BTFSS 03.0
0069: GOTO 072
.................... {
.................... delay_ms(2); // muze byt rozdelany prenos dat (2x 4 bity) nebo pomaly povel
006A: MOVLW 02
006B: MOVWF 1B
006C: CALL 015
.................... lcd_send_nibble(3); // rezim 8 bitu
006D: MOVLW 03
006E: MOVWF 21
006F: CALL 02A
.................... }
0070: INCF 18,F
0071: GOTO 066
....................
.................... delay_us(40); // cas na zpracovani
0072: MOVLW 0D
0073: MOVWF 0C
0074: DECFSZ 0C,F
0075: GOTO 074
.................... lcd_send_nibble(2); // nastav rezim 4 bitu (plati od nasledujiciho prenosu)
0076: MOVLW 02
0077: MOVWF 21
0078: CALL 02A
.................... delay_us(40); // cas na zpracovani
0079: MOVLW 0D
007A: MOVWF 0C
007B: DECFSZ 0C,F
007C: GOTO 07B
....................
.................... for (i=0;i<3;i++) // proved inicializaci (nastaveni modu, smazani apod)
007D: CLRF 18
007E: MOVF 18,W
007F: SUBLW 02
0080: BTFSS 03.0
0081: GOTO 08E
.................... {
.................... lcd_send_byte(0,LCD_INIT_STRING[i]);
0082: MOVF 18,W
0083: CALL 004
0084: MOVWF 19
0085: CLRF 1F
0086: MOVF 19,W
0087: MOVWF 20
0088: CALL 040
.................... delay_ms(2);
0089: MOVLW 02
008A: MOVWF 1B
008B: CALL 015
.................... }
008C: INCF 18,F
008D: GOTO 07E
008E: GOTO 1D2 (RETURN)
.................... }
....................
....................
.................... // Proved presun kurzoru
.................... //
.................... // Pozice 1.1 je domu
.................... //
.................... void lcd_gotoxy( BYTE x, BYTE y)
.................... {
....................
.................... BYTE Adr;
....................
.................... Adr=x-1;
008F: MOVLW 01
0090: SUBWF 1B,W
0091: MOVWF 1D
.................... if(y==2)
0092: MOVF 1C,W
0093: SUBLW 02
0094: BTFSS 03.2
0095: GOTO 098
.................... Adr+=LCD_LINE_2;
0096: MOVLW 40
0097: ADDWF 1D,F
....................
.................... lcd_send_byte(0,0x80|Adr);
0098: MOVF 1D,W
0099: IORLW 80
009A: MOVWF 1E
009B: CLRF 1F
009C: MOVF 1E,W
009D: MOVWF 20
009E: CALL 040
009F: RETLW 00
.................... }
....................
....................
.................... // Zapis znaku na displej, zpracovani ridicich znaku
.................... //
.................... void lcd_putc( char c)
.................... {
....................
.................... switch (c)
00A0: MOVF 1A,W
00A1: MOVWF 0C
00A2: MOVLW 0C
00A3: SUBWF 0C,W
00A4: BTFSC 03.2
00A5: GOTO 0B3
00A6: MOVLW 0A
00A7: SUBWF 0C,W
00A8: BTFSC 03.2
00A9: GOTO 0BB
00AA: MOVLW 0D
00AB: SUBWF 0C,W
00AC: BTFSC 03.2
00AD: GOTO 0C1
00AE: MOVLW 08
00AF: SUBWF 0C,W
00B0: BTFSC 03.2
00B1: GOTO 0C6
00B2: GOTO 0CB
.................... {
.................... case '\f' : lcd_send_byte(0,1); // smaz displej
00B3: CLRF 1F
00B4: MOVLW 01
00B5: MOVWF 20
00B6: CALL 040
.................... delay_ms(2);
00B7: MOVLW 02
00B8: MOVWF 1B
00B9: CALL 015
.................... break;
00BA: GOTO 0D7
.................... case '\n' : lcd_gotoxy(1,2); break; // presun se na 1. znak 2. radky
00BB: MOVLW 01
00BC: MOVWF 1B
00BD: MOVLW 02
00BE: MOVWF 1C
00BF: CALL 08F
00C0: GOTO 0D7
.................... case '\r' : lcd_gotoxy(1,1); break; // presun home
00C1: MOVLW 01
00C2: MOVWF 1B
00C3: MOVWF 1C
00C4: CALL 08F
00C5: GOTO 0D7
.................... case '\b' : lcd_send_byte(0,0x10); break; // posun kurzor o 1 zpet
00C6: CLRF 1F
00C7: MOVLW 10
00C8: MOVWF 20
00C9: CALL 040
00CA: GOTO 0D7
.................... default : if (c<0x20) c&=0x7; // preklopeni definovatelnych znaku na rozsah 0 az 0x1F
00CB: MOVF 1A,W
00CC: SUBLW 1F
00CD: BTFSS 03.0
00CE: GOTO 0D1
00CF: MOVLW 07
00D0: ANDWF 1A,F
.................... lcd_send_byte(1,c); break; // zapis znak
00D1: MOVLW 01
00D2: MOVWF 1F
00D3: MOVF 1A,W
00D4: MOVWF 20
00D5: CALL 040
00D6: GOTO 0D7
.................... }
00D7: RETLW 00
.................... }
....................
....................
.................... // Zapni kurzor
.................... //
.................... void lcd_cursor_on()
.................... {
.................... lcd_send_byte(0,LCD_CURSOR_ON_);
.................... }
....................
....................
.................... // Vypni kurzor
.................... //
.................... void lcd_cursor_off()
.................... {
.................... lcd_send_byte(0,LCD_CURSOR_OFF_);
.................... }
....................
....................
.................... // Definice vlastnich fontu
.................... //
.................... // Vlastnich definic muze byt jen 8 do pozic 0 az 7 pameti CGRAM radice lcd displeje
.................... // Pro snadne definovani jsou pripraveny nasledujici definice a na konci souboru je uveden
.................... // priklad pouziti definovanych znaku.
....................
....................
.................... // Pomocna procedura pro posilani ridicich dat do radice displeje
.................... //
.................... void lcd_putc2(int Data)
.................... {
.................... lcd_send_byte(1,Data);
.................... }
....................
....................
.................... // Pomocne definice pro programovani obsahu CGRAM
.................... //
.................... #DEFINE lcd_define_start(Code) lcd_send_byte(0,0x40+(Code<<3)); delay_ms(2)
.................... #DEFINE lcd_define_def(String) printf(lcd_putc2,String);
.................... #DEFINE lcd_define_end() lcd_send_byte(0,3); delay_ms(2)
....................
....................
.................... // Vlastni vykonne makro pro definovani fontu do pozice Index CGRAM s definicnim retezcem Def
.................... //
.................... #DEFINE lcd_define_char(Index, Def) lcd_define_start(Index); lcd_define_def(Def); lcd_define_end();
....................
....................
.................... // Pripravene definice fontu vybranych znaku
.................... // V tabulce nesmi byt 00 (konec retezce v printf()), misto toho davame 80
.................... //
.................... #DEFINE LCD_CHAR_BAT100 "\x0E\x1F\x1F\x1F\x1F\x1F\x1F\x1F" /* symbol plne baterie */
.................... #DEFINE LCD_CHAR_BAT50 "\x0E\x1F\x11\x11\x13\x17\x1F\x1F" /* symbol polovicni baterie */
.................... #DEFINE LCD_CHAR_BAT0 "\x0E\x1F\x11\x11\x11\x11\x11\x1F" /* symbol vybite baterie */
.................... #DEFINE LCD_CHAR_LUA "\x04\x0E\x11\x11\x1F\x11\x11\x80" /* A s carkou */
.................... #DEFINE LCD_CHAR_LLA "\x01\x02\x0E\x01\x1F\x11\x0F\x80" /* a s carkou */
.................... #DEFINE LCD_CHAR_HUC "\x0A\x0E\x11\x10\x10\x11\x0E\x80" /* C s hackem */
.................... #DEFINE LCD_CHAR_HLC "\x0A\x04\x0E\x10\x10\x11\x0E\x80" /* c s hackem */
.................... #DEFINE LCD_CHAR_HUD "\x0A\x1C\x12\x11\x11\x12\x1C\x80" /* D s hackem */
.................... #DEFINE LCD_CHAR_HLD "\x05\x03\x0D\x13\x11\x11\x0F\x80" /* d s hackem */
.................... #DEFINE LCD_CHAR_LUE "\x04\x1F\x10\x10\x1E\x10\x1F\x80" /* E s carkou */
.................... #DEFINE LCD_CHAR_LLE "\x01\x02\x0E\x11\x1F\x10\x0E\x80" /* e s carkou */
.................... #DEFINE LCD_CHAR_HUE "\x0A\x1F\x10\x1E\x10\x10\x1F\x80" /* E s hackem */
.................... #DEFINE LCD_CHAR_HLE "\x0A\x04\x0E\x11\x1F\x10\x0E\x80" /* e s hackem */
.................... #DEFINE LCD_CHAR_LUI "\x04\x0E\x04\x04\x04\x04\x0E\x80" /* I s carkou */
.................... #DEFINE LCD_CHAR_LLI "\x02\x04\x80\x0C\x04\x04\x0E\x80" /* i s carkou */
.................... #DEFINE LCD_CHAR_HUN "\x0A\x15\x11\x19\x15\x13\x11\x80" /* N s hackem */
.................... #DEFINE LCD_CHAR_HLN "\x0A\x04\x16\x19\x11\x11\x11\x80" /* n s hackem */
.................... #DEFINE LCD_CHAR_LUO "\x04\x0E\x11\x11\x11\x11\x0E\x80" /* O s carkou */
.................... #DEFINE LCD_CHAR_LLO "\x02\x04\x0E\x11\x11\x11\x0E\x80" /* o s carkou */
.................... #DEFINE LCD_CHAR_HUR "\x0A\x1E\x11\x1E\x14\x12\x11\x80" /* R s hackem */
.................... #DEFINE LCD_CHAR_HLR "\x0A\x04\x16\x19\x10\x10\x10\x80" /* r s hackem */
.................... #DEFINE LCD_CHAR_HUS "\x0A\x0F\x10\x0E\x01\x01\x1E\x80" /* S s hackem */
.................... #DEFINE LCD_CHAR_HLS "\x0A\x04\x0E\x10\x0E\x01\x1E\x80" /* s s hackem */
.................... #DEFINE LCD_CHAR_HUT "\x0A\x1F\x04\x04\x04\x04\x04\x80" /* T s hackem */
.................... #DEFINE LCD_CHAR_HLT "\x0A\x0C\x1C\x08\x08\x09\x06\x80" /* t s hackem */
.................... #DEFINE LCD_CHAR_LUU "\x02\x15\x11\x11\x11\x11\x0E\x80" /* U s carkou */
.................... #DEFINE LCD_CHAR_LLU "\x02\x04\x11\x11\x11\x13\x0D\x80" /* u s carkou */
.................... #DEFINE LCD_CHAR_CUU "\x06\x17\x11\x11\x11\x11\x0E\x80" /* U s krouzkem */
.................... #DEFINE LCD_CHAR_CLU "\x06\x06\x11\x11\x11\x11\x0E\x80" /* u s krouzkem */
.................... #DEFINE LCD_CHAR_LUY "\x02\x15\x11\x0A\x04\x04\x04\x80" /* Y s carkou */
.................... #DEFINE LCD_CHAR_LLY "\x02\x04\x11\x11\x0F\x01\x0E\x80" /* y s carkou */
.................... #DEFINE LCD_CHAR_HUZ "\x0A\x1F\x01\x02\x04\x08\x1F\x80" /* Z s hackem */
.................... #DEFINE LCD_CHAR_HLZ "\x0A\x04\x1F\x02\x04\x08\x1F\x80" /* z s hackem */
....................
....................
.................... // Priklad pouziti definovanych znaku
.................... //
.................... //
.................... //void lcd_sample()
.................... //{
.................... // lcd_define_char(0,LCD_CHAR_BAT50); // Priklad definice znaku baterie do pozice 0
.................... // lcd_define_char(2,LCD_CHAR_HLE LCD_CHAR_LUI); // Priklad definice znaku e s hackem a I s carkou od pozice 2
.................... // // vsimnete si, ze neni carka mezi retezci s definici (oba retezce definuji
.................... // // jediny definicni retezec)
.................... // printf(lcd_putc,"\fZnaky:\20\22\23"); // priklad vypisu znaku z pozice 0, 2 a 3
.................... // delay_ms(1000);
.................... // lcd_define_char(0,LCD_CHAR_BAT0); // Predefinovani tvaru znaku v pozici 0
.................... // delay_ms(1000);
.................... //}
....................
....................
.................... #DEFINE PRIJIMAC PIN_A3 // pin na ktery je pripojen prijimac
.................... #DEFINE SERVO_X PIN_A0 // pin na ktery je pripojeno servo
.................... #DEFINE SERVO_Y PIN_A1
....................
....................
.................... // Prijme datovy nibble vcetne zasynchronizovani
.................... // Chybi dodelat timeout
.................... int8 prijmi_nibble(int8* datovy, int8* data)
.................... {
.................... int8 i;
....................
.................... #IFDEF DEBUG
.................... int1 tmp;
.................... #ENDIF
....................
.................... *data=0;
00D8: MOVF 1D,W
00D9: MOVWF 04
00DA: CLRF 00
....................
.................... // Cekam na dlouhou nulu
.................... for (i=4; i>0; i--)
00DB: MOVLW 04
00DC: MOVWF 1E
00DD: MOVF 1E,F
00DE: BTFSC 03.2
00DF: GOTO 0EE
.................... {
.................... if (input(PRIJIMAC)) i=4;
00E0: BSF 03.5
00E1: BSF 05.3
00E2: BCF 03.5
00E3: BTFSS 05.3
00E4: GOTO 0E7
00E5: MOVLW 04
00E6: MOVWF 1E
.................... delay_us(IMPULS/2);
00E7: MOVLW 29
00E8: MOVWF 0C
00E9: DECFSZ 0C,F
00EA: GOTO 0E9
00EB: NOP
.................... }
00EC: DECF 1E,F
00ED: GOTO 0DD
....................
.................... // Cekam na jednicku (start ramce)
.................... for (; !input(PRIJIMAC); )
00EE: BSF 03.5
00EF: BSF 05.3
00F0: BCF 03.5
00F1: BTFSS 05.3
.................... {
.................... }
00F2: GOTO 0EE
....................
.................... // Ctu typ nibblu
.................... delay_us(2*IMPULS+2*IMPULS/3);
00F3: MOVLW DD
00F4: MOVWF 0C
00F5: DECFSZ 0C,F
00F6: GOTO 0F5
00F7: NOP
00F8: NOP
.................... *datovy=input(PRIJIMAC);
00F9: MOVF 1C,W
00FA: MOVWF 04
00FB: BSF 03.5
00FC: BSF 05.3
00FD: MOVLW 00
00FE: BCF 03.5
00FF: BTFSC 05.3
0100: MOVLW 01
0101: MOVWF 00
....................
.................... // Prenasim bity
.................... for (i=0; i<4; i++)
0102: CLRF 1E
0103: MOVF 1E,W
0104: SUBLW 03
0105: BTFSS 03.0
0106: GOTO 128
.................... {
.................... delay_us(2*IMPULS);
0107: MOVLW A6
0108: MOVWF 0C
0109: DECFSZ 0C,F
010A: GOTO 109
010B: NOP
.................... *data >>= 1;
010C: MOVF 1D,W
010D: MOVWF 04
010E: BCF 03.0
010F: RRF 00,W
0110: MOVWF 0C
0111: MOVWF 00
.................... if (input(PRIJIMAC)) *data +=0b1000;
0112: BSF 03.5
0113: BSF 05.3
0114: BCF 03.5
0115: BTFSS 05.3
0116: GOTO 11C
0117: MOVF 1D,W
0118: MOVWF 04
0119: MOVLW 08
011A: ADDWF 00,W
011B: MOVWF 00
....................
.................... #IFDEF DEBUG
.................... output_bit(DEBUG,tmp);
011C: BTFSC 1F.0
011D: GOTO 120
011E: BCF 05.2
011F: GOTO 121
0120: BSF 05.2
0121: BSF 03.5
0122: BCF 05.2
.................... tmp=!tmp;
0123: MOVLW 01
0124: BCF 03.5
0125: XORWF 1F,F
.................... #ELSE
.................... delay_us(20);
.................... #ENDIF
.................... }
0126: INCF 1E,F
0127: GOTO 103
....................
.................... return FALSE;
0128: MOVLW 00
0129: MOVWF 0D
012A: RETLW 00
.................... }
....................
....................
.................... // Prijme datovy ramec
.................... // Pokud nastane chyba vraci kod chyby
.................... int8 prijmi_ramec(int8* kanal, int8* data)
.................... {
.................... int8 datovy;
.................... int8 suma;
....................
.................... // Cekej na synchronizacni nibble
.................... do
.................... {
.................... if (prijmi_nibble(&datovy, data)) return 1; // chyba timout
012B: MOVLW 1A
012C: MOVWF 1C
012D: MOVF 19,W
012E: MOVWF 1D
012F: CALL 0D8
0130: MOVF 0D,F
0131: BTFSC 03.2
0132: GOTO 136
0133: MOVLW 01
0134: MOVWF 0D
0135: GOTO 186
.................... }
.................... while(datovy);
0136: MOVF 1A,F
0137: BTFSS 03.2
0138: GOTO 12B
....................
.................... // Zkontroluj magickou hodnotu
.................... if (*data != SYNC_NIBBLE) return 2; // chyba magickeho kodu ramce
0139: MOVF 19,W
013A: MOVWF 04
013B: MOVF 00,W
013C: SUBLW 0F
013D: BTFSC 03.2
013E: GOTO 142
013F: MOVLW 02
0140: MOVWF 0D
0141: GOTO 186
....................
.................... // Prijmi cislo kanalu
.................... if (prijmi_nibble(&datovy, kanal)) return 1; // chyba timeout
0142: MOVLW 1A
0143: MOVWF 1C
0144: MOVF 18,W
0145: MOVWF 1D
0146: CALL 0D8
0147: MOVF 0D,F
0148: BTFSC 03.2
0149: GOTO 14D
014A: MOVLW 01
014B: MOVWF 0D
014C: GOTO 186
.................... if (!datovy) return 3; // chyba typu nibblu
014D: MOVF 1A,F
014E: BTFSS 03.2
014F: GOTO 153
0150: MOVLW 03
0151: MOVWF 0D
0152: GOTO 186
....................
.................... // Prijmi data
.................... if (prijmi_nibble(&datovy, data)) return 1; // chyba timeout
0153: MOVLW 1A
0154: MOVWF 1C
0155: MOVF 19,W
0156: MOVWF 1D
0157: CALL 0D8
0158: MOVF 0D,F
0159: BTFSC 03.2
015A: GOTO 15E
015B: MOVLW 01
015C: MOVWF 0D
015D: GOTO 186
.................... if (!datovy) return 3; // chyba typu nibblu
015E: MOVF 1A,F
015F: BTFSS 03.2
0160: GOTO 164
0161: MOVLW 03
0162: MOVWF 0D
0163: GOTO 186
....................
.................... // Prijmi zabezpeceni
.................... if (prijmi_nibble(&datovy, &suma)) return 1; // chyba timeout
0164: MOVLW 1A
0165: MOVWF 1C
0166: MOVLW 1B
0167: MOVWF 1D
0168: CALL 0D8
0169: MOVF 0D,F
016A: BTFSC 03.2
016B: GOTO 16F
016C: MOVLW 01
016D: MOVWF 0D
016E: GOTO 186
.................... if (!datovy) return 3; // chyba typu nibblu
016F: MOVF 1A,F
0170: BTFSS 03.2
0171: GOTO 175
0172: MOVLW 03
0173: MOVWF 0D
0174: GOTO 186
....................
.................... // Zkontroluj kontrolni soucet
.................... if (((*kanal+*data) & 0b1111) != suma) return 3; // chyba kontrolniho souctu
0175: MOVF 18,W
0176: MOVWF 04
0177: MOVF 00,W
0178: MOVWF 1C
0179: MOVF 19,W
017A: MOVWF 04
017B: MOVF 00,W
017C: ADDWF 1C,W
017D: ANDLW 0F
017E: SUBWF 1B,W
017F: BTFSC 03.2
0180: GOTO 184
0181: MOVLW 03
0182: MOVWF 0D
0183: GOTO 186
....................
.................... return 0;
0184: MOVLW 00
0185: MOVWF 0D
0186: GOTO 1FA (RETURN)
.................... }
....................
....................
....................
.................... int8 x,y;
.................... int8 xc,yc; // pocitadla aktualizace x a y
.................... int e1,e2,e3,e4; // pocitadla chyb - ladici
....................
.................... void main()
.................... {
*
01CE: CLRF 04
01CF: MOVLW 1F
01D0: ANDWF 03,F
.................... lcd_init(); // zinicializuj LCD display
01D1: GOTO 056
.................... delay_ms(5);
01D2: MOVLW 05
01D3: MOVWF 1B
01D4: CALL 015
.................... printf(lcd_putc,"Ahoj...");
*
000C: BCF 0A.0
000D: BCF 0A.1
000E: BCF 0A.2
000F: ADDWF 02,F
0010: RETLW 41
0011: RETLW 68
0012: RETLW 6F
0013: RETLW 6A
0014: RETLW 00
*
01D5: CLRF 18
01D6: MOVF 18,W
01D7: CALL 00C
01D8: INCF 18,F
01D9: MOVWF 1A
01DA: CALL 0A0
01DB: MOVLW 04
01DC: SUBWF 18,W
01DD: BTFSS 03.2
01DE: GOTO 1D6
01DF: MOVLW 03
01E0: MOVWF 19
01E1: MOVLW 2E
01E2: MOVWF 1A
01E3: CALL 0A0
01E4: DECFSZ 19,F
01E5: GOTO 1E1
.................... delay_ms(300);
01E6: MOVLW 02
01E7: MOVWF 18
01E8: MOVLW 96
01E9: MOVWF 1B
01EA: CALL 015
01EB: DECFSZ 18,F
01EC: GOTO 1E8
....................
.................... x = 0;
01ED: CLRF 0E
.................... y = 0;
01EE: CLRF 0F
.................... xc = 0;
01EF: CLRF 10
.................... yc = 0;
01F0: CLRF 11
.................... e1 = 0;
01F1: CLRF 12
.................... e2 = 0;
01F2: CLRF 13
.................... e3 = 0;
01F3: CLRF 14
.................... e4 = 0;
01F4: CLRF 15
....................
.................... while (true)
.................... {
.................... int8 kanal, data;
....................
.................... if (prijmi_ramec(&kanal,&data))
01F5: MOVLW 16
01F6: MOVWF 18
01F7: MOVLW 17
01F8: MOVWF 19
01F9: GOTO 12B
01FA: MOVF 0D,F
01FB: BTFSC 03.2
01FC: GOTO 1FF
.................... e1++;
01FD: INCF 12,F
.................... else
01FE: GOTO 2A6
.................... {
.................... switch (kanal) // rozeskoc se podle adresy osy
01FF: MOVLW 01
0200: SUBWF 16,W
0201: ADDLW FD
0202: BTFSC 03.0
0203: GOTO 210
0204: ADDLW 03
0205: GOTO 2A8
.................... {
.................... case OSA_X:
.................... {
.................... x=data;
0206: MOVF 17,W
0207: MOVWF 0E
.................... xc++;
0208: INCF 10,F
.................... break;
0209: GOTO 210
.................... };
.................... case OSA_Y:
.................... {
.................... y=data;
020A: MOVF 17,W
020B: MOVWF 0F
.................... yc++;
020C: INCF 11,F
.................... break;
020D: GOTO 210
.................... };
.................... case TLs:
.................... {
.................... e4++;
020E: INCF 15,F
.................... break;
020F: GOTO 210
.................... };
.................... };
*
02A8: BCF 0A.0
02A9: BSF 0A.1
02AA: BCF 0A.2
02AB: ADDWF 02,F
02AC: GOTO 206
02AD: GOTO 20A
02AE: GOTO 20E
....................
.................... // ladici vypisy
.................... lcd_gotoxy(1,1); // vytiskni X a Y
*
0210: MOVLW 01
0211: MOVWF 1B
0212: MOVWF 1C
0213: CALL 08F
.................... printf(lcd_putc,"X%2U %3U%3U%3U ", x, xc, e1, e2);
*
019C: MOVF 0D,W
019D: MOVF 18,W
019E: MOVWF 1A
019F: MOVLW 64
01A0: MOVWF 1B
01A1: CALL 187
01A2: MOVF 0C,W
01A3: MOVWF 18
01A4: MOVF 0D,W
01A5: MOVLW 30
01A6: BTFSS 03.2
01A7: GOTO 1AF
01A8: BTFSC 19.0
01A9: BSF 19.3
01AA: BTFSC 19.3
01AB: GOTO 1B5
01AC: BTFSC 19.4
01AD: MOVLW 20
01AE: GOTO 1B1
01AF: BCF 19.3
01B0: BCF 19.4
01B1: ADDWF 0D,F
01B2: MOVF 0D,W
01B3: MOVWF 1A
01B4: CALL 0A0
01B5: MOVF 18,W
01B6: MOVWF 1A
01B7: MOVLW 0A
01B8: MOVWF 1B
01B9: CALL 187
01BA: MOVF 0C,W
01BB: MOVWF 18
01BC: MOVF 0D,W
01BD: MOVLW 30
01BE: BTFSS 03.2
01BF: GOTO 1C4
01C0: BTFSC 19.3
01C1: GOTO 1C8
01C2: BTFSC 19.4
01C3: MOVLW 20
01C4: ADDWF 0D,F
01C5: MOVF 0D,W
01C6: MOVWF 1A
01C7: CALL 0A0
01C8: MOVLW 30
01C9: ADDWF 18,F
01CA: MOVF 18,W
01CB: MOVWF 1A
01CC: CALL 0A0
01CD: RETLW 00
*
0214: MOVLW 58
0215: MOVWF 1A
0216: CALL 0A0
0217: MOVF 0E,W
0218: MOVWF 18
0219: MOVLW 11
021A: MOVWF 19
021B: CALL 19C
021C: MOVLW 20
021D: MOVWF 1A
021E: CALL 0A0
021F: MOVF 10,W
0220: MOVWF 18
0221: MOVLW 10
0222: MOVWF 19
0223: CALL 19C
0224: MOVF 12,W
0225: MOVWF 18
0226: MOVLW 10
0227: MOVWF 19
0228: CALL 19C
0229: MOVF 13,W
022A: MOVWF 18
022B: MOVLW 10
022C: MOVWF 19
022D: CALL 19C
022E: MOVLW 20
022F: MOVWF 1A
0230: CALL 0A0
0231: MOVLW 20
0232: MOVWF 1A
0233: CALL 0A0
.................... lcd_gotoxy(1,2);
0234: MOVLW 01
0235: MOVWF 1B
0236: MOVLW 02
0237: MOVWF 1C
0238: CALL 08F
.................... printf(lcd_putc,"Y%2U %3U%3U%3U ", y, yc, e3, e4);
0239: MOVLW 59
023A: MOVWF 1A
023B: CALL 0A0
023C: MOVF 0F,W
023D: MOVWF 18
023E: MOVLW 11
023F: MOVWF 19
0240: CALL 19C
0241: MOVLW 20
0242: MOVWF 1A
0243: CALL 0A0
0244: MOVF 11,W
0245: MOVWF 18
0246: MOVLW 10
0247: MOVWF 19
0248: CALL 19C
0249: MOVF 14,W
024A: MOVWF 18
024B: MOVLW 10
024C: MOVWF 19
024D: CALL 19C
024E: MOVF 15,W
024F: MOVWF 18
0250: MOVLW 10
0251: MOVWF 19
0252: CALL 19C
0253: MOVLW 20
0254: MOVWF 1A
0255: CALL 0A0
0256: MOVLW 20
0257: MOVWF 1A
0258: CALL 0A0
....................
.................... // ovladani serv
.................... output_high(SERVO_X);
0259: BSF 03.5
025A: BCF 05.0
025B: BCF 03.5
025C: BSF 05.0
.................... delay_ms(1);
025D: MOVLW 01
025E: MOVWF 1B
025F: CALL 015
.................... for (data=x; data--; data>0)
0260: MOVF 0E,W
0261: MOVWF 17
0262: MOVF 17,W
0263: DECF 17,F
0264: XORLW 00
0265: BTFSC 03.2
0266: GOTO 271
.................... delay_us(65);
0267: MOVLW 15
0268: MOVWF 0C
0269: DECFSZ 0C,F
026A: GOTO 269
026B: NOP
026C: MOVF 17,F
026D: BTFSS 03.2
026E: GOTO 270
026F: MOVLW 00
0270: GOTO 262
.................... output_low(SERVO_X);
0271: BSF 03.5
0272: BCF 05.0
0273: BCF 03.5
0274: BCF 05.0
....................
.................... output_high(SERVO_Y);
0275: BSF 03.5
0276: BCF 05.1
0277: BCF 03.5
0278: BSF 05.1
.................... delay_ms(1);
0279: MOVLW 01
027A: MOVWF 1B
027B: CALL 015
.................... for (data=y; data--; data>0)
027C: MOVF 0F,W
027D: MOVWF 17
027E: MOVF 17,W
027F: DECF 17,F
0280: XORLW 00
0281: BTFSC 03.2
0282: GOTO 28D
.................... delay_us(65);
0283: MOVLW 15
0284: MOVWF 0C
0285: DECFSZ 0C,F
0286: GOTO 285
0287: NOP
0288: MOVF 17,F
0289: BTFSS 03.2
028A: GOTO 28C
028B: MOVLW 00
028C: GOTO 27E
.................... output_low(SERVO_Y);
028D: BSF 03.5
028E: BCF 05.1
028F: BCF 03.5
0290: BCF 05.1
....................
.................... for (data=30-x-y; data--; data>0)
0291: MOVF 0E,W
0292: SUBLW 1E
0293: MOVWF 0D
0294: MOVF 0F,W
0295: SUBWF 0D,W
0296: MOVWF 17
0297: MOVF 17,W
0298: DECF 17,F
0299: XORLW 00
029A: BTFSC 03.2
029B: GOTO 2A6
.................... delay_us(65);
029C: MOVLW 15
029D: MOVWF 0C
029E: DECFSZ 0C,F
029F: GOTO 29E
02A0: NOP
02A1: MOVF 17,F
02A2: BTFSS 03.2
02A3: GOTO 2A5
02A4: MOVLW 00
02A5: GOTO 297
....................
.................... }
.................... }
02A6: GOTO 1F5
.................... }
....................
02A7: SLEEP
....................
....................
/schemata/prenos/letadlo/SW/prijimac/zaloha/06/MAIN.PJT
0,0 → 1,32
[PROJECT]
Target=main.HEX
Development_Mode=
Processor=0x684A
ToolSuite=CCS
 
[Directories]
Include=C:\Program Files\PICC\Devices;C:\Program Files\PICC\Dri;
Library=
LinkerScript=
 
[Target Data]
FileList=main.c;
BuildTool=CCSC
OptionString=-p +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
 
/schemata/prenos/letadlo/SW/prijimac/zaloha/06/MAIN.STA
0,0 → 1,42
 
ROM used: 687 (67%)
337 (33%) including unused fragments
 
1 Average locations per line
5 Average locations per statement
 
RAM used: 12 (18%) at main() level
24 (35%) worst case
 
Lines Stmts % Files
----- ----- --- -----
178 89 66 d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\main.c
5 0 0 d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\main.h
111 0 0 C:\Program Files\PICC\Devices\16F84.h
6 0 0 d:\@kaklik\programy\pic_c\prenos\letadlo\common.h
272 46 21 d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\MYLCD.C
----- -----
1144 270 Total
 
Page ROM % RAM Functions:
---- --- --- --- ----------
0 21 3 1 delay_ms
0 8 1 0 @const22
0 22 3 3 lcd_send_nibble
0 22 3 2 lcd_send_byte
0 57 8 2 lcd_init
0 17 2 4 lcd_gotoxy
0 56 8 1 lcd_putc
0 83 12 6 prijmi_nibble
0 92 13 7 prijmi_ramec
0 218 32 2 main
0 9 1 0 @const10159
0 7 1 0 @goto10182
0 21 3 3 @DIV88
0 50 7 2 @PRINTF_U_150
 
Segment Used Free
--------- ---- ----
0000-0003 4 0
0004-03FF 683 337
 
/schemata/prenos/letadlo/SW/prijimac/zaloha/06/MAIN.SYM
0,0 → 1,71
00C @SCRATCH
00D @SCRATCH
00D _RETURN_
00E x
00F y
010 xc
011 yc
012 e1
013 e2
014 e3
015 e4
016 kanal
017 Data
018 lcd_init.i
018 prijmi_ramec.kanal
018 @PRINTF_U_150.P1
018 main.@SCRATCH
019 prijmi_ramec.Data
019 @PRINTF_U_150.P1
019 lcd_init.@SCRATCH
019 main.@SCRATCH
01A lcd_putc.c
01A prijmi_ramec.datovy
01A @DIV88.P1
01B delay_ms.P1
01B lcd_gotoxy.x
01B prijmi_ramec.suma
01B @DIV88.P1
01C lcd_gotoxy.y
01C prijmi_nibble.datovy
01C prijmi_ramec.@SCRATCH
01C @DIV88.@SCRATCH
01D lcd_gotoxy.Adr
01D prijmi_nibble.Data
01D prijmi_ramec.@SCRATCH
01E prijmi_nibble.i
01E lcd_gotoxy.@SCRATCH
01E prijmi_ramec.@SCRATCH
01F lcd_send_byte.Adr
01F.0 prijmi_nibble.tmp
020 lcd_send_byte.n
020 prijmi_nibble.@SCRATCH
021 lcd_send_nibble.n
021 prijmi_nibble.@SCRATCH
022 lcd_send_nibble.@SCRATCH
023 lcd_send_nibble.@SCRATCH
delay_us.P1
-002 LCD_INIT_STRING
lcd_putc2.Data
 
0015 delay_ms
0004 @const22
002A lcd_send_nibble
0040 lcd_send_byte
0056 lcd_init
008F lcd_gotoxy
00A0 lcd_putc
00D8 prijmi_nibble
012B prijmi_ramec
01CE main
000C @const10159
02A8 @goto10182
0187 @DIV88
019C @PRINTF_U_150
 
Project Files:
d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\main.c
d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\main.h
C:\Program Files\PICC\Devices\16F84.h
d:\@kaklik\programy\pic_c\prenos\letadlo\common.h
d:\@kaklik\programy\pic_c\prenos\letadlo\prijimac\MYLCD.C
/schemata/prenos/letadlo/SW/prijimac/zaloha/06/MAIN.TRE
0,0 → 1,702
ÀÄmain
ÀÄmain 0/218 Ram=2
ÃÄ??0??
ÃÄlcd_init 0/57 Ram=2
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@const22 0/8 Ram=0
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄdelay_ms 0/21 Ram=1
ÃÄdelay_ms 0/21 Ram=1
ÃÄ@const10159 0/9 Ram=0
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄdelay_ms 0/21 Ram=1
ÃÄprijmi_ramec 0/92 Ram=7
³ ÃÄprijmi_nibble 0/83 Ram=6
³ ÃÄprijmi_nibble 0/83 Ram=6
³ ÃÄprijmi_nibble 0/83 Ram=6
³ ÀÄprijmi_nibble 0/83 Ram=6
ÃÄ@goto10182 0/7 Ram=0
ÃÄlcd_gotoxy 0/17 Ram=4
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_150 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_150 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_150 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_150 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_gotoxy 0/17 Ram=4
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_150 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_150 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_150 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄ@PRINTF_U_150 0/50 Ram=2
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄlcd_putc 0/56 Ram=1
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄdelay_ms 0/21 Ram=1
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄlcd_putc 0/56 Ram=1
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄdelay_ms 0/21 Ram=1
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_gotoxy 0/17 Ram=4
³ ³ ÀÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÃÄlcd_send_byte 0/22 Ram=2
³ ³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ³ ÀÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_byte 0/22 Ram=2
³ ÃÄlcd_send_nibble 0/22 Ram=3
³ ÀÄlcd_send_nibble 0/22 Ram=3
ÃÄdelay_ms 0/21 Ram=1
ÀÄdelay_ms 0/21 Ram=1
/schemata/prenos/letadlo/SW/prijimac/zaloha/06/MYLCD.C
0,0 → 1,271
// LCD modul pro ovladani dvouradkoveho LCD modulu se standardnim Hitachi radicem
// (c)miho 2002
//
// Historie:
//
// 0.0 Uvodni verze se snadnou definici portu LCD displeje
//
//
// Funkce:
//
// lcd_init() inicializuje LCD displej a porty, nutno volat jako prvni
//
// lcd_putc(c) zapis snaku do lcd displeje, zpracovava nasledujici ridici znaky
// \f = \x0C - nova stranka - smazani displeje
// \n = \x0A - odradkovani (prechod na druhou radku)
// \b = \x08 - backspace - posunuti kurzoru o 1 pozici zpet
// \r = \x0D - goto home to position 1,1
// \0 .. \7 - definovatelne znaky v pozicich 0 az 7 v CGRAM
// \20 .. \27 - alternativne zapsane znaky (oktalove) v pozicich 0 az 7 CGRAM
// Pozor na to, ze funkce printf konci tisk pokud narazi na \0 (konec retezce)
//
// lcd_gotoxy(x,y) presune kurzor na uvedenou adresu
// nekontroluje parametry
//
// lcd_cursor_on zapne kurzor
// lcd_cursor_off vypne kurzor
//
// lcd_define_char(Index, Def) Makro, ktere definuje znaky od pozice Index obsahem definicniho
// retezce Def. Kazdych 8 znaku retezce Def definuje dalsi znak v CGRAM.
// Kapacita CGRAM je celkem 8 znaku s indexem 0 az 7.
// Na konci se provede lcd_gotoxy(1,1).
// Na konci teto knihovny je priklad pouziti definovanych znaku
//
// Definice portu:
//
// #DEFINE LCD_RS PIN_B2 // rizeni registru LCD displeje
// #DEFINE LCD_E PIN_B1 // enable LCD displeje
// #DEFINE LCD_DATA_LSB PIN_C2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
 
 
 
 
// Privatni sekce, cist jen v pripade, ze neco nefunguje
 
 
 
 
// Generovane defince portu pro ucely teto knihovny aby kod generoval spravne IO operace a soucasne
// bylo mozne jednoduse deklarovat pripojene piny LCD displeje pri pouziti teto knihovny. Problem spociva
// v tom, ze se musi spravne ridit smery portu a soucasne datovy port zabira jen 4 bity ze zadaneho portu
//
#DEFINE LCD_SHIFT (LCD_DATA_LSB&7) // pocet bitu posuvu dataoveho kanalu v datovem portu
#DEFINE LCD_PORT (LCD_DATA_LSB>>3) // adresa LCD datoveho portu
#DEFINE LCD_TRIS (LCD_PORT+0x80) // adresa prislusneho TRIS registru
#DEFINE LCD_MASK (0xF<<LCD_SHIFT) // maska platnych bitu
//
#IF LCD_SHIFT>4 // kontrola mezi
#ERROR LCD data port LSB bit not in range 0..4
#ENDIF
 
 
// Definice konstant pro LCD display
//
#define LCD_CURSOR_ON_ 0x0E // kurzor jako blikajici radka pod znakem
#define LCD_CURSOR_OFF_ 0x0C // zadny kurzor
#define LCD_LINE_2 0x40 // adresa 1. znaku 2. radky
 
 
// Definice rezimu LCD displeje
//
BYTE const LCD_INIT_STRING[4] =
{
0x28, // intrfejs 4 bity, 2 radky, font 5x7
LCD_CURSOR_OFF_, // display on, kurzor off,
0x01, // clear displeje
0x06 // inkrement pozice kurzoru (posun kurzoru doprava)
};
 
 
// Odesle nibble do displeje (posle data a klikne signalem e)
//
void lcd_send_nibble( BYTE n )
{
*LCD_PORT = (*LCD_PORT & ~LCD_MASK) | ((n << LCD_SHIFT) & LCD_MASK); // nastav datove bity portu a ostatni zachovej
output_bit(LCD_E,1); // vzestupna hrana
delay_us(1); // pockej alespon 450ns od e nebo alespon 195ns od dat
output_bit(LCD_E,0); // sestupna hrana (minimalni perioda e je 1us)
}
 
 
// Odesle bajt do registru LCD
//
// Pokud je Adr=0 .. instrukcni registr
// Pokud je Adr=1 .. datovy registr
//
void lcd_send_byte( BOOLEAN Adr, BYTE n )
{
output_bit(LCD_RS,Adr); // vyber registr
swap(n);
lcd_send_nibble(n); // posli horni pulku bajtu
swap(n);
lcd_send_nibble(n); // posli spodni pulku bajtu
delay_us(40); // minimalni doba na provedeni prikazu
}
 
 
// Provede inicializaci LCD displeje, smaze obsah a nastavi mod displeje
//
// Tato procedura se musi volat pred pouzitim ostatnich lcd_ procedur
//
void lcd_init()
{
 
int i; // pocitadlo cyklu
 
delay_ms(20); // spozdeni pro provedeni startu displeje po zapnuti napajeni
 
*LCD_TRIS = *LCD_TRIS & ~LCD_MASK; // nuluj odpovidajici bity tris registru datoveho portu LCD
 
output_bit(LCD_RS,0); // nastav jako vystup a nastav klidovy stav
output_bit(LCD_E,0); // nastav jako vystup a nastav klidovy stav
 
for (i=0; i<3; i++) // nastav lcd do rezimu 8 bitu sbernice
{
delay_ms(2); // muze byt rozdelany prenos dat (2x 4 bity) nebo pomaly povel
lcd_send_nibble(3); // rezim 8 bitu
}
 
delay_us(40); // cas na zpracovani
lcd_send_nibble(2); // nastav rezim 4 bitu (plati od nasledujiciho prenosu)
delay_us(40); // cas na zpracovani
 
for (i=0;i<3;i++) // proved inicializaci (nastaveni modu, smazani apod)
{
lcd_send_byte(0,LCD_INIT_STRING[i]);
delay_ms(2);
}
}
 
 
// Proved presun kurzoru
//
// Pozice 1.1 je domu
//
void lcd_gotoxy( BYTE x, BYTE y)
{
 
BYTE Adr;
 
Adr=x-1;
if(y==2)
Adr+=LCD_LINE_2;
 
lcd_send_byte(0,0x80|Adr);
}
 
 
// Zapis znaku na displej, zpracovani ridicich znaku
//
void lcd_putc( char c)
{
 
switch (c)
{
case '\f' : lcd_send_byte(0,1); // smaz displej
delay_ms(2);
break;
case '\n' : lcd_gotoxy(1,2); break; // presun se na 1. znak 2. radky
case '\r' : lcd_gotoxy(1,1); break; // presun home
case '\b' : lcd_send_byte(0,0x10); break; // posun kurzor o 1 zpet
default : if (c<0x20) c&=0x7; // preklopeni definovatelnych znaku na rozsah 0 az 0x1F
lcd_send_byte(1,c); break; // zapis znak
}
}
 
 
// Zapni kurzor
//
void lcd_cursor_on()
{
lcd_send_byte(0,LCD_CURSOR_ON_);
}
 
 
// Vypni kurzor
//
void lcd_cursor_off()
{
lcd_send_byte(0,LCD_CURSOR_OFF_);
}
 
 
// Definice vlastnich fontu
//
// Vlastnich definic muze byt jen 8 do pozic 0 az 7 pameti CGRAM radice lcd displeje
// Pro snadne definovani jsou pripraveny nasledujici definice a na konci souboru je uveden
// priklad pouziti definovanych znaku.
 
 
// Pomocna procedura pro posilani ridicich dat do radice displeje
//
void lcd_putc2(int Data)
{
lcd_send_byte(1,Data);
}
 
 
// Pomocne definice pro programovani obsahu CGRAM
//
#DEFINE lcd_define_start(Code) lcd_send_byte(0,0x40+(Code<<3)); delay_ms(2)
#DEFINE lcd_define_def(String) printf(lcd_putc2,String);
#DEFINE lcd_define_end() lcd_send_byte(0,3); delay_ms(2)
 
 
// Vlastni vykonne makro pro definovani fontu do pozice Index CGRAM s definicnim retezcem Def
//
#DEFINE lcd_define_char(Index, Def) lcd_define_start(Index); lcd_define_def(Def); lcd_define_end();
 
 
// Pripravene definice fontu vybranych znaku
// V tabulce nesmi byt 00 (konec retezce v printf()), misto toho davame 80
//
#DEFINE LCD_CHAR_BAT100 "\x0E\x1F\x1F\x1F\x1F\x1F\x1F\x1F" /* symbol plne baterie */
#DEFINE LCD_CHAR_BAT50 "\x0E\x1F\x11\x11\x13\x17\x1F\x1F" /* symbol polovicni baterie */
#DEFINE LCD_CHAR_BAT0 "\x0E\x1F\x11\x11\x11\x11\x11\x1F" /* symbol vybite baterie */
#DEFINE LCD_CHAR_LUA "\x04\x0E\x11\x11\x1F\x11\x11\x80" /* A s carkou */
#DEFINE LCD_CHAR_LLA "\x01\x02\x0E\x01\x1F\x11\x0F\x80" /* a s carkou */
#DEFINE LCD_CHAR_HUC "\x0A\x0E\x11\x10\x10\x11\x0E\x80" /* C s hackem */
#DEFINE LCD_CHAR_HLC "\x0A\x04\x0E\x10\x10\x11\x0E\x80" /* c s hackem */
#DEFINE LCD_CHAR_HUD "\x0A\x1C\x12\x11\x11\x12\x1C\x80" /* D s hackem */
#DEFINE LCD_CHAR_HLD "\x05\x03\x0D\x13\x11\x11\x0F\x80" /* d s hackem */
#DEFINE LCD_CHAR_LUE "\x04\x1F\x10\x10\x1E\x10\x1F\x80" /* E s carkou */
#DEFINE LCD_CHAR_LLE "\x01\x02\x0E\x11\x1F\x10\x0E\x80" /* e s carkou */
#DEFINE LCD_CHAR_HUE "\x0A\x1F\x10\x1E\x10\x10\x1F\x80" /* E s hackem */
#DEFINE LCD_CHAR_HLE "\x0A\x04\x0E\x11\x1F\x10\x0E\x80" /* e s hackem */
#DEFINE LCD_CHAR_LUI "\x04\x0E\x04\x04\x04\x04\x0E\x80" /* I s carkou */
#DEFINE LCD_CHAR_LLI "\x02\x04\x80\x0C\x04\x04\x0E\x80" /* i s carkou */
#DEFINE LCD_CHAR_HUN "\x0A\x15\x11\x19\x15\x13\x11\x80" /* N s hackem */
#DEFINE LCD_CHAR_HLN "\x0A\x04\x16\x19\x11\x11\x11\x80" /* n s hackem */
#DEFINE LCD_CHAR_LUO "\x04\x0E\x11\x11\x11\x11\x0E\x80" /* O s carkou */
#DEFINE LCD_CHAR_LLO "\x02\x04\x0E\x11\x11\x11\x0E\x80" /* o s carkou */
#DEFINE LCD_CHAR_HUR "\x0A\x1E\x11\x1E\x14\x12\x11\x80" /* R s hackem */
#DEFINE LCD_CHAR_HLR "\x0A\x04\x16\x19\x10\x10\x10\x80" /* r s hackem */
#DEFINE LCD_CHAR_HUS "\x0A\x0F\x10\x0E\x01\x01\x1E\x80" /* S s hackem */
#DEFINE LCD_CHAR_HLS "\x0A\x04\x0E\x10\x0E\x01\x1E\x80" /* s s hackem */
#DEFINE LCD_CHAR_HUT "\x0A\x1F\x04\x04\x04\x04\x04\x80" /* T s hackem */
#DEFINE LCD_CHAR_HLT "\x0A\x0C\x1C\x08\x08\x09\x06\x80" /* t s hackem */
#DEFINE LCD_CHAR_LUU "\x02\x15\x11\x11\x11\x11\x0E\x80" /* U s carkou */
#DEFINE LCD_CHAR_LLU "\x02\x04\x11\x11\x11\x13\x0D\x80" /* u s carkou */
#DEFINE LCD_CHAR_CUU "\x06\x17\x11\x11\x11\x11\x0E\x80" /* U s krouzkem */
#DEFINE LCD_CHAR_CLU "\x06\x06\x11\x11\x11\x11\x0E\x80" /* u s krouzkem */
#DEFINE LCD_CHAR_LUY "\x02\x15\x11\x0A\x04\x04\x04\x80" /* Y s carkou */
#DEFINE LCD_CHAR_LLY "\x02\x04\x11\x11\x0F\x01\x0E\x80" /* y s carkou */
#DEFINE LCD_CHAR_HUZ "\x0A\x1F\x01\x02\x04\x08\x1F\x80" /* Z s hackem */
#DEFINE LCD_CHAR_HLZ "\x0A\x04\x1F\x02\x04\x08\x1F\x80" /* z s hackem */
 
 
// Priklad pouziti definovanych znaku
//
//
//void lcd_sample()
//{
// lcd_define_char(0,LCD_CHAR_BAT50); // Priklad definice znaku baterie do pozice 0
// lcd_define_char(2,LCD_CHAR_HLE LCD_CHAR_LUI); // Priklad definice znaku e s hackem a I s carkou od pozice 2
// // vsimnete si, ze neni carka mezi retezci s definici (oba retezce definuji
// // jediny definicni retezec)
// printf(lcd_putc,"\fZnaky:\20\22\23"); // priklad vypisu znaku z pozice 0, 2 a 3
// delay_ms(1000);
// lcd_define_char(0,LCD_CHAR_BAT0); // Predefinovani tvaru znaku v pozici 0
// delay_ms(1000);
//}
/schemata/prenos/letadlo/SW/prijimac/zaloha/06/PRG.BAT
0,0 → 1,6
call picpgr stop
call picpgr erase pic16f84
call picpgr program main.hex hex pic16f84
call picpgr run
pause
call picpgr stop
/schemata/prenos/letadlo/SW/prijimac/zaloha/06/PRG.PIF
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
/schemata/prenos/letadlo/SW/prijimac/zaloha/06/RUN.BAT
0,0 → 1,5
call picpgr run
pause
call picpgr stop
pause
run.bat
/schemata/prenos/letadlo/SW/prijimac/zaloha/06/VC.MNU
0,0 → 1,4
R: Run
picpgr run
S: Stop
picpgr stop
/schemata/prenos/letadlo/SW/prijimac/zaloha/06/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
/schemata/prenos/letadlo/SW/prijimac/zaloha/main.c
0,0 → 1,185
// Prijimac
 
#DEFINE DEBUG PIN_A4 // ladici pomocne synchronizacni impulzy
 
#include "main.h"
#include "..\common.h"
 
#DEFINE LCD_RS PIN_B1 // rizeni registru LCD displeje
#DEFINE LCD_E PIN_B0 // enable LCD displeje
#DEFINE LCD_DATA_LSB PIN_B2 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
#INCLUDE "MYLCD.C"
 
#DEFINE PRIJIMAC PIN_A3 // pin na ktery je pripojen prijimac
#DEFINE SERVO_X PIN_A0 // pin na ktery je pripojeno servo
#DEFINE SERVO_Y PIN_A1
 
// Prijme datovy nibble vcetne zasynchronizovani
// Chybi dodelat timeout
int8 prijmi_nibble(int8* datovy, int8* data)
{
int8 i;
 
#IFDEF DEBUG
int1 tmp;
#ENDIF
 
*data=0;
 
// Cekam na dlouhou nulu
for (i=4; i>0; i--)
{
if (input(PRIJIMAC)) i=4;
delay_us(IMPULS/2);
}
 
// Cekam na jednicku (start ramce)
for (; !input(PRIJIMAC); )
{
}
 
// Ctu typ nibblu
delay_us(2*IMPULS+2*IMPULS/3);
*datovy=input(PRIJIMAC);
 
// Prenasim bity
for (i=0; i<4; i++)
{
delay_us(2*IMPULS);
*data >>= 1;
if (input(PRIJIMAC)) *data +=0b1000;
 
#IFDEF DEBUG
output_bit(DEBUG,tmp);
tmp=!tmp;
#ELSE
delay_us(20);
#ENDIF
}
 
return FALSE;
}
 
 
// Prijme datovy ramec
// Pokud nastane chyba vraci kod chyby
int8 prijmi_ramec(int8* kanal, int8* data)
{
int8 datovy;
int8 suma;
 
// Cekej na synchronizacni nibble
do
{
if (prijmi_nibble(&datovy, data)) return 1; // chyba timout
}
while(datovy);
 
// Zkontroluj magickou hodnotu
if (*data != SYNC_NIBBLE) return 2; // chyba magickeho kodu ramce
 
// Prijmi cislo kanalu
if (prijmi_nibble(&datovy, kanal)) return 1; // chyba timeout
if (!datovy) return 3; // chyba typu nibblu
 
// Prijmi data
if (prijmi_nibble(&datovy, data)) return 1; // chyba timeout
if (!datovy) return 3; // chyba typu nibblu
 
// Prijmi zabezpeceni
if (prijmi_nibble(&datovy, &suma)) return 1; // chyba timeout
if (!datovy) return 3; // chyba typu nibblu
 
// Zkontroluj kontrolni soucet
if (((*kanal+*data) & 0b1111) != suma) return 3; // chyba kontrolniho souctu
 
return 0;
}
 
 
 
int8 x,y,tlacitka;
int8 xc,yc; // pocitadla aktualizace x a y
int e1,e2,e3,e4; // pocitadla chyb - ladici
 
void main()
{
lcd_init(); // zinicializuj LCD display
delay_ms(5);
printf(lcd_putc,"Ahoj...");
delay_ms(300);
 
x = 0;
y = 0;
xc = 0;
yc = 0;
e1 = 0;
e2 = 0;
e3 = 0;
e4 = 0;
 
while (true)
{
int8 kanal, data;
 
if (prijmi_ramec(&kanal,&data))
e1++;
else
{
switch (kanal) // rozeskoc se podle adresy osy
{
case OSA_X:
{
x=data;
xc++;
break;
};
case OSA_Y:
{
y=data;
yc++;
break;
};
case TLs:
{
tlacitka=data;
break;
};
};
if (true==bit_test(tlacitka,1))
{
output_high(pin_A2);
}
else output_low(pin_A2);
 
// ladici vypisy
lcd_gotoxy(1,1); // vytiskni X a Y
printf(lcd_putc,"X%2U %3U%3U%3U ", x, xc, e1, e2);
lcd_gotoxy(1,2);
printf(lcd_putc,"Y%2U %3U%3U%3U ", y, yc, e3, tlacitka);
 
// ovladani serv
output_high(SERVO_X);
delay_ms(1);
for (data=x; data--; data>0)
delay_us(65);
output_low(SERVO_X);
 
output_high(SERVO_Y);
delay_ms(1);
for (data=y; data--; data>0)
delay_us(65);
output_low(SERVO_Y);
 
for (data=30-x-y; data--; data>0)
delay_us(65);
 
}
}
}
 
 
/schemata/prenos/letadlo/SW/prijimac/zaloha/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