Real Time 1Hz 08M

Vroom

Member
Make clock by other picaxe. 08M if correct 100% pulse 1Hz, one second output, show simple code what possible correct 1.00 sec or not really?

main:
high 1
pause 1000
low 1
pause 1000
goto main
 

Dippy

Moderator
Sadly, that'll be a toy clock.

If you want accuracy forget that idea. Internal resonator + execution time = not very good.

It is possible to make a reasonable stab at a good clock on PICs, but there is a little bit more to it than that simple approach - in most cases just get a Real Time Clock.
 

manuka

Senior Member
PICAXE High/Low/Pause (or Wait) approaches are OK for simple needs, but command execution time (of maybe a millisec) and thermal drift may lead to up to ~±1% timing error. How demanding hence is your need? Have you considered hacking a cheap battery powered clock? Stan.
 
Last edited:

Dippy

Moderator
Sadly, that'll be a toy clock.

If you want accuracy forget that idea. Internal resonator + execution time = not very good.

It is possible to make a reasonable stab at a good clock on PICs, but there is a little bit more to it than that simple approach - in most cases just get a Real Time Clock.
 

boriz

Senior Member
Mainly depends upon the application.

How accurate does it need to be? How long will it run for (without synchronisation). Is your project mains powered? (Mains AC frequency is often used for clock synchronisation).
 

inglewoodpete

Senior Member
Make clock by other picaxe. 08M if correct 100% pulse 1Hz, one second output, show simple code what possible correct 1.00 sec or not really?

main:
high 1
pause 1000
low 1
pause 1000
goto main
First and foremost, that code will give you an output waveform of (close to) 0.5Hz:rolleyes:

If you want 1Hz, each half cycle must be 500mS.
 

Pauldesign

Senior Member
08M if correct 100% pulse 1Hz,
Is that even a clock? :)

Also note; the statement 100% pulse means there will be no high to low transitions (in other words the waveform will stay high all the time).

Also think of oscillator instability or drifts caused by changes in temperature.

Well, if designing a device was that simple, then everybody would have own a company. :) Nevertheless, it's worth starting from somewhere.
 
Top