teensyduino and Multi-Inno MI0283QT-9A display/touchscreen

Status
Not open for further replies.

mike081

New member
Hi,
has anybody used a Multi-Inno MI0283QT-9A display with teensy(2++ or 3) and Arduino(teensyduino 1.0.5)?
I'v got the display from here: http://www.watterott.com/de/MI0283QT-2-Adapter
A Arduino Library (as part of an SD-shield) is here: https://github.com/watterott/mSD-Shield/tree/master/src

An older MI0283QT-2 did work flawlessly.
The new one seems not to listen to the SPI commands. (The touchscreen controller does work though...)

The problem might be that the older display uses the controller HX8347D whereas the newer one uses the ILITEK’s I9341 controler.
One difference is that the I9341 needs 9bit SPI transfers (the first bit states if the next byte its a command or data transfer)...

Is a 9bit SPI transfer possible with the Arduino SPI library?

Any hints would be helpful.

Thanks in advance!

---
Michael Reifenberger
 
The Arduino SPI library does not support 9 bit SPI on any board. The library API is only 8 bit transfers.

9 to 16 bits are possible on Teensy3, but you'll have to directly access the native SPI registers.

Are you sure it's really 9 bit SPI? That's very uncommon. It probably would not work with any normal Arduino board. I'm not saying it's impossible, but that seems pretty unlikely.
 
The Arduino SPI library does not support 9 bit SPI on any board. The library API is only 8 bit transfers.

9 to 16 bits are possible on Teensy3, but you'll have to directly access the native SPI registers.

Are you sure it's really 9 bit SPI? That's very uncommon. It probably would not work with any normal Arduino board. I'm not saying it's impossible, but that seems pretty unlikely.

Unfortunately yes.
The ILI chip seems to be able to be programmed in different parallell/seriall modes and watterott decided to spend a additional CMD/DATA SPI bit instead to modify the HW interface and spend a
additional CMD/DATA data pin.
So the 9th bit differentiates between cmd/data.

Here the relevant source fragments:
...
void MI0283QT9::wr_cmd(uint8_t cmd){
CS_ENABLE();
//9th bit
MOSI_LOW(); //cmd
CLK_LOW();
#if defined(SOFTWARE_SPI)
CLK_HIGH();
#else
SPCR &= ~(1<<SPE); //disable SPI
CLK_HIGH();
SPCR |= (1<<SPE); //enable SPI
#endif
wr_spi(cmd);
CS_DISABLE();
return;
}
void MI0283QT9::wr_data(uint8_t data){
CS_ENABLE();
//9th bit
MOSI_HIGH(); //data
CLK_LOW();
#if defined(SOFTWARE_SPI)
CLK_HIGH();
#else
SPCR &= ~(1<<SPE); //disable SPI
CLK_HIGH();
SPCR |= (1<<SPE); //enable SPI
#endif
wr_spi(data);
CS_DISABLE();
return;
}
...

I would like to replace all occurances of the register handling with high level SPI calls like I did with the previous display type.
That would be much cleaner and more portable between the different teensy's...

How can this be resolved for the teensy3?

Thanks!

Greetings
---
Michael Reifenberger
 
Status
Not open for further replies.
Back
Top