SPI & I2C....NOT GETTING CLOCK OUTPUT

hi, i am trying with SPI code provided for LPC2138 provided on philips site.but its strange that i am not able to observe the clock output on CRO. i have tried with a resistor connected in series with clock output before connecting on CRO probe.also i have provided high to the SSEL pin of LPC2138 to configure to as master. now i m observing clock output on its SPICLK pin with common ground. but i am getting noise signal only.

same problem is with I2C also. i think problem is not with the code .so please suggest any other possibility of error that you suspect.

please help ................i am stuck with this problem for many days.and i am thus not able to proceed with my application further.

Reply to
abhay
Loading thread data ...

Reply to
Elan Magavi

hi thanks for your reply yes there is a configuration register for pinouts PINSEL that i hav configured for my SPI operation.so i dont think there could be any mistake as such

Reply to
abhay

And is there also a data direction register in which you have set the appropriate pins to be outputs?

~Dave~

Reply to
Dave

yes there is also a data direction register IODIR .in that i hav configured spiclk pin as output.

Reply to
abhay

Not relevant. PINSEL does that for you, as long as you don't select GPIO for these pins.

--
Gemaakt met Opera's revolutionaire e-mailprogramma:  
http://www.opera.com/mail/
Reply to
Boudewijn Dijkstra

hi,

please help me out.

i am still not able to get the clock output of SPI. And i am not able to find its possible cause thank you

Reply to
abhay

I don't think PINSEL selects the direction, only the function (at least on the data sheet I've seen). There has to be a way to mode the clock as an input or an output, depending on whether you have a bus master or a slave.

OP: Do you have the SPI moded as a bus _master_? Are you using a scope that would show you a single event? Do you have it triggered correctly? Are you seeing any error status from the SPI? Are you getting a chip select?

~Dave~

Reply to
Dave

yes there is IODIR register for that.

yes SPI is configured for master operation.yes the scope could be set to trace single events also.

but what do you mean by triggering it correctly ?? what is the use for chip select when spi is configured for master operation already. what error status?? i am polling on master side.

Reply to
abhay

Op Wed, 18 Oct 2006 08:04:20 +0200 schreef abhay :

No! It isn't. LPC213x User Manual (rev. 01), page 74: "The direction control bit in the IO0DIR register is effective only when the GPIO function is selected for a pin."

To let the scope do the work of detecting interesting signal levels.

--
Gemaakt met Opera's revolutionaire e-mailprogramma:  
http://www.opera.com/mail/
Reply to
Boudewijn Dijkstra

Op Tue, 17 Oct 2006 19:36:59 +0200 schreef abhay :

See my reply in comp.sys.arm.

--
Gemaakt met Opera's revolutionaire e-mailprogramma:  
http://www.opera.com/mail/
Reply to
Boudewijn Dijkstra

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.