Call to arms | Teensy + SDRAM = true

Here's a quick update from me:

Got some 5" and 4.3" LCDs here, 800*480px, 16.7M colors
@Dogbone06 sent over some Adaftuit 40 pin lcd breakout boards which arrived on Monday, got to wiring it up day before last, and started testing.
Consulted with @jmarsh about eLCDIF timing config, as I am using his sample code.

Loaded a static image from progmem, copied into SDRAM and pushed to the display

View attachment 33250

And here is the original:
View attachment 33251

Yes the Blues and the Reds are swapped, but I suspect that is from the C array I generated

Next step, after confirming bus wiring is good, is to bind this to LVGL and see how it perfroms.
Its looking good, and yes, I'm envious.
 
I pulled up the 1060EVK schematic and took a look at how they wired up the LCD (it's a 480x272@16bit) and I see that the wiring order is B-G-R and not R-G-B as I wired it up:
1060_evk_lcd_con.jpg

1060_evk_mcu_con.jpg


looking through the eLCDIF control registers I don't seen an option to do a color order swap.
But this baffles and annoys me a bit, because the reference manual does not state what color each of the LCD Data output pins are, and this leaves room for unnecessary testing (unless someone can find some mention of this, either in the ref manual of the application notes for the eLCDIF)

@jmarsh FYI

Kids just feel asleep for nap time, so I will do a quick rewire and test again
 
Just so everyone understands. What Rezo is doing above, will in the end result in a library for anyone to use. I think it will add allot of value to the Teensy platform. SDRAM + eLCD = great success! ;)
Hopefully if you do another rev that has CSI pins broken out we can have the camera as well :) then it would be a Teensy Giga that actually works :)
 
Hopefully if you do another rev that has CSI pins broken out we can have the camera as well :) then it would be a Teensy Giga that actually works :)
I plan to do a gen5 with all our wishes fulfilled. The idea is that Rezo coordinates with KurtE about pins so we don't miss anything. Then he gives me a list. From that I will make it and send to all the original people that got the gen4.
 
Swapped the color order on the pins, so its wired B0-7, G0-7, R0-7 on LCD_DATA0 through LCD_DATA23 pins and it looks great!
So that confirms the color order on the eLCDIF output is BGR and not RGB
What I was trying to remember earlier: The LCDIF_CTRL2 register has two fields (ODD_LINE_PATTERN and EVEN_LINE_PATTERN, page 1888 of the IMXRT1060 pdf) that specify the RGB component order, so you could just change those values rather than rewiring.
 
was thinking about considering all the wiring involved with the camera and display - think @KurtE pointed all that out. Figured I would wait until the gen5 design came out :)
I am sort of torn on a lot of this stuff. That is I like what you are trying to do. But I would be far more interested if for example Paul was building a Teensy 4.x with these features. Then I would be all in.

For example should the camera be easily setup for FlexIO or CSI pins. Maybe both. But I am more interested currently with doing it with FlexIO,
as then those who purchase MicroMod boards can make use of the features.

I have been sort of hacking on an updated design of MicroMod breakout board that I may or may not have fabricated and a few partially built.

Currently looks like:
1707498578816.png


Things I wanted (sort of again along the line of the MMOD breakout Paul did during that Beta.
All of the IO pins have .1" breakout pins that I can connect to. Has connectors for both ILI934x and Adafruit ST.. displays. It has the 20 pin connector that is used on OV7670 boards and now with the GIGA board they have several different cameras with same pin breakout.

Also connection setup for something like an Audio board can be plugged in. And all of the other goodies, USB Host, SDIO, QWIIC.

One of the Hard parts is to find a pinout that one feature does not block another. Like the Audio board uses 20, 21, 23... which several were used earlier on camera... Which currently believe I have in this version:
PinMM PinOV767X ShieldMM FuncNameGPIOSerialI2CSPIPWMCANAudioXBARFlexIOAnalogSD/CSI/LCD
019*AD_B0_031.3Serial1(6) RXSPI1(3) CS0PWM1_X12_RXIO-17
117*AD_B0_021.2Serial1(6) TXSPI1(3) MISOPWM1_X02_TXIO-16
247TFT_RST*EMC_044.4PWM4_A22:TX_DATAIO-061:4
332TFT_BACKLIGHT*EMC_054.5PWM4_B22:TX_SYNCIO-071:5
410TFT_DC*EMC_064.6PWM2_A02:TX_BCLKIO-081:6
518TFT_CS*EMC_084.8PWM2_A12:RX_DATAIO-171:8
671CAMERA_D6*B0_102.10PWM2_A2, QT4_11:TX3_RX12:10LCD_DATA6
756AUDIOB1_012.17Serial4(4) RXPWM1_B31:TX_DATAIO-152:17, 3:17
854AUDIOB1_002.16Serial4(4) TXPWM1_A31:RX_DATAIO-142:16, 3:16
969CAMERA_D7*B0_112.11PWM2_B2,QT4_21:TX2_RX22:11LCD_DATA7
1055CAMERA_PCLKFNCS0B0_002.0SPI(4) CS0QT1_0MQS_RIGHT2:0LCD_CLK
1159SPI_MOSI*B0_022.2SPI(4) MOSIQT1_21_TX2:2LCD_HSYNC
1261SPI_MISO*B0_012.1SPI(4) MISOQT1_1MQS_LEFT2:1LCD_ENABLE
1357SPI_CLK*B0_032.3SPI(4) SCKQT2_01_RX2:3LCD_VSYNC
14/A034*AD_B1_021.18Serial3(2) TXQT3_2SPDIF_OUT3:2A1:7, A2:7
15/A138*AD_B1_031.19Serial3(2) RXQT3_3SPDIF_IN3:3A1:8, A2:8
16/A220*AD_B1_071.23Serial2(3) RXWire2(3) SCLSPDIF_EXTCLK3:7A1:12, A2:12USDHC2_DATA3
17/A322*AD_B1_061.22Serial2(3) TXWire2(3) SDASPDIF_LOCK3:6A1:11, A2:11USDHC2_DATA2
18/A412WIRE(CAM/AUD)*AD_B1_011.17Serial3(2) RTSWire(1) SDAQT3_13:1A1:6, A2:6
19/A514WIRE(CAM/AUD)*AD_B1_001.16Serial3(2) CTSWire(1) SCLQT3_03:0A1:5, A2:5
20/A652AUDIOAD_B1_101.26Serial5(8) TX1:RX_SYNC3:10A1:15, A2:15
21/A750AUDIOAD_B1_111.27Serial5(8) RX1:RX_BCLK3:11A1:0, A2:0
22/A849*AD_B1_081.24PWM4_A01_TX3:8A1:13, A2:13USDHC2_CMD
23/A958AUDIOAD_B1_091.25PWM4_A11_RX1:MCLK3:9A1:14, A2:14USDHC2_CLK
24/A1053AD_B0_121.12Serial6(1) TXWire1(4) SCLPWM1_X2A1:1
25/A1151AD_B0_131.13Serial6(1) RXWire1(4) SDAPWM1_X3GPT1_CLKA1:2
26/A1267TOUCH_CSAD_B1_141.30SPI1(3) MOSI1:TX_BCLK3:14A2:3
27/A138TOUCH_IRQAD_B1_151.31SPI1(3) SCK1:TX_SYNC3:15A2:4
284TFT_SD_CSEMC_323.18Serial7(7) RXPWM3_B1
2916CAMERA_MCLK*EMC_314.31Serial7(7) TXSPI2(1) CS1PWM3_A1
3041CAMERA_PDN*0EMC_373.23GPT1_33_RX3:MCLKIO-23
3143CAMERA_PEN*0EMC_363.22GPT1_23_TX3:TX_DATAIO-22
3265CAMERA_HSYNCB0_122.121:TX1_RX3IO-102:12LCD_DATA8
3363CAMERA_VSYNCEMC_074.7PWM2_B02:MCLKIO-091:7
SD Pins - Cable connector(T4 34-39)
3466SDIOFPE1SD_B0_033.15Serial5(8) RTSSPI2(1) MISOPWM1_B1IO-07DATA1
3564SDIOSD_B0_023.14Serial5(8) CTSSPI2(1) MOSIPWM1_A1IO-06DATA0
3660SDIO*SD_B0_013.13Wire2(3) SDASPI2(1) CS0PWM1_B0IO-05CLK
3762SDIO*SD_B0_003.12Wire2(3) SCLSPI2(1) SCKPWM1_A0IO-04CMD
3868SDIOFPE0SD_B0_043.16Serial5(8) TXFLEXSPI B_SSO_BPWM1_A2IO-08DATA2
3970SDIOFNCS1SD_B0_053.17Serial5(8) RXFLEXSPI B_DQSPWM1_B2IO-09DATA3
Micromod new pins
4040CAMERA_D0*B0_042:04Wire3(2) SCLQT2_12:4LCD_DATA0
4142CAMERA_D1*B0_052:05Wire3(2) SDAQT2_22:5LCD_DATA1
4244CAMERA_D2*B0_062:06QT3_02:6LCD_DATA2
4346CAMERA_D3*B0_072:07QT3_12:7LCD_DATA3
4448CAMERA_D4*B0_082:08QT3_22:8LCD_DATA4
4573CAMERA_D5*B0_092:09QT4_02:9LCD_DATA5


Hopefully if you do another rev that has CSI pins broken out we can have the camera as well :) then it would be a Teensy Giga that actually works :)
Yes and No... That is with all of it's warts it is still a product you can go out and purchase...
And assuming many of these warts are fixed over time. It is a Dual core processor, with SDIO memory, about 75 IO pins that are on
connectors, that are easy for hobbyist to access, versus their Portenta boards (or MicroMod board for that matter), where most of us hobbyists find harder to build your own shields...

Side note: As I asked on the Arduino Forum, I wish I knew what connectors that Arduino is using for their Camera connections, that allow you to
for example connect from either the top or bottom of the board:
1707499637018.png

As if I knew what they were, would be tempted to use on the design above...
Likewise, if they have single row version for the displays as sometimes nice for ILI9341 boards to be on the back
and sometime nice to be on the front...
 
@KurtE, I wish that Paul would make all this but he's not. Atleast that we know of.
a Micromod board wont have all the pins exposed. I am trying to supply you and the others who got the gen4 with a gen5 so that all the development and testing you wanna do can be done. For example, @jmarsh wants to make sort of a DVD player. You wanna play with the camera and so on.

With that said, the board you posted above will probably help out. If you add the Camera stuff to it, then I can skip that on my gen5 board. My end goal is that all these cool features can be developed and supported. So that other users can have more fun. But it would also be nice if Paul picked a few of these ideas and made a Teensy 4.x / 5.

Please show me that Camera connector you're speaking of and I'll do some reasearch to find it.
 
Please show me that Camera connector you're speaking of and I'll do some reasearch to find it.
On the GIGA board they show it in the schematic like:
1707502808863.png

So far did not find anything 21TW-247 They show the same on the GIGA Display shield.
On their interactive display of the board, they show it as:
1707503186150.png


I know I have seen similar type connections in single row headers on some board(s) made by
either Robotis or Lynxmotion(Robotshop)... Now to see if I can find them

I think, sort of like: https://wiki.lynxmotion.com/info/wi...tronics/ses-modules/lss-adapter-board-type-c/

Which allow to stack, but...
1707504215036.png
 
Last edited:
these are just header pins, possibly with pass-through. There’s a ton of different ones out there. The only thing that’s important is ofc the spacing. Looks like 2.54mm.

These are good examples, male and female. These are not passthrough tho. But those exist.

 
Last edited:
@KurtE how many FlexIO pins would you need for the Camera?
Know I am not Kurt but answer to your question is 10:

Code:
#define OV7670_PLK   8    //8       B1_00   FlexIO2:16
#define OV7670_XCLK  7    //7       B1_01   PWM
#define OV7670_HREF  46   //32      B0_12   FlexIO2:12
#define OV7670_VSYNC 21   //33      EMC_07  GPIO
#define OV7670_RST   17  // reset pin

#define OV7670_D0    40   //40      B0_04   FlexIO2:4
#define OV7670_D1    41   //41      B0_05   FlexIO2:5
#define OV7670_D2    42   //42      B0_06   FlexIO2:6
#define OV7670_D3    43   //43      B0_07   FlexIO2:7
#define OV7670_D4    44   //44      B0_08   FlexIO2:8
#define OV7670_D5    45   //45      B0_09   FlexIO2:9
#define OV7670_D6    6    //6       B0_10   FlexIO2:10
#define OV7670_D7    9    //9       B0_11   FlexIO2:11
 
MIPI CSI is for sure the way to go. And it’ll work nicely with the eLCD. Sure, it’s more work but it’ll give nice performance.
 
Know I am not Kurt but answer to your question is 10:

Code:
#define OV7670_PLK   8    //8       B1_00   FlexIO2:16
#define OV7670_XCLK  7    //7       B1_01   PWM
#define OV7670_HREF  46   //32      B0_12   FlexIO2:12
#define OV7670_VSYNC 21   //33      EMC_07  GPIO
#define OV7670_RST   17  // reset pin

#define OV7670_D0    40   //40      B0_04   FlexIO2:4
#define OV7670_D1    41   //41      B0_05   FlexIO2:5
#define OV7670_D2    42   //42      B0_06   FlexIO2:6
#define OV7670_D3    43   //43      B0_07   FlexIO2:7
#define OV7670_D4    44   //44      B0_08   FlexIO2:8
#define OV7670_D5    45   //45      B0_09   FlexIO2:9
#define OV7670_D6    6    //6       B0_10   FlexIO2:10
#define OV7670_D7    9    //9       B0_11   FlexIO2:11

In that case,
We can optionally use GPIO_B0 and some of GPIO_B1 for eLCD @ 16bit color depth, and the remainder for FlexIO based camera interface.

Although I do agree with @Dogbone06 that CSI would be the preferred way to go
 
Last edited:
these are just header pins, possibly with pass-through. There’s a ton of different ones out there. The only thing that’s important is ofc the spacing. Looks like 2.54mm.

These are good examples, male and female. These are not passthrough tho. But those exist.
Thanks, the keyword, I was missing was pass through... Found some samtec ones at Digikey.

Know I am not Kurt but answer to your question is 10:
:LOL: yep Note: 8 of them need to be contiguous for D0-7 and then two others for Pin clock and HSYNC

I agree wholeheartedly with that :)
I too, except - Except would be nice, to have some stuff actually work on Teensy boards. T4.1 has some support for it.
 
I've started working on a little eLCDIF library: https://github.com/david-res/eLCDIF_t4

It's FAR from done, FAR from something functional, but I only started a couple hours ago.
I'm not making this super fancy or super flexible - I'm making the bare minimum that's needed to "easily" set it up"

I do want to shout out to @jmarsh for providing sample code for the eLCDIF, as I did use a fair bit of his code for the base of the library functions.
I can confidently say I wouldn't have been able to do anything anytime soon without it.
 
I'm at a bit of a loose end trying to decide which direction to go forward for video output.
I really don't want to get a screen with an RGB interface, would rather have generic output which means VGA or DVI/HDMI.
VGA requires either R2R ladders, which are reasonably cheap but messy (roughly 50 resistors for 24bpp) or a 3-channel VGA DAC like an ADV7123.
DVI requires an encoder such as a SiI164 (<$5) which also works for HDMI, or a proper HDMI encoder that can do audio as well like the ADV7513.
Yet another option is making a new USB device interface based on UVC that would basically make the Teensy look like a webcam to the USB Host. The drawback there is you need a PC or similar to view the output, and it wouldn't use any of the LCDIF stuff so it's really out of scope here.

I'm inclined to just go for the R2R solution, since it could be thrown together in an afternoon (assuming my local store actually has the right resistors, it's a new store I haven't visited since they opened) while the other ideas would require getting a board made... although if anyone else wanted to make a simple encoder board like that (basic digital RGB -> DVI/HDMI) I think they'd have no trouble covering their costs by selling extras back to the community.
 
Back
Top