I recently bought a Matrix Orbital display: EVE4x-70A-IPS-BLH-TPC-F128-USB ( https://www.matrixorbital.com/eve4x-70a ... h=eve4-70a ) and i can not set it up to work with my Arduino Due ( for testing ) over SPI.
The board looks to be fine, i ran the precompiled (EVE4-101.exe) in a windows VM ( because the code after compilation it refused to run on my computer ) with the onboard USB attached + feeding 7V over the black connector. The Logo was dispalyed and touch also works.
Currently i try to set it up with an Arduino Due. The pin headers werent soldered in my board, so i soldered in some of them and connected the following:
- GND - GND
- RST - Pin7
- CS - Pin3
- MOSI/MISO/SCK to the Due SPI header
(I found in another topic that the black connectors VCC and VCC pins are tied together so i didnt connected to 3v3 but i tried that also )
Currently im trying a simple sketch which only tries to boot up the display and read back the board id but im stuck here ( all other driver libraries where also stuck in this part ). It just contantly reads back 0x00 and never reads 0x7c which it should according to the documentation.
I checked the connections also checked the SPI pins with a scope and i could confirm indeed the data is sent but nothing comes back on MISO. The current consumption jumps a few 10mA when reset/cs is asserted/deasserted so it seems the headers are also fine on my board.
I already wrote to the support too because i ran out of ideas, hope that somebody can help here.
Here is the code im trying:
Code: Select all
#include <stdint.h>
#include <SPI.h>
#define EveCS_PIN 3
#define EveRST_PIN 7
void eve_hw_init() {
Serial.begin(115200);
while (!Serial) {;}
Serial.println("Booting ...");
delay(500);
pinMode(EveCS_PIN, OUTPUT);
digitalWrite(EveCS_PIN, HIGH); // Deselect Eve
pinMode(EveRST_PIN, OUTPUT);
digitalWrite(EveRST_PIN, LOW); // Reset Eve
SPI.begin();
SPI.beginTransaction(SPISettings(1000000, MSBFIRST, SPI_MODE0));
delay(500);
Serial.println("Hardware inited.");
}
void eve_reset() {
Serial.println("Resetting display ...");
digitalWrite(EveRST_PIN, LOW);
delay(500);
digitalWrite(EveRST_PIN, HIGH);
delay(500);
Serial.println("Display reset done.");
}
void eve_init() {
eve_reset();
Serial.println("Initing display ...");
// Wakeup
eve_host_command(0x44, 0); // HCMD_CLKEXT
// eve_host_command(0x61, 42); // Configure System Clock
// Set Active
eve_host_command(0x00, 0); // HCMD_ACTIVE
delay(300);
uint32_t ready = 0;
do
{
ready = eve_read_reg_id();
delay(500);
} while (!ready); // Code never exists the loop here
Serial.println("Display ready.");
}
uint8_t eve_read_reg_id()
{
uint8_t readData[2];
// SPI Start
// SPI.beginTransaction(SPISettings(1000000, MSBFIRST, SPI_MODE0));
digitalWrite(EveCS_PIN, LOW);
delay(1);
// SPI.transfer(0x00);
SPI.transfer(0x30);
SPI.transfer(0x20);
SPI.transfer(0x00); // REG_ID
// Read buffer
uint8_t a = SPI.transfer(0x00); // dummy read
readData[0] = SPI.transfer(0x00);
readData[1] = SPI.transfer(0x00);
// SPI Stop
delay(1);
digitalWrite(EveCS_PIN, HIGH);
// SPI.endTransaction();
Serial.print("* REG ID Value: 0x");
Serial.print(readData[0], HEX);
Serial.print(" 0x");
Serial.println(readData[1], HEX);
if (readData[0] == 0x7C) return 1;
else return 0;
}
void eve_host_command(uint8_t cmd, uint8_t param) {
Serial.print("* SPI Sending HOST CMD: 0x");
Serial.println(cmd, HEX);
// SPI Start
// SPI.beginTransaction(SPISettings(1000000, MSBFIRST, SPI_MODE0));
digitalWrite(EveCS_PIN, LOW);
delay(1);
// SPI Write
SPI.transfer(cmd);
SPI.transfer(param);
SPI.transfer(0x00);
// SPI Stop
delay(1);
digitalWrite(EveCS_PIN, HIGH);
// SPI.endTransaction();
}
void setup() {
eve_hw_init();
eve_init();
}
void loop() {
// put your main code here, to run repeatedly:
}