rallygoer
Joined: 24 Sep 2009 Posts: 1 Location: Staffordshire
|
SPI Pin Assignment Problems with PIC Wizard |
Posted: Thu Jan 29, 2015 3:47 am |
|
|
As of version 5.040 I have noticed a problem with the pin assignment when using the wizard to set up initial hardware.
On some parts it seems pin_select does not seem to work at all
i.e. on PIC18F97J94
Code: |
#pin_select SCK2=PIN_A1
#pin_select SDI2=PIN_A2
|
fails with Invalid Pre-Processor Directive Invalid Pin ID
and on others, as in my case PIC18F26J11:
Code: |
#pin_select SCK2=PIN_C1
#pin_select SDI2=PIN_C2
#pin_select SD02=PIN_C3
#pin_select SS2OUT=PIN_None
|
Look carefully at line 3 SDO2. It is actually generated as SD(Zero)2, and not SD(Oh)2.
Also PIN_None is not valid for any pin, and should not be generated by the wizard, so just delete it as it is not required. |
|