i am using 18f4550 pic.i am not easily getting about the spi program concepts.i am using c18 compiler.so can anyone help me with the program for spi in 18f4550.i used several methods to crack it up but they never worked properly.the main prolem is that should i use openSWSPI if yes how ,i am unable to what parameters are to be written in openSWSPI.how can i make the spi ports software spi ports is it by using following ..
#define SW_DIN_PIN PORTCbits.RC4 // Data in
#define TRIS_SW_DIN_PIN TRISCbits.TRISC4
#define SW_DOUT_PIN PORTCbits.RC6 // Data out
#define TRIS_SW_DOUT_PIN TRISCbits.TRISC6
by using these kind of sentances can i make RA0 and RD0 ,DIN and DOUT ports.
please post me the program for spi
#define SW_DIN_PIN PORTCbits.RC4 // Data in
#define TRIS_SW_DIN_PIN TRISCbits.TRISC4
#define SW_DOUT_PIN PORTCbits.RC6 // Data out
#define TRIS_SW_DOUT_PIN TRISCbits.TRISC6
by using these kind of sentances can i make RA0 and RD0 ,DIN and DOUT ports.
please post me the program for spi