Nov 20, 2008 #1 V vijiembed Newbie level 5 Joined Jul 8, 2008 Messages 8 Helped 0 Reputation 0 Reaction score 0 Trophy points 1,281 Activity points 1,331 pic16877a hai friends, I have some doubts in SPI protocol. Actually, i want to implement SPI with ADC in PIC16f877a microcntroller. I tried to do this. My code is, void main(void) { SPI init(); SPI tran(); } void SPI init(void) { TRISC 0b11000111; SSPSTAT 0b00000000; SSPCON 0b00110000; } void SPI tran(void) { SSPIF 0; SSPBUF 0b10101010; while(SSPIF 0); SSPIF 0; } Can anybody help me....
pic16877a hai friends, I have some doubts in SPI protocol. Actually, i want to implement SPI with ADC in PIC16f877a microcntroller. I tried to do this. My code is, void main(void) { SPI init(); SPI tran(); } void SPI init(void) { TRISC 0b11000111; SSPSTAT 0b00000000; SSPCON 0b00110000; } void SPI tran(void) { SSPIF 0; SSPBUF 0b10101010; while(SSPIF 0); SSPIF 0; } Can anybody help me....