Teensy 4.0 First Beta Test

Status
Not open for further replies.
I did it in sketch - thus my wonder about it having been reset by then - it was written as two steps {read,Print} and I merged to post the code. The T_3.x code works fine in sketch AFAIK it is a static thing, unlike what maybe the manual page suggest for this SRC_SRSR that may be violated/volatile.

More soon
 
For what it is worth, I have migrated some of my ili9341_t3n code that makes it run on the T4 beta into a new branch of the ili9341_t3 library:

https://github.com/KurtE/ILI9341_t3/tree/T4_Beta

It appears to work on my my T4 board using default CS=10, DC=9 of GraphicPaint program.

It should run faster if DC=10... And note: it should run on any digital pins for CS/DC... Won't be as fast as T3.x, but...

I will do a PR of it soon, but would be good if one or more people took it for a "SPIN" (Not that use SPIN library here) to make sure it works for them and that I did not break them for T3.x.

Note: This also did pull in changes where it should run on T3.x where CS is not hardware CS pin... (Still requires DC to be on one...)

Kurt
 
@KurtE - downloaded as ZIP will give it a try … would have been handy a couple hours ago ;) - I started edits to get _t3N version to compile and it cascaded quickly ...
 
@Robin,
In my experience of hand-carrying expensive R&D equipment between US and Europe, you absolutely need to state the value as zero dollars. Any other value will/could be used to calculate customs. Seemingly too low values can result in goods held until proper documentation arrives. It does not help to state that the recipient is not to pay the value. Customs is simply based on value, not who is paying.
Anyway, this type of equipment truly has zero monetary value and customs understands that. It helps if the magic wording is on the papers. Wish I remember what I used back in the old days. Pretty sure they were Proforma Invoices. Again the crucial thing is ZERO dollars. Contacting a shipping handler would sort this out for you.
Just my five cents, hopefully helpful. And thanks PJRC and all on this thread putting in the hours! Much appreciated. Looking forward to buying 4.0 with real money;)

edit: "No commercial value" is part of the magic wording, I believe.
 
Last edited:
@KurtE - downloaded as ZIP will give it a try … would have been handy a couple hours ago ;) - I started edits to get _t3N version to compile and it cascaded quickly ...

@KurtE/@defragster
Sorry guys after my frustration with touch today need a break and just everything reorganized. Ordered one of PRJC's ILI9341 boards, plus designed a ILI9341 ardunio style shield for my T3.5/T3.6 breakout boards (should also work with the T4 breakout I have). Tomorrow soldering up Frank's Teens64 and then back to testing. Will give the _t3 lib a try tomorrow with the T3x's.
 
@mjs513 totally understand the frustration, I should also organize my office as right now it feels more like an electronics hoarder area :eek:
 
Doubly so for me @mjs513 … I'm still stuck from my post last week. I had a working display on a breadboarded T4 ... Which is okay except trying to test USBHost and work with display with the cool folks.

I just marked and pulled off my Serial Debug wires to two T_3.1's so I could get the breakout alone on a lighted usable work surface - mapped the pins and matched the labels as best I could confirming with DVM.

That Breakout is just odd - I got the wrong idea since Audio adapter plugged and worked that it just connected the T4 pins ... I knew some were off ... but so many moved/missing ... have to check my wires again

Made a color coded map to pins needed to my new jumper set to the Purple PJRC OSH display board (get power to LED and RST and minimally wired to pullup SPI pins and share them so I could plug a display on and off the header. Like worked when wired to T_3.6 before for 9341 and 9488.

Backlight powers and not pure white - so controller has power … but no visible signs of data.

@KurtE - what Touch code is in the 'ILI9341_t3\examples\breakouttouchpaint\breakouttouchpaint.ino' - where does #include "TouchScreen.h" come from. Why does it use Analog pins? Don't you have ILI9341 with XPT2046 controller? Then in '\ILI9341_t3\examples\touchpaint\touchpaint.ino' it does "#include <Adafruit_STMPE610.h>" … that is just weird :)
 
Hi @defragster and @mjs513 ... (As I just mentioned in the bluetooth thread) Again last night I wondered if I had not been clear when I mentioned using the touch paint program, that I am using my version touchpaint_xpt2046 in the ili9341_t3n library, There is no examples currently released in the ili9341_t3 library that uses this touch controller... There is a PR that I did two years ago, that had a copy of TouchPaint_xpt2046 that was specific to the ili9341_t3 library (March 15, 2017), which is still pending...

The Adafruit display used/uses the STMPE chip..
 
Hi @defragster and @mjs513

I found that out yesterday when I was trying to debug the problems I was having with touch. As I mentioned I figured out that all I had to do was change the library to touch_xpt2046. Forgot to mention it with everything else I had going on but with @Frank B's Teensy64 board touch is now working for me. Thought I had tried everything yesterday with wires and breadboard but guess not.

Thank you Frank for a great board. I love it.
 
Made a local copy of :: T:\tCode\T4\touchpaint_xpt2046\touchpaint_xpt2046.ino

Still no Joy - maybe my wires need to be checked it power and grays the screen - not pur white - and Serial Out shows and when I touch the LED dims since it isn't monitoring TIRQ

Changed to where I have the wires mapped in code below - here is what I found on my breakout? Am I confused?

I found that it is very confusing mapping the breakout - not all agree with comment below?:
T4# (BreakoutName #pin)
9(MEMCS #6)
11(MOSI #7)
4(BCLK #9)
5(MCLK #11)
3(LRCLK #23)
2(Tx #22)
13(SCK #14)
To avoid confusion for Touch:
#18 Touch CS (SDA #18)
#19 TIRQ (SCL #19)


Code:
//tt #include <ILI9341_t3n.h>
#include <ILI9341_t3.h>

#if defined(__IMXRT1052__) || defined(__IMXRT1062__)
// On Teensy 4 beta with Paul's breakout out: 
// Using pins (MOSI, MISO, SCK which are labeled on Audio board breakout location 
// which are not in the Normal processor positions
// Also DC=10(CS), CS=9(MEMCS) and RST 23(MCLK) TOUCH_CS=21(BCLK)
#define TFT_RST 255 // tt 23
#define TFT_DC 9 // tt 10
#define TFT_CS 10 // tt 9
#define TFT_SCK 13
#define TFT_MISO 12
#define TFT_MOSI 11
#define TOUCH_CS 18 // tt 21
#endif


[B]XPT2046_Touchscreen ts(TOUCH_CS, 19); // tirq 19[/B]
// tt ILI9341_t3n tft = ILI9341_t3n(TFT_CS, TFT_DC, TFT_RST, TFT_MOSI, TFT_SCK, TFT_MISO);
[B]ILI9341_t3 tft = ILI9341_t3(TFT_CS, TFT_DC, TFT_RST, TFT_MOSI, TFT_SCK, TFT_MISO);[/B]
 
Touch seems to work - but I have not displayed pixels yet ...

I don't know what :: ts.bufferEmpty() does - but it does not stop POLLING when TIRQ given?

With TIRQ set this prints MAPPED values with that uncommented - only when Touched.

The LED goes off - there is some ANOMOLY where it will stick on - which AFAIK is the IRQ RACE - each test sets IRQ - but IRQ disabled when no touch - but somehow IRQ set comes again and it stutters the LED on until touched again ... This is worse on T4 - but I think I saw it in T3.6 the other week and where I was going when things made me take a break ...

Code:
[B]#define TS_MINPRESS 800 // Z Pressure return minimum to use point[/B]


void loop()
{
[COLOR="#FF0000"]
 [B] // NOT SURE What this is to do ???[/B]
  // See if there's any  touch data for us
  if (ts.bufferEmpty()) {
    return;
  }
[/COLOR]
  // You can also wait for a touch
  /*
  if (! ts.touched()) {
    return;
  }
  */

  // Retrieve a point
  TS_Point p = ts.getPoint();
  [B]if ( p.z > TS_MINPRESS ) {[/B]  [COLOR="#FF0000"]// ADD THIS TEST and block off the code below[/COLOR]
//...

// Add } at end func()
 
@defragster
Interesting on graphics but no touch.

Using Kurt's mods for ILI9341_t3 I ran graphicstest worked. All the demos after cube3d failed in one form or another. Didn't run, screen just showed vertical bars, plasma yellow was red.. etc

EDIT: Trying to use backlit pin on anything didn't work

Just to make sure - this is testing with T4
 
@mjs513 - Touch - but no graphics … Yes … T4 - anxious to get the wiring right to have and compare … will do it with Teensy64 later … have to migrate the mapping for that …
 
Last edited:
@KurtE/@defragster
Using the Teensy64 graphicsTest from the ili9341_t3n library works fine all tests ran and displayed graphics.

Using the Teensy64 with the new ILI9341_t3 lib fails - nothing runs....
 
@defragster
Interesting on graphics but no touch.

Using Kurt's mods for ILI9341_t3 I ran graphicstest worked. All the demos after cube3d failed in one form or another. Didn't run, screen just showed vertical bars, plasma yellow was red.. etc

EDIT: Trying to use backlit pin on anything didn't work

Just to make sure - this is testing with T4
I am trying to remember Frank's configuration of back light pin. But If I remember correctly I borrowed it onto my own board. I think there are a couple of transistors, that control the brightness.

Which I then have my (probably never to be completed well monitor program) code that uses analogWrite to the backlight pin.
Where I believe in my code: to turn the backlight fully on: analogWrite(TFT_BACKLIGHT, g_backlight_value);

To turn the display almost off: analogWrite(TFT_BACKLIGHT, 240);

I then have a timer running that if the touch display had not been touched in some period of time, I decrease the brighness (increase the analogWrite value by 16...)
 
@KurtE/@defragster.

Thanks for the explanation. That was the first time I saw. After your explanation I google it :) In the demosauce sketch its backlight is just turn on (1023) and left on so its pretty much a no player.

What concerns me more is that with this pin configuration:
Code:
#define TFT_RST 255
#define TFT_DC 20
#define TFT_CS 21
#define TFT_SCK 14
#define TFT_MISO 39
#define TFT_MOSI 28
for the Teens64, graphics test does not run but if I use the ILI9341_t3n library no problem.
 
Hi @mjs513 - I think there may have been at least one merge issue when I pulled in the stuff to support T4...

I pushed up a change, which appears to be working on the C64 board I have... You might give it a try.
 
Evening @KurtE

That last push did the trick its working now - Graphicstest and DemoSauce :) More testing tomorrow :) Think I am done for the night - maybe :)

@KurtE:
EDIT: I just tried to rerun the same tests (graphics and Demosauce) for the T4 but now I am getting errors on:
Code:
KINETISK_SPI0...….
Think maybe something broke when you pushed the other previous change?

BIG UPDATE: My fault - download wrong branch - sorry..... Both working now. Although, after sphere3d everything fails to plot on the T4
 
Last edited:
Sphere3d? Where is this one?

@mjs513, @defragster, and @Paul - My guess is hopefully good enough for PR So just issued one: https://github.com/PaulStoffregen/ILI9341_t3/pull/52
Shere3d is one of the animations in demosauce.ino that is in the examples folder.

Think it is good enough for the PR based on the tests so far

EDIT:
@KurtE - made one change to DemoSuace.ino and it working so all demo animations work. The change was not associated with the ILI9341_t3 library
 
Last edited:
I pulled it down - will run it at least on FB_Teensy64 … knowing it should work I'll look at wiring to T4

Can my breakout wire notes in p#2135 be confirmed/corrected?

update: Looks Good> Did two samples on T_3.6 powered FB_Teensy64 and it runs fine. Did BuhdaBrot without custom 'n' funcs() and A Touch tester sketch
 
Last edited:
I pulled it down - will run it at least on FB_Teensy64 … knowing it should work I'll look at wiring to T4

Can my breakout wire notes in p#2135 be confirmed/corrected?

update: Looks Good> Did two samples on T_3.6 powered FB_Teensy64 and it runs fine. Did BuhdaBrot without custom 'n' funcs() and A Touch tester sketch

Morning @defragster

Sorry Tim missed that one. This is what I have for pin mapping on the T4:
Code:
MISO = 12
MOSI = 11
CS = 10
MEMCS = 9  -- dc
SCK = 13
SDA = 18
SCL = 19
MCLK = 23  ----rst
BLCK = 21

EDIT: Wanted to ask if your audio switch is set to I2S1 and you didn't move it by accident? That might prevent the graphics from working.
 
Last edited:
Shere3d is one of the animations in demosauce.ino that is in the examples folder.

Think it is good enough for the PR based on the tests so far

EDIT:
@KurtE - made one change to DemoSuace.ino and it working so all demo animations work. The change was not associated with the ILI9341_t3 library

In case anyone else tries this with the T4 beta hooked up the way some of us have... I first built and ran the demosause.ino and nothing showed up on the screen...

Then noticed that they had the BACKLIGHT_PIN defined as 23, which is the pin I have my screens reset pin connected to... I changed that to 21 instead (and used 23 as reset) and it looks like the demo is working... (Don't have a microphone hook up yet... And backlight is currently is just going to power...
 
@KurtE is right - while I got it working I forgot to tell everyone what you had to do - just assumed. I am attaching the whole demosauce.ino for you all if you want to give it a try. The sketch really gives the screen a workout. I also changed the analog read microphone line to make it provide a random between 0-1023 to simulate a mic.

Thanks Kurt for clarifying.
 

Attachments

  • DemoSauce.zip
    25.3 KB · Views: 70
Morning @defragster

Sorry Tim missed that one. This is what I have for pin mapping on the T4:
Code:
MISO = 12
MOSI = 11
CS = 10
MEMCS = 9  -- dc
SCK = 13
SDA = 18
SCL = 19
MCLK = 23  ----rst
BLCK = 21

EDIT: Wanted to ask if your audio switch is set to I2S1 and you didn't move it by accident? That might prevent the graphics from working.

Saw this go by - but computer was busy updating other software so have not re-re-re-checked wire mapping yet.

That switch did get flipped - since it was there - but right now 'is set to I2S1'.

One thing I see against my notes:
You show :: BLCK = 21
my notes :: SHOWED BCLK hitting on T4 Pin #4

Just pulled T4 from Breakout and now I see NO connect from BCLK header pin to any T4 header pin? IIRC when I was testing to find it on T4's pin #4 it was intermittent at times.

That pin is not vital to use - at least in my case where I was using 18/19. But it does suggest that my Beta_BreakOut might have been damaged in (ab)'use' from bad assumption in mapping and dropping that pinned Osh Purple display board in the headers.
 
Status
Not open for further replies.
Back
Top