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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/12/09 09:34
Read: times


 
#161443 - Ring or no Ring
Responding to: ???'s previous message
Marshall Brown said:
Yes I have a very nice ring driven UART function that can collect the bytes, the issue I have is getting these on the I2C bus in an orderly manner, it seems wasteful sending them one byte at a time having to have the overhead of addressing the slave etc.

Just have your I2C pull data from the ring buffer as required - from your main loop, or some other suitable event in your system.

The I2C could pull them as soon as they're available, and then send when it's built a "frame", or wait until there's a full frame in the ring buffer and send that...

buffer the data into 2 rings, (a & b) when A ring is full switch to B ring, and send A ring, and then wait until B ring is full and send that and contiously toggle between the 2 rings.

Yes, that should work.

With 2 buffers like that, the individual buffers themselves don't need to be rings - you are effectively forming a ring of 2 buffers!
You could have more than 2 buffers, if it helped...

List of 8 messages in thread
TopicAuthorDate
Streaming Data RS232 -> I2C -> RS232            01/01/70 00:00      
   to infinity and beyond            01/01/70 00:00      
      Waaaaaaaaay OTT?            01/01/70 00:00      
   Ring-a-ring-O-roses...            01/01/70 00:00      
      Thanks but ----> how do I stream on the I2C            01/01/70 00:00      
         Ring or no Ring            01/01/70 00:00      
   great idea            01/01/70 00:00      
      Wouldn't need to send to the other UART though            01/01/70 00:00      

Back to Subject List