52RE : [ADuC_ARM] I²C Configuration
- May 10, 2006
I think you forgot the send of data (I2C1MTX register) just after the I2C1ADR.
I send you a document from AD on the I2C bus.
De : ADuC_ARM@yahoogroups.com [mailto:ADuC_ARM@yahoogroups.com] De la part de marcusmoser81
Envoyé : mardi 9 mai 2006 13:23
À : ADuC_ARM@yahoogroups.com
Objet : [ADuC_ARM] I²C Configuration
I'm interested in programming the ADuC7020 microcontroller. I have
succesfully programmed the UART. But now I have problems with I²C.
Here is a part of my code:
GP1CON = 0x22; // I2C1 on P1.2 and P1.3,
I2C1CFG = 0x0002; // Master Enable & Enable Generation of Master
// I2C1-Master setup
I2C1DIVH = 0xCF; // 0x3232 = 400kHz
I2C1DIVL = 0xCF; // 0xCFCF = 100kHz
IRQEN = 0x400; // I2C0 Master Interupt
I2C1ADR = 0x1A; // set i2c1 address (LSB = 0, Master Write)=
Adresse of AD5933
What isn't right? I don't see a signal on my oscilloscope, but I don't
find any error in my code. Have I forget some configurations?
- << Previous post in topic Next post in topic >>