How to interface a RTC to S12SX and C time functions

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

How to interface a RTC to S12SX and C time functions

2,399 次查看
AndersJ
Contributor IV

Assuming i have a RTC physically connected the cpu,

how do I interface the RTC software wise,

to the C time functions, in time.h.

 

Thanks,

Anders J

标签 (1)
0 项奖励
回复
3 回复数

1,327 次查看
jsmcortina
Contributor III

You question is rather lacking in detail!

 

What kind of external real time clock are you trying to use? Often these might use SPI, in which case you will have to write routines to intialise and use the SPI communications.

 

James

0 项奖励
回复

1,327 次查看
AndersJ
Contributor IV

James. thanks for your interest.

 

My problem is not how to communicate with the clock.

My query is about the way I make the C time routines

use my RTC data, regardless of how my software accesses the RTC.

 

How do I tell Time() where to read MY realtime, so that it,

and other routines that call it can process date and time  properly.

 

Anders J

 

 

 

 

 

0 项奖励
回复

1,327 次查看
jsmcortina
Contributor III

Sounds like you will need to re-write the C libraries. It might be easier to use your own functions.

 

James

0 项奖励
回复