TinyCircuits Forum

TinyCircuits Products => TinyDuino Processors & TinyShields => Topic started by: mike_ekim1024 on February 27, 2015, 04:56:44 AM

Title: TinyScreen uses both Wire and SPI?
Post by: mike_ekim1024 on February 27, 2015, 04:56:44 AM
Just curious why both?  SPI is fast and used for data, while it looks like Wire is used for commands?  Wire has multiple 32 byte buffers that are not even used and take precious memory, while SPI hardly uses any.

Any reason for using both protocols?  I can change the buffer sizes if need be, at least :)

Mike
Title: Re: TinyScreen uses both Wire and SPI?
Post by: Ben Rose on March 09, 2015, 06:43:15 PM
Missed this Mike. The OLED on TinyScreen uses SPI for data and commands, but the chip select and other control lines(along with the buttons) are attached to an I2C GPIO chip. This trades 7 I/O on the main controller for an I2C address, which allows TinyScreen to be compatible with all our other boards.

The Wire library has unnecessary overhead, but we want to cause as few software conflicts as possible- you can definitely change the buffers to be very small, 2 bytes should work without causing issues in the library logic, but I haven't tested that.
Title: Re: TinyScreen uses both Wire and SPI?
Post by: mike_ekim1024 on March 10, 2015, 02:55:08 AM
The Wire library has unnecessary overhead, but we want to cause as few software conflicts as possible

Thanks for the response.  It does make sense to limit the number of pins used, and like you said I can make the I2C buffer very small.  It's always nice to understand the choices made, to have a little deeper knowledge.