Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

dsPIC3[03]F SPI Frequency

Status
Not open for further replies.

dougy83

Well-Known Member
Most Helpful Member
Hi,

I was wanting to shift a 40Mbps datastream out a dsPIC30/33, clock is not required. I was thinking of using either a) SPI @40MHz, or b) 2x SPI@20MHz using SCLK to MUX the data into single 40MHz stream. I don't need the clock or receive lines externally otherwise.

The datasheets for the dsPICs I looked at specify a maximum 10MHz SCLK frequency. Does anyone know why this is? Or whether it will still function? I was guessing received data may become corrupt at the higher frequencies, or the output driver current consumption might increase...

Any info anyone has on operating the dsPIC SPI at these higher frequencies would be most welcome.

Thanks!
 
The receive frequency of an SPI stream has to be 1/4 of the maximum clock of the chip. hence 10mhz from a 40mhz clocked PIC. It's a synchronization issues, you can't use SPI without a clock so I'm not sure why you're saying you don't need it.
 
Sceadwian said:
The receive frequency of an SPI stream has to be 1/4 of the maximum clock of the chip. hence 10mhz from a 40mhz clocked PIC.

I'm not sure what you're referring to. The dsPIC33F can have a 40MHz instruction clock. The SPI clock can be as high as the instruction clock, but for some reason(s) may not exceed 10MHz (according to the datasheet, also see attached image). I was wondering what sets this limit - e.g. output driver current increases excessively above 10MHz, e.g. inability to clock in data at higher rate, etc. I was also wondering if the SPI module set as Master can output data on the MOSI pin (ignoring or disabling SCK & MISO).

Sceadwian said:
It's a synchronization issues, you can't use SPI without a clock so I'm not sure why you're saying you don't need it.
I'm not interfacing to an SPI device and consequently the clock and MISO pins are of no concern to me.
 

Attachments

  • dspicspi.gif
    dspicspi.gif
    7.9 KB · Views: 148
Last edited:
Thing that sucks about the PIC32's is no DIP packages for breadboarding. :(
 
That's why you get adapter boards.
 
I told you dougy, it's limited by the synchronization of the SPI peripheral to the PIC's clock rate, obviously it can't have an SPI clock equivilent to the PIC clock or it wouldn't specifically state that it can't in the PDF. It's a limitation of the SPI hardware itself an there's nothing you can do about it.

If you're not interfacing with an SPI device then WHY are you using the SPI hardware? Bit bang the I/O lines. Apparently the PIC32's hardware SPI is slightly better as it can receive at up to 1/2 the system clock.
 
...obviously it can't have an SPI clock equivilent to the PIC clock or it wouldn't specifically state that it can't in the PDF.
The SPI clock frequency can be equal to the instruction clock for any instruction clock up to 10MHz.

It's a limitation of the SPI hardware itself an there's nothing you can do about it.
Probably. I was kind of hoping that the limitation would be on parts of the module that I wasn't thinking of using (SCK & SDI); it may not be the case however.

If you're not interfacing with an SPI device then WHY are you using the SPI hardware?
Because it saves me having to do in the foreground (100% CPU usage) what the SPI hardware does in the background (0% CPU usage). It would make it harder to insert useful data into the stream if you're using 100% of the CPU just to keep the stream running.

Apparently the PIC32's hardware SPI is slightly better as it can receive at up to 1/2 the system clock.
Thanks for the suggestion Sceadwian & nickleflippr. I'll have a look. It might end up being too expensive for what I was after though.
 
This is where using cheaper devices in parallel helps =) You never did say what device you're trying to set up with this setup.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top