How to set I2C frequency of 12ZVCA MCU

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to set I2C frequency of 12ZVCA MCU

Jump to solution
1,166 Views
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 Kudos
Reply
1 Solution
1,130 Views
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

View solution in original post

1 Reply
1,131 Views
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