I made a program where I use the I/O expander via I2C, however it didn't do anything at all. I checked the "p16F88x_perif.xml" file and realized that the synchronous serial port (MSSP) was not programmed, so I added a fraction of code based on the "p16F87x_perif.xml" file where the I2C does work. After this, the I2C protocol worked, however I could not get the SPI protocol to work. I attach the fraction of code that I added to the XML file.
I hope you can help me.
Thanks in advance.
Greetings
I hope you can help me.
Thanks in advance.
Greetings
- Code:
<msspunit name="MSSP" type="00" configregsA="SSPCON" >
<twi name="TWI" configregsA="SSPCON" configregsB="SSPCON2"
dataregs="SSPBUF"
addressreg="SSPADD"
statusreg="SSPSTAT"
interrupt="SSP"
prescalers=""
pins="PORTC4,PORTC3" /><!-- "SDA,SCL" -->
<spi name="SPI" configregsA="SSPCON"
dataregs="SSPBUF"
statusreg="SSPSTAT"
interrupt="SSP"
prescalers="4,16,64,0"
pins="PORTC5,PORTC4,PORTC3,PORTA5"/><!-- "SDI,SDO,SCK,SS" -->
</msspunit>