9 years, 3 months ago.

Display option

Hi Motoo

This looks good! I have the HY28B (ILI9320) display, would this work with this using the correct library? What bandwidth and horizontal speed can you achieve?

Paul

Question relating to:

A simple oscilloscope using Adafruit 2.8" TFT with touch. Runs on FRDM-KL25Z, FRDM-K22F, FRDM-K64F, NUCLEO-F411RE. 2 channel analog inputs with 4 trigger modes and time division. FRDM-K64F, FRDM-KL25Z, NUCLEO-F411RE, TFT, touch, trigger, with

On a related note: We really should make a standard TextDisplay and GraphicsDisplay repository instead of including slightly different versions in every TFT library. If thas the case then there would be no need to wonder if it would work also on another display.

posted by Erik - 10 Jan 2015

2 Answers

9 years, 3 months ago.

Dear Paul-san,

Thank you very much for having interest in my program.

First of all, I agree with Erik-san's comment, too. If we had standard Display or TFT class it would be very nice. Anyway, this time I was occupied to implement what I wanted to my hardware and could not think about reusability, I'm sorry for that.

I have just downloaded my code and ran grep and found following functions are used SPI_TFT_ILI9341 TFT library TFT.background(), TFT.cls(), TFT.fillrect(), TFT.foreground(), TFT.line(), TFT.locate(), TFT.printf(), TFT.rect(), TFT.set_font()

SPI_STMPE610 TSC library TSC.getPoint()

So if there is/are counter part functions of these 9 TFT library functions porting won't be very hard. Although you have to tweak the positions to fit in your TFT module(s).

Meantime, for the touch sensor, the only function used is getPoint, which returns true for return value when touch sensor is touched along with the x, y (, and z) location in TFT pixel location.

As for the speed of ADC. The ADC on KL25Z is supposed to be able to sample up to around 800K sample per second. But with my trial I could get as fast as 20us per sample. And when taking care of trigger, it required at least 30us or program stalled. Although for the trigger mode NONE 20us worked OK, to be in the safer side, I set the minimum to 30us/sample.

And in the display I put grid on each 10 pixels which makes the minimum time division per grid 300us. Since the data length of each signal is 198 (200 pixel frame - 2 frame pixels) x 30us = 5,940 us = 5.9ms per horizontal sample, but sampling stops while updating the chart. (did I answer your question?)

Best Regards, 11-Jan-2015 (JST) moto

Accepted Answer

Yes, thank you, you have answered my question. Those display functions are much the same, so with very few changes it would work. I will give it a try! Paul

posted by Paul Staron 11 Jan 2015
9 years, 3 months ago.

I concur with Erik's remark.
As the ILI9320 library is a spin-off from Peter Drescher's library (also uses Simon Ford's graphicslibrary and textlibrary), i believe it won't be that hard to make it work.
Note : I am currently reworking the ILI9320 library to add 8/16 bit parallel support. ILI9325/28 SPI is already present, i only need to add parallel support.

Hi Frank, that's good news with parallel support!

posted by Paul Staron 11 Jan 2015

I'm also looking for a LCD library for my projects and having used UTFT on my arduinos was keen on getting Todor's code working but I've not had the time to work out why it wasn't working for me. I did notice that the UTFT library now supports the Teensy platform and in theory it should work for other mbed platforms as well.

posted by Michael Bawden 11 Jan 2015

I will create a new library (ILI932x) as there will be many changes : the current lib already supports ILI9325/28 and parallel support will be added, so the name no longer fits. While i'm at it, i'm also looking at separating the graphic primitives from low-level I/O. I started a new topic here.

posted by Frank Vannieuwkerke 11 Jan 2015