DSPRelated.com
Forums

ADSP-2181 - the problem still persists..

Started by manish marwaha June 18, 2002

greetings all..

Anyone got good experience with serial data transfer??? can u send me some code? specially for transfer using autobuffering..

and alternate framing..

i  intend to implement a PLL using  a dedicated PLL chip.. and control it using 2181. The chip accepts data as 21bits.. serially..

but adsp can send data only as word lengths of 3-16..

one solution that i have come up with is to use 2181 with a 7-bit word length and transmit 3 such words. (i am thinking on the lines of autobuffering)

I am open to an alternative solution..

regards
manish






>From: manish marwaha <>
>To:
>Subject: [adsp] ADSP-2181 - the problem still persists..
>Date: Mon, 17 Jun 2002 21:19:54 -0700 (PDT) >greetings all..
>
>Anyone got good experience with serial data transfer??? can u send me some
>code? specially for transfer using autobuffering..
>
>and alternate framing..
>
>i intend to implement a PLL using a dedicated PLL chip.. and control it
>using 2181. The chip accepts data as 21bits.. serially..
>
>but adsp can send data only as word lengths of 3-16..

You could just toggle a couple of flag outputs, and 'bit-bang' the data.
I've done this to configure an FPGA with a clocked serial bit stream.

Leon
--
Leon Heller, G1HSM Tel: +44 1327 359058 Email:
My web page: http://www.geocities.com/leon_heller
My low-cost Altera Flex design kit: http://www.leonheller.com


Manish-

You are making this too hard. Just use GPIO lines for clock and data and
control the
lines using single instructions to set/reset the line. I.e. like:

for (i=0; i<21; i++) {

set clock high
set data line = bits[i]
set clock low /* latch data into PLL chip */
delay(as needed)
}

The PLL chip doesn't care about speed, frame sync, space between bits, etc. How
often will you program the PLL chip? Not very often, so why use up a valuable
serial
port for this peripheral?

Jeff Brower
DSP sw/hw engineer
Signalogic manish marwaha wrote:
>
> greetings all..
>
> Anyone got good experience with serial data transfer??? can u send me some
code?
> specially for transfer using autobuffering..
>
> and alternate framing..
>
> i intend to implement a PLL using a dedicated PLL chip.. and control it
using
> 2181. The chip accepts data as 21bits.. serially..
>
> but adsp can send data only as word lengths of 3-16..
>
> one solution that i have come up with is to use 2181 with a 7-bit word length
and
> transmit 3 such words. (i am thinking on the lines of autobuffering)
>
> I am open to an alternative solution..
>
> regards
> manish




Like the others said, you don't need to use up a serial port just
because the PLL chip accepts serial data. Just use 3 GPIO lines for
clk, data and CS/LD as the 3rd line (you can use a 4th one but most
chips needs only 3).
Take your 21 bit data, write a for loop to extract each bit from your
21 bit data, and set the data line either high or low appropriately.
of course you need to pulse the clock line each time. At the end of
the 21 bit transmission, you probably need to pulse the LD line or
you may need to keep the CS line low during your transmission
(depends on the timing diagram of your PLL data sheet).

Cheers
Bhaskar

--- In adsp@y..., manish marwaha <manish_marwaha@y...> wrote:
>
> greetings all..
>
> Anyone got good experience with serial data transfer??? can u send
me some code? specially for transfer using autobuffering..
>
> and alternate framing..
>
> i intend to implement a PLL using a dedicated PLL chip.. and
control it using 2181. The chip accepts data as 21bits.. serially..
>
> but adsp can send data only as word lengths of 3-16..
>
> one solution that i have come up with is to use 2181 with a 7-bit
word length and transmit 3 such words. (i am thinking on the lines of
autobuffering)
>
> I am open to an alternative solution..
>
> regards
> manish >
>
> ---------------------------------
>



At 11:19 PM 6/17/2002, manish marwaha wrote:

>greetings all..
>
>Anyone got good experience with serial data transfer??? can u send me some
>code? specially for transfer using autobuffering..
>
>and alternate framing..
>
>i intend to implement a PLL using a dedicated PLL chip.. and control it
>using 2181. The chip accepts data as 21bits.. serially..
>
>but adsp can send data only as word lengths of 3-16..
>
>one solution that i have come up with is to use 2181 with a 7-bit word
>length and transmit 3 such words. (i am thinking on the lines of autobuffering)
>
>I am open to an alternative solution..
>
>regards
>manish


First, I would use a newer 218x part (100 pin package)., such as the 2186M
or 2185M. The 2181 is really only used for existing designs.

I think you want to use Sport 0 in TDM mode. This is usually the easiest
way to create these kind of interfaces. You may need to take a close look
at the frame sync line. I assume you have the ADI book: ADSP-2100 Family
Users Manual. When I write software for these kind of applications, I
usually use a logic analyzer or a DSO to monitor the Sport Lines since it
is very easy to get something wrong.

You might want to look at some of the codec interfacing examples on the ADI
web site since the basic technique is the same. Al Clark
Danville Signal Processing, Inc.
--------------------------------
Purveyors of Fine DSP Hardware and other Cool Stuff
Available at http://www.danvillesignal.com