Make IIC a slave

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

Make IIC a slave

662 Views
ronaldpatton
Contributor I

Hello,

 

After long last I have been able to successfully build and compile an application for the MC9S08QG8 thanks to a post by Rodney McGee (How-to Directly Install CodeWarrior 6.3 Classic in Windows 7 & 10 x64 (Unofficial Method) ).   It is a somewhat old application for an amateur radio device.  As just mentioned, the code builds, loads and runs fine.

 

The device has an externalized IIC interface.

The IIC routines act as master.  The application currently interrogates an ADC chip and writes information to a LCD display (which is not IIC).   I would now like to change the IIC routine to act as a slave.  Why?  I will be interfacing the device with another device (via the externalized IIC interface) that will act as the master.  The new external device will interrogate the ADC (via IIC) and then send information to the application running on the MC9S08QG8) (acting as slave).  The application will then update the LCD display.  So, the bottom line is I would like the current MC9S08QG8 application to act as a slave.

 

How do I do that with Code Warrior 6.3?

 

Regard,

Ron

Original Attachment has been moved to: mwattmeter.zip

Labels (1)
0 Kudos
2 Replies

450 Views
Stano
NXP Employee
NXP Employee

Hello Ronald,

I suggest you to use the AN3291 as the first step how to set-up and use the IIC module on S08QG8 as a slave. The slave must work in the interrupt routine, to be able promptly communicate with master IIC device. The SW examples in this AN are in clear C, so you can use it in your version of CW tool. Here is the link:

http://cache.freescale.com/files/microcontrollers/doc/app_note/AN3291.pdf

I hope it can help you. If yes, please click on the "Correct answer" button. Thanks.

Best Regards,

Stano.

0 Kudos

450 Views
ronaldpatton
Contributor I

Hello Stano,

This just what I was looking for.  I will be sure to give the suggested document a thorough examination.

Regards,

Ron 

0 Kudos