Quantcast
Channel: MEL PICBASIC Forum
Viewing all articles
Browse latest Browse all 4787

Question on SPI Data out on PortC.7(pic18f4550)

$
0
0
The following code is working...
Code:

SD_WE        Var    PORTA.4    ' SD card write protect
SD_WE_TRIS    Var    TRISA.4    ' SD card write protect direction
SDI        Var    PORTB.0    ' SPI data in
SDI_TRIS    Var    TRISB.0    ' SPI data in direction
SCL        Var    PORTB.1    ' SPI clock
SCL_TRIS    Var    TRISB.1    ' SPI clock direction
SD_CS        Var    PORTB.3    ' SD card chip select
SD_CS_TRIS    Var    TRISB.3    ' SD card chip select direction
SD_CD        Var    PORTB.4    ' SD card detect
SD_CD_TRIS    Var    TRISB.4    ' SD card detect direction
SDO        Var    PORTC.7    ' SPI data out
SDO_TRIS    Var    TRISC.7    ' SPI data out direction

My question now is it possible to use other pin for SDO? I see it on the datasheet for Pic18F4550 PORTRC.7 is RC7/RX/DT/SDO. I tried PortD.0 and PortB.7 but not working. The reason I want to use other pin is I'm planning to use it for blue tooth module and use hardware interrupt on PortC.7.


Kind regards,
tacbanon

Viewing all articles
Browse latest Browse all 4787

Trending Articles