Problem with comparison.
/Designs/Tools/reflow2/SW/reflow.PJT
0,0 → 1,43
[PROJECT]
Target=reflow.HEX
Development_Mode=2
Processor=0x877A
Processor_Text=PIC16F877A
ToolSuite=CCS
 
[Directories]
Include=
Library=
LinkerScript=
 
[Target Data]
FileList=D:\MLAB\Designs\Tools\reflow2\SW\reflow.c
BuildTool=C-COMPILER
OptionString=+FM
AdditionalOptionString=
BuildRequired=1
 
[reflow.c]
Type=4
Path=
FileList=
BuildTool=
OptionString=
AdditionalOptionString=
 
[mru-list]
1=reflow.c
 
[Windows]
0=0000 reflow.c 0 0 796 451 3 0
 
[Opened Files]
1=reflow.c
2=reflow.h
3=C:\Program Files\PICC\Examples\EX_LED.C
4=
5=lcd.c
6=
[Units]
Count=1
1=reflow (main)
/Designs/Tools/reflow2/SW/reflow.c
0,0 → 1,162
#include "reflow.h"
#include <math.h>
 
// nastaveni teplot a casu
#define TEPLOTA_PREDEHREVU 120
#define DOBA_PREDEHREVU 60
 
#define TEPLOTA_VRCHOLU 210
#define DOBA_VRCHOLU 5
 
// CPU IO rozhrani
#define LCD_RS PIN_C1 // rizeni registru LCD displeje
#define LCD_E PIN_C2 // enable LCD displeje
#define LCD_DATA_LSB PIN_D0 // data LCD
#include "lcd.c"
 
#define TL1 PIN_B3 // tlacitko S1
#define TL2 PIN_B2 // tlacitko S2
#define TL3 PIN_B1 // tlacitko S3
#define TL4 PIN_B0 // tlacitko S4
 
#define POWER_T4 PIN_A6 // ovladani optotriaku T3
#define POWER_T4 PIN_A5 // ovladani optotriaku T4
#define POWER_T5 PIN_A4 // ovladani optotriaku T5
 
#define ADC_PIN PIN_A0 //info, nelze menit - pin pouzit jako input analog
#define ADC_PIN_NC PIN_A1 //info, nelze menit - pin pouzit jako input analog
#define REF_PIN PIN_A3 //info, nelze menit - pin pouzit jako input reference 2.5V
 
// interni
#define PowerOn() output_low(POWER_T4);output_low(POWER_T5)
#define PowerOff() output_high(POWER_T4);output_high(POWER_T5)
 
// globalni promenne
struct time
{
volatile unsigned int8 hod;
volatile unsigned int8 min;
volatile unsigned int8 sec;
}cas;
 
// funkce
void GeneralCpuInit()
{
output_high(POWER_T4);
output_high(POWER_T5);
port_b_pullups(true);
setup_psp(PSP_DISABLED);
setup_spi(SPI_SS_DISABLED);
setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1); //nepouzit
setup_timer_1(T1_DISABLED); //nepouzit
setup_timer_2(T2_DIV_BY_16,249,10); //rtc 40ms
setup_comparator(NC_NC_NC_NC);
setup_vref(FALSE);
enable_interrupts(GLOBAL);
enable_interrupts(INT_TIMER2);
setup_adc_ports(AN0_AN1_VSS_VREF); //A0 vstup cidla, A1 nepozit, A3 - ref. 2.5V
setup_adc(ADC_CLOCK_DIV_8);
SET_ADC_CHANNEL(0); //AN0, PIN_A0
}
 
unsigned int16 adc(void)
{
unsigned int16 analog;
unsigned int8 a;
 
analog = 0;
for (a=0;a<32;a++)
{
analog += read_adc();
delay_us(50);
}
return (analog >> 5 ); // prumer = analog/32
}
 
int16 teplota(void)
{
 
BYTE CONST TEMP_CALLIBRATION[20] = {0x90,0xb7,0x19,0x15,0x36,0x54,0x50,0xb5,0,0x24};
 
int16 Temp;
 
/* float32 Rpt;
float32 Tpt;
 
Rpt = 1.0*adc()*2350.0/1024.0; //zapojeni OZ -> R=U/Iconst
#define A 3.90802e-3
#define B -5.802e-7
Tpt = (-A + sqrt(A*A - 4*B*(1.0 - Rpt/1000.0)))/2.0/B;
*/
 
 
 
return Temp;
}
 
 
#int_TIMER2
void Rtc(void) //40ms
{
static unsigned int8 ms40=0;
struct time* time;
time=&cas;
if ( ++ms40 < 25) return;
ms40=0;
if (++(time->sec) >= 60)
{
time->sec=0; //1min
if (++(time->min) >= 60)
{
time->min = 0; //1hod
(time->hod)++;
}
}
}
 
void nullcas(struct time* time)
{
disable_interrupts(INT_TIMER2);
time->sec=0;
time->hod=0;
time->min=0;
enable_interrupts(INT_TIMER2);
}
 
// start
void main()
{
int8 tmp;
GeneralCpuInit();
PowerOff();
lcd_init();
lcd_define_char(1,LCD_CHAR_STUPEN);
nullcas(&cas);
while(true)
{
delay_ms(300);
if (cas.sec != tmp){
tmp=cas.sec;
lcd_gotoxy(9,1);
printf(lcd_putc,"%2u:%02u:%02u",cas.hod,cas.min,cas.sec);
}
lcd_gotoxy(1,2);
printf(lcd_putc,"teplota: %ld\21C ",teplota());
}
}
/Designs/Tools/reflow2/SW/reflow.h
0,0 → 1,16
#include <16F877A.h>
#device adc=10
 
#FUSES NOWDT //No Watch Dog Timer
#FUSES HS //High speed Osc (> 4mhz for PCM/PCH) (>10mhz for PCD)
#FUSES NOPUT //No Power Up Timer
#FUSES NOPROTECT //Code not protected from reading
#FUSES NODEBUG //No Debug mode for ICD
#FUSES NOBROWNOUT //No brownout reset
#FUSES NOLVP //No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O
#FUSES NOCPD //No EE protection
#FUSES NOWRT //Program memory not write protected
 
#use delay(clock=4000000)
#use rs232(baud=9600,parity=N,xmit=PIN_B7,rcv=PIN_B6,bits=8)
 
/Designs/Tools/reflow2/SW/reflow.hex
0,0 → 1,117
:1000000002308A00FE2A0000FF00030E8301A100D7
:100010000A08A0008A010408A2007708A300780853
:10002000A4007908A5007A08A600831383128C30F7
:100030008400801C1D288C182E2822088400230888
:10004000F7002408F8002508F9002608FA0020081F
:100050008A00210E8300FF0E7F0E09008A110A120A
:1000600039280A108A100A11820728340C34013406
:100070000634C4012830C300AB0A2B08183C03180F
:100080006C28AB01023043078400831344188317A4
:10009000800A00083B3C03186C28023043078400A8
:1000A00083134418831780010130430784008313AE
:1000B00044188317800A00083B3C03186C28013061
:1000C0004307840083134418831780014308840086
:1000D000831344188317800A8C108A110A121D2872
:1000E0000634093409340634803480348034803452
:1000F0000034F43270366F3A611DA0126C329121D7
:1001000020100000831685128312851683160512AF
:100110008312051683168113091283129412A712F3
:10012000270883168700831227162708831687005F
:100130008312A711270883168700013083129400C9
:100140000030831694000108C739083881008312F3
:1001500090014830F80006389200F930831692007A
:1001600007309C00050885000330F700F70BB62820
:100170001C0883120D1383169D01C03083128B045B
:1001800083168C141F149F101F159F111F138312A9
:100190001F179F1383169F1783121F140030F80038
:1001A0001F08C73978049F008A110A12122B3930B0
:1001B0008400831300080319EB280130F800F701CD
:1001C000F70BE028F80BDF284A30F700F70BE6289A
:1001D000E928800BDD2808000808F039C1003F0835
:1001E0000F39410488000715271127088316870057
:1001F0000000831207112711270883168700831236
:100200000800BD08031D0629871007298714A710B9
:100210002708831687008312BE0E3E08BF00EC201D
:10022000BE0E3E08BF00EC200D30F700F70B16297C
:100230000800C830B900D720F03083168805831233
:100240008710A7102708831687008312071127112C
:100250002708831687008312AD012D08023C031C7A
:1002600039290230B900D7200330BF00EC20AD0A95
:100270002D290D30F700F70B3B290230BF00EC2091
:100280000D30F700F70B4229AD012D08023C031C8D
:1002900055292D083120AE00BD012E08BE000121D8
:1002A0000230B900D720AD0A45298A110A121B2B4A
:1002B000831603178C170C140000000083128C089F
:1002C00003197F290D080313AD0003170F0803134B
:1002D000AE0003170C080313AF000130BD002F0858
:1002E000BE0001212D0803178D0003132E080317EC
:1002F0008F008D0A03198F0A03135829031703135C
:100300008A110A12292B83168C10023083122D07B2
:10031000840083132E18831780012D088400831313
:100320002E188317800101302D07840083132E18A7
:100330008317800183168C1483128A110A12342BBE
:1003400001303902BB003A08023C031DA9294030A4
:10035000BB073B088038BC00BD013C08BE00012142
:1003600008003008F8012F020318B9292F08F700F8
:10037000C529F7010830B100AF0DF70D300877023D
:100380000318F700F80DB10BBC29080038080C3A27
:100390000319D129063A0319D929073A0319DF2984
:1003A000E429BD010130BE0001210230B900D7208F
:1003B000F0290130B9000230BA00A021F029013043
:1003C000B900BA00A021F02938081F3C031CEA2913
:1003D0000730B8050130BD003808BE000121F02902
:1003E000080078082D08AF006430B000B12177080C
:1003F000AD0078083030031D042AAE1C0B2AAE195C
:100400000B2A2E1A2030072AAE112E122E14F807AE
:100410007808B800C6212D08AF000A30B000B1211D
:100420007708AD0078083030031D1C2AAE19202A49
:100430002E1C202A2E1A2030F8077808B800C62172
:100440003030AD072D08B800C62108002D08F8008F
:100450002E08F9008A110A12612B831603178C17D4
:100460000C140000000003185C2A83120C087F396A
:100470000313B00003170D080313B10003170F088F
:100480000313B2003008B800C621310803178D00ED
:100490000313320803178F0083168C170C14000007
:1004A000000083120313AF0B562A592A8316031731
:1004B0005C2A7B2A8316031783120C0D0E0D7F39DD
:1004C0000313B00003170D080313B10003170F083F
:1004D0000313B2003008B800C621310803178D009D
:1004E0000313320803178F008D0A03198F0A0310B4
:1004F0000313AF0B2D2A0800B7010408B60037100C
:10050000831B3714B01F8C2AB617361EB60AAF09E4
:10051000B009AF0A0319B00A300EF038B200B207C2
:10052000E23EB300323EB50030080F39B307B307DF
:10053000B507E93EB400B407B4072F0E0F39B4076E
:10054000B507B40DB50DB509B50D2F080F39B507B1
:10055000B20D0730B1000A30B507B403031CAC2A52
:10056000B407B303031CB02AB307B203031CB42AB5
:10057000B207B103031CB82A31308400831307305B
:100580003605361384033605031DCD2A361A840A30
:10059000361ACD2A2030F700EA2A840735300402C3
:1005A000031936170008F700031DDE2A361BDE2A62
:1005B000361AF82AB619DE2A2030E92AB61FE62AAA
:1005C0002D30F70084033613B613EA2AB615361217
:1005D0003030F707B0010408AF003010831B30142F
:1005E0007708B800C6212F088400831330188317BA
:1005F000840A361FCE2A8A110A12762B84018313AD
:100600001F3083058316861383128617AB0183166A
:100610001F149F141F159F1107309C00FF30831279
:10062000A700822883168512831285168316051269
:10063000831205161929BD014830BE000121023080
:10064000B900D720703003178D0000308F000313DE
:100650005829BD010330BE0001210230B900D72066
:10066000AE012830AD0083290230AD009630B900CC
:10067000D720AD0B362B2C082A0203195B2B2A0836
:10068000AC000930B9000130BA00A0212808AD0043
:100690001130AE00F1213A30B800C6212908AD0072
:1006A0000130AE00F1213A30B800C6212A08AD0071
:1006B0000130AE00F1210130B9000230BA00A021B2
:1006C000262A7908AE007808AD00793003178D002E
:1006D00000308F00031009300313AF002D221030BB
:1006E00084002E08B0002D08AF007C2A7F3003174D
:1006F0008D0000308F00031004300313AF002D2253
:04070000342B630033
:02400E003A3F37
:00000001FF
;PIC16F877A
;CRC=4F23 CREATED="16-IV-11 23:41"
/Designs/Tools/reflow2/SW/LCD.C
0,0 → 1,318
// LCD modul pro ovladani dvouradkoveho LCD modulu se standardnim Hitachi radicem
// (c)miho 2002,2005
//
// Historie:
//
// 0.00 Uvodni verze se snadnou definici portu LCD displeje
// 0.01 Oprava portu (zapomenute stare identifikatory)
// 0.02 Doplnena moznost pripojeni datoveho portu LCD na libovolne porty
// 0.03 Doplnena procedura lcd_clr pro smazani 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_clr smaze displej
//
// 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: // Datovy port displeje pripojeny na 4 bity za sebou na jeden port
//
// #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)
//
//
// Alternativni definice: // Datovy port displeje pripojeny na libovolne 4 bitove porty (vede na kod delsi asi o 25 slov)
//
// #define LCD_RS PIN_B2 // rizeni registru LCD displeje
// #define LCD_E PIN_B1 // enable LCD displeje
// #define LCD_D0 PIN_C2 // D0 - datove bity pripojene na libovolne porty
// #define LCD_D1 PIN_C3 // D1
// #define LCD_D2 PIN_C4 // D2
// #define LCD_D3 PIN_C5 // D3
 
 
 
 
// Privatni sekce, cist jen v pripade, ze neco nefunguje
 
 
 
 
#ifdef LCD_DATA_LSB
// 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 datoveho 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
#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 )
{
#ifdef LCD_DATA_LSB
// data jsou za sebou na 4 bitech jednoho portu
*LCD_PORT = (*LCD_PORT & ~LCD_MASK) | ((n << LCD_SHIFT) & LCD_MASK); // nastav datove bity portu a ostatni zachovej
#else
// data jsou na libovolnych 4 bitech libovolnych portu
output_bit(LCD_D0,bit_test(n,0));
output_bit(LCD_D1,bit_test(n,1));
output_bit(LCD_D2,bit_test(n,2));
output_bit(LCD_D3,bit_test(n,3));
#endif
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(200); // spozdeni pro provedeni startu displeje po zapnuti napajeni
 
#ifdef LCD_DATA_LSB
// data jsou na 4 bitech za sebou, nastav smer pro vsechny dalsi prenosy
*LCD_TRIS = *LCD_TRIS & ~LCD_MASK; // nuluj odpovidajici bity tris registru datoveho portu LCD
#endif
 
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_);
}
 
 
// Smaz displej
//
void lcd_clr()
{
lcd_putc('\f');
}
 
 
// 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_BAT20 "\x0E\x1F\x11\x11\x11\x11\x1F\x1F" /* symbol baterie 20% */
#define LCD_CHAR_BAT40 "\x0E\x1F\x11\x11\x11\x1F\x1F\x1F" /* symbol baterie 40% */
#define LCD_CHAR_BAT60 "\x0E\x1F\x11\x11\x1F\x1F\x1F\x1F" /* symbol baterie 60% */
#define LCD_CHAR_BAT80 "\x0E\x1F\x11\x1F\x1F\x1F\x1F\x1F" /* symbol baterie 80% */
 
#define LCD_CHAR_BAT0 "\x0E\x1F\x11\x11\x11\x11\x11\x1F" /* symbol vybite baterie */
#define LCD_CHAR_UP "\x80\x04\x0E\x15\x04\x04\x04\x80" /* symbol sipka nahoru */
#define LCD_CHAR_DOWN "\x80\x04\x04\x04\x15\x0E\x04\x80" /* symbol Sipka dolu */
#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 */
 
#define LCD_CHAR_STUPEN "\x06\x09\x09\x06\x80\x80\x80\x80" /* ° stupen C */
 
// 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);
//}