tty2oled Soft&Hardware Add-On (Shows Core based Pictures on a Display)

Showcase builds, discuss cases, embedding MiSTer into existing computer cases.
User avatar
venice
Top Contributor
Posts: 739
Joined: Tue Jun 16, 2020 9:29 am
Location: Germany
Has thanked: 264 times
Been thanked: 261 times

Re: tty2oled Software Add-On now with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by venice »

Silly Question, same Baudrate on both ends?
If yes which is it? I think your are on 115200.

We have successfully tested 921600.

Have you tried another cable?

My MiSTer Add-On-Projects tty2oled, i2c2oled, SNAC2IEC
You can donate by sending a Postcard to me.

dave18
Posts: 72
Joined: Sun Jun 21, 2020 8:21 am
Has thanked: 4 times
Been thanked: 7 times

Re: tty2oled Software Add-On now with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by dave18 »

I was trying on 115200 on both end. I've tried other values since and the highest that works is 19200 (which seems to transmit fast enough for the use case). I'll try some other cable and see if they allow for faster speeds. At least I now the code/interface works, and I could live with 19200 if I had to.
dave18
Posts: 72
Joined: Sun Jun 21, 2020 8:21 am
Has thanked: 4 times
Been thanked: 7 times

Re: tty2oled Software Add-On now with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by dave18 »

Tried with two different hubs and a couple of cables and 19200 seems the maximum reliable value. Might treat myself to a new high quality cable as a last resort, otherwise will just run in at 19200.
User avatar
venice
Top Contributor
Posts: 739
Joined: Tue Jun 16, 2020 9:29 am
Location: Germany
Has thanked: 264 times
Been thanked: 261 times

Re: tty2oled Software Add-On now with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by venice »

I am using a modded Hub v2.1 with an cheap usb to dupont cable from ali.
So nothing special.

But good to hear that it works so far.

My MiSTer Add-On-Projects tty2oled, i2c2oled, SNAC2IEC
You can donate by sending a Postcard to me.

User avatar
RealLarry
Top Contributor
Posts: 768
Joined: Mon May 25, 2020 4:04 am
Location: San Junipero/DE/Earth
Has thanked: 86 times
Been thanked: 329 times

Re: tty2oled Software Add-On now with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by RealLarry »

dave18 wrote: Tue May 04, 2021 12:52 pm Tried with two different hubs and a couple of cables and 19200 seems the maximum reliable value. Might treat myself to a new high quality cable as a last resort, otherwise will just run in at 19200.
Just read your comments and I'm wondering about your low transfer rate. Venice and I did dozens of tests with different types of ESP's and speed, all of them were working with a speed up to 921600 baud. Don't know what type of cables I'm using, but I'm sure that there are no-name ones and brand-named cables, all mixed for ready2use.
Have a close look at the solder points of your ESP, if possible. Maybe that there is a bad solder point which interferere with higher baud rates. I had a similar issue with one of my displays, which displayed some pictures, some not, resets while displaying and so on. Found a cold joint at displays connector, resoldered it and voila, it's working stable now.
Contributor of tty2oled, author of tty2tft, tty2rpi and update_tty2xxx
dave18
Posts: 72
Joined: Sun Jun 21, 2020 8:21 am
Has thanked: 4 times
Been thanked: 7 times

Re: tty2oled Software Add-On now with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by dave18 »

Hi RealLarry

I've tried with 2 different ESPs (although both TTGO T8s from the same supplier) and they both have issues above 19200.

Interestingly I upload from Sketch to the boards at 921600 and the upload always works without issue (although the upload process may have some error checking built it to resend any missed data).

I think maybe the supplier has used a substandard component somewhere affecting my particular boards, I can't think of any other reason for it to be unstable above 19200.

Dave
User avatar
RealLarry
Top Contributor
Posts: 768
Joined: Mon May 25, 2020 4:04 am
Location: San Junipero/DE/Earth
Has thanked: 86 times
Been thanked: 329 times

Re: tty2oled Software Add-On now with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by RealLarry »

dave18 wrote: Wed May 05, 2021 8:52 amI've tried with 2 different ESPs (although both TTGO T8s from the same supplier) and they both have issues above 19200.

Interestingly I upload from Sketch to the boards at 921600 and the upload always works without issue (although the upload process may have some error checking built it to resend any missed data).
Good to know!
I think maybe the supplier has used a substandard component somewhere affecting my particular boards, I can't think of any other reason for it to be unstable above 19200.
I don't think so then. When the upload of the Sketch is working with highest baud rates, why not with MiSTer...? Are you using a "MiSTer USB hub" or something similar? Sufficient power source?
Another test you can run for troubleshooting is to connect two FTDI's between MiSTer and PC to transfer, save and compare some data between them. My feeling is that there must be a bug outside of your EPS's. I've a box full of small and "big" EPS's, some normal, some for a skidded price, but - alas - never got a problem there.
Contributor of tty2oled, author of tty2tft, tty2rpi and update_tty2xxx
dave18
Posts: 72
Joined: Sun Jun 21, 2020 8:21 am
Has thanked: 4 times
Been thanked: 7 times

Re: tty2oled Software Add-On now with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by dave18 »

I've tried using two FTDIs to send from MiSTer to PC and it seems to work ok. I've attached the PuTTY logs at both 38400 and 921600. The MiSTer is clearly sending the data correctly.

The MiSTer side FTDI is plugged into the same USB Hub I've been using with the cable so it doesn't seem like a hub issue. Hub isn't powered so I thought maybe the ESP is drawing more power than the FTDI and causing an issue there, but I've tried with a powered hub with no luck.

It feels like a buffer issue on the ESP receiving side, in that if the serial stream is too fast the buffer is getting overwritten before it can be read, but why is that not affecting all ESP implementations?
You do not have the required permissions to view the files attached to this post.
User avatar
RealLarry
Top Contributor
Posts: 768
Joined: Mon May 25, 2020 4:04 am
Location: San Junipero/DE/Earth
Has thanked: 86 times
Been thanked: 329 times

Re: tty2oled Software Add-On now with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by RealLarry »

dave18 wrote: Wed May 05, 2021 10:50 am I've tried using two FTDIs to send from MiSTer to PC and it seems to work ok. I've attached the PuTTY logs at both 38400 and 921600. The MiSTer is clearly sending the data correctly.
Very well done/debugged, Dave. But what damned crap is that? All components are working fine but ESP won't take 2kb of data at normal and high speed? I hate this kind of trouble. If you were my neighbor I'd lent a bunch of working devices for further tests...
Contributor of tty2oled, author of tty2tft, tty2rpi and update_tty2xxx
dave18
Posts: 72
Joined: Sun Jun 21, 2020 8:21 am
Has thanked: 4 times
Been thanked: 7 times

Re: tty2oled Software Add-On now with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by dave18 »

Yeah, it would be good to test with other modules.

I did another test, if I send the serial data to the ESP using the FTDI (same FTDI and hub combo that worked with the PC) with the RX/TX wired directly to the ESP TX/RX pins (plus GND) it still fails to receive the data properly, so it can't be the serial chip or USB cable at fault. I've powered the ESP from my monitor USB port so there shouldn't be any serial cross talk.

It there any way to configure the serial buffer size? The maximum Serial.available() gets to for me is 256 bytes before it maxes out, is that the same buffer size you would expect?

btw, this is the product I bought https://www.ebay.co.uk/itm/133616318730
User avatar
RealLarry
Top Contributor
Posts: 768
Joined: Mon May 25, 2020 4:04 am
Location: San Junipero/DE/Earth
Has thanked: 86 times
Been thanked: 329 times

Re: tty2oled Software Add-On now with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by RealLarry »

dave18 wrote: Wed May 05, 2021 11:11 amIt there any way to configure the serial buffer size? The maximum Serial.available() gets to for me is 256 bytes before it maxes out, is that the same buffer size you would expect?
Thats the same information I'm aware of. 256 bytes buffers max. Very strage behaviour of your ESP. I'm currently out of new ideas.
Contributor of tty2oled, author of tty2tft, tty2rpi and update_tty2xxx
RascalUK
Posts: 156
Joined: Mon Jun 08, 2020 2:02 pm
Location: Manchester, UK
Has thanked: 72 times
Been thanked: 23 times
Contact:

Re: tty2oled Software Add-On now with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by RascalUK »

dave18 wrote: Tue May 04, 2021 12:52 pm Might treat myself to a new high quality cable as a last resort
We sure know how to live round these parts don't we? :)
dave18
Posts: 72
Joined: Sun Jun 21, 2020 8:21 am
Has thanked: 4 times
Been thanked: 7 times

Re: tty2oled Software Add-On now with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by dave18 »

RealLarry

I wonder if it's a library issue. I had to rewrite the the code to get rid of Strings as they crashed my ESP, yet I assume they work fine on yours.. If my ESP libs are older then maybe there's a bug in the serial code too. I just added the board manager URL and installed esp32 1.0.6 which also installed the libs into ArduinoData folder.

Out of interest, which board do you select, I just choose ESP32 Dev Module.

RascalUK wrote: Wed May 05, 2021 2:46 pm
dave18 wrote: Tue May 04, 2021 12:52 pm Might treat myself to a new high quality cable as a last resort
We sure know how to live round these parts don't we? :)
Worse part is explaining to my wife why I'm buying a new cable when I have a box full of them already taking up room in the house!
User avatar
venice
Top Contributor
Posts: 739
Joined: Tue Jun 16, 2020 9:29 am
Location: Germany
Has thanked: 264 times
Been thanked: 261 times

Re: tty2oled Software Add-On now with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by venice »

dave18 wrote: Wed May 05, 2021 3:16 pm ...I just added the board manager URL and installed esp32 1.0.6 which also installed the libs into ArduinoData folder.

Out of interest, which board do you select, I just choose ESP32 Dev Module.
I am working with Arduino 1.8.13 / ESP32 Package 1.0.5 and 1.0.6 on Windows.
RealLarry works with Linux.

For Board Settings see https://github.com/venice1200/MiSTer_tt ... o-Settings

My MiSTer Add-On-Projects tty2oled, i2c2oled, SNAC2IEC
You can donate by sending a Postcard to me.

dave18
Posts: 72
Joined: Sun Jun 21, 2020 8:21 am
Has thanked: 4 times
Been thanked: 7 times

Re: tty2oled Software Add-On now with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by dave18 »

Hmm, everything seems right. Maybe I need to try an uninstall/reinstall
User avatar
venice
Top Contributor
Posts: 739
Joined: Tue Jun 16, 2020 9:29 am
Location: Germany
Has thanked: 264 times
Been thanked: 261 times

Re: tty2oled Software Add-On now with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by venice »

dave18 wrote: Wed May 05, 2021 4:14 pm Hmm, everything seems right. Maybe I need to try an uninstall/reinstall
Someone else around you helping out with an ESP32 for tests?

My MiSTer Add-On-Projects tty2oled, i2c2oled, SNAC2IEC
You can donate by sending a Postcard to me.

dave18
Posts: 72
Joined: Sun Jun 21, 2020 8:21 am
Has thanked: 4 times
Been thanked: 7 times

Re: tty2oled Software Add-On now with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by dave18 »

Happy to swap code/esp with anyone who wants to test stuff (am in UK). Case arrived today so am distracted measuring and 3d printing, will hopefully have something to show after the weekend.
Reg
Posts: 118
Joined: Mon Mar 22, 2021 11:38 am
Has thanked: 60 times
Been thanked: 31 times

Re: tty2oled Software Add-On now with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by Reg »

Great news for me, the kit arrived from China so I can plug on.

I have two simple questions that I just want to ask if I may...

I assume by everything that I've read all I do is grab the update script with this...

wget https://raw.githubusercontent.com/venic ... ty2oled.sh -O /media/fat/Scripts/update_tty2oled.sh

...and it will install everything.

Second question, I am seeing an unholy amount of grounds that I need to solder together - can anyone advise any tips or tricks, I've daisychained grounds on larger projects before ( buttons for cabs ), but this is going to look like it's a smaller solution needed. Don't mind if I have to buy more parts - I'd like to just take a steer from those that have done this and have a good solution - learn from experts if I may.

Thank you.
User avatar
venice
Top Contributor
Posts: 739
Joined: Tue Jun 16, 2020 9:29 am
Location: Germany
Has thanked: 264 times
Been thanked: 261 times

Re: tty2oled Software Add-On now with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by venice »

Reg wrote: Wed May 05, 2021 11:20 pm Great news for me, the kit arrived from China so I can plug on.

I have two simple questions that I just want to ask if I may...

I assume by everything that I've read all I do is grab the update script with this...

wget https://raw.githubusercontent.com/venic ... ty2oled.sh -O /media/fat/Scripts/update_tty2oled.sh

...and it will install everything.
Thank you.
On the MiSTer Side, yes.
Run the installer, set your INI File Options, done.
See: https://github.com/venice1200/MiSTer_tt ... stallation

For the ESP to finish you (or someone) need to compile the Arduino Code into the ESP.
This is not fully documented, just a few information are in the Wiki.
See: https://github.com/venice1200/MiSTer_tt ... o-Settings
Reg wrote: Wed May 05, 2021 11:20 pm Second question, I am seeing an unholy amount of grounds that I need to solder together - can anyone advise any tips or tricks, I've daisychained grounds on larger projects before ( buttons for cabs ), but this is going to look like it's a smaller solution needed. Don't mind if I have to buy more parts - I'd like to just take a steer from those that have done this and have a good solution - learn from experts if I may.

Thank you.
I just solderred them all together.
See: viewtopic.php?p=24089#p24089

My MiSTer Add-On-Projects tty2oled, i2c2oled, SNAC2IEC
You can donate by sending a Postcard to me.

Reg
Posts: 118
Joined: Mon Mar 22, 2021 11:38 am
Has thanked: 60 times
Been thanked: 31 times

Re: tty2oled Software Add-On now with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by Reg »

Thank you Vince.
User avatar
RealLarry
Top Contributor
Posts: 768
Joined: Mon May 25, 2020 4:04 am
Location: San Junipero/DE/Earth
Has thanked: 86 times
Been thanked: 329 times

Re: tty2oled Software Add-On now with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by RealLarry »

dave18 wrote: Wed May 05, 2021 3:16 pmWorse part is explaining to my wife why I'm buying a new cable when I have a box full of them already taking up room in the house!
A thing of "better arguments". Maybe some warm words about a possible meltdown, burning house or womhole may help :)

Happy to swap code/esp with anyone who wants to test stuff (am in UK). Case arrived today so am distracted measuring and 3d printing, will hopefully have something to show after the weekend.
I think you're using Windows as you'd dropped Putty logs some posts ago? In case of using Linux I'd be happy to zip a cleaned up copy of my Arduino subfolder for you.
Contributor of tty2oled, author of tty2tft, tty2rpi and update_tty2xxx
User avatar
venice
Top Contributor
Posts: 739
Joined: Tue Jun 16, 2020 9:29 am
Location: Germany
Has thanked: 264 times
Been thanked: 261 times

Re: tty2oled Software Add-On now with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by venice »

Update

"Contrast Update" for SD & USB Version
You can set now the OLED Contrast Value in the INI File

The Update contains
  • New Contrast INI Option => INI File Update to v1.2
  • Updated tty2oled Script for sending Contrast Value from the MiSTer to ESP
  • Updated SD & USB Arduino Sketches to read and apply the received Contrast Value
  • Updated S60tty2oled Script (Minor Update, not Contrast related but needs the INI File Update v1.2)

My MiSTer Add-On-Projects tty2oled, i2c2oled, SNAC2IEC
You can donate by sending a Postcard to me.

User avatar
venice
Top Contributor
Posts: 739
Joined: Tue Jun 16, 2020 9:29 am
Location: Germany
Has thanked: 264 times
Been thanked: 261 times

Re: tty2oled Software Add-On now with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by venice »

Jukk@M wrote: Thu Apr 29, 2021 9:24 am ...
+ 93 text .xbm images.
...
Hi Jukk@M,
the Picture "A.ASTROCADE.xbm" shows "GORF".
Is this correct?

My MiSTer Add-On-Projects tty2oled, i2c2oled, SNAC2IEC
You can donate by sending a Postcard to me.

Jukk@M
Posts: 48
Joined: Wed Aug 26, 2020 2:20 pm
Location: Finland / Tampere
Has thanked: 14 times
Been thanked: 19 times

Re: tty2oled Software Add-On now with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by Jukk@M »

venice wrote: Thu May 06, 2021 10:15 am
Jukk@M wrote: Thu Apr 29, 2021 9:24 am ...
+ 93 text .xbm images.
...
Hi Jukk@M,
the Picture "A.ASTROCADE.xbm" shows "GORF".
Is this correct?
Yes, that's right.
User avatar
venice
Top Contributor
Posts: 739
Joined: Tue Jun 16, 2020 9:29 am
Location: Germany
Has thanked: 264 times
Been thanked: 261 times

Re: tty2oled Software Add-On now with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by venice »

Jukk@M wrote: Thu May 06, 2021 10:40 am
venice wrote: Thu May 06, 2021 10:15 am Hi Jukk@M,
the Picture "A.ASTROCADE.xbm" shows "GORF".
Is this correct?
Yes, that's right.
List fully updated.
https://github.com/venice1200/MiSTer_tt ... ation-List

My MiSTer Add-On-Projects tty2oled, i2c2oled, SNAC2IEC
You can donate by sending a Postcard to me.

User avatar
venice
Top Contributor
Posts: 739
Joined: Tue Jun 16, 2020 9:29 am
Location: Germany
Has thanked: 264 times
Been thanked: 261 times

Re: tty2oled Software Add-On now with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by venice »

RealLarry wrote: Thu May 06, 2021 8:03 am
dave18 wrote: Wed May 05, 2021 3:16 pmHappy to swap code/esp with anyone who wants to test stuff (am in UK). Case arrived today so am distracted measuring and 3d printing, will hopefully have something to show after the weekend.
I think you're using Windows as you'd dropped Putty logs some posts ago? In case of using Linux I'd be happy to zip a cleaned up copy of my Arduino subfolder for you.
I have attached my actually compiled bin file which I have uploaded to my TTGO-T8 just a few minutes before.

//Edit
Attachment deletet

My MiSTer Add-On-Projects tty2oled, i2c2oled, SNAC2IEC
You can donate by sending a Postcard to me.

dave18
Posts: 72
Joined: Sun Jun 21, 2020 8:21 am
Has thanked: 4 times
Been thanked: 7 times

Re: tty2oled Software Add-On now with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by dave18 »

Thanks, although I guess it will be hard to tell if it's working correctly on my 128 pixel display.
dave18
Posts: 72
Joined: Sun Jun 21, 2020 8:21 am
Has thanked: 4 times
Been thanked: 7 times

Re: tty2oled Software Add-On now with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by dave18 »

RealLarry wrote: Thu May 06, 2021 8:03 am
dave18 wrote: Wed May 05, 2021 3:16 pmHappy to swap code/esp with anyone who wants to test stuff (am in UK). Case arrived today so am distracted measuring and 3d printing, will hopefully have something to show after the weekend.
I think you're using Windows as you'd dropped Putty logs some posts ago? In case of using Linux I'd be happy to zip a cleaned up copy of my Arduino subfolder for you.
Hmm, might be an interesting test. I can always compile on a VM and see if it makes a difference. Thanks.
User avatar
venice
Top Contributor
Posts: 739
Joined: Tue Jun 16, 2020 9:29 am
Location: Germany
Has thanked: 264 times
Been thanked: 261 times

Re: tty2oled Software Add-On now with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by venice »

dave18 wrote: Fri May 07, 2021 12:48 am Thanks, although I guess it will be hard to tell if it's working correctly on my 128 pixel display.
Sorry I forgot.
I can build one for you as well.

Did you already left an link for your source?

My MiSTer Add-On-Projects tty2oled, i2c2oled, SNAC2IEC
You can donate by sending a Postcard to me.

dave18
Posts: 72
Joined: Sun Jun 21, 2020 8:21 am
Has thanked: 4 times
Been thanked: 7 times

Re: tty2oled Software Add-On now with USB/SD Support (Show Text/Pictures based on loaded Core on Display)

Unread post by dave18 »

venice wrote: Fri May 07, 2021 4:40 am
dave18 wrote: Fri May 07, 2021 12:48 am Thanks, although I guess it will be hard to tell if it's working correctly on my 128 pixel display.
Sorry I forgot.
I can build one for you as well.

Did you already left an link for your source?
I did but here it is to save you looking. https://github.com/dave18/MiSTer_tty2ol ... SD1306_USB

Please note that I added a function to the display library to integer scale the bitmap (included in the git)
Post Reply