Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
11/01/11 07:05
Read: times


 
#184497 - Still gives puny transfer rate with significant limitations
Responding to: ???'s previous message
Konstantinos L. Angelis said:
it is only attainable if EVERYTHING ELSE (ISRs, main, ...) is stopped. for a while !

Let's say that using burst mode for 1ms every 50ms. Then the slave system is stopped for 1ms and free for operations the other 49ms, that yields to 98% free for normal (not SPI) activities. The master system gives the rate of the slave should be used to accept/respond to commands.


But that is not really much different from instead dropping the baudrate with a factor 50 - your 100kbit/s loop will still melt down to <= 2kbit/s of actual data. But with lots of limitations and assumptions and lots of bruising involved.

And that burst mode still requires the master to hold the slave select enough time before the data transfer starts, that the slave have time to react.

If the slave does that burst inside a pin-change interrupt, then it will lock up all other interrupts (timers, UART, ...) for that millisecond. And the full ms may not transfer data - some of the time must be reserved for reacting to the slave select.

If that optimized assembler code is instead called from the main loop, then that main loop must guarantee better than 500us loop time always, to be able to get 500us of slave communication during that ms.

Whatever happens, the master must activate slave-select in good time. And the slave must do an best effort to detect it and then start the busy loop while waiting for real data. If the slave has a 100us jitter time to detect the slave select, then the master must be prepared to always hold slave select at least 150us before start of data. And the slave must busy-loop for 50..150us before any data will start to arrive.

List of 20 messages in thread
TopicAuthorDate
SPI Slave in 89S52            01/01/70 00:00      
   Get real processor            01/01/70 00:00      
      Topic Author Date            01/01/70 00:00      
         Big problem            01/01/70 00:00      
         Look for a different model            01/01/70 00:00      
         Try 8051 BASCOM            01/01/70 00:00      
            at what speed            01/01/70 00:00      
               Interpreters have an easier life.            01/01/70 00:00      
               Soft SPI speed            01/01/70 00:00      
                  But how to combine that loop with a real program?            01/01/70 00:00      
                     and more            01/01/70 00:00      
                        Software master trivial - slave is not            01/01/70 00:00      
                           SPI analysis is made, results?            01/01/70 00:00      
                              There _may_ be a solution - but maybe not acceptable            01/01/70 00:00      
                  sure, and so what?            01/01/70 00:00      
                     SPI at 100Kbps            01/01/70 00:00      
                        Still gives puny transfer rate with significant limitations            01/01/70 00:00      
                           the answer is            01/01/70 00:00      
   Fully Interlocked Handshaking.            01/01/70 00:00      
      Quite common            01/01/70 00:00      

Back to Subject List