sindyme
Joined: 05 Aug 2009 Posts: 37
|
How can I set SPI pin_x at PIC24FJ256GB106 |
Posted: Tue Jan 12, 2010 10:17 pm |
|
|
My PIC is PIC24FJ256GB106.
How should I plan "PRn Pin" for Hardware ?
24FJ256GB106 have three hardware SPI inside.
How does CCS plan the code edit ?
The CCS index say ~
Code: |
#use spi(DI=PIN_B1, DO=PIN_B0, CLK=PIN_B2, ENABLE=PIN_B4, BITS=16)
// uses software SPI
#use spi(FORCE_HW, BITS=16, stream=SPI_STREAM)
// uses hardware SPI and gives this stream the name SPI_STREAM |
But ~ When I use hardware SPI and compiler.
CCS have error about "not valid for H/W" <-----
I hope SPI plan use ~
Code: |
#define SDI PIN_B4
#define SDO PIN_B5
#define SCK PIN_B8
#define CS PIN_B9
|
How can I write the CCS code?
Help me, please .... Thanks everybody
|
|