Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anyone playing with the Teensy 4.0? #102

Closed
MockbaTheBorg opened this issue Feb 12, 2020 · 8 comments
Closed

Anyone playing with the Teensy 4.0? #102

MockbaTheBorg opened this issue Feb 12, 2020 · 8 comments

Comments

@MockbaTheBorg
Copy link
Owner

@MockbaTheBorg MockbaTheBorg commented Feb 12, 2020

Hi all,

I got a couple Teensy4 and the Audio breakout for a synth project, but this breakout also has a uSD card slot on it, so I thought of trying RunCPM on it as well.
I am wondering if anyone has had the chance to use it like that?
The uSD might be slow, I know, but worth a try.

Please let me know!

Thanks!!!

@mecparts

This comment has been minimized.

Copy link

@mecparts mecparts commented Feb 17, 2020

Back on the air after a prolonged bout of hardware hacking. Yes, I'm still using my Teensy 4.0. Last week I added a proper RS232 serial port to the Teensy and hooked up a homebrewed Wemos D1 mini based WiFi modem to it. Sure, I could have skipped the whole RS232 bit and just hooked the mini right up to a serial port on the Teensy, but I'm also building another modem for the Ampro and figured I might as well go full retro on both of them. And there's just something about seeing 8 LEDs blinking behind red acrylic that's very nostalgic. I'm trying to resist adding a little MP3 board in there for faux dialling and connection sounds.

And just a few minutes ago I completed the first test of a parallel printer port. A 16 bit I2C I/O expander to some good old 74LS buffers, a DB25 to Centronics cable, a venerable Juki daisy wheel, and now the Teensy can print like it's 1988.

Throw in a first generation Raspberry Pi running a customised version of PiGFX and you've got a very, very, very fast CP/M system with a colour ANSI terminal (with GSX graphics extensions), a daisy wheel printer and a modem faster than anything I could have dreamed of back in the day. I think it's time to lay out a PCB so I can get SDIO to the uSD card working and put it in a case. Mind you, if it works out like I hope, that case will be small enough to bolt to the VESA mount on the back of the monitor. The Little Board could have a Teensy Board little sibling.

@MockbaTheBorg

This comment has been minimized.

Copy link
Owner Author

@MockbaTheBorg MockbaTheBorg commented Feb 17, 2020

@mecparts

This comment has been minimized.

Copy link

@mecparts mecparts commented Feb 17, 2020

I hadn't thought of doing a website, to be honest. But that doesn't preclude sharing some pictures of the prototype right now.

Here's the main board. The DB25F and DE9M on the left are mounted in a quickie 3D printed holder. A MAX3232 chip provides the RS232 level conversion. An MCP23017 I2C I/O expander handles the I2C <-> Centronics conversion and a 74LS245 and 74LS05 convert to/from 3.3V to TTL levels. I went with LS rather than HCT or ACT because they're feeding signals off board and TTL doesn't require the protection that CMOS would.
mainboard

And here's looking across the main board at the Pi that acts as the terminal. The Pi is running a bare metal (no O/S) ANSI terminal emulator derived from PiGFX. The Pi is powered from the same USB supply that powers the Teensy board (the old Pi doesn't need many mA and the adapter has lots of capacity). A standard LCD monitor and USB keyboard are plugged into the Pi. The idea is to use the upper half of the VESA mount to hold the eventual Teensy PCB. You could use a Pi Zero (but not, from what I've read, a Pi Zero W) in place of the old Pi that I did.
terminal

Here's the WiFi modem prototype. I've brought out RTS and CTS for flow control, but didn't bother hooking DSR, DCD, et al up to anything other than the LEDs. Again, a MAX3232 provides the RS232 level conversion. The status LEDs are driven by a 74ACT245. The final version will use a Wemos D1 mini in place of the D1. More quickie 3D printed mounts hold the DE9F and the red acrylic faceplate. For looks I'd love to get a hold of an old Hayes Smartmodem case to mount the final board in, but they're metal except for the end pieces and that wouldn't do good things to the WiFi.
modem_top

And finally, the nostalgia shot of the modem's status LEDs.
modem_front

My gut feeling on the speed of the uSD with SPI is that if we sent this setup back in time to the late 80s, we'd be more than happy with how fast the "disk" I/O is. Fast forward to today and it feels a bit sluggish. Usable, but sluggish. I'm looking forward to trying out SDIO. Will I get the board laid out and made before Paul brings out a Teensy 4.1 with onboard uSD hooked up to SDIO?

Wayne

@MockbaTheBorg

This comment has been minimized.

Copy link
Owner Author

@MockbaTheBorg MockbaTheBorg commented Feb 17, 2020

This is REALLY COOL.

I am having a hard time here initializing the SD card.
How did you initialize yours?

Thanks!

@mecparts

This comment has been minimized.

Copy link

@mecparts mecparts commented Feb 17, 2020

The only change I've made since I originally patched things to get it working back in October was to remove the SD_SCK_MHZ(25) from the SD.begin(SDINIT) call. The el cheapo SD adapter I had started with was the bottleneck, and once I changed over to something better I was able to let the library figure out the speed it liked. You could try adding the speed parameter to your SD.begin call and seeing if the uSD on the audio board is likewise not quite up to snuff.

@MockbaTheBorg

This comment has been minimized.

Copy link
Owner Author

@MockbaTheBorg MockbaTheBorg commented Feb 18, 2020

Looks like the latest (1.1.1) Greinman SdFat now works with the Teensy 4.0.
After I loaded it all seems to work.
And damn this thing is fast. Like REALLY fast.

@mecparts

This comment has been minimized.

Copy link

@mecparts mecparts commented Feb 18, 2020

There's a new SdFat? Excellent. I can retire my patched version.

Yeah, the speed is really something, isn't it? <insert evil grin>

@MockbaTheBorg

This comment has been minimized.

Copy link
Owner Author

@MockbaTheBorg MockbaTheBorg commented Feb 18, 2020

Yup ... I am amazed that it runs on the Teensy 4.0 as fast (if not slightly faster) as on my i7 2.6G laptop.
It is really awesome.
I will close the issue as Teensy 4.0 (with the audio board) is officially added now.
Thanks for the help man! And please, get the details of your project into hackaday or something.
It is coming up amazing. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.