Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: Use of the preprocesser to keep HW straight

2007-03-27 by thormj_altea

--- In AVR-Chat@yahoogroups.com, John Samperi <samperi@...> wrote:
>
> At 01:05 AM 27/03/2007, you wrote:
> >2. SPI [slave] requires an additional line for the select,
> 
> What's so strange about this? ALL SPI implementations require
> a slave select line, you can ground the SS pin if you like
> and it will work but if for some reason you lose synch then it
> will no longer work and will need to reset the processor.

Hrm... I hadn't thought about losing sync; I guess I was hoping (now 
there's a naive word) that if it lost clock for so long, it would 
consider the transmission done.

The problem with the concept -- I'm just using PSCOUT00 from the PSC 
(also pin 1)... so I was hoping (but I didn't see how) that I could 
set SS_A to just be an SFR, and I could write a 0 to it, and use the 
SPI on 3, 4, & 5 to communicate.  To synchronize I was thinkging I 
could do the above bit in software, or I could use a different line 
(eg, I'm not using pin 12), and I'd put a decent delay in the SS -> 
data phase.

So I started looking at I2C (TWI/Neurowire/???), but it appears that 
the EUSART can't do TWI.  So I hacked together software 
implementation, but the way I did it is limiting the speed and 
detracting from the control loop performance.

Still looking for suggestions, but since I got hung up on the SS_A vs 
PSCOUT00, I'm also wondering if anybody is using some clever tools / 
preprocessor / ??? to keep the pins/functions from clobbering each 
other.

-Thor

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.