View previous topic :: View next topic |
Author |
Message |
andys
Joined: 23 Oct 2006 Posts: 175
|
SPI broblem |
Posted: Sat Mar 17, 2007 5:26 pm |
|
|
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
|
|
Posted: Sat Mar 17, 2007 5:47 pm |
|
|
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
|
spi broblem |
Posted: Sat Mar 17, 2007 9:19 pm |
|
|
If is possiple upload yous code because i want to see any example for spi |
|
|
Ttelmah Guest
|
|
Posted: Sun Mar 18, 2007 3:49 am |
|
|
#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 |
|
|
|