i2c2oled (little brother of tty2oled)
- venice
- Top Contributor
- Posts: 788
- Joined: Tue Jun 16, 2020 9:29 am
- Location: Germany
- Has thanked: 278 times
- Been thanked: 278 times
i2c2oled (little brother of tty2oled)
Just for fun (Part 2)…
This MiSTer-Bash-Script-Add-On uses the i2c Interface on the DE10-Nano’s LTC Connector to drive a small i2c based SSD1306 OLED Display with 128x64 Pixel showing (currently only) Pictures or (new) Text based on the running core.
Antonio Villena builds IOBoards with such small builtin OLED Displays and asked for support, so here we are
Donating!
If you enjoy the project and if you like to donate to me send me a postcard with an nice picture of your City/Area/Location/Country/Continent/Planet.
Drop me an PM with the Subject "Cardware" and I will answer.
!! WARNING !!
This Add-On uses the MiSTer's i2c Bus. Wrong usage can confuse the MiSTer's i2c Bus or worse!
You need to make sure you use the right i2c Bus as the MiSTer has more than one.
Go to https://github.com/venice1200/MiSTer_i2c2oled for details.
There is space for a lot improvement and it's not fast as tty2oled, but is really cool to see what you can do with a bit of bash scripting, 4 wires and a small Display.
Ideas:
Check for an connected i2c Display on start Done
Create an C/C++ Application for much more speed
More PIX here https://github.com/ingloriond/MiSter_I2 ... c2oled_pix
This MiSTer-Bash-Script-Add-On uses the i2c Interface on the DE10-Nano’s LTC Connector to drive a small i2c based SSD1306 OLED Display with 128x64 Pixel showing (currently only) Pictures or (new) Text based on the running core.
Antonio Villena builds IOBoards with such small builtin OLED Displays and asked for support, so here we are
Donating!
If you enjoy the project and if you like to donate to me send me a postcard with an nice picture of your City/Area/Location/Country/Continent/Planet.
Drop me an PM with the Subject "Cardware" and I will answer.
!! WARNING !!
This Add-On uses the MiSTer's i2c Bus. Wrong usage can confuse the MiSTer's i2c Bus or worse!
You need to make sure you use the right i2c Bus as the MiSTer has more than one.
Go to https://github.com/venice1200/MiSTer_i2c2oled for details.
There is space for a lot improvement and it's not fast as tty2oled, but is really cool to see what you can do with a bit of bash scripting, 4 wires and a small Display.
Ideas:
Check for an connected i2c Display on start Done
Create an C/C++ Application for much more speed
More PIX here https://github.com/ingloriond/MiSter_I2 ... c2oled_pix
You do not have the required permissions to view the files attached to this post.
-
- Posts: 210
- Joined: Thu Feb 04, 2021 11:42 pm
- Has thanked: 18 times
- Been thanked: 46 times
Re: i2c2oled (little brother of tty2oled)
That looks a cool little thing.
Can you animate the images ?
Was thinking something like an animated 1541 drive would be superb, or for Atari - the 1050, or even a 1010 cassette drive.
Can you animate the images ?
Was thinking something like an animated 1541 drive would be superb, or for Atari - the 1050, or even a 1010 cassette drive.
- venice
- Top Contributor
- Posts: 788
- Joined: Tue Jun 16, 2020 9:29 am
- Location: Germany
- Has thanked: 278 times
- Been thanked: 278 times
Re: i2c2oled (little brother of tty2oled)
I don't think the Bash Script is fast enough but an (C/C++) Program should support that.
Like I wrote, there is space for improvement.
- RealLarry
- Top Contributor
- Posts: 881
- Joined: Mon May 25, 2020 4:04 am
- Location: San Junipero/DE/Earth
- Has thanked: 120 times
- Been thanked: 385 times
Re: i2c2oled (little brother of tty2oled)
We, Venice and myself, are already working on the next level of core display. There, and with the actual tty2oled devices (ESP8266, ESP32), it would be possible in principle but requires more "AI logic" to display animations. And people who are willing to create these animations.MiSTer_Kirk wrote: ↑Wed Apr 21, 2021 12:53 am That looks a cool little thing.
Can you animate the images ?
Was thinking something like an animated 1541 drive would be superb, or for Atari - the 1050, or even a 1010 cassette drive.
Noted as feature request
- RealLarry
- Top Contributor
- Posts: 881
- Joined: Mon May 25, 2020 4:04 am
- Location: San Junipero/DE/Earth
- Has thanked: 120 times
- Been thanked: 385 times
Re: i2c2oled (little brother of tty2oled)
Bash's speed would be sufficient for sure. But display's speed? Dunno. The easiest way for an animation would be a small set of pictures, sent one after one. We'll see...
- RealLarry
- Top Contributor
- Posts: 881
- Joined: Mon May 25, 2020 4:04 am
- Location: San Junipero/DE/Earth
- Has thanked: 120 times
- Been thanked: 385 times
-
- Posts: 210
- Joined: Thu Feb 04, 2021 11:42 pm
- Has thanked: 18 times
- Been thanked: 46 times
Re: i2c2oled (little brother of tty2oled)
Yeah, thanks for the reply. I wasn't thinking about complex animation, more a static image of a 1541, but with flashing lights for loading games.RealLarry wrote: ↑Wed Apr 21, 2021 9:29 amWe, Venice and myself, are already working on the next level of core display. There, and with the actual tty2oled devices (ESP8266, ESP32), it would be possible in principle but requires more "AI logic" to display animations. And people who are willing to create these animations.MiSTer_Kirk wrote: ↑Wed Apr 21, 2021 12:53 am That looks a cool little thing.
Can you animate the images ?
Was thinking something like an animated 1541 drive would be superb, or for Atari - the 1050, or even a 1010 cassette drive.
Noted as feature request
-
- Posts: 156
- Joined: Mon Jun 08, 2020 2:02 pm
- Location: Manchester, UK
- Has thanked: 72 times
- Been thanked: 23 times
- Contact:
Re: i2c2oled (little brother of tty2oled)
I've got a couple of screens lying around at home. Any chance of a wiring diagram when you get a min?
- RealLarry
- Top Contributor
- Posts: 881
- Joined: Mon May 25, 2020 4:04 am
- Location: San Junipero/DE/Earth
- Has thanked: 120 times
- Been thanked: 385 times
Re: i2c2oled (little brother of tty2oled)
EDITED: I know. This was only an example that animation is possible. I'm with you that a very small animation of a core's splash screen or something like this would be sufficient. But this would mean that Bash/Daemon has to permanently send data to the device. Still doable.MiSTer_Kirk wrote: ↑Wed Apr 21, 2021 11:00 amYeah, thanks for the reply. I wasn't thinking about complex animation, more a static image of a 1541, but with flashing lights for loading games.RealLarry wrote: ↑Wed Apr 21, 2021 9:29 amWe, Venice and myself, are already working on the next level of core display. There, and with the actual tty2oled devices (ESP8266, ESP32), it would be possible in principle but requires more "AI logic" to display animations. And people who are willing to create these animations.MiSTer_Kirk wrote: ↑Wed Apr 21, 2021 12:53 am That looks a cool little thing.
Can you animate the images ?
Was thinking something like an animated 1541 drive would be superb, or for Atari - the 1050, or even a 1010 cassette drive.
Noted as feature request
EDIT
Rest of my post deleted. Wrong thread. Mea culpa.
- RealLarry
- Top Contributor
- Posts: 881
- Joined: Mon May 25, 2020 4:04 am
- Location: San Junipero/DE/Earth
- Has thanked: 120 times
- Been thanked: 385 times
Re: i2c2oled (little brother of tty2oled)
What type of screens (type of chip that the display is driven by)? We're experimenting with ILI9341 based display for now...
EDIT: Damn! We're at the i2c2oled thread here. Forget about my post.
- RealLarry
- Top Contributor
- Posts: 881
- Joined: Mon May 25, 2020 4:04 am
- Location: San Junipero/DE/Earth
- Has thanked: 120 times
- Been thanked: 385 times
Re: i2c2oled (little brother of tty2oled)
Yes, bad day today
But have a look at https://file.pcbway.com/websponsor/18/0 ... 99_Top.png and
https://github.com/MiSTer-devel/Hardwar ... tc_1.3.pdf for the i2c connection.
-
- Posts: 210
- Joined: Thu Feb 04, 2021 11:42 pm
- Has thanked: 18 times
- Been thanked: 46 times
Re: i2c2oled (little brother of tty2oled)
Ok, thanks for the explanation.RealLarry wrote: ↑Wed Apr 21, 2021 11:40 am EDITED: I know. This was only an example that animation is possible. I'm with you that a very small animation of a core's splash screen or something like this would be sufficient. But this would mean that Bash/Daemon has to permanently send data to the device. Still doable.
- venice
- Top Contributor
- Posts: 788
- Joined: Tue Jun 16, 2020 9:29 am
- Location: Germany
- Has thanked: 278 times
- Been thanked: 278 times
Re: i2c2oled (little brother of tty2oled)
If you have a two color display you can do this
You do not have the required permissions to view the files attached to this post.
- venice
- Top Contributor
- Posts: 788
- Joined: Tue Jun 16, 2020 9:29 am
- Location: Germany
- Has thanked: 278 times
- Been thanked: 278 times
Re: i2c2oled (little brother of tty2oled)
The i2c/SPI Header of the official RTC1.3 has no Power pin, only Data and GND if I am right.
So you have to get 3.3v power from another pin on the board.
I was sponsored by Antonio Villena with (t)his RTC which has solder Pins for i2c and 3.3v power. But without some Pin-Text on the Board
I have attached the drawing he sent to me.
https://www.antoniovillena.es/store/pro ... h-battery/
//Edit
First Fixes available on Github.
You do not have the required permissions to view the files attached to this post.
- venice
- Top Contributor
- Posts: 788
- Joined: Tue Jun 16, 2020 9:29 am
- Location: Germany
- Has thanked: 278 times
- Been thanked: 278 times
Re: i2c2oled (little brother of tty2oled)
Github User MickGyver created an Tool for conversion of XPM to PIX Files.
See https://github.com/venice1200/MiSTer_i2 ... n/XPMToPIX
The tool works well and should run wherever .NET Core Framework 3.1+ is installed. Actually only testet on Windows.
I have tested it by dropping an folder with XPM's onto the "XPMtoPIX.exe" file, Voila
From the XPMToPIX.txt:
Converts all XPM images in a folder to PIX used by MiSTer i2c2oled.
Usage:
XPMToPIX [folder]
If you run XPMToPIX without the folder argument, then XPMToPIX will convert
all XPM files in the folder where XPMToPIX was run from.
See https://github.com/venice1200/MiSTer_i2 ... n/XPMToPIX
The tool works well and should run wherever .NET Core Framework 3.1+ is installed. Actually only testet on Windows.
I have tested it by dropping an folder with XPM's onto the "XPMtoPIX.exe" file, Voila
From the XPMToPIX.txt:
Converts all XPM images in a folder to PIX used by MiSTer i2c2oled.
Usage:
XPMToPIX [folder]
If you run XPMToPIX without the folder argument, then XPMToPIX will convert
all XPM files in the folder where XPMToPIX was run from.
- venice
- Top Contributor
- Posts: 788
- Joined: Tue Jun 16, 2020 9:29 am
- Location: Germany
- Has thanked: 278 times
- Been thanked: 278 times
Re: i2c2oled (little brother of tty2oled)
I added some Picture templates to Github: https://github.com/venice1200/MiSTer_i2 ... /templates
You do not have the required permissions to view the files attached to this post.
- venice
- Top Contributor
- Posts: 788
- Joined: Tue Jun 16, 2020 9:29 am
- Location: Germany
- Has thanked: 278 times
- Been thanked: 278 times
Re: i2c2oled (little brother of tty2oled)
Update
The actual version of i2c2oled got Basic Support for Text.
I embedded an 8x8 Pixel Font from https://github.com/greiman/SSD1306Ascii (MIT License) into the Script.
The usage...
...and the result.
Update 2
If no PIX is available the Corename is now shown instead of the "No Picture available"-PIX.
You need to add "misterheader.pix" (see Github) to your system.
The actual version of i2c2oled got Basic Support for Text.
I embedded an 8x8 Pixel Font from https://github.com/greiman/SSD1306Ascii (MIT License) into the Script.
Code: Select all
font=(
"0x00" "0x00" "0x00" "0x00" "0x00" "0x00" "0x00" "0x00" # Space
"0x00" "0x00" "0x00" "0x00" "0x5F" "0x00" "0x00" "0x00" # !
...
"0x00" "0x42" "0x42" "0x76" "0x08" "0x08" "0x00" "0x00" # }
"0x00" "0x00" "0x04" "0x02" "0x04" "0x02" "0x00" "0x00" # ~
)
The usage...
Code: Select all
set_cursor 16 2 # Set Cursor at Page (Row) 2 to the 16th Pixel (Column)
showtext "MiSTer FPGA" # Some Text for the Display
sleep 1.0 # Wait a moment
set_cursor 16 4 # Set Cursor at Page (Row) 4 to the 16th Pixel (Column)
showtext "by Sorgelig" # Some Text for the Display
Update 2
If no PIX is available the Corename is now shown instead of the "No Picture available"-PIX.
You need to add "misterheader.pix" (see Github) to your system.
You do not have the required permissions to view the files attached to this post.
- venice
- Top Contributor
- Posts: 788
- Joined: Tue Jun 16, 2020 9:29 am
- Location: Germany
- Has thanked: 278 times
- Been thanked: 278 times
Re: i2c2oled (little brother of tty2oled)
Press Play on Tape >>>
It's a mix of an Background PIX and two "Icons"
//Edit
Update uploaded to Github.
The tiny Data(s)sette-Animation runs before an Corename-PIX is loaded.
You need the "pressplay.pix" (see Github) on your system.
Font based Animation DemoMiSTer_Kirk wrote: ↑Wed Apr 21, 2021 12:53 am ...
Was thinking something like an animated 1541 drive would be superb, or for Atari - the 1050, or even a 1010 cassette drive.
It's a mix of an Background PIX and two "Icons"
//Edit
Update uploaded to Github.
The tiny Data(s)sette-Animation runs before an Corename-PIX is loaded.
You need the "pressplay.pix" (see Github) on your system.
-
- Posts: 210
- Joined: Thu Feb 04, 2021 11:42 pm
- Has thanked: 18 times
- Been thanked: 46 times
- venice
- Top Contributor
- Posts: 788
- Joined: Tue Jun 16, 2020 9:29 am
- Location: Germany
- Has thanked: 278 times
- Been thanked: 278 times
Re: i2c2oled (little brother of tty2oled)
Update
10-Step "Loading..." Animation added.
You need the "loading.pix" (see Github) on your system.
/Edit
Pictures deleted, see next post.
10-Step "Loading..." Animation added.
You need the "loading.pix" (see Github) on your system.
/Edit
Pictures deleted, see next post.
- venice
- Top Contributor
- Posts: 788
- Joined: Tue Jun 16, 2020 9:29 am
- Location: Germany
- Has thanked: 278 times
- Been thanked: 278 times
Re: i2c2oled (little brother of tty2oled)
Update
"loading" Animation and...
If the embedded Video isn't working use this link https://i.imgur.com/9WI8i4P
You need the "ncc1701.pix" (see Github) on your System.
Just a test to see if pixel scrolling is working.
//Edit
I uploaded the PIX Slideshow-Viewer "i2c2oled_slideshow.sh".
Add it to /media/fat/Scripts, make it executable and run it from CLI, SSH or from the Script Menu.
You will see if your PIX are fine or producing calculation errors because of too much/less Pixels.
Re: i2c2oled (little brother of tty2oled)
any scheme to connect in for officcial addons , (non villena´s style) ?
- venice
- Top Contributor
- Posts: 788
- Joined: Tue Jun 16, 2020 9:29 am
- Location: Germany
- Has thanked: 278 times
- Been thanked: 278 times
-
- Posts: 140
- Joined: Sun May 24, 2020 8:11 pm
- Has thanked: 2 times
- Been thanked: 49 times
Re: i2c2oled (little brother of tty2oled)
The official RTC board has no VCC pin. But you can extract from the connector by soldering a wire. The 4 wires you need are: VCC, GND, SDA and SCL
- venice
- Top Contributor
- Posts: 788
- Joined: Tue Jun 16, 2020 9:29 am
- Location: Germany
- Has thanked: 278 times
- Been thanked: 278 times
Re: i2c2oled (little brother of tty2oled)
Does this help?
You do not have the required permissions to view the files attached to this post.
Re: i2c2oled (little brother of tty2oled)
working
thank you guys!
thank you guys!
You do not have the required permissions to view the files attached to this post.
- venice
- Top Contributor
- Posts: 788
- Joined: Tue Jun 16, 2020 9:29 am
- Location: Germany
- Has thanked: 278 times
- Been thanked: 278 times
Re: i2c2oled (little brother of tty2oled)
Update
The i2c2oled Script got an I2C Device ID detection.
If the OLED-Device is not found at the given ID the Script ends with Exit Code 1.
The i2c2oled Script got an I2C Device ID detection.
If the OLED-Device is not found at the given ID the Script ends with Exit Code 1.