I2C Clock issue on HCs08

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

I2C Clock issue on HCs08

2,775件の閲覧回数
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,605件の閲覧回数
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,605件の閲覧回数
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,605件の閲覧回数
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,605件の閲覧回数
prajaktakakade
Contributor I

Part no. is FXTH871x7

0 件の賞賛
返信