HCS12 Date and Time

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

HCS12 Date and Time

1,294 次查看
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 回复数

1,000 次查看
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 项奖励
回复

1,000 次查看
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 项奖励
回复