comparison level1/cmds/mc09rtc.asm @ 3189:e9685c909630

mc09: Correct the description of the RTC part-number And add a reference to the instructions for wiring it up.
author Neal Crook <foofoobedoo@gmail.com>
date Sat, 20 May 2017 23:33:48 +0100
parents ef66bdab9b45
children
comparison
equal deleted inserted replaced
3188:b0ba9d16589a 3189:e9685c909630
1 ******************************************************************** 1 ********************************************************************
2 * mc09rtc - read/write DS1802 RTC attached to multicomp09 GPIO 2 * mc09rtc - read/write DS1302 RTC attached to multicomp09 GPIO
3 * Details of the hook-up can be inferred from the code or see the
4 * description here:
5 * https://github.com/nealcrook/multicomp6809/wiki/Adding-a-RTC
3 * 6 *
4 * Rather than bloat the timer module (which is memory-resident) 7 * Rather than bloat the timer module (which is memory-resident)
5 * this is a stand-alone utility that can either read the RTC and 8 * this is a stand-alone utility that can either read the RTC and
6 * update the system time, or read the system time and update the 9 * update the system time, or read the system time and update the
7 * RTC. It can be run from the startup file to set the time at boot. 10 * RTC. It can be run from the startup file to set the time at boot.
40 * ------------------------------------------------------------------ 43 * ------------------------------------------------------------------
41 * 1 2015/11/07 Neal Crook 44 * 1 2015/11/07 Neal Crook
42 * Created. 45 * Created.
43 * 46 *
44 nam mc09rtc 47 nam mc09rtc
45 ttl Read/write DS1802 RTC, copy to/from system time 48 ttl Read/write DS1302 RTC, copy to/from system time
46 49
47 use defsfile 50 use defsfile
48 51
49 tylg set Prgrm+Objct 52 tylg set Prgrm+Objct
50 atrv set ReEnt+rev 53 atrv set ReEnt+rev
516 519
517 puls x,pc tidy up the stack and return 520 puls x,pc tidy up the stack and return
518 521
519 522
520 ******************************************************************** 523 ********************************************************************
521 * Low-level DS1802 read/write. Broken into the following parts: 524 * Low-level DS1302 read/write. Broken into the following parts:
522 * 525 *
523 * initio - GPIO init 526 * initio - GPIO init
524 * putcmd - write 1st (cmd) byte 527 * putcmd - write 1st (cmd) byte
525 * putbyte - write 1 data byte 528 * putbyte - write 1 data byte
526 * getbyte - read 1 data byte 529 * getbyte - read 1 data byte