Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working on SAM3x8E (Arduino Due) -- changes to get it working #8

Open
martinzw opened this issue Mar 26, 2019 · 0 comments
Open

Comments

@martinzw
Copy link

ILI9225.c

I tried to get my (china) ILI9225 working with ASF and this lib on "Arduino Due" with it's SAM3x8E controller and it's hardware SPI0.
After days of research I found, why it does not work:

  1. SPI_MODE_3 instead of 1 has to be chosen (CLK-Signal idle high; capture on rising CLK)
  2. 8 bits per Transfer has to be selected (do not switch it back to "default 16Bit" as noted in ili9225_write_cmd-function!!)
  3. write_ram and write_ram_buffer functions have to call "spi_write" twice, one time for High-Byte, one time for Low-Byte of the uint16_t-Data:
    spi_write(BOARD_ILI9225_SPI, us_data>>8, BOARD_ILI9225_SPI_NPCS, 0); //High-Byte
    spi_write(BOARD_ILI9225_SPI, us_data&0x00FF, BOARD_ILI9225_SPI_NPCS, 0); //Low-Byte
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant