Forums

SSP LPC2148

Started by mgiaco82 July 29, 2007
Hello I have some questions concerning the SSP on the LPC2148. I need
to speak with one ADC and one DAC. So therefore I need 2 slave select
pins. But the LPC has only one. I know that I can use a normal GPIO
for slave select, but I want to use the FIFO for TX and RX. Let me
explain.

When I speak to the ADC (8Ch x 16Bit) I need to write 8 word commands
one for each CH. After each command the slave select pin must driven
high for some nsec, and then the ADC shift out the conversation word
and so on. So when I want to write the 8 words to the FIFO at one time
doing the conversation I cannot handle the slave select pin when I use
a normal GPIO it only works with the SSEL Pin ore when i do it without
the fifo sending word by word.

So when I want to speak with the DAC too I need to change the SSEL.

Is the only way to do this with an external hardware MUX?

I want to do it with the fifo because i have to do a lot of other
things on the device.
Thanks

mgiaco

An Engineer's Guide to the LPC2100 Series

--- In l..., "mgiaco82" wrote:
>
> Hello I have some questions concerning the SSP on the LPC2148. I need
> to speak with one ADC and one DAC. So therefore I need 2 slave select
> pins. But the LPC has only one. I know that I can use a normal GPIO
> for slave select, but I want to use the FIFO for TX and RX. Let me
> explain.
>
> When I speak to the ADC (8Ch x 16Bit) I need to write 8 word commands
> one for each CH. After each command the slave select pin must driven
> high for some nsec, and then the ADC shift out the conversation word
> and so on. So when I want to write the 8 words to the FIFO at one time
> doing the conversation I cannot handle the slave select pin when I use
> a normal GPIO it only works with the SSEL Pin ore when i do it without
> the fifo sending word by word.
>
> So when I want to speak with the DAC too I need to change the SSEL.
>
> Is the only way to do this with an external hardware MUX?
>
> I want to do it with the fifo because i have to do a lot of other
> things on the device.
> Thanks
>
> mgiaco
>
It looks to me like you want to use the ability of SSEL to frame the
data and, as you point out, there is only one SSEL. Table 161 of the
User Manual for Pin Name SSEL1 indicates that "When there is more than
one slave on the bus, further qualification of their Frame
Select/Slave Select inputs will typically be necessary ...".

Richard
--- In l..., "rtstofer" wrote:
>
> --- In l..., "mgiaco82" wrote:
> >
> > Hello I have some questions concerning the SSP on the LPC2148. I need
> > to speak with one ADC and one DAC. So therefore I need 2 slave select
> > pins. But the LPC has only one. I know that I can use a normal GPIO
> > for slave select, but I want to use the FIFO for TX and RX. Let me
> > explain.
> >
> > When I speak to the ADC (8Ch x 16Bit) I need to write 8 word commands
> > one for each CH. After each command the slave select pin must driven
> > high for some nsec, and then the ADC shift out the conversation word
> > and so on. So when I want to write the 8 words to the FIFO at one time
> > doing the conversation I cannot handle the slave select pin when I use
> > a normal GPIO it only works with the SSEL Pin ore when i do it without
> > the fifo sending word by word.
> >
> > So when I want to speak with the DAC too I need to change the SSEL.
> >
> > Is the only way to do this with an external hardware MUX?
> >
> > I want to do it with the fifo because i have to do a lot of other
> > things on the device.
> >
> >
> > Thanks
> >
> > mgiaco
> >
> It looks to me like you want to use the ability of SSEL to frame the
> data and, as you point out, there is only one SSEL. Table 161 of the
> User Manual for Pin Name SSEL1 indicates that "When there is more than
> one slave on the bus, further qualification of their Frame
> Select/Slave Select inputs will typically be necessary ...".
>
> Richard
>

Thanks Richard, I know this from the Manual and so i need some
hardware, right?

mgiaco
> > It looks to me like you want to use the ability of SSEL to frame the
> > data and, as you point out, there is only one SSEL. Table 161 of the
> > User Manual for Pin Name SSEL1 indicates that "When there is more than
> > one slave on the bus, further qualification of their Frame
> > Select/Slave Select inputs will typically be necessary ...".
> >
> > Richard
> > Thanks Richard, I know this from the Manual and so i need some
> hardware, right?
>
> mgiaco
>

That's the way I see it. If you can afford 2 GPIO you might consider
a 74ALVC08 Quad 2-Input AND Gate at 2.9 nS tPD MAX! I might try to
stay away from demultiplexers as the propogation delay starts to add up.

Richard
Richard

If you can afford 2 GPIO you might consider a 74HC
--- In l..., "rtstofer" wrote:
> > > It looks to me like you want to use the ability of SSEL to frame the
> > > data and, as you point out, there is only one SSEL. Table 161
of the
> > > User Manual for Pin Name SSEL1 indicates that "When there is
more than
> > > one slave on the bus, further qualification of their Frame
> > > Select/Slave Select inputs will typically be necessary ...".
> > >
> > > Richard
> > >
> >
> > Thanks Richard, I know this from the Manual and so i need some
> > hardware, right?
> >
> > mgiaco
> > That's the way I see it. If you can afford 2 GPIO you might consider
> a 74ALVC08 Quad 2-Input AND Gate at 2.9 nS tPD MAX! I might try to
> stay away from demultiplexers as the propogation delay starts to add up.
>
> Richard
> Richard
>
> If you can afford 2 GPIO you might consider a 74HC
>

Thanks yes i think i will do it that way.

mgiaco
--- In l..., "mgiaco82" wrote:
>
> --- In l..., "rtstofer" wrote:
> >
> >
> > > > It looks to me like you want to use the ability of SSEL to
frame the
> > > > data and, as you point out, there is only one SSEL. Table 161
> of the
> > > > User Manual for Pin Name SSEL1 indicates that "When there is
> more than
> > > > one slave on the bus, further qualification of their Frame
> > > > Select/Slave Select inputs will typically be necessary ...".
> > > >
> > > > Richard
> > > >
> > >
> > > Thanks Richard, I know this from the Manual and so i need some
> > > hardware, right?
> > >
> > > mgiaco
> > >
> >
> > That's the way I see it. If you can afford 2 GPIO you might consider
> > a 74ALVC08 Quad 2-Input AND Gate at 2.9 nS tPD MAX! I might try to
> > stay away from demultiplexers as the propogation delay starts to
add up.
> >
> > Richard
> >
> >
> > Richard
> >
> > If you can afford 2 GPIO you might consider a 74HC
> > Thanks yes i think i will do it that way.
>
> mgiaco
>

Hello now I get my ADC and DAC working on SSP LPC2148.

But I do not clearly understand the advantages of using Interrupts
with the SSP Module.

My ADC needs one byte for conversation. After a special time I can
read all the four channels. So first of all I taught I use SSP with
IRQs RX and TX that the P can handle other stuff between control
byte and conversation time. But know I use an external IRQ because the
ADC has an EOC pin. So I wrote the control byte and after conversation
when ECO comes high, I read out the four channels in the EXTINT ISR.

When should I use SSP with IRQ and when not.

Thanks

mgiaco