Hi Zet, In addtion to this. If you want to use a clock with your microcontroller you can either use a clock-ic for that (like a DS3231) or you build a clock in software but as Oliver said, you need a crystal on your microcontroller and not use the internal oscillator.
BTW. It is possible to run a PIC on a 32 kHz crystal. That makes it very easy 🙂. Kind regards, Rob ________________________________ Van: 'Oliver Seitz' via jallib <[email protected]> Verzonden: dinsdag 20 april 2021 08:05 Aan: [email protected] <[email protected]> Onderwerp: Re: [jallib] clock Hi Zet, that question is in fact a lot of questions. A microcontroller in general does not know anything about time. It has no operating system, which makes things more complicated in some cases, but helps a lot when speaking about speed and reliability. Libraries can assist with dealing with things an operating system does on a "standard computer". If you're speaking about "time zones", you need to know what time it is. Usually, a computer knows the time using internet time servers, or radio clocks, or GPS receivers. A microcontroller by itself doesn't have any of these. A microcontroller has its system frequency generator, which can be a crystal, or an internal rc oscillator. You can choose at which frequency your microcontroller should run, with 8 bit PICs today up to 64MHz. The controller can count the pulses of that frequency. If you want to run something now and tomorrow at the same time, just run it now and then wait for 64000000*24*60*60 pulses, then run again. The controller doesn't need to know what time it is for that purpose. If you do want to have a clock time, there are date/calendar libraries to help you to transform that clock pulses in a human-readable time, but you will also need to set the clock every time you're starting the controller. If you're using the internal frequency generator, it's not guaranteed to be very accurate, it can be around 2% (=half an hour per day) fast or slow. Greets, Kiste Am Montag, 19. April 2021, 23:51:58 MESZ hat [email protected] <[email protected]> Folgendes geschrieben: LS I hope someone can help me. Does a library excist with timezone Amsterdam so the microprocessor can use it to send an order to start or stop a device every day at the same time? ZetWeeh -- You received this message because you are subscribed to the Google Groups "jallib" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jallib/5b7be137-cda7-47c7-a198-5914804ebf85n%40googlegroups.com. -- You received this message because you are subscribed to the Google Groups "jallib" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jallib/122110146.4220543.1618898714083%40mail.yahoo.com. -- You received this message because you are subscribed to the Google Groups "jallib" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jallib/AM0PR07MB624182D6F2BEC5D83B5DDDF3E6489%40AM0PR07MB6241.eurprd07.prod.outlook.com.
