Altera Forum






Threads: 18,988
Posts: 77,600
Members: 29,302
Welcome to our newest member, yvan
User
Reputation
9135
7620
5891
4200
3030
2197
2056
1706
1388
1300




 
Register
Quick Search
 
  Altera Forums > IP and Dev Kit Related > Nios Forum > General Discussion > General Discussion Forum

SPI and an Audio codec

Reply
 
Thread Tools Display Modes
  #1  
Old October 19th, 2005, 08:40 PM
eltonlaonong eltonlaonong is offline
Altera Pupil
 
Join Date: Apr 2005
Posts: 10
Rep Power: 1978
eltonlaonong is on a distinguished road
Default

Hello, all
I want to use SPI core to control TLV320AIC23, which is an audio codec.
Now, the problem is
According to the document of Altera Embeded Peripherals Handbook,
SPI core availible in SOPC Builder just supports data which width is
8-bit or less, but the width of registers of the audio codec is 9-bits.
Is there any way to solve this problem?
Thanks.
__________________
Aiguille
Reply With Quote
  #2  
Old October 20th, 2005, 12:51 PM
smcnutt smcnutt is offline
Altera Guru
 
Join Date: Jul 2004
Location: New Jersey, USA
Posts: 731
Rep Power: 2611
smcnutt is on a distinguished road
Default

Hi eltonlaonong,

> but the width of registers of the audio codec is 9-bits

And the address is only 7-bits ... so you end up with

1st octet: A6-A5-A4-A3-A2-A1-A0-D8
2nd octet: D7-D6-D5-D4-D3-D2-D1-D0

Regards,
--Scott
Reply With Quote
  #3  
Old October 20th, 2005, 01:14 PM
Mike DeSimone Mike DeSimone is offline
Altera Teacher
 
Join Date: Jun 2004
Location: Austin, TX
Posts: 192
Rep Power: 2368
Mike DeSimone is on a distinguished road
Send a message via AIM to Mike DeSimone
Default

Bear in mind that the 8-bit limit is only for the Altera HAL SPI driver. If you don't mind talking straight to your SPI hardware, you can use any word size up to 16 bits (set in SOPC Builder).

One other limit to the HAL SPI driver is that it either writes a byte and ignores the byte shifted in, or writes a 0 out and reads the byte shifted in; it can't read and write on the same transaction.

FYI, I have used the SPI peripheral several times, and the HAL driver 0 of those times. It's really a pretty simple peripheral to drive directly; initialize it by setting two or three registers, then read and write when the status bits tell you to.
__________________
Mike DeSimone, Research Engineer, Sonar Development Division
Applied Research Labs: The University of Texas
Reply With Quote
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with DE2 Audio Codec ssuunny2005 IP Discussion 1 April 4th, 2010 04:33 PM
Help with the Audio Codec patrickbway Development Kit Related 5 December 9th, 2009 09:48 PM
Help needed about the DE2 Audio Codec ssuunny2005 Development Kit Related 6 May 11th, 2009 01:52 AM
Ask about the DE2 Audio Codec. ssuunny2005 University Program 8 May 24th, 2008 12:46 PM
audio codec -- help help galaxary Development Kit Related 1 April 24th, 2008 06:24 AM


All times are GMT -8. The time now is 07:43 AM.