interfacing using SPI on LPC2148

Started by lucky_suhas in LPC20006 years ago 13 replies

HI again, I have been trying to learn programming using the LPC2148. Thanks to all the people who replied and helped with my ADC code. I am...

HI again, I have been trying to learn programming using the LPC2148. Thanks to all the people who replied and helped with my ADC code. I am taking the help of some example codes i found online. but with regard to SPI there doesn't seem to be any examples around. although i found one that interfaces SPI to SD card. it was a little difficult to understand. i would like a generalized code on usi...


SPI buses on LPC1768

Started by Olivier Gautherot in LPC20007 years ago 13 replies
SPI

Dear list, I am working on a design that will use the LPC1768 and I have a question about the doc - mainly to cross-check my reading. The...

Dear list, I am working on a design that will use the LPC1768 and I have a question about the doc - mainly to cross-check my reading. The datasheet refers to SSP0, SSP1 and SPI. However, the User Guide includes the following note: "Remark: SSP0 is intended to be used as an alternative for the SPI interface, which is included as a legacy peripheral. Only one of these peripherals can be u...


SD/MMC card communication speed using SPI

Started by Jan Thogersen in LPC200011 years ago 9 replies

HI all, I have a project were I communicate between a LPC2148 and a SD card via SPI. It's works as it should but it's just to slow... even...

HI all, I have a project were I communicate between a LPC2148 and a SD card via SPI. It's works as it should but it's just to slow... even though I have the SPI clock running at 15Mhz. I started digging into the details about the communication and found out that every time I send the SD cmd 17 "READ_SINGLE_BLOCK" the SD card lock's up for about 1-15ms before it responds "ready" (0xFE...


A word or two of thanks and some SPI info, (LPC2129)

Started by mjames_doveridge in LPC200010 years ago

..to those here who recently responded to my query about SPI/FIQ interrupts with useful hints and even more useful examples. Thanks to your...

..to those here who recently responded to my query about SPI/FIQ interrupts with useful hints and even more useful examples. Thanks to your help, I now have my SPI working OK, though it's a little kludgy so far: In the initialization, I 'manually' load up the RAM FIQ vector at 0x4000001C with a 'mov pc,r8' instruction word, then, in the read/write/whatever functions, I switch to FIQ mode...


Duplex communication using SPI

Started by sukhdeep singh in LPC20008 years ago 9 replies
SPI

Hi, ??? Is it possible to have duplex communication using SPI? Suppose if SPI is receiving data of 8 bit, it has received 7 bit and now getting...

Hi, ??? Is it possible to have duplex communication using SPI? Suppose if SPI is receiving data of 8 bit, it has received 7 bit and now getting the last bit of data at the same time user has written the value into SPI data register for transmission. now when SPI data has the value of received data and user has overwritten the value of data(which user want is to transmit). now the user will be n...


Re: LPC-H2214 and SPI woes

Started by Mukadder CEYHAN in LPC200012 years ago 1 reply

Hi! I have the same problem! Have you solved this issue? If you solved, could you help me please? regards, mukadder --- Herbert Larbie...

Hi! I have the same problem! Have you solved this issue? If you solved, could you help me please? regards, mukadder --- Herbert Larbie wrote: > Hi, > > I am a newbie experimenting with an Olimex LPC-H2214 > and SPI, I am > using the code > for SPI shown in the Phillips application note > amended. I attach a > oscilloscope to the SCK and see nothing, n


SPI on LPC3180

Started by Sam Lee in LPC200011 years ago

Hi I was working on the LPC3180 and i am currently trying out the 2 SPI ports. getting one to receive and the other to transmit to each...

Hi I was working on the LPC3180 and i am currently trying out the 2 SPI ports. getting one to receive and the other to transmit to each other. I understand that there is a FIFO buffer for both the transmit and receive. The problem that i have is that when i try to send a few sets of data (less than 8) before receiving on the other SPI port, what i receive is just the value that i last tra...


SPI howto

Started by lpcarmed in LPC200013 years ago 1 reply

There was a lot of discussion about SPI recently, it would be great if we could summarize how to use it right. For starters this is what I...

There was a lot of discussion about SPI recently, it would be great if we could summarize how to use it right. For starters this is what I collected: - SPI master could not use the select line. SSEL needs to be pulled up in master mode. If master needs to use select line use a regular GPIO and drive if from the code. - There is no FIFO


SPI Interrupts not working...

Started by russellelexon in LPC200010 years ago 2 replies
SPI

Hi all, Im having trouble setting up an SPI routine. I have adapted code from MACC06001_LPC2000_SPI.pdf from NXP. The SPI transmits fine...

Hi all, Im having trouble setting up an SPI routine. I have adapted code from MACC06001_LPC2000_SPI.pdf from NXP. The SPI transmits fine (scope) however I do not get an interrupt (SPI_Isr) when the transfer is complete. Here are the main parts of the code: (Its far from complete, im just trying to get that interrupt to happen first!) -The write function gets called and 0x55 is sent over th...


SPI

Started by gfaurie1 in LPC200012 years ago

Hello, I use LPC2294 and SPI bus. I'd like to use SSEL PIN as another function (EINT2) because all my SPI peripheral don't need SSEL...

Hello, I use LPC2294 and SPI bus. I'd like to use SSEL PIN as another function (EINT2) because all my SPI peripheral don't need SSEL signal. It seems that i am obligate to select SSEL functionnality on a pin. My question : is there a method to not use SSEL pin ? Thanks


Re: SPI

Started by rtstofer in LPC20007 years ago 7 replies

--- In l...@yahoogroups.com, "gfaurie1" wrote: > > Hello, > > I use LPC2294 and SPI bus. I'd like to use SSEL PIN as another > ...

--- In l...@yahoogroups.com, "gfaurie1" wrote: > > Hello, > > I use LPC2294 and SPI bus. I'd like to use SSEL PIN as another > function (EINT2) because all my SPI peripheral don't need SSEL signal. > > It seems that i am obligate to select SSEL functionnality on a pin. > > My question : is there a method to not use SSEL pin ? > > Thanks > At first I thou


spi and ssp

Started by sherifkamelzaki in LPC200012 years ago 1 reply

hi how are u all? i have a simple question i can't exactly understand the differnce between spi and ssp i have both on the lpc2138 and i...

hi how are u all? i have a simple question i can't exactly understand the differnce between spi and ssp i have both on the lpc2138 and i made a driver for the sd card on ssp can i move it to spi or not? i tired but it didn't work thanks ------------------------ Yahoo! Groups Sponsor --------------------~--> Great things are happening at Yahoo! Groups. See the new email design. http


I2c/Spi bus sharing

Started by FIRAT KOCAK in LPC20009 years ago 7 replies

Hi, While sharing i2c/spi bus, it is ok for spi devices that they have a chip select input but for i2c devices there is not any kind of input...

Hi, While sharing i2c/spi bus, it is ok for spi devices that they have a chip select input but for i2c devices there is not any kind of input ( some have reset pin, this pin may be held down while writing to spi devices but this may be not a good solution ), thus, i2c devices must be isolated from the bus while writing to spi devices. So what is the best way of isolating i2c devices f...


Re: Put an array of structures in a particular place

Started by Samie Hassan Ghauri in LPC200010 years ago 1 reply
SPI

> void ChangeStruct{ > Name[x]-> item = data; > } > > Would this work?? Not if you are intending to use SPI memory. Other replies to...

> void ChangeStruct{ > Name[x]-> item = data; > } > > Would this work?? Not if you are intending to use SPI memory. Other replies to your question cover most of what you need. The key thing to remember is that for SPI memory, you will write to each address "manually" using some form of write( ) routine. I have some sample code to do similar stuff. If you intend to go down SPI memory route


LPC2138 Slave SPI

Started by phlpcmicro in LPC200012 years ago

Hi All, I am seeking clarification of the SPI slave operation for the LPC2138 When an LPC2138 is configured as a slave. Please assume the SPI...

Hi All, I am seeking clarification of the SPI slave operation for the LPC2138 When an LPC2138 is configured as a slave. Please assume the SPI control register has been configured correctly for slave eg: bit2 BitEnable= 0 (SPI set to 8bit size) bit3 CPHA (set same as master) bit4 CPOL (set same as master) bit5 MSTR = 0 (set as slave) bit6 LSBF (set same as master) b


SSP issues with lpc24xx

Started by Herbert Demmel in LPC20009 years ago 4 replies

Hi, when switching an lpc2000 design with a SPI slave to a lpc24xx I used the second set of MISO0 / MOSI0 / SSEL0 / SCK0 pins on P2[xx]...

Hi, when switching an lpc2000 design with a SPI slave to a lpc24xx I used the second set of MISO0 / MOSI0 / SSEL0 / SCK0 pins on P2[xx] expecting to be able to run my existing SPI code via these port pins. After investigating several hours into "why doesn't it work anymore" I found out that the SPI clock SCK (not SCK0) is available on P0[15] only, so when using P2[xx] SSP0 must be use...


SPI delay

Started by teunvandeberg in LPC200013 years ago

Hello all, I have written a SPI driver for use with FreeRTOS (www.freertos.org). I am using a LPC2292. Using this driver...

Hello all, I have written a SPI driver for use with FreeRTOS (www.freertos.org). I am using a LPC2292. Using this driver I have observed some strange behavior. The driver is interrupt driven, so I write to the SPI data register again after the interrupt flag go


SPI Slave / SSEL0 using as GPIO ?

Started by Herbert Demmel in LPC200012 years ago 6 replies

Hi all, I plan to use the LPC2138 or LPC2148 SPI (SCK0, MISO0, MOSI0) as a SPI slave only device. Is it possible to use SSEL0 for any other...

Hi all, I plan to use the LPC2138 or LPC2148 SPI (SCK0, MISO0, MOSI0) as a SPI slave only device. Is it possible to use SSEL0 for any other function (e.g. PWM2) then or must SSEL0 tied to ground in any case when using the LPC as slave only device? Regards Herbert


SPI problem

Started by kender_a in LPC20008 years ago 3 replies

Colleagues, I've written a small program in IAR EWARM to test SPI. It runs, but SCLK and MOSI do not show up on the oscilloscope. Here's...

Colleagues, I've written a small program in IAR EWARM to test SPI. It runs, but SCLK and MOSI do not show up on the oscilloscope. Here's the code, which actually makes SPI transactions: while(1) { S0SPCCR = 32; // SCLK rate S0SPCR = 0x00000000 | // MOSI valid on raising edge of SCLK (CPOL=CPHA=0) 0x00000020 | // master (AD7390 DAC is ...


SPI and SSP double buffered?

Started by Gus in LPC200012 years ago 2 replies

Hello, On SPI, is the shift register different than the data register? In other words, if I am a slave, can I put data in the SPI data...

Hello, On SPI, is the shift register different than the data register? In other words, if I am a slave, can I put data in the SPI data register any time even while a transition is in progress? On PIC micros this is safe practice but what about LPC? Thanks, Gus