How to set I2C frequency of 12ZVCA MCU

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

How to set I2C frequency of 12ZVCA MCU

ソリューションへジャンプ
1,063件の閲覧回数
s_kim1
Contributor III

Hello,

I have a question about I2C of S12ZVCA19MLF MCU.

First, I have purchased and used the DEVKIT-S12ZVC development kit.

Second, the development sample source

DEVKIT-S12ZVC development platform for S12ZVC | NXP 

IIC is being reported and developed in the DEVKIT-S12ZVC Lab Examples on this site.

If you are trying to set the I2C Frequency, you have learned to set the IBFD register.

I would like to know how to specify the register value to set it to 100KHz.

If there is additional data that summarizes the I2C frequency value, please provide it.

Thanks.

0 件の賞賛
返信
1 解決策
1,027件の閲覧回数
kef2
Senior Contributor V

Hi,

MC9S12ZVCRMV1.pdf Figure 1-16 IIC Block diagram shows bus_clock as an IIC module clock. The top bus clock speed of S12ZVC is 32MHz. You may choose different bus clock using PLL, but for 32MHz bus and 100kHz IIC you need SCL divider of about 32M/100k = 320. Looking into Table 16-7 in the same S12ZVC RM I see these IBFD (IBC7:0 bits) settings for SCL divider=320: 0x25, 0x5D, 0x94. 

Edward

元の投稿で解決策を見る

1 返信
1,028件の閲覧回数
kef2
Senior Contributor V

Hi,

MC9S12ZVCRMV1.pdf Figure 1-16 IIC Block diagram shows bus_clock as an IIC module clock. The top bus clock speed of S12ZVC is 32MHz. You may choose different bus clock using PLL, but for 32MHz bus and 100kHz IIC you need SCL divider of about 32M/100k = 320. Looking into Table 16-7 in the same S12ZVC RM I see these IBFD (IBC7:0 bits) settings for SCL divider=320: 0x25, 0x5D, 0x94. 

Edward