Teensy 4.0 First Beta Test

Status
Not open for further replies.
As 6 extra IO pins with special functions may be more valuable to me than SD access...

Those pins do provide access to another completely independent SPI port. All the other features on those pins appear to be more or less duplicates of stuff we already have, or stuff that isn't very useful without other pins we don't have.
 
@Kurt, Tim:
I played a bit with the ILI9488 this evening.

The optimal connections are a bit different:

- Best brightness with VCC connected to 5V (attention, all other pins 3v3 max!!)
- LED connected to 3v3 without resistor - LED Pin draws 2.5mA on my display - so driving with a MCU Pin for PWM seems possible.
- Touch MISO + Display MISO connected together does not work. Touch works if display MISO is disconnected (its not needed anyway)
- Total consumption on 5V pin 60mA
- Hardware reset not needed, command 0x01 (Reset command) + 5ms delay is OK. Reset connected to 3v3 is perfectly OK.

@Paul: Are there any SMD parts in the area between the USB-Host pads and SD pads ?
 
Are there any SMD parts in the area between the USB-Host pads and SD pads ?

Nope. I kept all that space clear of parts on the bottom side. Likewise on the other side where the 10 extra pads are located. All the bottom side parts in the middle, mostly underneath the BGA.
 
So it might be possible to attach a small PCB (with the SD slot) which increases the distance (height) to the main USB a little bit and with traces to the left or right outside for the USB Host and the needed chip - correct? :)
 
With pogo pins, the steel spring is encased in a steel tube with nickle & gold plating. Most of the electrical conduction is probably through the plating materials on the surface, partly because they're lower resistance than steel, partly because skin effect at high frequency.

One thing that I find helps a whole lot when dealing with test pads, is to have a via in the center that can accept the pogo pin tip. I try to avoid test points though, and just use full thruholes instead, since blind vias can get a bit expensive. Another thing that helps are registration pins and holes.
image-20181212_145955.jpgimage-20181219_104106.jpg
 
Has anyone experience with springs like this: https://www.mtc.de/en/emc-metal-parts/smd-contact-springs or knows where I can buy some?
Are they OK for manual soldering?

Best to use a rework station, if you *must* do it manually. Otherwise use the reflow oven.

Note that there is a registration hole on these connectors sometimes.
For a small additional cost, the board fab should be able to do selective copper buildup. That way the part is at least going to be on-center. Having the parts rotate on you can be a bit of a pain, though.
 
:) I give it a try:)
...and I'll mail the manufacturer of these springs and ask for some samples for an alternate solution. They are here in Germany.
 
@PaulStoffregen

Quick question - will there be a trace between VUSB and VIN that can be cut for external power like on the T3x? Not sure if I saw this anywhere?
 
Is it possible to use I2S1 with a external MCLK? (MCLK from an other chip)? (Is MCLK needed at all?)
 
Last edited:
Is it possible to use I2S1 with a external MCLK? (MCLK from an other chip)? (Is MCLK needed at all?)

This depends on the device.
I have ADCs that do not require a MCLK so I do not provide MCLK.
I use some Analog Devices ADCs (e.g. AD7982) that only expect BCLK.

The most 'extreme' application I have, is a cirrus ADC, where I provide a MCLK, but let the cirrus be the master. that is, Teensy I2S is configured as slave.
this was necessary as I needed BCLK to be equal to master clock, something Teensy cannot do (BCLK is at most MCLK/2).
So it is possible to use any clock to be a MCLK (for the device).
However, you need internally MCLK to derive BCLK, but as I said, if the device does not expect MCLK, you do not need it to provide it.
 
my question was, wether teensy (as slave) needs the mclk or not :) I guess yes, but I'm not sure.
the other question was, if it is possible to use I2S1 with external mclk (as master, perhaps)
 
my question was, wether teensy (as slave) needs the mclk or not :)

I can answer this one. Not. MCLK is unnecessary for Teensy in I2S slave mode.


the other question was, if it is possible to use I2S1 with external mclk (as master, perhaps)

This one, I'm not so sure.

But I can tell you, I tested using SGTL5000 on I2S2, with I2S1's MCLK. Worked well. This was a big part of the decision to swap pins 5 & 33, so I2S2 has BCLK, LRCLK, TX & RX on the outside pins and I2S2's MCLK is on pin 33 on the bottom side pads.
 
Before I dig deeper:
- is there a chance that I can use the T4 to control a TFT with 6800- or 8080-style parallel interface? The display I'm considering needs at least 8 data lines. 9, 12, 16, 18 and 24 are also supported - if the T4 provides them.
- How much memory would I have available for a frame buffer?
 
Morning All

Over on the ILI9341_t3n thread I posted a test code to generate what is known as a Buddhabrot - kind of a negative fractal, https://forum.pjrc.com/threads/3875...-(ILI9341_t3n)?p=201873&viewfull=1#post201873. The code was adapted from something I found on the web to run on the T4. Note it should run on a T3.5/3.6 as well. Here is a sample image:
20190329_091919.jpg

Wanted to show an actual application using a T4. It does run pretty quick and the limitation is the max size of the pixel (240,240).
 
Morning All

Over on the ILI9341_t3n thread I posted a test code to generate what is known as a Buddhabrot - kind of a negative fractal, https://forum.pjrc.com/threads/3875...-(ILI9341_t3n)?p=201873&viewfull=1#post201873. The code was adapted from something I found on the web to run on the T4. Note it should run on a T3.5/3.6 as well. Here is a sample image:

Wanted to show an actual application using a T4. It does run pretty quick and the limitation is the max size of the pixel (240,240).

It does run on T_3.6 at same 240x240 pixels - adjusted pins to FrankB's Teensy64 TFT setup.

Looking like the progression of a CAT scan. Need fresh wires it seems to get ILI9341 working on my T4 … then need to mod to show the processing time to compare CPU perf.

<UPDATE:>
No working T4 ILI9341 wired yet - but the number of cycles for T_3.6 versus T4 follows running the batch of exposures.

T4 cycles :: 232593
T_3.6 Cyc:: 462005
T_3.5 Cyc:: 462524

Not only are there more cycles/sec on T4 - but the calc requires ~half the cycles. All compiled with Std Opt
 
Last edited:
@defragster

Glad you got your ILI9341 finally working. Teensy64 coming in handy now.

Never thought about it before but it does kind of look like a CAT scan..

Nice comparison. Since I only have one display did want to keep moving it around. Glad you did the performance analysis. More will follow on the Buddhabrot - been reading up on it. Its actually easier to do the graphics on the Teensy than on windows :).
 
I posted a test code to generate what is known as a Buddhabrot

In German, this word sounds like "Butterbrot" - Sandwich.

Yesterday I ordered new PCBs wich bring out USB and SD. They are meant to be soldered directly under the T4 and have the shape of a butterfly, with the wings on the left and right sticking out of the Teensy.

These Chinese manufacturers are fun - I recently found one who produces 10 pieces of 100x100mm boards for 2$(+shipping) in 1-2days. (~14 days to Germany with cheapest delivery now -getting faster and faster, 5 days from order to delivery with express shipping) and that in very good quality. So boards are almost more fun than programming ;)
Today I'll make PCBs for DD4WHs SDR & T4.
 
Last edited:
@Paul: Are there any 'components' on Beta Breakout board in the path of SPI pins :: 9/10/11/12/14[13] ?
With DVM between T4 header and the '7 wide' header set:: I find T4[13] connects '7 wide' #14 as expected. And 10 and 12 are connected, but I get no continuity on 9 and 11.
> a week or so ago trying to cheat display onto breakout I put a modified OSH Purple display board onto breakout and felt HEAT on a T4 chip. Have tried wiring ili9488 and ili9341 since and failed, just moved T4 to breadboard and it works - so T4 is healthy.
>> heated (not burning) chip I quickly felt was the small square closest to pins 22/23/3v3 as plug was pulled.
- Serial and USB working - but something in the needed SPI connect path seems to have been wronged.

@defragster
Glad you got your ILI9341 finally working. Teensy64 coming in handy now.

Never thought about it before but it does kind of look like a CAT scan..
Nice comparison. Since I only have one display did want to keep moving it around. Glad you did the performance analysis. More will follow on the Buddhabrot - been reading up on it. Its actually easier to do the graphics on the Teensy than on windows :).

I had 4 displays - just swapped two onto the C64 PCB unit - and they fail all white now [1 immediate, one rotates once after few iterations then whiteout : both have J1 soldered] - the other seems good onto the C64 - now to try to get the one that was good on C64 to work on T$ with the fresh wires . . . it hasn't worked yet.
… Checked again - won't wire from breakout . . . time to pull it and re-wire direct …

DONE and WORKING! T4 on std breadboard wired as to breakout and now has butterbrot visual. Good with T_3.6 and T4 to ili9341
 
@Paul:: Just tried an LTO compile and it fails to compile without PaulStoffregen/cores/pull/358

@Paul - BUGBUG :: When it did compile [ Fastest + pure-code with LTO ] - I had to do a 15 second reset using this minor edited version of Buddabrot:
View attachment Buddabrot.ino
Building requires KurtE libs … - here is elf/hex/sym/lst and all from my build dir :: View attachment bb15sReset.zip
libs are KurtE :: SPIN and ILI9341_t3n
Until the reset it would not run again. I found this - and repeated to the same effect and need for 15s reset before proper HEX would run again.
<edit> removing the ili9341/SPIN code and that failed too - but working code could upload without reset.
… Assume you can compile and upload this with no need to actually connect a write only SPI display, you'll see SCK LED #13 flash and output on Serial USB when it runs - and nothing until 15s RESET
I don't expect it is my edit to other posted code causing the trouble - but included to be sure and have it handy.

It did compile and run w/FASTER and FASTEST - the cycle counts did not change but +/1000 out of 232000

BTW - neither of these are a buddabrot image:
NotBBrot.PNG
but this is:
BBrot.jpg
 
Last edited:
@KurtE / mjs513 : looking at last image in p#2074 (and ino there) can you explain why the spacing is off on the values printed on the right margin?

Code above is not with the last value - but changing to these still has uneven spacing::
Code:
		tft.drawNumber(bailout, 240, 5);
		tft.drawNumber(exposures, 240, 25);
		tft.drawNumber(exposures - [COLOR="#FF0000"]Dexposures, 240, 45);[/COLOR]

Non-Black fillscreen in setup() makes this easier to see :: tft.fillScreen(ILI9341_CYAN);
Also using this for the top row assumes the same position - moving it down '5' does not seem to shift by 5 - no CYAN change:
Code:
		tft.drawString("bailout:  ", 0, 0);
		tft.drawNumber(bailout, 240, 0);
NOTE: seems the same on T_3.6
<edit>: same with rotation(1) as for (3)
- Perhaps the font height factoring into the provided cords? Where the 'y' val calcs to bottom not top?
With square 240x240 and Rot 0 or 2 the text could be across the bottom margin off the image area.
 
Last edited:
Status
Not open for further replies.
Back
Top