Author |
Message |
Topic: SPI slave with timeout? |
rcooke
Replies: 25
Views: 33316
|
Forum: General CCS C Discussion Posted: Sun Aug 28, 2011 12:37 pm Subject: SPI slave with timeout? |
If I have the Timer1 setup to trigger an interrupt when it rolls over will it still set the TMP1IF bit even if the ISR isn't called when I'm in the SPI interrupt?
I'm trying to find a way to create ... |
Topic: SPI slave with timeout? |
rcooke
Replies: 25
Views: 33316
|
Forum: General CCS C Discussion Posted: Thu Aug 25, 2011 3:12 pm Subject: SPI slave with timeout? |
Ttelmah,
You've got me confused regarding the timer. I'm using Timer1's interrupt to increment my Tick variable at a rate of 16.3ms/tick.
I'm lost as to what you are suggesting. Can you give m ... |
Topic: SPI slave with timeout? |
rcooke
Replies: 25
Views: 33316
|
Forum: General CCS C Discussion Posted: Thu Aug 25, 2011 10:24 am Subject: SPI slave with timeout? |
Ttelmah,
Here's my timer routine where I'm incrementing the Tick variable:
//****************************************************************************
// Timer 1 Interrupt - used to setup a ... |
Topic: SPI slave with timeout? |
rcooke
Replies: 25
Views: 33316
|
Forum: General CCS C Discussion Posted: Thu Aug 25, 2011 9:13 am Subject: SPI slave with timeout? |
I apologize for not giving a clear explanation of just what our SPI slave system has to do. The master sends a "command byte" and the slave has to return a "sync byte" of 0X5A. T ... |
Topic: SPI slave with timeout? |
rcooke
Replies: 25
Views: 33316
|
Forum: General CCS C Discussion Posted: Wed Aug 24, 2011 8:51 pm Subject: SPI slave with timeout? |
Ttelmah,
Thanks for the info. I appreciate all the help folks give on this forum. This is a great resource.
I'm still running into a real can of worms with this SPI routine. If I use this for ... |
Topic: SPI slave with timeout? |
rcooke
Replies: 25
Views: 33316
|
Forum: General CCS C Discussion Posted: Mon Aug 22, 2011 5:49 pm Subject: SPI slave with timeout? |
John P,
That might work but as is usual for one of our projects - we've run out of free inputs. I do like your idea though.
Richard |
Topic: SPI slave with timeout? |
rcooke
Replies: 25
Views: 33316
|
Forum: General CCS C Discussion Posted: Fri Aug 19, 2011 4:45 pm Subject: SPI slave with timeout? |
John P,
Unfortunately we don't (or can't) influence the customer and their comm scheme. We're just a small part of their overall system. They won't even tell us what the inter-byte delay can be.
... |
Topic: SPI slave with timeout? |
rcooke
Replies: 25
Views: 33316
|
Forum: General CCS C Discussion Posted: Fri Aug 19, 2011 3:17 pm Subject: SPI slave with timeout? |
Ttelmah,
I agree that my scheme isn't pretty or "proper" but it is working. We need to receive 3 bytes. We need to send 0x5A back to the master as the 1st byte is received, call this on ... |
Topic: SPI slave with timeout? |
rcooke
Replies: 25
Views: 33316
|
Forum: General CCS C Discussion Posted: Fri Aug 19, 2011 8:36 am Subject: SPI slave with timeout? |
John,
The problem we're having is if the customer's computer (master) hangs during the 3 byte transmission to our slave. If we don't tickle the WDT within 1 sec it will reset our system. I'm goin ... |
Topic: SPI slave with timeout? |
rcooke
Replies: 25
Views: 33316
|
Forum: General CCS C Discussion Posted: Wed Aug 17, 2011 9:36 am Subject: SPI slave with timeout? |
Thanks Telmah. I think you have made the issue more understandable. I'm now going to have to figure out how to implement the monitor code.
Thanks again,
Richard |
Topic: SPI slave with timeout? |
rcooke
Replies: 25
Views: 33316
|
Forum: General CCS C Discussion Posted: Wed Aug 17, 2011 8:59 am Subject: SPI slave with timeout? |
Actually I am using the SPI interrupt. Our issue is what happens if the master stops the transmission before all 8 bits are received? If the master (customer's computer) hangs during a transmission w ... |
Topic: SPI slave with timeout? |
rcooke
Replies: 25
Views: 33316
|
Forum: General CCS C Discussion Posted: Tue Aug 16, 2011 4:11 pm Subject: SPI slave with timeout? |
Hi Folks,
In our application we have a PIC18F24K22 set up as the slave SPI. Our code is working fine but there is a small possibility that if the master controller (our customer's responsibility) ... |
Topic: AD8402 digital pot - sending 10bits via SPI? |
rcooke
Replies: 5
Views: 8181
|
Forum: General CCS C Discussion Posted: Sun Apr 10, 2011 2:05 pm Subject: AD8402 digital pot - sending 10bits via SPI? |
PCM,
Thanks for the heads-up. I searched the forum but didn't do a very good job. I just wanted a second opinion and you pointed me to one. That's the beauty of this forum.
Richard |
Topic: AD8402 digital pot - sending 10bits via SPI? |
rcooke
Replies: 5
Views: 8181
|
Forum: General CCS C Discussion Posted: Sun Apr 10, 2011 1:46 pm Subject: AD8402 digital pot - sending 10bits via SPI? |
I don't understand why you say it is bizarre. The hardware team designed the circuit in such a way that I am forced to use the hardware SPI function on the chip (18F24K22). We have other devices tha ... |
Topic: AD8402 digital pot - sending 10bits via SPI? |
rcooke
Replies: 5
Views: 8181
|
Forum: General CCS C Discussion Posted: Sun Apr 10, 2011 1:31 pm Subject: AD8402 digital pot - sending 10bits via SPI? |
Hi Folks,
In my application I am forced to use the HW SPI due to conditions out of my control. I need to write 10 bits to the chip 2 bits of address and 8 bits of data. I can't use the CCS suppli ... |
|