Re: I2C Start Problem

Started by Paul Claessen in LPC200010 years ago

That's odd! I'd say the problem with your latest piece of code was using CONSTAT instead as CONSET to check for SI as you did in your first...

That's odd! I'd say the problem with your latest piece of code was using CONSTAT instead as CONSET to check for SI as you did in your first code example. CONSTAT doesn't have a SI bit! (I advised to simply remove the clearing of SI before you checked it) The reason I said "odd" is that the direction of a pin (in/out) is only something for GPIO. If you select its I2C function, the I2C hardwar...


disabling PWM & I2C on P0.02 and P0.03 on a LPC2103

Started by Csaba Zvekan in LPC20009 years ago 1 reply

I am having difficulties disabling the multiplexed stuff on P0.2 & P0.3. I am trying to use it as a simple GPIO pins. I tried disabling the...

I am having difficulties disabling the multiplexed stuff on P0.2 & P0.3. I am trying to use it as a simple GPIO pins. I tried disabling the I2C and PWM with these two commands but it won't work I2C_I2CONCLR = 0x0; // Disable I2C PWM_MCR = 0x0; // Match Control register off Now this might be totally wrong , please remember "newbi" here . I have a dimmed led on P0.2 when I probe it ...


not receving i2c interrupt

Started by vijayasarathy T in LPC200013 years ago

Hi all, I have used the following code for I2C intializing, the vector no 9, i dont receive i2c interrupt(IRQ) after setting the...

Hi all, I have used the following code for I2C intializing, the vector no 9, i dont receive i2c interrupt(IRQ) after setting the start bit. if I configure the interrupt as FIQ I receive the interrupt. #define VIC_ENABLE (1<<5) #define VIC_BIT(b) (1<


LPC2106

Started by Amir Sherman in LPC200013 years ago

Pl's see below my customer summery of the LPC2106 requirements : 1. Act as an I2C PROM via the I2C channel. 2. Receive configuration...

Pl's see below my customer summery of the LPC2106 requirements : 1. Act as an I2C PROM via the I2C channel. 2. Receive configuration orders from the I2C channel. 3. Read HW configuration via IO pins. 4. Configure an external component using a multiplexed 8 bit data/address bus, should be implemented by GPIO. 5. Drive several HW pins according to configura


LPC2129 elementary I2C code NOT working

Started by tint...@gmail.com in LPC200010 years ago 2 replies

Hi everybody, I followed Hitex's I2C example for LPC2129 and had no effect. Here is the code I wrote for writing at a 24cxx memory at address...

Hi everybody, I followed Hitex's I2C example for LPC2129 and had no effect. Here is the code I wrote for writing at a 24cxx memory at address 0, showing also what results gave the debugger step-by-step... //initializations made I2CONCLR = 0x000000FF; //Clear all I2C settings (i thought that we //should not write 1s at reserved bits) I2CONSET = 0x00000040; //Enable the I...


LPC176X I2C reading ADC121C021

Started by sig5534 in LPC20005 years ago

Great frustration trying to get the 16b data read back from a ADC121C021. I've got many other I2C chips on the bus, not much problem getting them...

Great frustration trying to get the 16b data read back from a ADC121C021. I've got many other I2C chips on the bus, not much problem getting them working right, but I can't get the ARM I2C state machine to do the right things to read this ADC. I have written the ISR Read routine like the NXP doc says in the manual, but that results in an infinite loop that the ADC/MCU never comes out of, bounc...


I2C problems (LPC2138 as slave)

Started by jensalsig in LPC200013 years ago

Hi, I'm developing an application that have to transmit data between a PC and a LPC2138 using the I2C interface. The PC interface is a...

Hi, I'm developing an application that have to transmit data between a PC and a LPC2138 using the I2C interface. The PC interface is a U2C-11 I2C Bridge from Dimax. This device can only operate in master mode so the PC has to control the communication completely. I have the PC->LPC2138 part working and partly the LPC2138->PC part working. The


I2c STOP - problem and solution

Started by Martin Honeywill in LPC200011 years ago 1 reply

Hi I've implemented a simple i2c driver for an FRAM memory chip, I based my code on the "I2c_w_error.c" program available in the Files...

Hi I've implemented a simple i2c driver for an FRAM memory chip, I based my code on the "I2c_w_error.c" program available in the Files section of this group. This worked fine for the memory chip, but when later I tried to add access for a MAX7311 I/O chip I would find that my code would sometimes lockup. Upon further investigation I found that I was always locking up in the I2c Stop Fu...


help :one wire master bridge ds2482 interface with lpc2148

Started by "san...@ymail.com" in LPC20009 years ago 1 reply

hi aim implementing i-button interface to lpc2148 using ds2482 1-wire to i2c bridge. my problem is i am using hardware i2c controller in...

hi aim implementing i-button interface to lpc2148 using ds2482 1-wire to i2c bridge. my problem is i am using hardware i2c controller in lpc2148.i am writing 3 routine 1 detect the i button 2 read i-button 3 write i-button each routine using i2c interrupt.i seen some example in that all i2c code are written in side the interrupt routine only. im confused about how can i uses the i...


I2C Interrupts - LPC2368 working under Keil uVision 3

Started by Samjith Wasim in LPC20008 years ago

Hello ppl, Why really I2C Interrupts Hanging under large applications ? What is the exact reason behind hanging ? Service routine after few...

Hello ppl, Why really I2C Interrupts Hanging under large applications ? What is the exact reason behind hanging ? Service routine after few seconds not really runnning on ? But when a separate project dedicated for I2CIRQ is developed it is superb !!! Running great I2C INTERRUPTS ON LPC2368 (ARM7) Samjith Wasim . A LCS Controls Private Ltd. www.lcsembedded.com


I2C Problem (Can't even send START signal)

Started by stangelanda in LPC200010 years ago 2 replies

I'm trying to get the I2C bus to work on an NXP LPC2103. I'm using Keil's Realview tools to compile. The LPC2103 is the master and there is...

I'm trying to get the I2C bus to work on an NXP LPC2103. I'm using Keil's Realview tools to compile. The LPC2103 is the master and there is only one slave, an NXP Port Expander (PCA9506). I've got some more complicated code with a full state machine, but I pared it down to just initializing the I2C controller and sending a START signal. I'm not seeing any change after I set the START fla...


I2C problems with LPC2138 + GNU + I2C.1+Keil board 2130

Started by Ake Hedman, eurosource in LPC200012 years ago

Hi, I wounder if someone have experienced problems with the second I2C channel on the LPC2138 chip? I am trying to interface a...

Hi, I wounder if someone have experienced problems with the second I2C channel on the LPC2138 chip? I am trying to interface a 24LC512 chip. I can write to the chip OK (I believe so anyway as the correct states are gone true) but read always return 0. The zero return can be maybe be due to other things but the real problem is a read when t


I2C for LPC2148 - RTC Epson RX8025

Started by Sutton Mehaffey in LPC200012 years ago 1 reply

By chance, has anyone interfaced the Epson RX8025 by I2C to any LPC chip? Or any MPU for that matter? The standard read method for I2C works...

By chance, has anyone interfaced the Epson RX8025 by I2C to any LPC chip? Or any MPU for that matter? The standard read method for I2C works very reliably for this chip, but there is a 'simplified read' in the datasheet which requires fewer steps. I have not been able to get this method work very well at all. The chip never sees a STOP and therefore hangs quite often. Perhaps there is a ...


I2C does not generate interrupt after writing or reading

Started by catstransport in LPC200013 years ago 3 replies

I have a problem with my lpc2292. The I2C bus does not generate a interrupt after a writing or a reading. When I set the interrupt manually...

I have a problem with my lpc2292. The I2C bus does not generate a interrupt after a writing or a reading. When I set the interrupt manually by setting the i2c interrupt bit high then it comes in my isr routine. I have tried several things but it all doesn't generate a interrupt. best regards, Remco If one cannot enjoy rea


LPC23xx i2c-interface 1 and 2

Started by "t.herbi" in LPC200010 years ago 6 replies
I2C

Hello, i read through the databooks of the lpc23xx devices and found that the i2c interfaces 1 and 2 have no open drain pins. I need all...

Hello, i read through the databooks of the lpc23xx devices and found that the i2c interfaces 1 and 2 have no open drain pins. I need all three i2c's and want to use them in master or slave mode. Has anyone experienced problems with this interfaces in master or slave mode or do they work without problems? Thanks in advance, Timo


I2C loading the I2DAT w/out a vectored interrupt

Started by i will tell u if u ask in LPC200012 years ago 2 replies

Hi I have a general question for those of you who have used the I2C hardware on the LPC21XX. I am using a LPC2104 and I am trying to send some...

Hi I have a general question for those of you who have used the I2C hardware on the LPC21XX. I am using a LPC2104 and I am trying to send some I2C data with my LPC2104 set as the master in transmit mode, without having to use the SI bit to vector an interrupt service to load the I2DAT register. In other words i want to load the I2DAT after the SI bit in I2CONSET, and not having to load it i...


Regarding I2C problem in LPC2368

Started by samjith_wasim in LPC20009 years ago 4 replies
I2C

I was able to configure and work with I2C interface in LPC2368 using Polling Method.There was no problem with the polling method. Now i am...

I was able to configure and work with I2C interface in LPC2368 using Polling Method.There was no problem with the polling method. Now i am forced to use I2C using Interrupt Routines for Real-Time Applications. I configured the following registers for enabling ISR , when i tried simulating the program , the VIC Address, VIC Enable Bit and VIC Priority are setting up properly.But the function whe...


Reg: Feedbacks got for I2C Interrupt.

Started by samjith_wasim in LPC20009 years ago
I2C

Hey ppl, with all your valuable and positive feedback i was able to establish the I2C Interrupt protocol . I have a just got a small problem...

Hey ppl, with all your valuable and positive feedback i was able to establish the I2C Interrupt protocol . I have a just got a small problem with I2C Interrupt . The I2DAT Register is reading only one memory location 0x00 from my slave always. My slave has data from 0x00 to 0x24 memory location which is configured correctly on its end. Below is my ISR Routine that I have developed . __ir...


Don't understand I2C addresses on Ashling LPC2106 eval board

Started by Anonymous in LPC200014 years ago 2 replies

I'm trying to implement I2C communication with my Ashling LPC2106 eval board, and to get started, I've been reviewing the...

I'm trying to implement I2C communication with my Ashling LPC2106 eval board, and to get started, I've been reviewing the Ashling Full example. That project communicates with two I2C devices on the eval board, a 7-segment LED and a DIP switch. The documentation indicates t


I2C Routine

Started by lehighuboy in LPC200013 years ago

Does anyone see anything wrong with the following I2C routine:? void SendI2CAddress(unsigned char Addr_S){ I2CONCLR = 0x6C; // Clear...

Does anyone see anything wrong with the following I2C routine:? void SendI2CAddress(unsigned char Addr_S){ I2CONCLR = 0x6C; // Clear control bits I2CONSET = 0x40; // Active Master Mode on I2C bus if((Addr_S & 0x01)) // Test if reading I2CONSET = STA | AA; // Set STA - allow master to acknowlege slave else I2CONSET = STA; // Se