I2C Clock issue on HCs08

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

I2C Clock issue on HCs08

2,767 次查看
prajaktakakade
Contributor I

I am doing I2C bit banging with HCs08 as a master and external accelerometer as a slave.

As internal crystal is of 4 Mhz. We want clock cycle of 100 MHz

Aim- To generate 5usec ON and 5usec OFF clock cycle on SCL pin.

Observations and Problems-

  1. Calling timer routine from main (see 1.1.).
  2. Timer for 5usec is configured (1.2.).
  3. Enable interrupt and start timer by giving clock (1.2.).
  4. Checked whether timer overflow flag (TOF) set, TOF value is 1, But ISR routine is not executed (1.3.).\

Code is attached.
Please tell me anyone.
where i m going wrong?

0 项奖励
回复
4 回复数

2,597 次查看
vicentegomez
NXP TechSupport
NXP TechSupport

Hi

I got lost, your problem is with the timer? or with the IIC module?

regards

Vicente Gomez

0 项奖励
回复

2,597 次查看
prajaktakakade
Contributor I

HCs08 doesn't have in-built IIC module. SO need to do iic bit banging.
Problem is with clock generating for IIC.

0 项奖励
回复

2,597 次查看
vicentegomez
NXP TechSupport
NXP TechSupport

What part are you using?

I b elieve that all the HCS08 device has a IIC module on in, I do not remember if the smallest one does not have it, but for intace the S08SH has it.

Thanks

0 项奖励
回复

2,597 次查看
prajaktakakade
Contributor I

Part no. is FXTH871x7

0 项奖励
回复