View previous topic :: View next topic |
Author |
Message |
JerryR
Joined: 07 Feb 2008 Posts: 167
|
#use SPI issue on PIC16F18855 |
Posted: Fri Mar 27, 2020 1:36 pm |
|
|
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: 19515
|
|
Posted: Fri Mar 27, 2020 2:29 pm |
|
|
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: 167
|
|
Posted: Fri Mar 27, 2020 3:21 pm |
|
|
Makes perfect sense Ttelmah. New to PPS devices. Many thanks! |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19515
|
|
Posted: Sat Mar 28, 2020 1:00 am |
|
|
It's one of those things where the manual could definitely be 'improved'...
The PIN_SELECT 'sticky' here in the forum may help.
Have fun. |
|
|
JerryR
Joined: 07 Feb 2008 Posts: 167
|
|
Posted: Sat Mar 28, 2020 5:21 am |
|
|
Again, great help. Thanks so much |
|
|
|