colin382
Joined: 03 Jun 2020 Posts: 37 Location: UK
|
No SPI DO pin on PIC16LF15325 [Solved] |
Posted: Mon May 09, 2022 7:36 am |
|
|
Attempting to set up an SPI facility on 16LF15325 using statement
#use spi(MASTER, DI = PIN_C0, DO = PIN_C1, CLK = PIN_C2, FORCE_SW, BITS = 8)
followed by: spi_xfer(0xF8);
I note that DO in #use spi() is printed in blue, the rest of the characters are in black. Why is this? There is no variable named DO.
The code compiles and I see eight clock pulses on the correct pin but nothing on the DO pin, or any other pin.
The clock rate is quite slow, about 100KHz on a 1MHz internal clock so I think it is using software as intended.
The device data sheet does not have an explicit assignment for SPI data out, but by using FORCE_SW I expected to get round this limitation.
Should I write my own SPI function, the CCS compiler normally would do a better job. |
|