CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Search found 8 matches
CCS Forum Index
Author Message
  Topic: dsPIC33 SPI Slave Interupt spi_read() Not Reading
hammale

Replies: 14
Views: 26202

PostForum: General CCS C Discussion   Posted: Wed May 17, 2017 7:23 am   Subject: dsPIC33 SPI Slave Interupt spi_read() Not Reading
If you have slave select lines, then there is no problem.... Smile

To use select with the #use spi, you need to have done a PIN SELECT first for the select pin. However you may find it better if you a ...
  Topic: dsPIC33 SPI Slave Interupt spi_read() Not Reading
hammale

Replies: 14
Views: 26202

PostForum: General CCS C Discussion   Posted: Wed May 17, 2017 6:41 am   Subject: dsPIC33 SPI Slave Interupt spi_read() Not Reading
So I enabled the SS pin in my slave #USE SPI directive (pin B0 on my chip) and modified the ISR to be the following:

#INT_SPI1
void spi1_isr(void) {
data = spi_xfer_in(SPI_PO ...
  Topic: dsPIC33 SPI Slave Interupt spi_read() Not Reading
hammale

Replies: 14
Views: 26202

PostForum: General CCS C Discussion   Posted: Wed May 17, 2017 5:14 am   Subject: dsPIC33 SPI Slave Interupt spi_read() Not Reading
Thanks for the awesome feedback it really helps. Unfortunately I am stuck with my current hardware so I will have to find a way to "make it work". I have 4 SPI slaves connected in series (no ...
  Topic: dsPIC33 SPI Slave Interupt spi_read() Not Reading
hammale

Replies: 14
Views: 26202

PostForum: General CCS C Discussion   Posted: Tue May 16, 2017 3:45 pm   Subject: dsPIC33 SPI Slave Interupt spi_read() Not Reading
Ran into another issue with this code today. My system has 8 of these processors daisy chained together. While the previous code works perfectly with only one master and slave, when I connect a second ...
  Topic: dsPIC33 SPI Slave Interupt spi_read() Not Reading
hammale

Replies: 14
Views: 26202

PostForum: General CCS C Discussion   Posted: Tue May 16, 2017 2:26 am   Subject: dsPIC33 SPI Slave Interupt spi_read() Not Reading
The interrupt must _always_ read the data.
The interrupt is saying 'there is a character needing to be read'.
You are ignoring this if PIN_C4 is high. This will mean that the peripheral won't inter ...
  Topic: dsPIC33 SPI Slave Interupt spi_read() Not Reading
hammale

Replies: 14
Views: 26202

PostForum: General CCS C Discussion   Posted: Mon May 15, 2017 4:46 pm   Subject: dsPIC33 SPI Slave Interupt spi_read() Not Reading
A slave, only sends when the data is clocked out by the master.

So when you write in the SPI routine, a byte is loaded 'waiting to send', and this won't actually be sent, till the master sends you ...
  Topic: dsPIC33 SPI Slave Interupt spi_read() Not Reading
hammale

Replies: 14
Views: 26202

PostForum: General CCS C Discussion   Posted: Mon May 15, 2017 9:00 am   Subject: dsPIC33 SPI Slave Interupt spi_read() Not Reading
Lets try cleaning up some stuff first:

1. You don't need to disable the SPI interrupt while in it. The HW does this for you.

2. You don't need to clear the interrupt flag in the interrupt. CC ...
  Topic: dsPIC33 SPI Slave Interupt spi_read() Not Reading
hammale

Replies: 14
Views: 26202

PostForum: General CCS C Discussion   Posted: Mon May 15, 2017 5:34 am   Subject: dsPIC33 SPI Slave Interupt spi_read() Not Reading
Hello,

I am using two dsPIC33EV256GM104 processors as a master and slave with SPI but am having troubles implementing an interrupt driven slave. I am currently using PCD compiler v5.071c. I am tryi ...
 
Page 1 of 1
All times are GMT - 6 Hours
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group