king kong said:
No one knows how to do firmware?
You're asking like firmware programming experience automatically qualifies someone to know the details of the dsPIC30F4013 development system.
I'm sure lots of us have substantial firmware programming experience as the term "firmware" covers a lot
of hardware territory.
However what you're asking is pretty much programming support software and PIC hardware development platform specific.
It's been years since I've done any PIC development work. There's pretty much no
way around doing some tedious research with the more sophisticated PIC development systems, and your initial post suggests you have found that out. You have to read the documentation to know what label, attributes, and pre-conditions are associated with the specific serial communication you want with a specific PIC series. The full list of software and hardware programming/init requirements for SPI can vary.
While you're focusing on the programming aspects, don't forget you often have to enable/disable specific hardware jumpers or switches on a given PIC development board in order to get specific SPI (and other) functionality(1)
. Your programming can be flawless but if you've missed a single bit of the hardware setup it can become quite frustrating.
I think your best bet to find a solution is to keep looking for examples, tutorials, and ask this question on a PIC-specific programming forum.
edited to add this example:
Here's a general example of this type of requirement for one PIC development system.
section "4.3 BOARD SETUP FOR THE dsPIC30F2011 SAMPLE APPLICATION"
The dsPICDEM 2 Development Board supports dsPIC30F devices that have multiple
peripheral devices multiplexed on some pins. Therefore, the jumper set up of various
headers depends on which of the dsPIC30F peripherals are used by the application.
This section demonstrates how the board is set up for the dsPIC30F2011 device to
support the dsPIC30F2011 example software....
(You also have to watch how
you are using the multiplexed devices. "On this device, multiplexing of various peripherals on the pins does not allow the
simultaneous use of....")