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

ESP8266 Support #7

Merged
merged 5 commits into from
Sep 9, 2015
Merged

ESP8266 Support #7

merged 5 commits into from
Sep 9, 2015

Conversation

h4rm0n1c
Copy link
Collaborator

SoftDMD is not included, yet, but otherwise this is feature complete. (I've used a preprocessor statement to disable SoftDMD on the ESP8266)

All demo sketches compile and execute as they were meant to, the only change needed being changing SoftDMD to SPIDMD.

The #define ESP8266_TIMER0_TICKS in DMD2_Timer.cpp sets the delay between running scan_running_dmds via timer0 interrupt in microseconds, the default I've set is 1000, seems to work well with 4mhz SPI clock, which is also a default.

Why timer0?
Because the ESP8266 has no hardware PWM, so the ESP8266/Arduino project is using timer1 for software PWM, a.k.a analogWrite. The only other ESP8266 library that currently uses timer0 is for Servo control, the likelihood that someone will use servos with a DMD is low compared to wanting to be able to adjust DMD brightness.

How to connect:
You'll probably want to use a level shifter, I used a TXS0108E that worked quite well. I imagine some 7400 and 4000 series chips that have been used in such a way before could also be substituted.

Pin on DMD GPIO # on ESP
a GPIO16
b GPIO12
sck GPIO0
clk GPIO14
r GPIO13
noe GPIO15

One more thing: The kinds of frequencies everything is required to run at to make this work probably doesn't lend itself too well to a solderless breadboard, my ESP8266 is on a soldered breadboard and it works pretty well, but sometimes it hiccups due to the capacitance between the tracks on the board, people are welcome to try, but I thought you should know the potential risks of using a solderless breadboard.

EDIT: Swapped GPIO15 from sck to noe, swapped GPIO0 from noe to sck, I apologise for the change, putting noe on gpio15 (which is held low for the ESP8266's boot mode) keeps the DMD from displaying garbage while the ESP8266 boots.

See https://github.com/esp8266/Arduino for more details.

Started over with a fresh fork of the DMD2 library, since I'd borked
things up so badly with the old one, developing in my own branch.
After a number of Compiles and Uploads, I've found these values to be
optimal for minimal flicker.
This frees up timer1, which is used for all PWM functions on the
ESP8266/Arduino fork, as there is no hardware PWM available.

Why? Because then the DMD2 library's brightness control works.

Apart from SoftDMD, this port is now feature complete.
@projectgus projectgus merged commit 8650cc7 into freetronics:master Sep 9, 2015
@projectgus
Copy link
Contributor

Thanks heaps for this, sorry for the ridiculously long time to reply - this got stuck down my TODO list.

It's now merged, I added some notes in the README about using w/ ESP8266 and also tagged a new 0.0.3 version so it should become available in the Board Manager shortly.

@mohitsachan33
Copy link

Thank you very much but one problem is there when we want to display any string its possible but when we go for scrolling the string then after 10 to 12 sec its shows stack overflow.
plz help me how to remove this error.

@herrysugiharto
Copy link

Hi,
I tried your instruction but the text not displaying correctly. Could you tell me what's wrong?
esp8266-p10-error

@ghost
Copy link

ghost commented Feb 11, 2018

DMD2 is great working for ESP8266/nodeMCU. you just initialize/define PIN on ESP8266

#define pin_A 16
#define pin_B 12
#define pin_sclk 0
#define pin_clk 14
#define pin_r 13
#define pin_noe 15

#define DISPLAYS_WIDE 1
#define DISPLAYS_HIGH 1
SPIDMD dmd(DISPLAYS_WIDE, DISPLAYS_HIGH, pin_noe, pin_A, pin_B, pin_sclk); // DMD controls the entire display

because ESP8266 PIN's is default set on LOW

@CTWF
Copy link

CTWF commented Mar 23, 2018

@mohitsachan33 try to scroll text without space
@h4rm0n1c new update dmd2?

@masrodjie
Copy link

Hi @helmisusanto thanks for the update. Did you use level shifter?

@ghost
Copy link

ghost commented Mar 28, 2018

are you mean p10 with 2 rows?

you need using 2 esp8266 for row 1 and row 2.

PIN OUT first ESP full with first panel p10.

@CTWF
Copy link

CTWF commented May 12, 2018

how can i change the size panel inside loop?

@MohamadAlsadi
Copy link

hello my friends

I have 2 module p10 (64x16 screen) I need drive it with NODE MCU ESP32 not ESP8266

please help me

@id1402
Copy link

id1402 commented Jan 21, 2023

How to connect: You'll probably want to use a level shifter, I used a TXS0108E that worked quite well. I imagine some 7400 and 4000 series chips that have been used in such a way before could also be substituted.
Pin on DMD GPIO # on ESP
a GPIO16
b GPIO12
sck GPIO0
clk GPIO14
r GPIO13
noe GPIO15

I have a question on connection DMD---ESP8266 (Here is my ESP8266: https://circuit-diagramz.com/wp-content/uploads/2018/11/ESP8266-12e-Pinout-12.jpg ).
My DMD doesn't have Pins "sck", "clk" and "noe" as you mention above.
Here is my DMD pinout:
OE A
N B
N C
N S
N L
N R
N G
N D

So what pins are "sck", "clk" and "noe"?
And what about the 7 N-Pins? Should I connect the to GND?
Please help.

@id1402
Copy link

id1402 commented Jan 29, 2023

I figured out how to connect DMD---ESP8266.

DMD_pin_R --- GPIO13 (SPI MOSI)
DMD_pin_S --- GPIO14 (SPI SCLK)
DMD_pin_N --- GND

You can connect the following DMD-pins to GPIO-pins you like, but you must define them in your code as helmisusanto wrote on Feb 11, 2018.
For Example:
DMD_pin_OE --- GPIO15
DMD_pin_A --- GPIO16
DMD_pin_B --- GPIO12
DMD_pin_L --- GPIO5

According code:

#define DMD_pin_OE 15
#define DMD_pin_A 16
#define DMD_pin_B 12
#define DMD_pin_L 5
#define DISPLAYS_WIDE 1
#define DISPLAYS_HIGH 1
SPIDMD dmd(DISPLAYS_WIDE, DISPLAYS_HIGH, DMD_pin_OE, DMD_pin_A, DMD_pin_B, DMD_pin_L);

Good luck!

@radoslawkozuch
Copy link

Do I need a logic level shifter? As I checked, the DMD is able to receive a 3.3V signal (A, B, three SPI lines), but of course the OE has smaller value so the DMD is a bit dimmer, but I don't need a super bright display.

@id1402
Copy link

id1402 commented Feb 11, 2023

@radoslawkozuch
Copy link

Works well for me without level shifter. No level shifter mentioned here: https://cdn.shopify.com/s/files/1/0045/8932/files/DMD_Getting_Started.pdf https://cdn.shopify.com/s/files/1/0045/8932/files/DMDCON_DMDConnector.pdf

But in your links they use 5V Arduino. This thread is about 3.3V ESP

@id1402
Copy link

id1402 commented Feb 12, 2023

Yes, OK, sorry. I begun with NodeMCU 1.0 without level shifter.
Now I use Arduino because I have a more ambitious project, I need more GPIO-Pins than NodeMCU 1.0 has.

@radoslawkozuch
Copy link

Actually I am not using a NodeMCU, but an ESP32 S2 mini with 27 IO pins. It works with this library but some changes were needed.

@RakaMulya
Copy link

Actually I am not using a NodeMCU, but an ESP32 S2 mini with 27 IO pins. It works with this library but some changes were needed.

can you explain the detail ??

@helmiattastify
Copy link

helmiattastify commented Mar 9, 2023

I think everyone should move to another library

https://github.com/busel7/DMDESP

I try to use dmd2 for advanced code like adding mqtt, mdns, and making it more readable, but DMD2 always makes my nide mcu keeping hard restart

I tried to change to DMDESP everything works fine.

@RakaMulya
Copy link

I think everyone should move to another library

https://github.com/busel7/DMDESP

I try to use dmd2 for advanced code like adding mqtt, mdns, and making it more readable, but DMD2 always makes my nide mcu keeping hard restart

I tried to change to DMDESP everything works fine.

Hi Helmi, is it also work for ESP32 ?

@helmiattastify
Copy link

@vovella
Copy link

vovella commented Apr 17, 2023

I think everyone should move to another library

https://github.com/busel7/DMDESP

I try to use dmd2 for advanced code like adding mqtt, mdns, and making it more readable, but DMD2 always makes my nide mcu keeping hard restart

I tried to change to DMDESP everything works fine.

Note - If you have 3 rows, the second one will be reversed!

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

Successfully merging this pull request may close these issues.