CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Hardware SPI and usart sharing on DSPIC, can it be done?

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
JamesW



Joined: 23 Apr 2007
Posts: 91
Location: Rochester, England

View user's profile Send private message Visit poster's website

Hardware SPI and usart sharing on DSPIC, can it be done?
PostPosted: Mon Aug 22, 2011 11:27 am     Reply with quote

I am basing a design on the DSP Audio dev kit , and have encountered an interesting question.

The Codec in the design uses the SPI bus in DMA mode to transfer data to and from the DSPic. We assume that it is using the SPI in hardware mode. However it only uses SCK1 (pin 35) and SDO1 (pin 33) of the DSPic.

This leaves Pin 34 (Which is SDI1) – which is currently unused.

Pin 34 is also U1Rx as well – which is the receive pin of the first UART.

On my design, I need to receive data from two Uarts (not worried about transmitting), and at first glance this seems perfect, but before I lay out and build a circuit board I thought I ought to check the following :

If the processor is set up to use the SPI bus in hardware mode, and only two pins are used – is it possible to also use the hardware UART on the unused pin?

If so – is there anything “special” I need to do when setting the unit up?

Or am I better off using the 80 pin device ( dsPIC33FJ128GP708A-I/PT), where it seems the hardware peripherals are located on different pins?

Thanks in advance

James

Cheers

James
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Mon Aug 22, 2011 2:20 pm     Reply with quote

Generally, I expect that the respective pin isn't disconnected from input functions, according to Figure 10-3: Shared Port Structure Block Diagram from dsPIC33F Family Reference Manual.

But even if the input connection would be mutual exclusive similar to the peripheral output functions, the RX1 function can be expected to have the highest (Peripheral A) priority, because it's first in the pin name.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group