ShiftOut question for Hannio flipDot Display #1033
Replies: 18 comments
-
Posted at 2017-09-10 by @allObjects In the anonymous function in your What type of shift register are you using? Btw, you can save yourself some work by using MC / Eespruino built-in SPI (serial peripheral interface) appliance: assuming, there are two shif registers, one for x (0..5) and the other one for y (0..6) and the shift registers are in series - first x, then y - then you have an easy game:
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-09-10 by Mrbbp There is 2 ic 74hc238 who are decoding a 3bit adress and convert to 8bits for the shift register 74hc595 (i suppose) for l293d Here the git page of the project (lib and diagramm) In the arduino lib, the latch time is 500 microseconds. An other question who is alway confuse me on the espruino. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-09-10 by Mrbbp If i power the espruino with the 12v, i plug on the 3rd pin (gnd pin side)? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-09-10 by @gfwilliams Hi - which Espruino board are you using? I'm pretty sure the 3rd pin won't be right (that's usually the 3.3v pin) - I think if you do that you could cause some serious damage! I'd also make sure that GND of all boards is connected together - it can often be a big cause of problems if that isn't connected. In terms of software, what you're doing looks good. The latch is often active low though, so I'd try:
Or potentially the problem is that
Might help? Also, I believe there are some issues with shiftOut:
You could try this?
Or, as @allObjects says, you can use the SPI object. But you'll still need |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-09-10 by @allObjects @mrbbp, I see that you use a controller (with 293 type, 4 x half-H bridge)... a lot of hardware, but it makes it possible to drive the coils w/ 12V and the logic with 3.3V (or 5V), and with the tons of diodes it is a pretty cool setup - and so is obviously the driving software. From my understanding, the shift register is there to feed the two 238 3-to-8 decoders, and the pulse is only there for the write (latch) into the shift register output buffers. Regarding the pulse: the shift register requires only a raising flank, and we get hat for free by using the built in SPI appliance and the nss (negative signal select) pin in the To drive the row and column decoders, only 3 bits each are used for each nibble (half a byte, half of the shift register's 8 registers). The fourth bit is used for the data of the selected row and column, respectively. These 4th bits are always low and high or vice-versa for making a change. In other words, the byte you have to send (with SPI) looks like this:
The idea of the flip dot display though is that it does not use current after setting a(ll) dot(s). Therefore, after updating the whole display, at least these row and column data bits have to be set to low. Depending the implementation, I recommend to do that even between pixel settings... In other words, the data has to be stable (latched) in the shift register output register buffer for a specified time... and you have to figure out how long that time is. I find it odd that the addresses are reverse (MSB shifting out first), but it is not that much a complication for the code. Regarding the max. invocation frequency, you may need to look if you can set one pixel after the other, because if you keep the values not stable for required time, the 'derived pulse' - the time between two pixel flips - is too short to actually have the pixel flipped... But if you de-power the coils after a sequence of settings, you may even choose a higher voltage - up to 36 volts according to the L293 spec - to 'pump' enough energy into the coils with a much shorter time of applying stable values (and before de-powering)!
That's all you need... the nssPin is connected to the Init your 3 pins - data, sclk, rclk - as output and set rclk high and you are just fine from the get go. If you loose flips, you may slow down the
If you want to make the code 'safe' to prevent the coordinates not to interfere with the row and column data bits, use this expression which mask everything beyond 3 row and column address bits (works even when coordinates are not integers...):
Btw, choosing PS: will test the code when I get a display... ;-) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-09-11 by Mrbbp @allObjects: Whao, i'm impressed! Amazing! @gordon, sorry, i've forgotted to write: i use a pico board unpinned. The arduino lib is great but for english writer, no accents! :/ |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-09-11 by @gfwilliams @mrbbp no problem :) You want to connect your input voltage to what's shown as Ideally just the 5v signal from the board though if you can, rather than 12v. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-09-11 by @allObjects
...was a hint looking for a sponsor... ;) - and kind of says: sorry, have (had) no chance to test... of course, I could make a dry test: print the bits I'm passing to I'm tinkering along on a different display 'project' as possible 'sub-project' or 'explorative project' for an other, larger project. Im tinkering with a retro display: National Semiconductor 12 digit 7-segment, red LED Bubble Display NS A5120A (see attached pic) - as found in many pocket calculators in lat 60/early 70 - about $2K a piece was HP's first usable/scientific pocket calculator. I use 3 595 shift register in series. The last one sources the 7-segment plus decimal point anodes, and the 12 bit of the 16 bits of the other two drain the common cathodes for each digit... since the shift register drains a measly 6ma on 5V, I'm already in trouble with just 595 and may need to add 12 transistors to reliably drive all segments plus decimal point of a single digit all at once... another 2 chips of ULN2703 or 12 plain transistors w/ 12 Base resistors (the issue is obviously not the driving of the cathodes, - otherwise you could not see the digit lit - but more so the reliable shifting on higher speeds to 'hide' the multiplexing from the slow eye. The heavy drain load makes the latching register not to behave nicely anymore...). The setup you see in the picture uses an Espruino-Wifi, which is more or less a Pico w/ onboard ESP8266 (latter here not in use right now even though the blue LED dims...). Also you see that only the drains of tje first 3 digits' are hooked - hidden under the white-blue-striped segment wires (Ran out of common cathode resistors from my reuse-pile... or rusty nails I keep for ever... ;) ...to the dismay of many around me...). I avoid the The
Regarding the SPI write with nss pin passed: SPI slaves requires the slave select line to go and stay low - hence called - nss (negative ss) in order to make a slave look at data on the bus (MOSI - Master Out Slave In wire) and detect when the transmission transaction is completed: ssn goes high. You can control ssn by yourself separately, such as Attachments: |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-01-21 by Mrbbp I'm back on subject with some news and questions. @allObjects: You use
Do i need to explicitly use regards |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-01-26 by Mrbbp I've decided to work by a different way. Too many time lost on that. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-01-27 by @allObjects ...sorry to hear that... but it is for sure a nice experiment to let an Arduino do the bit work and Espruino the byte work. I do not know about the powering... that could be an issue, because the flip dot things are a lot of electromagnetic things (coils) that can 'fire back' Regarding the pin for nss, you can pick any that is available and easier in access to you. Also note that there was actually something that changed for 1v95 with which I had some glitches when changing pin mode. A good practice is to always intentionally setting the pin mode even though Espruino tries and does it pretty well automatically for you. If you take a closer look at my intial and then later code with all this shift out, I had every state in its own timeout to give enough time to let enough energy flow thru. @gordon then adviced me to just run it all the way thru... to reduce the flicker... This works for electronic devices, such as LEDs, but for sure not for ELECTROMAGNETIC devices, which need a certain pulse width to let enough energy flow. This may be the cause of the irregular flips... Sorry not seeing your previous post earlier... |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-01-28 by Mrbbp Ok, soooo i did it. Arduino code
Espruino code
a video of the display in action ps: i've fried 5 dots, therefor i've removed the dots on the display (upper line) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-06-10 by @allObjects ERROR fix of core line in code fragments in post #6: Polarity ('color') is set by either bit 3 or 7, which have the values 8 and 120, respective (and not 64 and 128, which would be bits 6 and 7), in order meet the spec (paraphrased):
Recap of wiring: Espruino (Pico - 5V tolerant, since flip-dot is 5V driven) to http://www.hannio.org flip-dot-disaplay module (using SPI):
FlipDotDisplay (has 5V regulator on board that supplies the logic):
*** DO NOT connect any 5V or 3.3V between Espruino and FlipDotDisplay - when Espruino powered (USB or Bat).*** Flip-Dot-Display module though supports 5V at the 5V pin... which could be used to drive Espruino over its BAT in / USB. Powering Espruino from 5V of Flip-Dot-Display module allows to work with single 12V power supply... Code used to create attached clips:
PS: Great Thanks to @mrbbp who provided me with two units to validate and have fun...Attachments: |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-06-11 by Mrbbp Gorgeous! Have you try to chain 2 flip dot display? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-06-11 by @allObjects ...hold your horses...
Chaining... sure: easy... out of one goes to in of next (daisy-chained), clock and latch (and ground and 12V power) go parallel... Nest step is to connect it to a Graphics buffer... With a configurable setup any cascading should be possible. Configurability may though have an impact on update speed. Will see. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-06-12 by Spocki ... oder langsam ächli pressiäre (... or slowly gearing up) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-06-12 by @allObjects ...iuuu - seit dr Matte Giuuu |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-08-15 by @allObjects @spocki, what are your roots? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-09-09 by Mrbbp
Hello @gordon
I've bought a flipdot display controled by a shift register.
There is an arduino lib to control it...
i find the code to display one pixel with arduino:
it needs a LATCH pin more for working, i've added it in the js code
i've rewrited the code for espruino like this
it does not work...
if i generate a random number for data
dots flip sometime...
i suppose it's about format of my byte...
Luca from Hannio send me the format for the byte
Where i'm wrong?
best regards
é.
Beta Was this translation helpful? Give feedback.
All reactions