southernbob
New Member
The attached program(s) is my attempt to generate a time-of-day
source from a 08M Picaxe. The program uses a servo pulse on
leg 6 as a means of generating a "timer tick". This timer tick
occurring every 20 msec generates an interrupt. These interrrupts
are counted to form minutes then hours resulting in the
time-of-day. To set the correct time an IR remote is used.
The time is set by pressing 1 on the IR remote and then
entering 4 digits (HHMM) for the hours and minutes.
The program will then use that time. If the time is not set
by the remote the time will start out as 00:00. The initial
time can also be set by un-commenting the hour and minute
instuctions at the start of the program and putting in the
desired time before compiling and downloading.
Also, the program has provision for sending 2 option bytes
(entered by pressing channel UP or channel DOWN on the
IR remote) to the connected picaxe for 'what ever' use.
The circuit consists of a 08M with an IR receiver connected to
infrain . The time-of-day can be outputted to the 08M terminal
screen or send to another picaxe by means of a conditional
compile statement. See the program header for more details on
the program operation . The 2nd program is a bare-bones
program for receiving the time-of-day and then displaying
it on the terminal screen for that picaxe (set for a 18X).
The programs have a (.txt) file extension added so that they may
be viewed with a text reader such as NOTEPAD or saved
on your computer. The (.txt) can be deleted before use in the
picaxe editor. Ignore the warning message from Windows
about changing the file extension.
source from a 08M Picaxe. The program uses a servo pulse on
leg 6 as a means of generating a "timer tick". This timer tick
occurring every 20 msec generates an interrupt. These interrrupts
are counted to form minutes then hours resulting in the
time-of-day. To set the correct time an IR remote is used.
The time is set by pressing 1 on the IR remote and then
entering 4 digits (HHMM) for the hours and minutes.
The program will then use that time. If the time is not set
by the remote the time will start out as 00:00. The initial
time can also be set by un-commenting the hour and minute
instuctions at the start of the program and putting in the
desired time before compiling and downloading.
Also, the program has provision for sending 2 option bytes
(entered by pressing channel UP or channel DOWN on the
IR remote) to the connected picaxe for 'what ever' use.
The circuit consists of a 08M with an IR receiver connected to
infrain . The time-of-day can be outputted to the 08M terminal
screen or send to another picaxe by means of a conditional
compile statement. See the program header for more details on
the program operation . The 2nd program is a bare-bones
program for receiving the time-of-day and then displaying
it on the terminal screen for that picaxe (set for a 18X).
The programs have a (.txt) file extension added so that they may
be viewed with a text reader such as NOTEPAD or saved
on your computer. The (.txt) can be deleted before use in the
picaxe editor. Ignore the warning message from Windows
about changing the file extension.
Attachments
-
8.6 KB Views: 83
-
1.3 KB Views: 38