DSPRelated.com
Forums

ADSP 2189m and pic18c452 serial interfacing

Started by osam...@gmail.com March 22, 2006
Hi everyone, i am a newbie in the field of DSP processors. The problem that i am facing pertains to transfering data from DSP processor to pic microcontroller through serial port.

I am trying to send a continuous stream of data from the ADSP 2189M sport0 to PIC18C452 serial port synchronously. The clock is being generated by DSP processor. The problem is that the microcontroller misses the first bit sent by the DSP processor. This is becuz the DSP starts transmitting data in the same clock cycle in which the strob goes low but the pic microcontroller misses a sclk cycle between receiving strob and receiving data on SDI line. Is there a way through which programmatically i could introduce a 1 sclk cycle delay between the strob and data sending in case of the DSP? I also wanted an opinion over my hypothesis regarding the missing bit?

Thanks in Advance.

Osama Buttar
Pakistan
Hi,

Are you using SPI interface in the PIC side? USART?
What configuration do you have in the PIC side? Have
you read the ADSP-218x Hardware Reference Manual in
the Serial Port chapter? Did you realize the waveform
you need for communicating both chips?

Having those questions answered could improve the kind
of help that you can get from the group.

Cheers,

JaaC

--- o...@gmail.com wrote:

> Hi everyone, i am a newbie in the field of DSP
> processors. The problem that i am facing pertains to
> transfering data from DSP processor to pic
> microcontroller through serial port.
>
> I am trying to send a continuous stream of data from
> the ADSP 2189M sport0 to PIC18C452 serial port
> synchronously. The clock is being generated by DSP
> processor. The problem is that the microcontroller
> misses the first bit sent by the DSP processor. This
> is becuz the DSP starts transmitting data in the
> same clock cycle in which the strob goes low but the
> pic microcontroller misses a sclk cycle between
> receiving strob and receiving data on SDI line. Is
> there a way through which programmatically i could
> introduce a 1 sclk cycle delay between the strob and
> data sending in case of the DSP? I also wanted an
> opinion over my hypothesis regarding the missing
> bit?
>
> Thanks in Advance.
>
> Osama Buttar
> Pakistan
>
>
> a...
>
>
>

Jaime Andr Aranguren Cardona
j...@ieee.org
j...@computer.org
__________________________________________________
Hi,

I have never worked with a PIC.... As Jaac has questioned, I will like to
know which peripheral on PIC side is being used (is it an SPI or USART or is
there SPORT similar to 2189)....

In case you are using SPI on PIC side, you might want to explore
what "Clock Phase" and "Clock Polarity" settings to use. I have worked with
SPI on different devices (but not on PIC) and they support different
combinations of CPHASE and CPOL (total four possible combinations), and the
timings are different for each. This could be of interest to you.

Which port are you using on 2189? Are you using SPORT (a synchronous
serial port)? In that case even changing the driving edge of the clock could
have an affect on the signal timings (I beleive that SPORTs on all ADI DSPs
support his option - drive on rising edge of the Clock or falling edge of
the clock).....

I hope that different combinations of CPOL+CPHASE (assuming that you
are using an SPI) on PIC side and driving edge combination on 2189 side
might help.....

Also, the 2189 SPORT offers early frame sync and late frame sync
options... there is a difference on when the first data bit gets transferred
(w.r.t. CLK and FS).. you might want to analyse timings for two modes....

I hope that something from the above helps you..
Regards,
kunal

On 3/22/06, Jaime Andres Aranguren Cardona
wrote:
>
> Hi,
>
> Are you using SPI interface in the PIC side? USART?
> What configuration do you have in the PIC side? Have
> you read the ADSP-218x Hardware Reference Manual in
> the Serial Port chapter? Did you realize the waveform
> you need for communicating both chips?
>
> Having those questions answered could improve the kind
> of help that you can get from the group.
>
> Cheers,
>
> JaaC
>
> --- o...@gmail.com wrote:
>
> > Hi everyone, i am a newbie in the field of DSP
> > processors. The problem that i am facing pertains to
> > transfering data from DSP processor to pic
> > microcontroller through serial port.
> >
> > I am trying to send a continuous stream of data from
> > the ADSP 2189M sport0 to PIC18C452 serial port
> > synchronously. The clock is being generated by DSP
> > processor. The problem is that the microcontroller
> > misses the first bit sent by the DSP processor. This
> > is becuz the DSP starts transmitting data in the
> > same clock cycle in which the strob goes low but the
> > pic microcontroller misses a sclk cycle between
> > receiving strob and receiving data on SDI line. Is
> > there a way through which programmatically i could
> > introduce a 1 sclk cycle delay between the strob and
> > data sending in case of the DSP? I also wanted an
> > opinion over my hypothesis regarding the missing
> > bit?
> >
> > Thanks in Advance.
> >
> > Osama Buttar
> > Pakistan
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > a...
> >
> >
> >
> >
> > Jaime Andr Aranguren Cardona
> j...@ieee.org
> j...@computer.org
> __________________________________________________