In message <01BD0CC6.311A3160@Milano38-15.tin.it>, Ivano BONASSINA writes >I should plan a lot of time to realize an ASM code for PIC 16F84 realizing a >''simple'' >Clock calendar with LED display (6) HH:MM:SS or GG:MM:AA with some alarms >every 30 minutes. My question is: >I have to look in the DS1202 external I2C clock calendar every how many >millisecond and >when? And if I ask the DS1202 ( or PCF 8583 ) during a changing of second, how >can I prevent the problem? Is better to use a 50hz clock to sincronize the look >in the DS 1202? >Someone can help me with a flow of the program? >Thanks in advance. >Bonassin@tin.it The PCF8583 can be set to give a pulse on one of the pins every second, feed that into one of the PIC pins and use that to initiate the reading routine. If you do just continually read the chip, it doesn't matter if you read during a change of seconds - the time will be corrected at the next read, so will never be more than a fraction of a second wrong. -- Nigel. /--------------------------------------------------------------\ | Nigel Goodwin | Internet : nigelg@lpilsley.demon.co.uk | | Lower Pilsley | Web Page : http://www.lpilsley.demon.co.uk | | Chesterfield | | | England | | \--------------------------------------------------------------/