View previous topic :: View next topic |
Author |
Message |
avatarengineer
Joined: 13 May 2013 Posts: 51 Location: Arizona
|
4 Hardware SPIs: how can I use them? |
Posted: Mon May 13, 2013 3:36 pm |
|
|
Version 4.141, looking through manual and forums.
Haven't found example on how to use all 4 Hardware SPIs
on a PIC24EP512GP806.
Functions only provide; spi & spi2. where's 3 & 4 ?
Suggestions? |
|
|
newguy
Joined: 24 Jun 2004 Posts: 1907
|
|
Posted: Mon May 13, 2013 3:53 pm |
|
|
They may be supported but not documented yet. Try using spi3 in place of spi2 and see if the compiler throws an error or not.
If the compiler does accept references to SPI 3 & 4, more importantly, check the .lst file to ensure that the compiler is properly setting up the registers. Just because the compiler accepts references to the hardware doesn't mean that it's bug free.
Sorry to be the bearer of bad news, but you may be forced to set up the registers yourself. CCS frequently will add cursory support to new peripherals but the support isn't 100% working for quite some time. |
|
|
avatarengineer
Joined: 13 May 2013 Posts: 51 Location: Arizona
|
4 Hardware SPIs: ... |
Posted: Mon May 13, 2013 6:06 pm |
|
|
Thanks for the advice;
The setup3, setup4 compile without error.
Without documentation, this requires "faith" that CCS got it working.
I'd love to see someone's example of it working with 4 peripherals
so I could sleep better at night. |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9215 Location: Greensville,Ontario
|
|
Posted: Mon May 13, 2013 6:29 pm |
|
|
Frankly I don't know HOW CCS can keep up with the number of PICs coming out these days. Way too many series and 'variations on a theme'.
I'm quite happy 'struggling' with the 'new' 18F46K22 as it seems it fill 99% of my needs though I have to admit it's overkill for the Cougar taillight project. <2% of code space used, 1/2 pins free, no internal perhipherals used...sigh...it's just too easy these days!
When you get your 4 channel SPI up and running, toss your code into the code library so you can help others.
cheers
jay |
|
|
|