P89C664 i2c driver

Started by tux, June 01, 2005, 08:47:30 AM

Previous topic - Next topic

tux

hello,

where i can finde a runing i2c driver for the P89C664 MCU?

Have anyone a sample driver for me?

Thanks

erikm

use CodeArchitect for LPC932, the difference is obvious and easy to handle.

tuxi

it is posible that run on a P89C664 MCU wenn i generate with the codearchitect LPC932 a code?

tuxi

ok wenn i generate the LPC932 i2c Driver from CodeArchitect, the I2DAT var's are not defined on the reg66x.h can i copy the defines from the reg932.h?

Thanks

Andy Ayre

If they are not defined in reg66x.h then they don't exist in the 66x. You need to look at the datasheets for the LPC932 and the 664 and compare the differences between the two.

Embedded Systems Academy, Inc.
support at esacademy dot com

tuxi

The 66x had a i2c device it stand in the Data Sheet but no description of the i2c include in the data sheet from the i2c as like the LPC935 MCU.
It engaged in the DataSheet under Features. (I

Andy Ayre

I just checked, and the 66x datasheet available at www.philips.com/microcontrollers contains a complete description of I2C covering 20 pages. It has a very complete description.

Embedded Systems Academy, Inc.
support at esacademy dot com

tuxi

ok i found the i2c description on 66x in the datasheet on site 12.

Rons

Philips has released a i2c driver that you could adapt to your case.
I wrote my own driver for a P89C668 device.  You won't be able to
get above a rate of about 70k.

tuxi

Where can i found the Philips i2c Driver - is it diferent from the CodeArchitect?

Rons can you send me the i2c driver that you had write?

My data rate is not important.
The codearchitect i2c driver don't please me. I have no so mutch time to write an own driver.

Thanks

erikm

I have no so mutch time to write an own driver.

If you do not have the time to do the task, why did you accept it???

Erik

tuxi

ok sorry i wirte it not so good.
i mean that i write total a new one for modyfile that time i must have.

Flo

Rons

The Philips application note is AN95068
It is titled "C routines for the PCx8584"

You might also want application note AN96040 and
data sheet for the PCF8584 I2C bus controller.

tuxi

oh thanks, that good, it help me very well!

tux

thanks @all - now it works!

only i have a problem.
After i read from the i2c Bus 2 char's to a pointer (char *buffer). the buffer is empty and wenn i
printf( "buffer: %x\n", buffer[ 0 ] );
 printf( "buffer: %x\n", buffer[ 1 ] );
the buffer inherits the data from the i2c bus.

wenn i print that in one line it dosend work.
I use Keil.

what i make wrong?