'************* Konfiguracja uC ***************** '*********************************************** '$regfile = "m162def.dat" '$regfile = "2313def.dat" $regfile = "attiny2313.dat" '$regfile = "m8def.dat" $crystal = 16000000 '$baud = 2400 'Config Porta = &B11111111 : Porta = &B11111111 Config Portb = &B11111111 : Portb = &B11111111 'Config Portc = &B11111111 : Portc = &B11111111 Config Portd = &B11111111 : Portd = &B11111111 'Config Porte = &B11111111 : Porte = &B11111111 'Config Lcdpin = Pin , Db4 = Porta.5 , Db5 = Porta.4 , Db6 = Porta.3 , Db7 = Porta.2 , E = Porta.0 , Rs = Porta.1 'mirley test board Config Lcdpin = Pin , Db4 = Portb.4 , Db5 = Portb.5 , Db6 = Portb.6 , Db7 = Portb.7 , E = Portb.1 , Rs = Portb.0 'mirley test board 2 'Config Lcdpin = Pin , Db4 = Portb.4 , Db5 = Portb.5 , Db6 = Portb.6 , Db7 = Portb.7 , E = Portb.3 , Rs = Portb.2 'avt 2313 test boart Config Lcd = 16 * 2 Cls Cursor Off Noblink 'Config 1wire = Pind.7 'Config Scl = Portd.6 'Config Sda = Portd.7 'I2cinit 'On Int0 Przzew0 Nosave 'Enable Int0 'Config Int0 = Falling Config Timer0 = Timer , Prescale = 1024 Enable Timer0 : On Timer0 Prztimer0 'Config Timer1 = Timer , Prescale = 8 'Enable Timer1 : On Timer1 Prztimer1 Enable Interrupts '********** Konfiguracja uC Koniec ************ '****************** Zmienne ******************* '*********************************************** '************* Zmienne Koniec **************** '************ Warunki Poczatkowe *************** '*********************************************** lcd "test" lowerline lcd " lcd test" '******* Warunki Poczatkowe Koniec *********** '************** Petla glowna ****************** '*********************************************** Do Loop End '************ Petla glowna Koniec ************** '( '********** Przerwanie Zewnetrzne ************** '*********************************************** Przzew0: Return '****** Przerwanie zewnetrzne koniec ********** ') '************ Przerwanie timer 0 *************** '*********************************************** Prztimer0: Return '******** Przerwanie timer 0 Koniec ************ '( '************ Przerwanie timer 1 *************** '*********************************************** Prztimer1: Return '******** Przerwanie timer 1 Koniec ************ ')