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 9 matches
CCS Forum Index
Author Message
  Topic: SPI Slave Select Issue
eddfish

Replies: 19
Views: 40799

PostForum: General CCS C Discussion   Posted: Thu Dec 19, 2019 6:13 am   Subject: SPI Slave Select Issue
Good.

However I have to say if you want speed use the spi_read and spi_write.


I will bear that in mind for the future. In this particular project, speed isn't that much of a major limitation, ...
  Topic: SPI Slave Select Issue
eddfish

Replies: 19
Views: 40799

PostForum: General CCS C Discussion   Posted: Thu Dec 19, 2019 6:09 am   Subject: SPI Slave Select Issue
Dang frustating to say the least.
Mighty happy you're 'up and running' though !! Got ANY hair left ??

My hair is rapidly dissapearing, soon I will have more forehead than humpty dumpty. I would n ...
  Topic: SPI Slave Select Issue
eddfish

Replies: 19
Views: 40799

PostForum: General CCS C Discussion   Posted: Wed Dec 18, 2019 11:02 am   Subject: SPI Slave Select Issue
So I think I have found the issue, it has taken many hours but hopefully this helps somebody else in the future.

#use spi(SLAVE, FORCE_HW, ENABLE=PIN_B0, SPI1, BITS=8, stream=SPI_STREAM,) ...
  Topic: SPI Slave Select Issue
eddfish

Replies: 19
Views: 40799

PostForum: General CCS C Discussion   Posted: Mon Dec 16, 2019 8:30 am   Subject: SPI Slave Select Issue
This is a great find, and I really seriously appreciate you trying it out.

Unfortunately (if I have understood correctly) even with this implemented it still doesn't work.

I had a look at the da ...
  Topic: SPI Slave Select Issue
eddfish

Replies: 19
Views: 40799

PostForum: General CCS C Discussion   Posted: Fri Dec 13, 2019 8:29 am   Subject: SPI Slave Select Issue
I forgot to mention earlier that I also did try the suggestion about the primary/secondary prescale.

I tried running:
#use delay(clock=40M, crystal=20M)

It makes no difference. Slave se ...
  Topic: SPI Slave Select Issue
eddfish

Replies: 19
Views: 40799

PostForum: General CCS C Discussion   Posted: Thu Dec 12, 2019 10:40 am   Subject: SPI Slave Select Issue
I then tried a bit of a hack, more as a sense check than anything else. Back to using SPI1, I just ran a pair of while loops continuously checking the status of the SS pin. When its high it just disab ...
  Topic: SPI Slave Select Issue
eddfish

Replies: 19
Views: 40799

PostForum: General CCS C Discussion   Posted: Thu Dec 12, 2019 10:17 am   Subject: SPI Slave Select Issue

1) Use the stream name in your spi_xfer.
2) You don't need the clear_interrupt in the ISR, the compiler does this
automatically.
3) Your clear_interrupt after enabling the interrupt is again poin ...
  Topic: SPI Slave Select Issue
eddfish

Replies: 19
Views: 40799

PostForum: General CCS C Discussion   Posted: Tue Dec 10, 2019 3:56 am   Subject: SPI Slave Select Issue
First of all thank you all for your suggestions. It really is appreciated.

First, check the FRMEN bit. If this is enabled, SSEN does not work.
Then check the ANSEL registers. All the SPI bits have ...
  Topic: SPI Slave Select Issue
eddfish

Replies: 19
Views: 40799

PostForum: General CCS C Discussion   Posted: Mon Dec 09, 2019 10:49 am   Subject: SPI Slave Select Issue
I'm having some issues with SPI on the DSPIC33EV256GM102, specifically slave select.

I have two DSPIC33EV256GM102's connected to a PIC18F as slaves, with the 18F as master.

A single master and ...
 
Page 1 of 1
All times are GMT - 6 Hours
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group