program MioRealClock18452_LM35_V2 'MIKR0BASIC CLASSICO ' * NOTES: ' - For proper I2C communication, pins on PORTC must be in the pull-up mode, ' RC3 - pin 6 DS1307 - SCL, ------> ' RC4 - pin 5 DS1307 - SDA, <------> Const Santi1 as string[182][20] = ("0101MARIA MADRE ","0102S. BASILIO VES. ","0103S. GENOVEFFA VER", "0104S. ERMETE ","0105S. AMELIA VERG. ","0106EPIFANIA DI N S.", "0107S. LUCIANO M. ","0108S. MASSIMO ","0109S. GIULIANO MART", "0110S. ALDO EREMITA ","0111S. IGINO PAPA ","0112S. MODESTO MART.", "0113S. ILARIO ","0114S. DAZIO ","0115S. MAURO ABATE ", "0116S. MARCELLO PAPA","0117S. ANTONIO ABATE","0118S. LIBERATA VERG", "0119S. MARIO MARTIRE","0120S. SEBASTIANO ","0121S. AGNESE VERG. ", "0122S. GAUDENZIO ","0123S. EMERENZIANA V","0124S. FRANC DI SAL.", "0125CONV. S. PAOLO ","0126S. TITO ","0127S. ANGELA MERICI", "0128S. VALERIO VESC.","0129S. COSTANZO ","0130S. MARTINA VERG.", "0131S. GIOVAN. BOSCO","0201S. VERDIANA VERG","0202PRESENT.DEL SIGN", "0203S. BIAGIO VESC. ","0204S. GILBERTO VESC","0205S. AGATA VERGINE", "0206S. PAOLO MIKI ","0207S. TEODORO MART.","0208S. GIROLAMO EMIL", "0209S. APOLLONIA VER","0210S. ARNALDO VESC.","0211N.S. DI LOURDES ", "0212S. EULALIA VERG.","0213S. MAURA MARTIRE","0214S.VALENTINO MART", "0215S. FAUSTINO ","0216S. FLAVIANO ","0217S. DONATO MART. ", "0218S. SIMEONE VESC.","0219S. MANSUETO V. ","0220S. ELEUTERIO V. ", "0221LE SACRE CENERI ","0222CATT. S. PIETRO ","0223S. LIVIO ", "0224S. EDILBERTO RE ","0225S. CESARIO ","0226S.CLAUDIANO MART", "0227S. LEANDRO VESC.","0228S. ROMANO ABATE ","0229S. GIUSTO MART. ", "0301SS ALBINO-EUDOSS","0302S. ERACLIO ","0303S. MARINO ", "0304S. CASIMIRO ","0305S. ADRIANO MART.","0306S. COLETTA VERG.", "0307SS.PERPET.-FELI.","0308S. GIOV. DI DIO ","0309S. FRANCESCA ", "0310S. SIMPLICIO ","0311S. COSTANTINO C.","0312S. TEOFANE MART.", "0313S. EUFRASIA VERG","0314S. MATILDE REGIN","0315S. LUISA VEDOVA ", "0316S. COLOMBA M. ","0317S. PATRIZIO ","0318S.CIRILLO DI GER", "0319S. GIUSEPPE ","0320S. ALESSAN. MART","0321S. SERAPIONE V. ", "0322S. CATERINA DI G","0323S. LEA ","0324S. ROMOLO ", "0325ANNUNCIAZ. SIGN.","0326S. TEODORO VESC.","0327S. RUPERTO VESC.", "0328S.SISTO III PAPA","0329S. SECONDO MART.","0330S. PASTORE ", "0331S. GUIDO AB. ","0401S. UGO VESCOVO ","0402S.FRANC. DI PAOL", "0403S. RICCARDO VESC","0404S. ISIDORO VESC.","0405S.VINCENZO FERR.", "0406S. DIOGENE MART.","0407S. ERMANNO ","0408S. GIULIA ", "0409S. MARIA CLEOFE ","0410S. TERENZIO MART","0411S.STANISLAO VESc", "0412S. ZENONE VESC, ","0413S.MARTINO I PAPA","0414S. LAMBERTO V. ", "0415S. ANNIBALE MART","0416S. LAMBERTO MART","0417S. ANICETO PAPA ", "0418S. GALDINO VESC.","0419S. ERMOGENE MART","0420S. ADALGISA VERG", "0421S. ANSELMO VESC.","0422S. SOTERO ","0423S. GIORGIO MART.", "0424S. FEDELE DA S. ","0425S. MARCO EVANG. ","0426S.MARCELLINO MAR", "0427S. ZITA VERGINE ","0428S. VALERIA MART.","0429S.CATERINA DA S.", "0430S. PIO V PAPA ","0501S.GIUSEPPE ARTIG","0502S. ATANASIO VESC", "0503S. FILIPPO ","0504S. CIRIACO ","0505S.PELLEGR. MART.", "0506S. GIUDITTA MART","0507S. FLAVIA VERG. ","0508S. DESIDERATO V.", "0509S. GERONZIO VESC","0510S. ANTONINO VESC","0511S. FABIO MARTIRE", "0512S. NEREO ","0513S. GLICERIA ","0514S. MATTIA APOST.", "0515S. TORQUATO VESC","0516S. UBALDO VESC. ","0517S. PASQ. BAYLON", "0518S. GIOV. I PAPA ","0519S. CELESTINO V. ","0520S.BERNARD. DA S.", "0521S. VITTORIO MART","0522S.RITA DA CASCIA","0523S DESIDERIO VESC", "0524MARIA AUSILIATR.","0525S. BEDA CONFESS.","0526PENTECOSTE ", "0527S. AGOSTINO DI C","0528S. EMILIO MART. ","0529S. MASSIMINO V. ", "0530S. FELICE I PAPA","0531VISITAZ. S. VERG","0601S. GIUSTINO MART", "0602SS. TRINITA' ","0603S.CARLO LUAN. M.","0604S. QUIRINO VESC.", "0605S.BONIFACIO VESC","0606S. NORBERTO VESC","0607S.SABINIANO MART", "0608S. MEDARDO VESC.","0609S. DIANA ","0610S. ASTERIO VESC.", "0611S. BARNABA APOST","0612S. BASILIDE MART","0613S. ANTONIO DA P.", "0614SACR CUORE GESU'","0615S. GERMANA VERG.","0616S.AURELIANO VESC", "0617S.RANIERI CONFES","0618S.GREGORIO BARB.","0619S.ROMUALDO ABATE", "0620S. ETTORE CONFES","0621S. LUIGI GONZAGA","0622S. PAOLINO DA N.", "0623S. LANFRANCO V. ","0624NATIV.' S.G BATT","0625S.GUGLIELM. ABAT", "0626S. RODOLFO MART.","0627S.CIRILLO D'ALES","0628S. IRENEO ", "0629SS.PIETRO E PAOL","0630SS. PRIMI MART. ") ' [20] Const Santi2 as string[184][20] = ("0701PREZ. S.DI GESU'","0702S. OTTONE ","0703S.TOMMASO APOST.", "0704S. ELISAB. DI P.","0705S.ANTON. M. ZAC.","0706S. MARIA GORETTI", "0707S. APOLLONIO ","0708S. PRISCILLA ","0709S. VERONICA VERG", "0710S. RUFINA ","0711S.BENEDETTO ABAT","0712S.FORTUNATO MART", "0713S. ENRICO IMPER.","0714S.CAMILLO DE LEL","0715S.BONAVENTURA C.", "0716N.S. DEL CARMELO","0717S. ALESSIO CONF.","0718S. CALOGERO EREM", "0719S. SIMMACO PAPA ","0720S. ELIA PROFETA ","0721S.LORENZO DA BR.", "0722S. MARIA MADDAL.","0723S. BRIGIDA VEDOV","0724S. CRISTINA VERG", "0725S. GIACOMO APOST","0726S. ANNA ","0727S.CELEST. I PAPA", "0728S. NAZARIO MART.","0729S. MARTA VERGINE","0730S. PIETRO CRISOL", "0731S.IGNAZIO DI LOY","0801S.ALFONSO DE LIG","0802S.EUSEBIO DI VER", "0803S.LIDIA DI FILIP","0804S. GIOVANNI M.V.","0805D. S.M. MAGGIORE", "0806TRASFIG.DI GESÙ ","0807S. GAETANO DA T.","0808S. DOMENICO C. ", "0809S. ROMANO MART. ","0810S. LORENZO MART.","0811S. CHIARA VERG. ", "0812S. MACARIO ","0813S. PONZIANO ","0814S. ALFREDO VESC.", "0815ASSUN. S. VERG .","0816S.STEFANO D'UNG.","0817S. GIACINTO C. ", "0818S. ELENA IMP. ","0819S.GIOVANNI EUDES","0820S. BERNARDO ABAT", "0821S. PIO X PAPA ","0822S. MARIA REGINA ","0823S. ROSA DA LIMA ", "0824S.BARTOLOM. APOS","0825S.LUIGI DEI FRAN","0826S. ALESSANDRO M.", "0827S. MONICA ","0828S. AGOSTINO DOTT","0829MARTIR S.G. BATT", "0830S. PAMMACHIO M. ","0831S. ABBONDIO ","0901S. EGIDIO ABATE ", "0902S. ELPIDIO VESC.","0903S.GREGORIO MAGNO","0904S. ROSALIA VERG.", "0905S.VITTORINO VESC","0906S. PETRONIO VESC","0907S. REGINA VERG. ", "0908NATIVITA' S.Verg","0909S. SERGIO PAPA ","0910S.PULCHERIA VERG", "0911S. DIOMEDE MART.","0912SS.NOME DI MARIA","0913S. GIOVANNI C. ", "0914ESALTAZ. S.CROCE","0915S. V. ADDOLORATA","0916S. CORNELIO ", "0917S.ROBERTO BELLA.","0918S. SOFIA MARTIRE","0919S. GENNARO VESC.", "0920S.EUSTACHIO MART","0921S. MATTEO APOST.","0922S. MAURIZIO MART", "0923S. LINO PAPA ","0924S. PACIFICO C. ","0925S. AURELIA VERG.", "0926SS.COSMA-DAMIANO","0927S.VINC DE' PAOLI","0928S.VENCESLAO MART", "0929S. MICHELE ","0930S. GEROLAMO DOTT","1001S.TERESA DI GESU", "1002SS.ANGELI CUSTOD","1003S. GERARDO ABATE","1004S FRANC. D'ASS. ", "1005S. PLACIDO MART.","1006S. BRUNO ABATE ","1007N.S. DEL ROSARIO", "1008S.PELAGIA PENIT.","1009SS.DIONIGI-COMP.","1010S. DANIELE MART.", "1011S. FIRMINO VESC.","1012S. SERAFINO C. ","1013S. EDOARDO RE ", "1014S.CALLIST I PAPA","1015S.TERESA D'AVILA","1016S. EDVIGE VEDOVA", "1017S.IGNAZIO D'ANTI","1018S.LUCA EVANGELIS","1019S.ISAAC JOGUES M", "1020S. IRENE VERG . ","1021S. ORSOLA VERG. ","1022S. DONATO VESC. ", "1023S. GIOVANNI DA C","1024S. ANTONIO M.C. ","1025S. CRISPINO ", "1026S. EVARISTO PAPA","1027S. FIORENZO VESC","1028SS. SIMONE-GIUDA", "1029S.ERMELINDA VERG","1030S. GERMANO VESC.","1031S. LUCILLA MART.", "1101TUTTI I SANTI ","1102COMMEM. DEFUNTI ","1103S. SILVIA VEDOVA", "1104S. CARLO BORROM.","1105S. ZACCARIA PROF","1106S.LEONARDO ABATE", "1107S. ERNESTO ABATE","1108S. GOFFREDO VESC","1109D.B. LATERANENSE", "1110S. LEONE MAGNO ","1111S.MART. DI TOURS","1112S. RENATO MART. ", "1113S. DIEGO FRANC. ","1114S. GIOCONDO V. ","1115S. ALBERTO MAGNO", "1116S. MARGH. DI S. ","1117AVVEN. AMBROS. ","1118D. B. VATICANA ", "1119S. FAUSTO MART. ","1120S. BENIGNO VESC.","1121PRESENT. S. VERG", "1122S. CECILIA VERG.","1123S. CLEMENTE PAPA","1124CRISTO RE ", "1125S.CAT. D'ALESS. ","1126S. CORRADO VESC.","1127S. MASSIMO VESC.", "1128S. GIACOMO FRANC","1129S.SATURNINO MART","1130S. ANDREA APOST.", "1201S. ANSANO ","1202S. BIBIANA VERG.","1203S.FRANC. SAVER. ", "1204S.GIOVANNI DAMAS","1205S. GIULIO MART. ","1206S. NICOLA VESC. ", "1207S. AMBROGIO V. ","1208IMMACOLATA CONC.","1209S. SIRO VESC. ", "1210N.S. DI LORETO ","1211S. DAMASO PAPA ","1212S. GIOV.A F. C. ", "1213S. LUCIA VERGINE","1214S.GIOVAN.DELLA C","1215S. NINO ", "1216S. ALBINA VERG. ","1217S. LAZZARO VESC.","1218S. GRAZIANO V. ", "1219S. FAUSTA VEDOVA","1220S. MACARIO MART.","1221S.PIETRO CANIS. ", "1222S. REMO V. ","1223S.GIOVAN.DI KETY","1224S. DELFINO VESC ", "1225NATIVITA' SIGNO ","1226S.STEFANO PROT. ","1227S.GIOVAN. APOST ", "1228SS.INNOCENT MART","1229S. DAVIDE RE ","1230S.EUGENIO VESC. ", "1231S.SILVESTR PAPA ") Const giorni as word[12] = (0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334) '1 'const Acquario65_bmp as byte[148] const Zodiaco65 as byte[1776] = ( 0, 0, 0,240,200,120,240,248,248,248,191,255,255,236,192,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,112,222,143,254,203, 31, 63, 63,255,255,255,247,127, 63, 31, 62, 56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248, 15,245, 63,231,248,252,254, 31, 31,120,255,252,224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 57, 60,225,255,191,231, 1, 0, 0, 0, 0, 1, 7, 31,126,240,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'const pesci65_bmp as byte[148] 0, 0, 0, 0, 0,128,192,192,224,224,224,224,224,240,112,112,124,126,127,112, 96, 96, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 240,248,142,254,255,255,255,255,255,255,227,113, 17, 1, 0, 39,127,127,253,254,254,251, 6,254,252,248,240,224, 48,240,224,128, 0, 0, 0, 0, 0, 1, 7, 15, 12, 7, 15, 31, 63,127, 96,223,127,127,191,254,254,228, 0,128,136,142,199,255,255,255,255,255,255,127,113, 31, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 6, 6, 14,254,126, 62, 14, 14, 15, 7, 7, 7, 7, 7, 3, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'const Ariete65_bmp as byte[148] 12,190,235,223,247,249,222,254,254,178,173, 63, 55, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 99,243,255,255,127,223,111,119,203,245,250,252,252,252,248,248,240,240,240,240,240,240,240,240,240,224,240, 60, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 15, 31, 31,249,196, 31,255,255,254, 1, 63, 63, 39, 63, 59,253,254, 1, 63,255,255,159, 15, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192,192,240,223,224,127, 31, 1, 0, 64, 96, 96, 48, 24, 79,103,112, 28, 15, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'const Toro65_bmp as byte[148] 0, 0, 0, 0, 0, 0, 0,192,128, 0,192,192,224,240,248,252,252,252,252,252,252,248,224,224,192, 0, 0, 57,255,156, 0, 0, 0, 0, 0, 0, 0, 56, 96, 64,192,248,248,120,254,191,255,255,253,121,253,255,190,222,241,255,255,255,192, 63,255,255,255,255,126,252,252,249,241,241,130, 6,140,112, 0, 0, 3, 1, 0, 0, 3, 15, 31, 31,223,239,120, 63,221,255,127, 63, 63, 31, 31, 19, 30, 63,127,247,251, 48,255,255, 31,231,127, 31, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 15, 28, 24, 27, 7, 28, 24, 24, 0, 0, 96, 96,112,152,207,195, 96, 56, 31, 7, 0, 0, 0, 0, 0, 0, 'const Gemelli65_bmp as byte[148] 128,192,224, 56,220,166,255,191,190,132,128,128,128, 0, 0, 0, 0,120,232,180,124, 56,192,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 15,255,246, 53,125,251,243,248,237, 7, 3, 1, 1, 3,131,207,255,255,255,127,255,250, 59, 39, 60, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126,255, 1, 0,240,255,183,251,109,119,126,252,248,190,247,111,215,175, 93,176,199, 63,126, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192,124, 63, 14, 59, 63, 28,224,240, 63, 15, 63,231, 7, 3, 7, 14, 11,127,224,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'const Cancro65_bmp as byte[148] 0, 0, 0, 0, 0, 0,224,240, 56, 28, 12, 14, 11, 9, 12,132,128,128,128,132, 12, 9, 11, 14, 12, 28, 56,240,224, 0, 0, 0, 0, 0, 0, 0, 0, 32, 67, 70,136,152,144, 33, 47, 47, 92,220,228,248,252,254,255,255,255,255,255,254,252,248,228,220, 92, 47, 47, 33,144,152,136, 70, 67, 32, 0, 0, 0, 0, 0, 0,128,224, 49, 9, 5, 5,228,245, 53, 27, 27, 23, 55, 55, 55, 23, 27, 27, 53,245,228, 5, 5, 9, 49,224,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 0, 0, 0,124, 7, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 7,124, 0, 0, 0, 1, 3, 0, 0, 0, 0, 0, 0, 'const Leone65_bmp as byte[148] 0, 0, 0, 0, 0, 0,192,160,112,252,250,249,249,249,123,242,226,196, 4, 8, 8, 16, 16, 32, 64,192,192,192,192,224,240,124, 32, 0, 0, 0, 0, 0, 0,224,252,126, 31, 31,127,254,251,123,221,230,254,195,255,251,193,255,250,244,248,248,252,252,252,248,240,240, 96, 0, 0, 0, 0, 0, 0, 0, 12, 14, 15, 13, 12, 0, 96,240,239,227,124,150,125,109,109,191,223,239,247,255,254,255,255,255,191,251,255,111,239,126, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 28, 31, 31, 0, 0, 0, 1, 1, 3, 7, 6, 15, 15, 5, 15, 14, 15, 15, 11, 26, 30, 63,121,224,224,192,192,128,128, 0, 0, 'const Vergine65_bmp as byte[148] 128, 0,168,252,184,160, 0,128, 0, 0, 0, 0, 6,223,255,255,255,254,252,252, 64, 56,252,254, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 7, 6, 61, 55, 22, 21, 24, 8, 12, 12,134,231,255,191,255,191,255,255,143,140,127,223,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,254,255, 15,255,191,207,253, 3,255,231,191, 60,193, 15, 31,126, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,192,252, 7,127,128,243,143, 48,255,227,127,251,252,155, 55,110,220,176, 96,192,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'const Bilancia65_bmp as byte[148] 0, 0, 0, 0, 0, 0,192,224, 96, 96, 96, 96, 96, 96,254,255,255,255,240,240,224,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192,186,134,186,194, 3, 3, 3,195,186,134,186,194,128,241,255,255, 31,255,207,255, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1,129,225,254,115, 30, 7, 3, 15,127,254,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 96,112, 30, 15, 3, 0, 0, 0, 0, 0, 0, 0, 0, 3, 15, 63,240,192,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'const Scorpione 65_bmp as byte[148] 0, 31,126,252, 30, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 30,252,126, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64,136,144, 49, 35, 38, 36,132,168,248,248,252,254,254,252,248,248,168,132, 36, 38, 35, 49,144,136, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 20, 37, 41, 41, 41, 21, 23, 11, 86,127,255,253,253,255,127, 86, 11, 23, 21, 41, 41, 41, 37, 20, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56, 36, 64, 64,128,129,129, 67, 70,124, 56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ' 'const Sagittario65_bmp as byte[148] 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,254,255,255,221,255,251,240,240,240,136, 4, 2, 1, 3, 14, 48,224, 0, 0, 0, 0,128,224,240,252,126,126,252,224,224,224, 96,224,236,238,239,207,207,207,255,254,250,202,253,253,247,155,248, 28, 28, 12, 12, 12, 30,255, 0, 3, 7, 7, 3,129,192,240, 62, 63,207,247,123, 62,121, 79,191,255,255,255,255,255,255,255,255,255,127,191,227,120, 63, 4, 8, 32,120,156, 3, 0, 0, 0, 0,124,255,195, 0, 0,127,255,193, 0, 0, 0, 0, 0, 0, 0, 48, 48, 49, 99, 99, 55, 31, 95,109, 35, 51, 19, 30, 14, 4, 0, 0, 0, 0, ' const Capricorno65_bmp as byte[148] 48, 48,248,254,254,255,253,245,245,245,229,230,198,134, 6, 5, 5, 5, 4, 4, 6, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3,254,255,255, 15,255,251, 63,231,255,255,255,255,254,248,224,128, 0, 0, 16,224,224,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 224,224, 96, 96,227,225,192,253, 14,249,255,254,255,255,255,255,255,255,255,126,188,184,184,119,239,159, 15, 7, 3, 3, 6, 0, 0, 0, 0, 0, 0, 56,239,224, 0,192,225,177,158,143,143,195,195, 6, 3, 7, 7, 3, 61,126,255,247,239,223,239,112,127, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ) const passi as byte[12][3] = ((21,12,1),(20,1,2 ),(21,2,3 ),(21,3,4 ), (20,4,5 ),(22,5,6 ),(22,6,7 ),(24,7,8 ), (22,8,9 ),(22,9,10),(23,10,11),(23,11,12)) const NomeSegni as string[12][10] = (" ACQUARIO "," PESCI "," ARIETE "," TORO ", " GEMELLI "," CANCRO "," LEONE "," VERGINE ", " BILANCIA ","SCORPIONE ","SAGITTARIO","CAPRICORNO") const Decorrenze as string[12][12] = ("21/01 19/02","20/02 20/03","21/03 20/04","21/04 19/05", "20/05 21/06","22/06 21/07","22/07 23/08","24/08 22/09", "22/09 21/10","22/10 22/11","23/11 22/12","23/12 20/01") dim Pausa as word dim cx,cy as float dim radianti as float dim passo as float dim cxsec,cysec as float dim cxmin,cymin as float dim cxore,cyore as float dim year2 as word dim com as word dim com1 as integer dim com2 as integer dim com3 as integer dim com4 as integer dim COM5 as integer dim COM6 as integer dim COM7 as integer dim com8 as integer dim Santo as string[16] dim i,y ,zz as byte dim MeGio as string[4] dim MeGioPas as string[4] dim PasY as word dim PasGiorno as byte dim PasA, PasB, PasC, PasD, PasE, PasM, PasN as word dim sec1, min1, hr1, week_day1, day1, mn1, year1 as short dim sec, min, hr, week_day, day, mn, year as short dim incOre as float dim theta as float dim scx, scy, arra, mxo,myo,mxh as float dim Gamma as float dim Iota as float dim tnum as string[4] DIM InizStamp as byte dim txtA as string[2] dim addr as longint 'dim dataWr as byte[8] dim week_dayOld as short dim ii,xx, yy as byte dim txtS as string[9] dim SwTasti as byte dim HoGiaScritto as byte dim Scrol as byte ' per lo scrolling dim swscrol as byte dim j, j1, k, k1 as byte dim Mes as byte ' per cancellare dim ByZo as byte dim Ics as byte dim Oriz as byte dim Ipsilon as byte dim Steep as word dim Disp as word dim Decorrenza as string[12] dim Segno as string[11] sub procedure ZODIACO() ' day1, mn1 if day1 < passi[mn1-1][0] then Disp = passi[mn1-1][1] else Disp = passi[mn1-1][2] end if Segno = NomeSegni[Disp-1] Decorrenza = Decorrenze[Disp-1] Steep = Disp * 148 -148 Oriz = 0 Ipsilon = 2 for zz = 0 to 3 Ics = 80 for xx = 0 + Oriz to 36 + Oriz ByZo = Zodiaco65[Steep + xx] for y = 0 to 7 if (ByZo.y) > 0 then Glcd_Dot(Ics, Ipsilon+y, 1) end if next y Ics = Ics +1 next xx Ipsilon = Ipsilon + 8 Oriz = Oriz + 37 next zz Glcd_Write_Text(Segno, 75,5,1) Glcd_Write_Text(Decorrenza, 75,6,1) scrol = 65 'per le righe in fondo swscrol = 0 ' per le righe in fondo end sub Dim Tlong As Longint dim t1 as word dim t2 as word Dim Ch as Byte 'Work area dim t1A as word dim t1B as word dim t1C as word '*********************************************************** sub procedure LeggeScriveTemperatura() SetBit(ADCON0, 2) t1 = ADC_Read(0) ' get ADC value from Channel 0 Aspetta1: if TestBit(ADCON0, 2) = 1 then goto Aspetta1 end if SetBit(ADCON0, 2) t2 = ADC_Read(1) ' get ADC value from Channel 0 Aspetta2: if TestBit(ADCON0, 2) = 1 then goto Aspetta2 end if t1 = t1 - t2 '########################################################################## if t1A = 0 then t1A = t1 goto esco end if if t1B = 0 then t1B = t1 goto esco end if t1 = (t1 + t1A + t1B) div 3 t1A = 0 t1B = 0 '########################################################################## ' Tlong = (t1 * 5000) Tlong = (t1 * 2500) t1 = Tlong >> 10 'div 1024 CH = t1 / 1000 ch = (t1 / 100) mod 10 Glcd_Write_Char((48+ch), 107, 6, 1) ch = (t1 / 10) mod 10 Glcd_Write_Char((48+ch) , 111, 6, 1) Glcd_Dot(115, 54, 1) ch = t1 mod 10 Glcd_Write_Char((48+ch), 117, 6, 1) delay_ms(20) Glcd_Dot(123, 49, 1) 'simbolo di grado Glcd_Dot(122, 50, 1) Glcd_Dot(124, 50, 1) Glcd_Dot(123, 51, 1) Esco: delay_ms(1) end sub ' mette zero dopy ByteToStr sub procedure MetteZero if tnum[1] < "1" then tnum[1] = "0" end if end sub ' --------------- Calcola la Pasqua ----------- sub precedure CalPasqua PasY = year1 + 2000 PasM = 24 PasN = 5 com1 = ( PasY / 19 ) * 19 PasA = PasY - com1 com1 = ( PasY / 4 ) * 4 PasB = PasY - com1 com1 = ( PasY / 7 ) * 7 Pasc = PasY - com1 com1 = ((19 * PasA) + PasM) com2 = com1 / 30 PasD = com1 - (com2 * 30) com1 = ((2 * PasB) + (4 * PasC) + (6 * PasD) + PasN) com2 = com1 / 7 PasE = com1 -(com2 * 7) if (PasD + PasE) < 10 then ' PasMese = "MARZO " PasGiorno = (PasD + PasE + 22) bytetostr(PasGiorno,tnum) MetteZero MeGioPas[0] = "0" MeGioPas[1] = "3" MeGioPas[2] = tnum[1] MeGioPas[3] = tnum[2] else ' PasMese = "APRILE" PasGiorno = (PasD + PasE - 9) bytetostr(PasGiorno,tnum) MetteZero MeGioPas[0] = "0" MeGioPas[1] = "4" MeGioPas[2] = tnum[1] MeGioPas[3] = tnum[2] end if end sub sub procedure CalcolaArra arra = 6.28 -(theta * 0.0174532925) end sub sub perocedure CalcolaPos(dim byref PosX, Posy as float) Gamma = cos(arra) Iota = Sin(arra) theta = ((scx - mxo) * Gamma) PosX = mxo + theta theta = ((scy - myo) * Iota) PosX = PosX + theta theta = ((scy - myo) * Gamma) PosY = myo + theta theta = ((mxh - mxo) * Iota) PosY = PosY + theta end sub sub procedure DisegnaLancette ' Posizione delle ore. theta = 0 incOre = min1 * 0.0166666 if hr1 > 12 then theta = ((hr1 - 12) + incOre) * 5 else theta = (hr1 + incOre) * 5 end if theta = theta * 6 ' Posizione dele ore scx = 32 scy = 32 - 16 Gamma = (theta * 0.0174532925) arra = 6.28 -gamma '(theta * 0.0174532925) '(Pi / 180) mxo = 32 myo = 32 mxh = 32 CalcolaPos(cxore, cyore) Glcd_Line(32,32,cxore,cyore,1) ' Posizione dei minuti theta = 0 theta = min1 theta = theta * 6 scx = 32 scy = 32 - 18 CalcolaArra 'arra = 6.28 -(theta * 0.0174532925) '(Pi / 180) mxo = 32 myo = 32 mxh = 32 CalcolaPos(cxmin, cymin) Glcd_Line(32,32,cxmin,cymin,1) ' Posizione dei secondi. theta = 0 theta = sec1 * 6 scx = 32 scy = 32 - 20 CalcolaArra ' arra = 6.28 -(theta * 0.0174532925) mxo = 32 myo = 32 mxh = 32 CalcolaPos(cxsec, cysec) Glcd_Line(32,32,cxsec,cysec,1) end sub ' --------------------------Trova giorno settimana sub procedure Calcola() ' x = N + (q)(N - 1) : 4 - (q)(N - 1) : 100 + (q)(N - 1) : 400 + t 'dove N è l'anno relativo alla data che interessa, (q)(N - 1) : 4 , (q)(N - 1) : 100 e (q)(N - 1) : 400 sono la parte 'intera dei quozienti delle tre divisioni di (N - 1) rispettivamente per 4, per 100 e per 400 e t rappresenta la data 'annuale del giorno considerato, ovvero il numero di giorni trascorsi dall'inizio dell'anno fino al giorno stesso '(compreso). 'Una volta calcolato x, occorrerà trovare il resto della divisione 'x : 7, year2 = 2000 + YEAR1 ' Com6 = year2 -1 com1 = COM6 / 4 com2 = COM6 / 100 com3 = COM6 / 400 com4 = mn1 -1 com5 = giorni[com4] com4 = day1 + com5 'giorni dall'nizio dell'anno com5 = year2 / 4 com6 = com5 * 4 com7 = year2 - com6 if com7 < 1 then com4 = com4 + 1 ' se bisestile end if com7 = year2 + com1 - com2 + com3 + com4 com1 = (com7 / 7) * 7 com8 = com7 - com1 week_day1 = com8 '+ 1 end sub '-------------------- Formats date and time sub procedure Transform_Time() sec1 = ((sec and 0x70) >> 4)*10 + (sec and 0x0F) min1 = ((min and 0xF0) >> 4)*10 + (min and 0x0F) hr1 = ((hr and 0x30) >> 4)*10 + (hr and 0x0F) week_day1 =(week_day and 0x07) day1 = ((day and 0xF0) >> 4)*10 + (day and 0x0F) mn1 = ((mn and 0x10) >> 4)*10 + (mn and 0x0F) year1 = ((year and 0xF0)>> 4)*10+(year and 0x0F) end sub sub procedure lefttrim (dim byref astring as string[255]) dim i, leng as byte i = 0 leng = 0 while astring[i] = 32 Inc(leng) Inc(i) wend i = 0 do astring[i] = astring[leng] Inc(i) Inc(leng) loop until astring[leng] = 0 astring[i] = 0 end sub '----------------------- Centratura stringa --------------------- sub procedure CentraStringa dim ii,xxx,yy as byte dim Testo as string[16] xxx = 0 for ii = 15 to 0 step -1 if Santo[ii] = 32 then xxx = xxx + 1 else goto zeta end if next ii zeta: if xxx > 1 then yy = xxx div 2 yy = yy - 1 for ii = 0 to yy testo[ii] = " " next ii xxx = 0 for ii = yy+1 to 15 testo[ii] = Santo[xxx] xxx = xxx + 1 next ii Santo = testo Santo[16] = 0 end if end sub ' -----------------------Toglie spazi a destra ------------------- Sub procedure RightTrim dim ii,xxx,yy as byte dim Testo as string[16] for ii = 15 to 0 step -1 if Santo[ii] <> 32 then goto trimmA end if next ii trimmA: for yy = 0 to ii Testo[yy] = Santo[yy] next yy Santo = Testo yy = yy+1 InizStamp = 97 - ((yy * 4 ) div 2) end sub ' ------------------------------ Trova Santo del giorno --------------------------- sub procedure TrovaSanto(dim byref mese, giorno as short) dim x as byte tnum = " " ByteToStr(mese, tnum) ' txt is " 24" (one blank here)mn1 MetteZero MeGio[0] = tnum[1] MeGio[1] = tnum[2] tnum = " " ByteToStr(giorno, tnum) MetteZero MeGio[2] = tnum[1] MeGio[3] = tnum[2] CalPasqua '************************* if (MeGio[0] = MeGioPas[0]) then if (MeGio[1] = MeGioPas[1]) then if (MeGio[2] = MeGioPas[2]) then if (MeGio[3] = MeGioPas[3]) then Santo = "PASQUA DI RESUR." ' x = 1 end if end if end if end if if x = 1 then x = 0 ' è Pasqua else if MeGio[0] = "1" then x = 1 else if MeGio[1] < "7" then x = 0 else x = 1 end if end if Santo = " " if x = 0 then for y = 0 to 182 if (MeGio[0] = Santi1[y][0])then if (MeGio[1] = Santi1[y][1]) then if (MeGio[2] = Santi1[y][2]) then if (MeGio[3] = Santi1[y][3]) then for i =0 to 15 Santo[i] = Santi1[y][4+i] next i goto poi end if end if end if end if next y else for y = 0 to 184 if (MeGio[0] = Santi2[y][0])then if (MeGio[1] = Santi2[y][1]) then if (MeGio[2] = Santi2[y][2]) then if (MeGio[3] = Santi2[y][3]) then for i =0 to 15 Santo[i] = Santi2[y][4+i] next i goto poi end if end if end if end if next y end if poi: CentraStringa end if Glcd_Write_Text(Santo, 65,4,1) end sub '-------------------- sub procedure GiornoSettimana(dim byref WD as short) select case WD case 0 txtS = " SABATO " case 1 txtS = "DOMENICA " case 2 txtS = " LUNEDI " case 3 txtS = " MARTEDI " case 4 txtS = "MERCOLEDI" case 5 txtS = " GIOVEDI " case 6 txtS = " VENERDI " end select Glcd_Write_Text(txtS, 76,0, 1) 'NomeGiorno settimana end sub sub procedure StampaGio(dim byref Giorno as short) ByteToStr(Giorno,tnum) ' Giorno MetteZero txtA[0] = tnum[1] txtA[1] = tnum[2] txtA[2] = 0 Glcd_Write_Text(txtA, 73,2,1) end sub sub procedure StampaMes(dim byref Mese as short) ByteToStr(Mese,tnum) 'Mese MetteZero txtA[0] = tnum[1] txtA[1] = tnum[2] txtA[2] = 0 Glcd_Write_Text(txtA, 86,2,1) end sub sub procedure StampaAnno(dim byref Anno as short) ByteToStr(Anno,tnum) 'Anno MetteZero tnum[3] = tnum[2] tnum[2] = tnum[1] tnum[0] = "2" tnum[1] = "0" Glcd_Write_Text(tnum, 99,2,1) end sub sub procedure StampaSecondi(dim byref Seco as short) ByteToStr(Seco,tnum) 'Secondi MetteZero txtA[0] = tnum[1] txtA[1] = tnum[2] txtA[2] = 0 Glcd_Write_Text(txtA, 89,6,1) end sub sub procedure StampaMinuti(dim byref Mino as short) ByteToStr(Mino,tnum) 'Minuti MetteZero txtA[0] = tnum[1] txtA[1] = tnum[2] txtA[2] = 0 Glcd_Write_Text(txtA, 77,6,1) end sub sub procedure StampaOre(dim byref Ore as short) ByteToStr(Ore,tnum) 'ora MetteZero txtA[0] = tnum[1] txtA[1] = tnum[2] txtA[2] = 0 Glcd_Write_Text(txtA, 65,6,1) end sub '-------------------- Output values to GLCD sub procedure Display_Time(dim byref sec2, min2, hr2, week_day2, day2, mn2, year2 as short) if week_dayOld <> week_day2 then GiornoSettimana(week_day2) 'Stampa Santo del giorno StampaGio(day2) StampaMes(mn2) StampaAnno(year2) TrovaSanto(mn2, day2) end if ' è riferito al confronto if week_dayOld <> week_day then ' StampaOre(hr2) StampaMinuti(min2) StampaSecondi(sec2) end sub sub procedure RipristinaValoriSeSuperaLimiti if min1 >=60 then min1=0 hr1 = hr1 +1 end if if hr1 >= 24 then hr1=0 day1 = day1 + 1 week_dayOld = 9 end if if day1 > 31 then day1 = 1 mn1 = mn1 + 1 week_dayOld = 9 end if if mn1=2 then if (day1 = 29) then if (year1 mod 4) > 0 then day1 = 1 mn1 = mn1 + 1 week_dayOld = 9 end if end if else if day1 = 31 then select case mn1 case 4,6,9,11 day1 = 1 mn1 = mn1 + 1 week_dayOld = 9 end select end if end if if mn1 > 12 then mn1 = 1 year1 = year1 +1 week_dayOld = 9 end if end sub sub procedure Write_Time() dim se,mi,ho,Gs,D1,M1,A1 as byte se = Dec2Bcd(sec1) + 0x80 ' write $80 to REG0. mi = Dec2Bcd(min1) ho = Dec2Bcd(hr1) Gs = Dec2Bcd(week_day1) D1 = Dec2Bcd(day1) M1 = Dec2Bcd(mn1) A1 = Dec2Bcd(year1) I2C_Start() ' issue start signal I2C_Wr(0xD0) ' address DS1307 I2C_Wr(0) ' start from word at address (REG0) I2C_Wr(se) ' write $80 + sec to REG0. I2C_Wr(mi) '(0) ' write 0 to minutes word to (REG1) I2C_Wr(ho) '(0x17) ' write 17 to hours word (24-hours mode)(REG2) I2C_Wr(Gs) '(0x02) ' write 2 - Monday (REG3) I2C_Wr(D1) '(0x04) ' write 4 to date word (REG4) I2C_Wr(M1) '(0x05) ' write 5 (May) to month word (REG5) I2C_Wr(A1) '(0x09) ' write 12 to year word (REG6) I2C_Stop() ' issue stop signal ' I2C_Start() ' issue start signal I2C_Wr(0xD0) ' address DS1307 I2C_Wr(0) ' start from word at address 0 I2C_Wr(0) ' write 0 to REG0 (enable counting + 0 sec) I2C_Stop() ' issue stop signal ' end if end sub ' sub procedure Read_Time() I2C_Start() I2C_Wr(0xD0) I2C_Wr(0) I2C_Repeated_Start() I2C_Wr(0xD1) sec =I2C_Rd(1) min =I2C_Rd(1) hr =I2C_Rd(1) week_day =I2C_Rd(1) day =I2C_Rd(1) mn =I2C_Rd(1) year =I2C_Rd(0) I2C_Stop() Transform_Time end sub sub procedure Scrolling if swscrol = 0 then Glcd_Dot(Scrol, 58, 1) Glcd_Dot(Scrol, 60, 1) Glcd_Dot(Scrol, 62, 1) Glcd_Dot(Scrol, 63, 1) Scrol = Scrol +1 if Scrol > 127 then Scrol = 127 swscrol = 1 end if else Glcd_Dot(Scrol, 58, 0) Glcd_Dot(Scrol, 60, 0) Glcd_Dot(Scrol, 62, 0) Glcd_Dot(Scrol, 63, 0) Scrol = Scrol -1 if Scrol < 65 then Scrol = 65 swscrol = 0 end if end if end sub sub procedure PulisceLancette() Glcd_Line(32,32,cxsec,cysec,0) 'PULISCE SEC Glcd_Line(32,32,cxmin,cymin,0) 'PULISCE MIN Glcd_Line(32,32,cxore,cyore,0) 'PULISCE ORE end sub sub procedure PulisceA() j = 65 j1 = 0 k = 127 k1 = 64 while j < 96 Glcd_Rectangle(j,j1,k,k1,0) delay_ms(3) j = j + 1 j1 = j1 + 1 k = k - 1 k1 = k1 - 1 wend end sub sub procedure PulisceB() for y = 0 to 63 for i = 64 to 127 Glcd_Dot(i, y, 0) next i next y end sub SUB PROCEDURE Ripulisce() PAUSA = 200 VDELAY_MS(PAUSA) PulisceA Read_Time() PulisceLancette() DisegnaLancette ZODIACO PAUSA = 1000 VDELAY_MS(PAUSA) Read_Time() PulisceLancette() DisegnaLancette VDELAY_MS(PAUSA) PulisceB Read_Time() PulisceLancette() DisegnaLancette week_dayOld = 9 end sub main: ADCON0 = %11000001 ' 11 = GRC (clock derived from the internal ' A/D RC oscillator) '000 (RA0/AN0come ingresso analogico) ' 1/0 = G0 A/D - 0 = End ' 0 not used ' 1 = A/D On - 0 = A/D Off ADCON1 = %10000001 'Allineamento a destra, A tutto analogico, 'Vref+ = ra3, VREF- = VSS ' ' —IMPOSTA LE PORTE—- TRISA = %00001111 'PIN RA0-RA1 sono impostati come ingressi TRISB=0 'PORTB is output ' ;RC3, RC4 are inputs for PORTC ' TRISC=%11110111 'PORTC is input TRISD=0 'PORTD is output delay_ms(1000) 'Pausa iniziale rem —-IMPOSTA IL DISPLAY GRAFICO—- ' cs1,cs2, rs, rw, rst, en Glcd_Init(PORTB,3,2,4,5,7,6,PORTD) ' Initialize Glcd Glcd_Fill(0) ' Clear Glcd inizia: ' Glcd_Set_Font(System3x5, 3, 5, 32) Glcd_Set_Font(@System3x6, 3, 6, 32) Mes = 0 swscrol = 0 day1 = 13 mn1 = 7 year1 = 12 sec1=0 min1=0 ' hr1=23 t1A = 0 t1B = 0 t1C = 0 swscrol = 65 swscrol = 0 Scrol = 64 SwTasti = 0 week_dayOld = 9 I2C_Init(100000) ' initialize full master mode HoGiaScritto = Eeprom_Read($00) if HoGiaScritto <> 0x41 then Write_Time delay_ms(100) end if Read_Time() ' —-DISEGNA CIRCONFERENZA SVEGLIA—- passo=0.02 radianti=0 while radianti< 2*3.14 cx = sin(radianti)*30.0+32.0 cy = -cos(radianti)*30.0+32.0 Glcd_Dot(cx, cy, 1) ' Accende il pixel radianti=radianti+passo wend ' —-DISEGNA I PALLINI DELLE 12 ORE—- passo=0.523598 radianti=0 while radianti< 2*3.14 cx = sin(radianti)*25.0+32.0 cy = -cos(radianti)*25.0+32.0 Glcd_Circle(cx,cy,2,1) radianti=radianti+passo ' delay_ms(200) PAUSA = 200 VDELAY_MS(PAUSA) WEND ' Glcd_Write_Text("ORE", 71,6,1) Glcd_Write_Char(":", 73,6,1) Glcd_Write_Char(":", 85,6,1) Glcd_Dot(100, 52, 1) Glcd_Dot(101, 52, 1) Glcd_Dot(102, 52, 1) LeggeScriveTemperatura while true ' Processa i TASTI per modifica orario RipeteTasti: ' ------------ Decrementa anno ----------------- if (portC.1 = 1) and (portC.0 = 0) then if portc.5=1 then year1 = year1 -1 while portC.5 = 1 'Ciclo anti REPEAT wend StampaAnno(year1) week_dayOld = 9 'per rilanciare la routine Calcola giorno settimana SwTasti = 1 end if end if ' -------------- Azzera byte 0 eeprom ------ if (portC.2 = 1) and (portC.0 = 0) then Eeprom_Write( $00, 0x00) Write_Time end if if portC.0 = 1 then ' minuti if portC.1 = 1 then min1 = min1 +1 while portC.1 = 1 'Ciclo anti REPEAT wend if min1 >=60 then min1=0 end if StampaMinuti(min1) SwTasti = 1 end if ' ore if portC.2 = 1 then hr1 = hr1 + 1 while portC.2 = 1 'Ciclo anti REPEAT nop nop nop wend if hr1 >= 24 then hr1=0 end if StampaOre(hr1) ''''' hr2 = hr2 +5 SwTasti = 1 end if ' giorni if portc.7=1 then day1 = day1 +1 while portC.7 = 1 'Ciclo anti REPEAT nop nop nop wend select case mn1 case 4,6,9,11 if day1 > 30 then day1 = 1 end if case 2 if (day1 > 28) then if (year1 mod 4) > 0 then day1 = 1 else if (day1 > 29) then day1 = 1 end if end if end if case else if (day1 > 31) then day1 = 1 end if end select StampaGio(day1) week_dayOld = 9 'per rilanciare la routine Calcola giorno settimana SwTasti = 2 end if ' mese if portc.6=1 then mn1 = mn1 +1 while portC.6 = 1 'Ciclo anti REPEAT nop nop nop wend if mn1 > 12 then mn1 = 1 end if StampaMes(mn1) week_dayOld = 9 'per rilanciare la routine Calcola giorno settimana SwTasti = 2 end if ' anno if portc.5=1 then year1 = year1 + 1 while portC.5 = 1 'Ciclo anti REPEAT nop nop nop wend StampaAnno(year1) week_dayOld = 9 'per rilanciare la routine Calcola giorno settimana SwTasti = 2 end if end if if portC.0 = 1 then goto RipeteTasti end if ' ------------------ Ripristina valori se supera limiti if SwTasti > 0 then if SwTasti = 1 then sec1=0 end if Write_Time Eeprom_Write( $00, 0x41) if week_dayOld = 9 then Calcola end if SwTasti = 0 end if DisegnaLancette LeggeScriveTemperatura ' --------------------------- Stampa Giorno settimana - data - Santo - ora if week_dayOld <> week_day1 then Calcola 'Trova numero giorno settimana end if Display_Time(sec1, min1, hr1, week_day1, day1, mn1, year1) week_dayOld = week_day1 Pausa = 100 '128 '238 for i = 1 to 8 Scrolling Vdelay_ms(Pausa) next i if (portC.0 = 0) and (portC.5 = 1) then Ripulisce Mes = 0 while portC.5 = 1 'Ciclo anti REPEAT nop nop nop wend end if Mes = Mes+1 if Mes > 30 then Ripulisce Mes = 0 end if Read_Time() PulisceLancette() wend end.