I've purchased one of these screens Digole 1.8" Serial: UART/I2C/SPI True Color OLED160x128 OLED Module DS160128COLED-35 which gives me the option of UART, I2C or SPI to communicate with it. I'm currently using UART and as I'm using the screen to plot graphs I'm finding it is slower than I require.
Will soldering the jumpers and connecting via SPI be faster than the current UART connection? Currently using a Mega so resources/pins aren't an issue. I understand SPI is faster than I2C.
I have run my code on another OLED over SPI which doesn't have this issue. However that was using a B/W screen with a different library which updates the image with a command once it is drawn whereas the Digole screen updates as commands are sent to it. I'm not sure if this is a library, communication or hardware issue.
1 ) SPI, it is fast. Use SPI, forget the rest. You don't even have to read the rest of this post
2 ) I2C, it is slower but can be easier in use. Only 2 pins are needed, and it is easier to interface a 5V Arduino board with a 3.3V sensor. Although I like to use I2C for everything, it is not the best option for a graphical display because it is slower than SPI.
3 ) UART, bad choice, slow. It is to be compatible with very simple microcontrollers, or to be able to connect it to a computer (with a usb-serial-ttl converter).
Peter_n:
1 ) SPI, it is fast. Use SPI, forget the rest. You don't even have to read the rest of this post
2 ) I2C, it is slower but can be easier in use. Only 2 pins are needed, and it is easier to interface a 5V Arduino board with a 3.3V sensor. Although I like to use I2C for everything, it is not the best option for a graphical display because it is slower than SPI.
3 ) UART, bad choice, slow. It is to be compatible with very simple microcontrollers, or to be able to connect it to a computer (with a usb-serial-ttl converter).
From a bit rate perspective, UART can be faster than I2c.
The default rate for i2c 100kbits/sec.
UART can be set up for baud rates faster than that.
The bus overhead for i2c can also be higher because of the i2c protocol
things like start signal, and address bytes are involved.
hi
I want to send data via UART to computer by Arduino UNO board.
for that i m using Serial.begin(9600) fuction in setup Section and
Serial.write(48); delay(100);
Serial.write(49); delay(100);
Serial.write(50); delay(100);
Serial.write(51); delay(100);
in void loop section.
Now the Problem is i m getting 3gfg on Hyperterminal instead of 0123 but getting 0123 on serial monitor of Arduino IDE.
I have cross checked on Protious also its working fine but on actual hardware its give junk value(3gfg)
Crystal oscilator 16Mhz on board.