Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
08/14/06 04:23
Read: times


 
#122180 - i2c interrupt of P89LPC9221
Hi,

I'm trying to write an i2c interface for P89LPC9221 to i2c flash AT24C64A.

I'm having problem to invoke the i2c interrupt of the chip.

I follow the steps in the usermanual but it seems that the interrupt couldn't be invoked although the SI flag is set.

I2CON register
bit 7 = x
bit 6 = I2EN
bit 5 = STA
bit 4 = STO
bit 3 = SI
bit 2 = AA
bit 1 = x
bit 0 = CRSEL

to write into i2c flash, i follow the steps mentioned in i2c master transmitter mode:

I2CON = 0b01000001;
I2CON = I2CON | 0b01000001; //STA = 1, AA = 1

then i read the value of I2CON and found that the SI flag is set but it doesn't enter the interrupt routine vectored at 0x33.

i then try to keep writing STA =1, AA = 1 to the i2c flash and measure SDA and SCL waveform, i found that there is a start condition generated with an ACK received. The problem now is i can't enter the i2c interrupt which check the value of ISTAT status register to perform further action.

do i need to check the status register outside the i2c interrupt?

Please help.

Regards,
Ivan






List of 4 messages in thread
TopicAuthorDate
i2c interrupt of P89LPC9221            01/01/70 00:00      
   Code Architect is your friend            01/01/70 00:00      
   Interrupt priority affected I2c interrupt            01/01/70 00:00      
      something wrong            01/01/70 00:00      

Back to Subject List