Call to arms | Teensy + SDRAM = true

Been using the DevBrd5 with @KurtE's shield to test the propshield and RA8876 with no issues. So next step was to test the Audio Adapter with the DB5. Ran the play wav file example which reads from the SDCard on the adapter and plays wav files.

As expected it played the files with no issues. Unfortunately can not attached the recoded audio. :{
 
So lengths of 32 are available? I assumed 28+4 was used because the run of pins was shortened (from ~40 or whatever the earlier boards had) and those were the only lengths available to make up the required size.
All lengths exist but they were out of stock which meant that the boards would have come without any headers. So I went for +4
 
I think I can cut a small notch in the plastic between the 28 and 4 pin connectors. If I am right, that should allow the tension of the bending PCB to close the gap. Hopefully;) Right now I am in the middle of finishing up the RA8876 24-bit color library using the DB5 so I can't fix the connectors till I am done...
 
But if you have the shield assembled, you can simply plug the RA8876 into the connector on it :D

Also hopefully Monday should have my order from OSHPark, that is new attempt at adapter to convert that RA8876 connection
into an Buydisplay ILI9488 connector. Also their NT35510 connector appears to be the same layout as their ILI9486, so should work
on that as well.

speaking of nt35510… somestuff is working in 8 bit mode… not great yet
IMG_0682.jpeg

Edit: By 8 bit mode I meant Parallel with 8 data pins. Sort of a PIA as every write appears to expect 16 bits so you have
to write out two packets even to write to a register. Actually writing to register is 4 writes. 2 for the register number and 2 for the data.
 
Last edited:
But if you have the shield assembled, you can simply plug the RA8876 into the connector on it :D

Also hopefully Monday should have my order from OSHPark, that is new attempt at adapter to convert that RA8876 connection
into an Buydisplay ILI9488 connector. Also their NT35510 connector appears to be the same layout as their ILI9486, so should work
on that as well.

speaking of nt35510… somestuff is working in 8 bit mode… not great yetView attachment 35313
I have not assembled yet. Been distracted with RA8876 24-bit conversion :)
 
Fixed it :D Box cutter and small thin serrated steak knife did the trick:
View attachment 35339
Now to see if I can keep a steady enough hand to solder it ;)
I know that feeling!

Note: if you look at my schematic for the board, you will see two pins swapped (in names only)
1722816061263.png

Sorry not very good drawing letters with mouse..
I have a mucked up version of your RA8876_config_8080.h file:
C++:
/* RA8876_Config.h
 A file to place user defines and configs.
*/

#ifndef RA8876_CONFIG_H
#define RA8876_CONFIG_H

// Hardware defines
#define RA8876_8080_CS 53
#define RA8876_8080_RESET 54
#define RA8876_8080_DC 55
#define RA8876_D0 40
#define BACKLITE 29
#define RA8876_RD 52    // FlexIO3:10: RD
#define RA8876_WR 56    // FlexIO3:11 WR

#define USE_8080_8_BIT_MODE 8
#define USE_8080_16_BIT_MODE 16
#define BUS_SPEED 20 //Available settings 2,4,8,12,20,24,30,40,60,120
#if 0

#define RA8876_8080_CS 11
#define RA8876_8080_DC 13
#define RA8876_8080_RESET 12

#define RA8876_WR 53
#define RA8876_RD 52
#define RA8876_D0 40

// DB5 Shield
//#define RA8876_8080_CS 11
//#define RA8876_8080_DC 13
//#define RA8876_8080_RESET 12

#define BUS_SPEED 20 //Available settings 2,4,8,12,20,24,30,40,60,120

//External backlight control connected to this Arduino pin
//#define BACKLITE 5
// #define BACKLITE 29
#endif
// Uncomment to use FT5206 touch.
#define USE_FT5206_TOUCH

#endif // RA8876_CONFIG_H
I am actually going to muck it up more to put in the different cases I use where I also run it on T4, T4.1 and Micromod...
 
I am actually going to muck it up more to put in the different cases I use where I also run it on T4, T4.1 and Micromod...
Had the same thought - makes it easier especially since this morning I got nailed with the pin swap because I forgot about it. We had it defaulted correctly in the sketches
 
I know that feeling!

Note: if you look at my schematic for the board, you will see two pins swapped (in names only)
View attachment 35340
Sorry not very good drawing letters with mouse..
I have a mucked up version of your RA8876_config_8080.h file:
C++:
/* RA8876_Config.h
 A file to place user defines and configs.
*/

#ifndef RA8876_CONFIG_H
#define RA8876_CONFIG_H

// Hardware defines
#define RA8876_8080_CS 53
#define RA8876_8080_RESET 54
#define RA8876_8080_DC 55
#define RA8876_D0 40
#define BACKLITE 29
#define RA8876_RD 52    // FlexIO3:10: RD
#define RA8876_WR 56    // FlexIO3:11 WR

#define USE_8080_8_BIT_MODE 8
#define USE_8080_16_BIT_MODE 16
#define BUS_SPEED 20 //Available settings 2,4,8,12,20,24,30,40,60,120
#if 0

#define RA8876_8080_CS 11
#define RA8876_8080_DC 13
#define RA8876_8080_RESET 12

#define RA8876_WR 53
#define RA8876_RD 52
#define RA8876_D0 40

// DB5 Shield
//#define RA8876_8080_CS 11
//#define RA8876_8080_DC 13
//#define RA8876_8080_RESET 12

#define BUS_SPEED 20 //Available settings 2,4,8,12,20,24,30,40,60,120

//External backlight control connected to this Arduino pin
//#define BACKLITE 5
// #define BACKLITE 29
#endif
// Uncomment to use FT5206 touch.
#define USE_FT5206_TOUCH

#endif // RA8876_CONFIG_H
I am actually going to muck it up more to put in the different cases I use where I also run it on T4, T4.1 and Micromod...
Thanks for the heads up. Maybe we should use your config file as the standard config to work off of. It's more inline with the shield and other variations. What do you think?
 
@KurtE - Finally have the shield soldered up except for the three 14 pin single inline female connectors. Still waiting for them (Aug 15th). Took me a while but it's working. Had lot's of soldapult usage :D It's nice to be able to have just one unit and one USB C cable. Here is an image of the DB5, sheild and display. Also all of the wires and the 5Volt/GND strip it replaces:
Kurts_shield_Finally.jpg

At first I could not get the screen to light up until I found and soldered the BL jumper. It's working great...
 
Hey folks, I'm happy to report I was able to create a custom teensy with sdram using this thread as a reference 😁

mimxrt1062-sdram.jpg


I was already in the throws of designing a custom teensy board that had usb host, usb device, and microsd all on a single edge, and adding the sdram was a no brainer. The driving force behind this was to have a board that I could place below another, and not need any cables or extensions to expose the usb and microsd ports.

Overall the process wasn't too difficult, and I intend to open source the kicad project for it shortly (hiding a private github repo url with the paper slip until I make a few more tweaks). Here are a few thoughts/observations regarding this build for anyone else considering doing this:
  1. It's expensive. I used JLCPCB to manufacture and assemble, but I soldered the MKL02 chips so I wouldn't have to handle the logistics of getting the chips from PJRC to JLCPCB. I opted to have five boards manufactured, and total cost per board with all components and shipping was $85 USD. No doubt the price per board goes down if you increase the quantity, but I didn't want to order too many without confirming that they'd actually work.
  2. You have to hack teensyduino to get non standard pins working (among other things). This has already been mentioned in this thread, but if you do this, be prepared for some headaches connecting the dots. I opted to duplicate my arduino directory make my changes in the copied directory, and then have the directories shuffled around in my makefile before compiling. I am not excited about moving my changes over to a new teensyduino version.
  3. Do a better job planning out which pads to route than I did. My main goals were to be able to play with eLCDIF, and to be able increase the amount of data my application can use, but I also wanted to run the audio library and I failed to route an MCLK pin. The pads on the chip are named confusingly so take your time and triple check the pads you need.
Thats it for now. Thanks for all the hard work that made this possible ❤️
 
You have to hack teensyduino to get non standard pins working (among other things). This has already been mentioned in this thread, but if you do this, be prepared for some headaches connecting the dots. I opted to duplicate my arduino directory make my changes in the copied directory, and then have the directories shuffled around in my makefile before compiling. I am not excited about moving my changes over to a new teensyduino version.
Or you can use my variants version of core and try to create a variant for yours...

I took the simple way out to start with, which was I did not collapse the pin numbers, for ones that were not available. Their current 4, 4.5 and 5 boards are based off of Micromod as per the size of the flash storage. I also have not tackled all of the external subsystems like SPI or Wire, to allow different pins...

Can try to improve on this later, if it looks like some or all of the changes are pulled in to the main cores.
 
Hey folks, I'm happy to report I was able to create a custom teensy with sdram using this thread as a reference 😁

View attachment 35579

I was already in the throws of designing a custom teensy board that had usb host, usb device, and microsd all on a single edge, and adding the sdram was a no brainer. The driving force behind this was to have a board that I could place below another, and not need any cables or extensions to expose the usb and microsd ports.

Overall the process wasn't too difficult, and I intend to open source the kicad project for it shortly (hiding a private github repo url with the paper slip until I make a few more tweaks). Here are a few thoughts/observations regarding this build for anyone else considering doing this:
  1. It's expensive. I used JLCPCB to manufacture and assemble, but I soldered the MKL02 chips so I wouldn't have to handle the logistics of getting the chips from PJRC to JLCPCB. I opted to have five boards manufactured, and total cost per board with all components and shipping was $85 USD. No doubt the price per board goes down if you increase the quantity, but I didn't want to order too many without confirming that they'd actually work.
  2. You have to hack teensyduino to get non standard pins working (among other things). This has already been mentioned in this thread, but if you do this, be prepared for some headaches connecting the dots. I opted to duplicate my arduino directory make my changes in the copied directory, and then have the directories shuffled around in my makefile before compiling. I am not excited about moving my changes over to a new teensyduino version.
  3. Do a better job planning out which pads to route than I did. My main goals were to be able to play with eLCDIF, and to be able increase the amount of data my application can use, but I also wanted to run the audio library and I failed to route an MCLK pin. The pads on the chip are named confusingly so take your time and triple check the pads you need.
Thats it for now. Thanks for all the hard work that made this possible ❤️
Happy to see others take us of this and make cool stuff. Amazing!

Making one board is expensive. Making a large batch makes the price waaay less.
 
I know the D0-D15 pins above match the LCD_DATAx pin
1717368267972.png

@KurtE Do you have a full document of this mapping out the signals on the other side?
I am trying to get Audio working on devboardV5 and I am getting confused between the datasheet and my SAI setup code:
Code:
FLASHMEM static void config_sai1()
{
  CCM_CCGR5 |= CCM_CCGR5_SAI1(CCM_CCGR_ON); 
  //PLL:
  int fs = AUDIO_SAMPLE_RATE_EXACT;
  // PLL between 27*24 = 648MHz und 54*24=1296MHz
  int n1 = 4; //SAI prescaler 4 => (n1*n2) = multiple of 4
  int n2 = 1 + (24000000 * 27) / (fs * 256 * n1);

  double C = ((double)fs * 256 * n1 * n2) / 24000000;
  int c0 = C;
  int c2 = 10000;
  int c1 = C * c2 - (c0 * c2);
  set_audioClock(c0, c1, c2);
  // clear SAI1_CLK register locations
  CCM_CSCMR1 = (CCM_CSCMR1 & ~(CCM_CSCMR1_SAI1_CLK_SEL_MASK))
       | CCM_CSCMR1_SAI1_CLK_SEL(2); // &0x03 // (0,1,2): PLL3PFD0, PLL5, PLL4
  CCM_CS1CDR = (CCM_CS1CDR & ~(CCM_CS1CDR_SAI1_CLK_PRED_MASK | CCM_CS1CDR_SAI1_CLK_PODF_MASK))
       | CCM_CS1CDR_SAI1_CLK_PRED(n1-1) // &0x07
       | CCM_CS1CDR_SAI1_CLK_PODF(n2-1); // &0x3f

  // Select MCLK
  IOMUXC_GPR_GPR1 = (IOMUXC_GPR_GPR1
    & ~(IOMUXC_GPR_GPR1_SAI1_MCLK1_SEL_MASK))
    | (IOMUXC_GPR_GPR1_SAI1_MCLK_DIR | IOMUXC_GPR_GPR1_SAI1_MCLK1_SEL(0));


  int rsync = 0;
  int tsync = 1;

  I2S1_TMR = 0;
  //I2S1_TCSR = (1<<25); //Reset
  I2S1_TCR1 = I2S_TCR1_RFW(1);
  I2S1_TCR2 = I2S_TCR2_SYNC(tsync) | I2S_TCR2_BCP // sync=0; tx is async;
        | (I2S_TCR2_BCD | I2S_TCR2_DIV((1)) | I2S_TCR2_MSEL(1));
  I2S1_TCR3 = I2S_TCR3_TCE;
  I2S1_TCR4 = I2S_TCR4_FRSZ((2-1)) | I2S_TCR4_SYWD((32-1)) | I2S_TCR4_MF
        | I2S_TCR4_FSD | I2S_TCR4_FSE | I2S_TCR4_FSP;
  I2S1_TCR5 = I2S_TCR5_WNW((32-1)) | I2S_TCR5_W0W((32-1)) | I2S_TCR5_FBT((32-1));

  I2S1_RMR = 0;
  //I2S1_RCSR = (1<<25); //Reset
  I2S1_RCR1 = I2S_RCR1_RFW(1);
  I2S1_RCR2 = I2S_RCR2_SYNC(rsync) | I2S_RCR2_BCP  // sync=0; rx is async;
        | (I2S_RCR2_BCD | I2S_RCR2_DIV((1)) | I2S_RCR2_MSEL(1));
  I2S1_RCR3 = I2S_RCR3_RCE;
  I2S1_RCR4 = I2S_RCR4_FRSZ((2-1)) | I2S_RCR4_SYWD((32-1)) | I2S_RCR4_MF
        | I2S_RCR4_FSE | I2S_RCR4_FSP | I2S_RCR4_FSD;
  I2S1_RCR5 = I2S_RCR5_WNW((32-1)) | I2S_RCR5_W0W((32-1)) | I2S_RCR5_FBT((32-1));
 
  CORE_PIN23_CONFIG = 3;  // MCLK
  CORE_PIN21_CONFIG = 3;  // RX_BCLK
  CORE_PIN20_CONFIG = 3;  // RX_SYNC
  CORE_PIN7_CONFIG  = 3;  // TX_DATA0


  I2S1_RCSR |= I2S_RCSR_RE | I2S_RCSR_BCE;
  I2S1_TCSR = I2S_TCSR_TE | I2S_TCSR_BCE  | I2S_TCSR_FRDE ;//<-- not using DMA */;

}

Specifically these pins, what alts can I used on dbv5 that won't clash with eLCDIF/SDRAM/SDIO
Code:
CORE_PIN23_CONFIG = 3;  // MCLK
CORE_PIN21_CONFIG = 3;  // RX_BCLK
CORE_PIN20_CONFIG = 3;  // RX_SYNC
CORE_PIN7_CONFIG  = 3;  // TX_DATA0
 

Attachments

  • DB5_Pin_MUX.pdf
    449.6 KB · Views: 24
Last edited:
Cheers, just what I needed!
Can you add this to TeensyDocuments repo as well? I always go there to look up pin data
 
Happy to see others take us of this and make cool stuff. Amazing!

Making one board is expensive. Making a large batch makes the price waaay less.
Hi Dogbone06, I have notice that you have order DevBoard5 frmo JLC some time before. Do you have already finish test of the board and if it is work OK. or have you test DevBoard 4.5. Is it work OK. Thanks.
 
Back
Top