CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

No SPI DO pin on PIC16LF15325 [Solved]

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
colin382



Joined: 03 Jun 2020
Posts: 37
Location: UK

View user's profile Send private message

No SPI DO pin on PIC16LF15325 [Solved]
PostPosted: Mon May 09, 2022 7:36 am     Reply with quote

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.
colin382



Joined: 03 Jun 2020
Posts: 37
Location: UK

View user's profile Send private message

PostPosted: Mon May 09, 2022 7:50 am     Reply with quote

SOLVED
A previous SPI setup had not been deleted.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group