MC9S08QG8 Demo Board/IIC issues...

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

MC9S08QG8 Demo Board/IIC issues...

1,833 次查看
awilliams
Contributor I
Newbe question regarding the IIC controller on a QG8.

Background: I am developing on the MC9S08QG8 Demo Board using CodeWarrior 5.7.0. The QG8's IIC controller is setup as a slave device only and another device is master. I'm able to successfully send one transaction but all subsequent transactions do not work. Both IIC lines are connected to a scope and I'm able to see the first address/data transaction. After the first transaction, I notice that the SCL line stays low instead of going high.

What's interesting is that when I attach the debugger to the QG8 and send the byte transaction again, I'm able to continuously send transactions to the slave and get data back from the slave even though the SCL line is still staying low.

The SCL/SDA lines are connected from the PIN connector of the demo board to the IIC on the master.

I checked the data sheet for the QG8 and the DEMO board but I don't see anything that explains this issue.

Thanks for your help.
标签 (1)
0 项奖励
回复
2 回复数

824 次查看
fabio
Contributor IV
Hi Awilliams,

This is really strange because when SCL is low, the I2C bus is busy and you are not supposed to be able to send data through it.

Your I2C routine is verifying the BUSY bit?

The pull ups are correct and ok?

You could take a look on the examples I wrote for master/slave I2C communication using the QG8:  www.sctec.com.br/hcs08 take a look at examples 13.6 and 13.7.

Best regards,
0 项奖励
回复

824 次查看
awilliams
Contributor I
Thanks fabio. Found my problem.
0 项奖励
回复