Teensy 3.6, a HX8357U, and a bit of emulation

Status
Not open for further replies.

STrRedWolf

New member
First time posting here (I've lurked a bit before), so please be gentile. :)

After reading up on the Aiie! handheld Apple IIe emulator I figured I'd take a hand at it, having a Teensy 3.6 on hand and actual cash to get a breakout board listed in the page.

That said, I'm looking at hooking up an Adafruit HX8357U-based display to it, using the 8-bit parallel bus. Yeah, 480x320 but it's what I have on hand. I think I'll be porting over Adafruit's library for it.

I did find the tutorial for 8-bit parallel bus access which is helpful... but that's only on Teensy 3.0 and LC, not the 3.6. And if I do the mappings from the schematics... I don't have a lot of areas where there's 8 bits to use. I have questions.

  • How is a stock Teensy 3.6 configured on boot-up? Some canidates have items overlaid such as serial, I2C, and SPI, and if they're active when my code starts, I gotta shut 'em down.
  • Is there any code examples for doing said 8-bit access on the Teensy 3.6?
 
A 480x320 TFT seems a little odd for emulating a retro computer which had graphics hardware with only 6 color 140x192 and (with the 80 column card) 16 color 280x192 resolution.

But to answer your questions...

How is a stock Teensy 3.6 configured on boot-up? Some canidates have items overlaid such as serial, I2C, and SPI, and if they're active when my code starts, I gotta shut 'em down.

All the pins except USB (which are dedicated, not shared with any normal I/O) are in a low-power disable state. They become digital I/O when initialized, but at boot time all the pins are disabled and waiting to be initialize.

If you're familiar with old 8 bit chips, Teensy has another level of configuration. Normally this is done automatically by pinMode(), Serial1.begin(), SPI.begin(), etc. But if you access the registers directly, you'll need to know each pin has a 8-way mux that controls which peripheral accesses the pin. The GPIO is considered just another peripheral. The huge table in chapter 10 of the ref manual shows what the mux settings can be for every pin.

This thread has more info about the pins and parallel output.

https://forum.pjrc.com/threads/1753...-GPIO_PDIR-_PDOR?p=21228&viewfull=1#post21228


Is there any code examples for doing said 8-bit access on the Teensy 3.6?

Check out the UTFT library. It has working 8 & 16 bit parallel TFT code. Performance is very good.

Also you might look at Frank's C64 emulator, though I believe the screen is done using overclocked 1 bit SPI with DMA.
 
Status
Not open for further replies.
Back
Top