Interfacing 25AA512 EEPROM to MC9S12GA240 using SPI

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

Interfacing 25AA512 EEPROM to MC9S12GA240 using SPI

1,436 次查看
harshal_pawar
Contributor III

I want to interface Microchip's 25AA512 EEPROM to MC9S12GA240 using SPI. Is there any sample code available for the same?

Like MODRR register in MC9S12XEP100, is there any routing register to make that port (Say PJ0- PJ3 for SPI1) dedicatedly for SPI?
1 回复

1,261 次查看
dianabatrlova
NXP TechSupport
NXP TechSupport

Hi Harshal,

Please refer to the chapter 2.3.11 Pins PJ7-0, the SPI1 signals are mapped to these pins (PJ0- PJ3) when used with the SPI function. Depending on the configuration of the enabled SPI1 the I/O state is forced to be input or output.

I found the project which was created for the S12XE. However, the S12XE has the same SPI module as S12G.

Please see the attachment.

Also, you can look at examples on the link below:

S12G Examples Pack 

There are G240-SPI-MC33810-CW51 and G240-SPI-Slave examples. 

I hope it helps you.

Best regards,

Diana