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

SPI broblem

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



Joined: 23 Oct 2006
Posts: 175

View user's profile Send private message

SPI broblem
PostPosted: Sat Mar 17, 2007 5:26 pm     Reply with quote

I try to write code for SPI master-slave and compiller find that at line
# use SPI(master,DIN=PIN_B1,D0=PIN_B0,CLK=PIN_B2,ENABLE=PIN_B4)


this error:

Library in USE not found "SPI"

How to correct this??????
mskala



Joined: 06 Mar 2007
Posts: 100
Location: Massachusetts, USA

View user's profile Send private message

PostPosted: Sat Mar 17, 2007 5:47 pm     Reply with quote

I found the same thing. It doesn't really matter since using SETUP_SPI() command with the appropriate arguments sets up the hardware SPI pins correctly (I'm in 4.012 PIC18 compiler). Just don't need the #use spi at all.

Mark S.
andys



Joined: 23 Oct 2006
Posts: 175

View user's profile Send private message

spi broblem
PostPosted: Sat Mar 17, 2007 9:19 pm     Reply with quote

If is possiple upload yous code because i want to see any example for spi
Ttelmah
Guest







PostPosted: Sun Mar 18, 2007 3:49 am     Reply with quote

#USE SPI, is one of the new commands, that doesn't work on the earlier V4 compilers.
If you look at the manual, and the 'index', it is not even listed. It is only found, if you search the manual, or look for one of the other new SPI commands like spi_xfer. Note also that the 'overview' section for SPI, does not show this.
In the latest versions, it is now accepted, and does appear to be generating working code.

Best Wishes
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