hx8357d spi lcd with arduino uno: works perfectly, first tim

EL Wire/Tape/Panels, LEDs, pixels and strips, LCDs and TFTs, etc products from Adafruit

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
lkcl
 
Posts: 6
Joined: Thu Apr 18, 2013 12:23 pm

hx8357d spi lcd with arduino uno: works perfectly, first tim

Post by lkcl »

hi, i just wanted you to know that with the instructions given on the web site i was able to get the spi-based HX8357D LCD up and running in under 15 minutes. the source code is here:
http://git.rhombus-tech.net/?p=eoma-fir ... o_spi_test

i had to make a number of modifications to the adafruit hx8357d library, as well as to graphicstest.ino. firstly: graphicstest.ino did *not* compile, because the functions named testText etc. had not been declared in advance. moving setup and loop to the *end* of the file fixed that.

secondly, i am experimenting as a way to get a yunlea spi-based hx8357d LCD up and running with an STM32F072, which has had hard-coded IM2,1,0 to 1,0,1 - that's a *nine* bit SPI for writes and an *eight* bit SPI for reads. sounds bizarre, but the MSB of the write is what's used instead of the "D/C" line.

so i have modified the adafruit hx8357d library so that if "DC=-1" and you elect to use software bit-banging SPI, you do *not* need the extra D/C line, freeing up one more GPIO. i *might* later investigate how to do hardware 9-bit SPI writes, but for now i have enough to move on to the next phase of the project i am working on. this message therefore serves as a courtesy to others should they find themselves in a situation where they need just the one more GPIO line than the unmodified library from adafruit permits.

the makefile was found with a google search "debian arduino uno makefile" - i do not believe it to be sane to compile code for devices that have only 16 to 32k of memory using a graphical tool that is TEN THOUSAND times more storage and memory requirements than the target. "apt-get install gcc-avr binutils-avr avrdude avr-libc" and "apt-get install arduino-core arduino-mk" installs in hardly any time and storage.

also to get the 9-bit mode, freeing up the D/C GPIO line, it was necessary to short between GND and "IM1", which sets SPI "3-wire" mode according to the HX8357D datasheet.

lkcl
 
Posts: 6
Joined: Thu Apr 18, 2013 12:23 pm

Re: hx8357d spi lcd with arduino uno: works perfectly, first

Post by lkcl »

hi folks i thought people might appreciate knowing that the laptop that this hardware was bought for has gone live on http://crowdsupply.com/eoma68/micro-desktop and that i've added a "breakout" board for the EOMA68-A20 robust credit-card-sized fully-functioning computer as well.

Locked
Please be positive and constructive with your questions and comments.

Return to “Glowy things (LCD, LED, TFT, EL) purchased at Adafruit”