ILI9341 scoop

39 views
Skip to first unread message

Hans van Veldhuizen

unread,
Jan 19, 2026, 1:47:33 PMJan 19
to jallist
Hi everyone,
A long time ago, I was playing around with an ILI9341. I thought I could make a simple scope with it, but of course, that's not going to work! Has anyone ever made something like this?
Greetings
Hans

Hans van Veldhuizen

unread,
Jan 20, 2026, 2:02:18 PMJan 20
to jallist
I tested 16f18857_touch_interrupt_ads 7843.jal examples in my 16F18877 with identical pinout. An analog input provides 80 measurements that are neatly displayed as waveforms/squares, etc. I'd like to set the measurement frequency with a touch slider, but I can't.

Op maandag 19 januari 2026 om 19:47:33 UTC+1 schreef Hans van Veldhuizen:

Rob CJ

unread,
Jan 21, 2026, 12:51:15 PMJan 21
to jal...@googlegroups.com
Hi Hans,

So you already have something to display, that's nice. Are you saying that the touch sample program does not work at all?

Kind regards,

Rob

Van: jal...@googlegroups.com <jal...@googlegroups.com> namens Hans van Veldhuizen <hanz...@zeelandnet.nl>
Verzonden: dinsdag 20 januari 2026 20:02
Aan: jallist <jal...@googlegroups.com>
Onderwerp: [jallist] Re: ILI9341 scoop
 
--
You received this message because you are subscribed to the Google Groups "jallist" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jallist+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/jallist/67ebc72d-5e23-4473-afae-d575d5632811n%40googlegroups.com.

Hans van Veldhuizen

unread,
Jan 21, 2026, 3:58:35 PMJan 21
to jallist
Hi Rob,
I've got the toy working so far, but initially I thought I could set the time with the touch.
 That's not working at all, so I resorted to an old-fashioned potentiometer.
 It still bothers me that it can't be done with the touch. If you're interested, here's what I have now.
Regards,
Hans

Op woensdag 21 januari 2026 om 18:51:15 UTC+1 schreef Rob CJ:
OSC__touch14.jal

Rob CJ

unread,
Jan 23, 2026, 1:11:55 PMJan 23
to jallist
Hi Hans,

Your code does not include the-glcd_touch_ads7843 library and I am also missing the interrupt part.

Have a look at the sample file 16f18857_touch_interrupt_ads7843.jal to see how it works.

Kind regards,

Rob



Verzonden: woensdag 21 januari 2026 21:58
Aan: jallist <jal...@googlegroups.com>
Onderwerp: Re: [jallist] Re: ILI9341 scoop
 

Hans van Veldhuizen

unread,
Jan 23, 2026, 3:39:48 PMJan 23
to jallist
Hi Rob, I tested the 16f18857_touch_interrupt_ads 7843.jal on this circuit and it worked perfectly. I tried to use these elements on my scope, but I couldn't. So I removed most of the touch and added the potentiometer. That's the file I'm using now.

Op vrijdag 23 januari 2026 om 19:11:55 UTC+1 schreef Rob CJ:
Message has been deleted

Rob CJ

unread,
Jan 25, 2026, 12:35:29 PMJan 25
to jallist
Hi Hans,

I do not understand this program. If you want to use the touch screen of the ili9341 you have to include the glcd_toch_ads7843.jal touch library next to the ili9341 since these are two different devices.

Have a look at sample 16f18857_touch_ads7943.jal that uses both the ili9341 and the touch screen.

Kind regards,

Rob


Verzonden: zondag 25 januari 2026 17:02
Aan: jallist <jal...@googlegroups.com>

Onderwerp: Re: [jallist] Re: ILI9341 scoop
 
old one, touch does not work

Op vrijdag 23 januari 2026 om 21:39:48 UTC+1 schreef Hans van Veldhuizen:

Hans van Veldhuizen

unread,
Jan 25, 2026, 2:29:48 PMJan 25
to jallist
Absolutely right, Rob, it's a mess. I'll clean it up.

Op zondag 25 januari 2026 om 18:35:29 UTC+1 schreef Rob CJ:

Hans van Veldhuizen

unread,
Jan 26, 2026, 5:01:00 AMJan 26
to jallist
corrected version but no touch reaktion

Op zondag 25 januari 2026 om 20:29:48 UTC+1 schreef Hans van Veldhuizen:
OSC__touch_V12.jal

Rob CJ

unread,
Jan 26, 2026, 1:09:38 PMJan 26
to jallist
Hi Hans,

It looks OK. What you can do to get a better idea about what is working and what not, could you write something to the LCD as follows:

if new_touch_data then

  -- Indicate a touch
  ili9341_goto(100,100) 
  print_string(glcd, "Touch!"

  if ads7843_get_touch_coordinate(touch_x, touch_y) then
     ads7843_touch_to_display_coordinate(touch_x, touch_y, pixel_x, pixel_y)

   -- Now write them to the screen.
   ili9341_goto(180,150)
   print_word_dec(glcd, pixel_x)
   ili9341_goto(180,180)
   print_word_dec(glcd, pixel_y)

Because later you have an if statement that compares value and if that if-statement does not return TRUE you see nothing on the screen but you also do not know if it is working at all. Always debug a program in the smallest possible steps.

Can you let me know what happens after adding that code?

Thanks.

Kind regards,

Rob


Verzonden: maandag 26 januari 2026 11:00

Hans van Veldhuizen

unread,
Jan 26, 2026, 3:23:37 PMJan 26
to jallist
Nothing to see after adding : 
     -- Update slider positie en delay
procedure update_slider() is
   var word touch_x, touch_y, pixel_x, pixel_y
   ------------------------------------------------------------------------------

------ BUG find ------------------


if new_touch_data then

  -- Indicate a touch
  ili9341_goto(100,100)
  print_string(glcd, "Touch!")

  if ads7843_get_touch_coordinate(touch_x, touch_y) then
     ads7843_touch_to_display_coordinate(touch_x, touch_y, pixel_x, pixel_y)

   -- Now write them to the screen.
   ili9341_goto(180,150)
   print_word_dec(glcd, pixel_x)
   ili9341_goto(180,180)
   print_word_dec(glcd, pixel_y)
   
 end if
 end if
   
   
------------------------------------------------------------------------------------
   if new_touch_data then

Op maandag 26 januari 2026 om 19:09:38 UTC+1 schreef Rob CJ:

Rob CJ

unread,
Jan 27, 2026, 12:43:17 PMJan 27
to jal...@googlegroups.com
Hi Hans,

So it seems you do not get an interrupt. To which pin is the interrupt connected?

Kind regards,

Rob


Verzonden: maandag 26 januari 2026 21:23

Hans van Veldhuizen

unread,
Jan 27, 2026, 4:15:09 PMJan 27
to jallist
Rob, I'm playing Tango for Two. I load your sample, and it correctly displays the touch values, and then, without any hardware modifications, the scoop file, which doesn't respond to the touch. I've done this multiple times. What I've noticed is that in both cases, I have to disconnect the Picklit3 from the board to get them both working.

Op dinsdag 27 januari 2026 om 18:43:17 UTC+1 schreef Rob CJ:
Reply all
Reply to author
Forward
Message has been deleted
0 new messages