How to set I2C frequency of 12ZVCA MCU

cancel
Showing results for 
Search instead for 
Did you mean: 

How to set I2C frequency of 12ZVCA MCU

74 Views
Contributor II

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
1 Reply

38 Views
Senior Contributor IV

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

0 Kudos