Return to SDK Examples for Microchip Studio
41#define clockPolarity SerialDriver::SCK_LOW
51#define clockPhase SerialDriver::LEAD_CHANGE
54#define SpiPort ConnectorCOM0
58 SpiPort.Mode(Connector::SPI);
59 SpiPort.Speed(baudRate);
60 SpiPort.SpiClock(clockPolarity, clockPhase);
64 SpiPort.SpiSsMode(SerialDriver::LINE_ON);
67 SpiPort.SpiTransferData(
'a');
68 SpiPort.SpiTransferData(98);
69 SpiPort.SpiTransferData(0x63);
71 SpiPort.SpiSsMode(SerialDriver::LINE_OFF);