laanwj / k210-sdk-stuff

Kendryte K210 / MaixGo stuff
ISC License
141 stars 31 forks source link

Hardware Support #5

Closed leo60228 closed 4 years ago

leo60228 commented 5 years ago

Is the MAix Bit supported by the graphical examples? It seems to have very similar functionality to the Go you're using, but I'm not sure if the pinout is similar enough.

laanwj commented 5 years ago

it looks like the pinout for the LCD pins is slightly different (see the blue pins to the bottom right):

This is for the M1: pinmap

This is for the new one:

Assuming they do use the same LCD module, it should be a matter of changing the pin assignments in rust/k210-shared/src/board/def.rs:

/** I/O pins for FPIOA */
#[derive(Copy, Clone)]
pub enum io {
…
    /** LCD chip select (output) */
    LCD_CS = 36,
    /** LCD reset (output) */
    LCD_RST = 37,
    /** LCD Data/Command */
    LCD_DC = 38,
    /** LCD SPI SCLK */
    LCD_WR = 39,
…
}

It has turned out that Maix's documentation diagrams are not always 100% reliable though. I think easiest way to know how to adopt it would be to look at the difference for the Maix-provided C samples for the boards, see what pin numbers they provide to the fpioa set function commands.

laanwj commented 5 years ago

Here's a detailed schematic http://dl.sipeed.com/MAIX/HDK/Maix-Bit/Maix-Bit_1.09/Maix-Bit_1.09%28Schematic%29.pdf, which seems to have the same pin numbers as Maix Go:

LCD_CS 36
LCD_RST 37
LCD_DC 38
LCD_WR 39

It mentions nowhere what exact kind of LCD is used though. Whether this "8bit MCU LCD" is the same ST7789V. As it's the same dimensions and 320×240 resolution I wouldn't be surprised if it was.

Another spec document: http://dl.sipeed.com/MAIX/HDK/Maix-Bit/Specifications/Sipeed%20Maix-BIT%20Specifications_EN%20V2.0.pdf seems it confirms the LCD pins are unswizzled.

leo60228 commented 5 years ago

I'm getting mine in about a week. Do you think it would be safe to just try the examples and see if they work?

laanwj commented 5 years ago

I don't think that can do anything really harmful, no. It's similar enough.

Looking at the schematic there are some components missing such as the I2C bus on io_30/io_31. So the acceleratometer/touch screen is not going to work. But only a few of the demos rely on that.

laanwj commented 5 years ago

Please let me know how it goes !