|
|
View previous topic :: View next topic |
Author |
Message |
JamesW
Joined: 23 Apr 2007 Posts: 91 Location: Rochester, England
|
Hardware SPI and usart sharing on DSPIC, can it be done? |
Posted: Mon Aug 22, 2011 11:27 am |
|
|
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
|
|
Posted: Mon Aug 22, 2011 2:20 pm |
|
|
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. |
|
|
|
|
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
|