EmbDev.net

Forum: µC & Digital Electronics 16 Bit plain serial data via SPI or logic&register


Author: Frank (Guest)
Posted on:

Rate this post
0 useful
not useful
Hi

I am working with a BB3210 and he requires 16Bit seriel data input 
"plain" just the data no start stop or parity bit.


My issue now is how to handle this in a clever way with a uC (proposed 
one is a PIC18) I came up with 3 basic solutions

1)use a uC output to generate the Serial code and send the data via bit 
shift bit for bit use 2 other uC out for the CS and CLK
unfortunately I like to use this for 16 channels so I need 8x 2310

2)write via 8 bit databus from the uC a shift register then clock the 
lsb bit to the 2310  and bit shift the complete data.

3)use the available SPI or UART where as far as I can know always one 
start stop or parity bit is generated
I am not so deep inside the PIC serial communication maybe there is also 
any other clever idea to use a shift register with some logic

Any beter solutions are welcome

Author: Jörg Wunsch (dl8dtl) (Moderator)
Posted on:

Rate this post
0 useful
not useful
Frank wrote:

> I am working with a BB3210

Any reference?

> 3)use the available SPI or UART where as far as I can know always one
> start stop or parity bit is generated

SPI does not have start or stop pulses but uses a separate bit clock
provided by the master.  However, with 8-bit SPI hardware modules
(as typically found in microcontrollers), you cannot chain two 8-bit
transfers together without at least some minimal additional delay (to
setup the new SPI data register value) between both 8-bit (partial)
transfers.

Author: Frank (Guest)
Posted on:

Rate this post
0 useful
not useful
Sorry
to be more presice it is a BurrBrown now TI  PGA 2310 Stereo Audio 
Volume Control . This a high quality audio component that act very 
simular to a VCA´. I will use this (actual 8 of them) to build a high 
end pre amplifier

Data sheet here:
http://focus.ti.com/docs/prod/folders/print/pga2310.html

Issue is that both channels are controlled by a seriell dataword just 
the dataword no startstop bit or parity (like on page 8)


The main problem is now how to generate a plain 16 bit serial data word 
with the uC (8 bit serial data without any "disturbing" start stop or 
parity)

Author: Jörg Wunsch (dl8dtl) (Moderator)
Posted on:

Rate this post
0 useful
not useful
This is a standard SPI protocol.  All you have to do is to initiate
two 8-bit transactions.

Author: Robert L. (manateemoo)
Posted on:
Attached files:

Rate this post
0 useful
not useful
If you uC's SPI interface is not able to send 16bit at ones, you can 
send the first eight bits then the next eight bits by holding CS active.
(see attached picture)

Author: Frank (Guest)
Posted on:

Rate this post
0 useful
not useful
Many thanks to all,

Also for me SPI seems to be the best solution I thought SPI has always a 
start and Stop bit as a definition, so I had to have a more detailed 
look at the uC specification ,- bye the way this will be a PIC18F8520 
deu to a useage for a touch screen and already available resources.

Author: Jörg Wunsch (dl8dtl) (Moderator)
Posted on:

Rate this post
0 useful
not useful
Frank wrote:

> Also for me SPI seems to be the best solution I thought SPI has always a
> start and Stop bit as a definition

Nope, it doesn't.  SPI just has data bits, nothing else.

You're confusing the setup time for the slave select signal, but
there's no clock edge involved.

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.