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

#use SPI issue on PIC16F18855

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



Joined: 07 Feb 2008
Posts: 139

View user's profile Send private message

#use SPI issue on PIC16F18855
PostPosted: Fri Mar 27, 2020 1:36 pm     Reply with quote

Anyone see why the two lines below would generate a compiler (PCWH 5.088) error for a PIC16F18855 ? Thanks!

Code:

#use SPI(SPI1, MODE = 0, BITS = 8, STREAM = Encoder_SPI)
#use SPI(SPI2, MODE = 0, BITS = 8, STREAM = DDS_SPI)


*** Error 99 "J:\AAA_PROJECTS\CCT 70K2 DDS PTO\C Code\70K2_DDS.h" Line 12(5,57): Option invalid Not valid for H/W
*** Error 99 "J:\AAA_PROJECTS\CCT 70K2 DDS PTO\C Code\70K2_DDS.h" Line 13(5,53): Option invalid Not valid for H/W
Ttelmah



Joined: 11 Mar 2010
Posts: 15727

View user's profile Send private message

PostPosted: Fri Mar 27, 2020 2:29 pm     Reply with quote

Have you got #PIN_SELECT statements for the SPI pins?.
Needed. The comipiler does not know about the 'default' selections.
JerryR



Joined: 07 Feb 2008
Posts: 139

View user's profile Send private message

PostPosted: Fri Mar 27, 2020 3:21 pm     Reply with quote

Makes perfect sense Ttelmah. New to PPS devices. Many thanks!
Ttelmah



Joined: 11 Mar 2010
Posts: 15727

View user's profile Send private message

PostPosted: Sat Mar 28, 2020 1:00 am     Reply with quote

It's one of those things where the manual could definitely be 'improved'...
The PIN_SELECT 'sticky' here in the forum may help. Smile

Have fun.
JerryR



Joined: 07 Feb 2008
Posts: 139

View user's profile Send private message

PostPosted: Sat Mar 28, 2020 5:21 am     Reply with quote

Again, great help. Thanks so much
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