HCS12 Date and Time

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

HCS12 Date and Time

765件の閲覧回数
tcrite
Contributor II

Hi everyone, I need some help with a project that I'm trying to do. Is there a macro to get the current date and time from the HCS12? I'm trying to get the date and time to output toTera Term when an interrupt triggers. I shouldn't have a problem with the output to Tera Term as long as I can figure out how to get the current date and time. Thanks in advance for any suggestions.

ラベル(1)
0 件の賞賛
2 返答(返信)

471件の閲覧回数
astro_goto
Contributor III

The HCS12 does not have a native clock you can read to get out date and time. You must program a clock yourself. An
excellent reference which contains all the code you need for a real time clock is "Programming the Motorola M68HC12
Family", by Gordon Doughman, 2000, Annabooks, http://www.annabooks.com/. That program uses power line interrupts
for accuracy.

My own HCS12 runs a PLL at 48 Mhz and generates 30 interrupts per second using the Modulus counter. The program
maintains a set of counters for seconds, minutes, hours, days, months, and year. My board's crystal oscillator is
accurate enough for my needs.

0 件の賞賛

471件の閲覧回数
tcrite
Contributor II

Thanks for the advice. I actually did some research and found that my dragon board has an on-board RTC that communicates using IIC.

0 件の賞賛