Reply by Ralph Hempel March 9, 20102010-03-09
Artem wrote:
>
> I found bug in my brain. SDA and SCL pins was short-circuited at my
> bearish homemade board. I'll call LPC to notify them that I'm looser.
> Topic is closed. Kill me, please. :(

I'm very glad you have a sense of humour about this :-) Welcome
to the group!

Cheers, Ralph

An Engineer's Guide to the LPC2100 Series

Reply by Artem March 9, 20102010-03-09
Russia, Siberia, the snowbound house in snowbound forest with bears and wolfs. But after I spend some sleepless nights, you will not distinguish me from a wild animal ;)

--- In l..., Dario Greggio wrote:
>
> Artem ha scritto:
> >
> > Topic is closed. Kill me, please. :(
> ok, address?? :)))
> --
>
> Ciao, Dario
> --
> Cyberdyne
>

Reply by Dario Greggio March 9, 20102010-03-09
Paul Curtis ha scritto:

> Don't Terminators somehow find addresses without asking their mark
> directly? [Lame, I know, I bent things a bit...]
I know I know :))
expected :)
Reply by Paul Curtis March 9, 20102010-03-09
On Tue, 09 Mar 2010 22:30:06 -0000, Dario Greggio
wrote:

> Artem ha scritto:
>>
>> Topic is closed. Kill me, please. :(
> ok, address?? :)))
>
> --Ciao, Dario
> --
> Cyberdyne

Don't Terminators somehow find addresses without asking their mark
directly? [Lame, I know, I bent things a bit...]

--
Paul Curtis, Rowley Associates Ltd http://www.rowley.co.uk
CrossWorks V2 is out for LPC1700, LPC3100, LPC3200, SAM9, and more!
Reply by Dario Greggio March 9, 20102010-03-09
Artem ha scritto:
>
> Topic is closed. Kill me, please. :(
ok, address?? :)))
--

Ciao, Dario
--
Cyberdyne
Reply by Artem March 9, 20102010-03-09
I found bug in my brain. SDA and SCL pins was short-circuited at my bearish homemade board. I'll call LPC to notify them that I'm looser. Topic is closed. Kill me, please. :(

--- In l..., Ralph Hempel wrote:
>
> Artem wrote:
> >
> > As I said in first post, bits in PCONP are set correctly
>
> Looks like you may have found a silicon bug.
>
> Call your local LPC rep and make sure that they notify all
> their customers around the world that this basic function is
> not working correctly.
>
> They may have to explain to customers that insist that it is
> working fine for them that they are mistaken.
>
> Ralph
>

Reply by Ralph Hempel March 9, 20102010-03-09
Artem wrote:
>
> As I said in first post, bits in PCONP are set correctly

Looks like you may have found a silicon bug.

Call your local LPC rep and make sure that they notify all
their customers around the world that this basic function is
not working correctly.

They may have to explain to customers that insist that it is
working fine for them that they are mistaken.

Ralph
Reply by Artem March 9, 20102010-03-09
As I said in first post, bits in PCONP are set correctly

--- In l..., "rtstofer" wrote:
>
> Did you turn on the I2C gadget in PCONP? Your code snippet doesn't show this.
>
> Richard
>

Reply by rtstofer March 9, 20102010-03-09
--- In l..., "Artem" wrote:
>
> I've connected I2C0 and I2C1 pins and tried communication. Still doesn't work...
Did you turn on the I2C gadget in PCONP? Your code snippet doesn't show this.

Richard

Reply by Artem March 9, 20102010-03-09
I've connected I2C0 and I2C1 pins and tried communication. Still doesn't work...

// Initialize VIC for I2C use
VICIntSelect=0x0; // selecting IRQ
VICIntEnable= (1<<9)|(1<<19); // enabling I2C

//// I2C 1 (slave receiver)
// setup SCL pin P17
PINSEL1 &= ~(3<<2);
PINSEL1 |= 1<<2;
// setup SDA pin P18
PINSEL1 &= ~(3<<4);
PINSEL1 |= 1<<4;

I2C1ADR = 0x20; // set I2C slave address
I2C1CONSET = 0x44;

VICVectCntl1= 0x20 | 19;
VICVectAddr1=(unsigned long) i2c1_irq;

//// I2C 0 (master transmitter)
// setup SCL pin P02
PINSEL0 &= ~(3<<4);
PINSEL0 |= 1<<4;
// setup SDA pin P03
PINSEL0 &= ~(3<<6);
PINSEL0 |= 1<<6;

I2C0SCLL = 400;
I2C0SCLH = 400;

// disable and reset interface
I2C0CONCLR = 0x6C;

VICVectCntl0= 0x20 | 9;
VICVectAddr0=(unsigned long) i2c0_irq;

// enable interface
I2C0CONSET = BIT(I2CON_I2EN);
I2C0CONSET = BIT(I2CON_STA);
while(I2C0STAT == TW_NO_INFO);
uart0Puts("Got start condition !\n"); // Every night I dream of this execution