Author Topic: P89C664 i2c driver  (Read 57512 times)

tux

  • Guest
P89C664 i2c driver
« on: June 01, 2005, 08:47:30 am »
hello,

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

Have anyone a sample driver for me?

Thanks

erikm

  • Guest
Re: P89C664 i2c driver
« Reply #1 on: June 01, 2005, 10:52:00 am »
use CodeArchitect for LPC932, the difference is obvious and easy to handle.

tuxi

  • Guest
Re: P89C664 i2c driver
« Reply #2 on: June 01, 2005, 10:57:30 am »
it is posible that run on a P89C664 MCU wenn i generate with the codearchitect LPC932 a code?

tuxi

  • Guest
Re: P89C664 i2c driver
« Reply #3 on: June 01, 2005, 11:07:16 am »
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

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2160
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: P89C664 i2c driver
« Reply #4 on: June 01, 2005, 11:15:34 am »
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

  • Guest
Re: P89C664 i2c driver
« Reply #5 on: June 01, 2005, 11:34:08 am »
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

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2160
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: P89C664 i2c driver
« Reply #6 on: June 01, 2005, 11:42:07 am »
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

  • Guest
Re: P89C664 i2c driver
« Reply #7 on: June 01, 2005, 11:50:23 am »
ok i found the i2c description on 66x in the datasheet on site 12.

Rons

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Re: P89C664 i2c driver
« Reply #8 on: June 01, 2005, 09:21:15 pm »
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

  • Guest
Re: P89C664 i2c driver
« Reply #9 on: June 02, 2005, 01:19:01 am »
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

  • Guest
Re: P89C664 i2c driver
« Reply #10 on: June 02, 2005, 06:10:11 am »
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

  • Guest
Re: P89C664 i2c driver
« Reply #11 on: June 02, 2005, 07:27:48 am »
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

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Re: P89C664 i2c driver
« Reply #12 on: June 02, 2005, 01:14:21 pm »
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

  • Guest
Re: P89C664 i2c driver
« Reply #13 on: June 02, 2005, 03:52:51 pm »
oh thanks, that good, it help me very well!

tux

  • Guest
Re: P89C664 i2c driver
« Reply #14 on: June 06, 2005, 02:34:49 am »
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?