Hello: I want to use Master mode SPI with my PIC18c452 for communicating with a oki ml2500bta. When I write to the SSPBUF register, SDO pin (RC5) and SCK pin (RC3) don't change. Should I see these pins change? This is my code: clrf SSPSTAT bsf SSPSTAT, CKE ; CKE=1,ClockEdgeSelect. CKP=0 ->Data tx on rising edge of SDK. bsf TRISA,5 ; SPI SS pin is set. bcf TRISC,3 ; SPI SCK pin is cleared (master mode) bsf TRISC,4 ; SPI SDI pin is input (will be controlled by SSP) bcf TRISC,5 ; SPI SDO pin is output (will be controlled by SSP) bcf SSPCON1,SSPEN ; SSPEN=0 bcf SSPCON1,WCOL ; WCOL=0, (Write Collision detect bit) bcf SSPCON1,SSPOV ; SSPOV=0, (Receive Overflow indicator bit) bcf SSPSTAT,BF ; BF=0 , (buffer full) bcf SSPCON1,CKP ; CKP=0 bcf SSPCON1,SSPM3 ; SSPM3:SSPM0 , Mode Select bits. bcf SSPCON1,SSPM2 ; 0010 bsf SSPCON1,SSPM1 ; SPI master mode, bcf SSPCON1,SSPM0 ; clock = Fosc/64 bsf SSPCON1,SSPEN ; SSPEN=1 movlw 0xAA; Send data to the SPI movwf SSPBUF ; Regards, Carlos -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads