Mike - K8LH
Well-Known Member
The hardware SPI interface is running at 4-MHz now with just a minor change to the code...
C:
/************************************************************************
* main setup *
************************************************************************/
void main(void)
{ ANSELA = 0; // Analog off (digital I/O)
ANSELC = 0; // "
TRISA = 0; //
TRISC = 0; //
OSCCON = 0b01111000; // INTOSC 16-MHz
/* *
* initialize MSSP module SPI mode 0 (CKE=1/CKP=0, Fosc/4) *
* */
SSP1STAT = 0x40; // CKE = 1
SSP1CON1 = 0x20; // SPI Master, Fosc/4, CKP = 0
Last edited: