Spi Interface

Status
Not open for further replies.

WHO

New Member
Hey Guys..

I'm Using Pic Simulator Ide And I Cant Get My Spi Interface Define Statements To Compile.. I Am Using The Basic C Compiler..

Anyone Familiar With The Program And Can Help Me..

Thanks
 
AllDigital

'Define spi_cs_port = PORTC
'Define spi_cs_bit = 0
'Define spi_sck_reg = PORTC
'Define spi_sck_bit = 3
'Define spi_sdi_reg = PORTC
'Define spi_sdi_bit = 4
'Define spi_sdo_reg = PORTC
'Define spi_sdo_bit = 5
'spiprepare


i commented the statements for now

let me know if i'm doing it wrong.
the PIC is 16F877A
 
Defines must be written like:

#define spi_cs_port PORTC
#define spi_cs_bit 0
,etc.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…