Hello!
I´m only a beginner in programming µC but I try to help you.
I have a similar problem. I want to communicate with a temperature
sensor over I2C.
I show you my init-function: (but it isn´t in assembler)
void initI2C(void)
{
IBFD=0x1F; /*here you must define the frequency divider*/
/*Block Guide page.16-25*/
IBAD=0xA0; /*SlaveAdress of this Module*/
/*I don´t know, whether it´s necessary*/
IBCR=0x80; /*activate I2C-Modul, without INTERRUPT*/
}
To start I´m using this command:
IBCR=0xB0; /*Start, BUS INTERRUPT DISABLE*/
/*IBEN & Master & Transmit = 1*/
Here is the command to stop the communication:
IBCR=0x90; /*Stop*/
/*IBEN & Transmit = 1*/
The addressing depends on the device (i.e. sensor), you want to use.
Take care, I don´t know whether it is right, what i´ve posted here.
Perhaps it helps you. At present that´s all I know.
Greetings!
> > IIC block. But I'm lost in the Motorola documents.
> > All I would like to have is an assembler example of starting,
> > addressing a device and stopping the Bus.
> > Have anybody already done that and possibly email me an example ?
> > That would be great.
> >
> > Thanks by advance
> >
> > Jean Claude
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/68HC12/<*> To unsubscribe from this group, send an email to:
[hidden email]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/