Loading...
 
[Show/Hide Left Column]

Current place and operation

Image

On the top of the burnstation, power is supplied by an old AT unit with its own switch (from the good ol' days when PCs had power switches, but someone broke it :( ).

Project goals

endre has bought a LED display made by Mediotext a while ago from Vatera, with dried out capacitors. The project aims to replace the original microcontroller with Arduino and to develop an Arduino library so that one can make use of the display for various projects.

The display

The display itself is built up with 96x7 5mm red LED pixels made by german firm Mediotext, and has had a 6502 microcontroller that has been replaced with Arduino lately. Award goes to MrT for his excellent reverse engineering work.

Interface Image

The display is equipped with a DB-9 connector on the top, having the folling pinout:
  1. SHR_CLK
  2. SHR_DAT
  3. RESERVED
  4. +5v
  5. GND
  6. ROW_ID_0
  7. ROW_ID_1
  8. ROW_ID_2
  9. BUZZER
The BUZZER and RESERVED lines are not connected as of now. Line +5v provides enough power to run an Arduino on it, eliminating the need for an external power supply.

Operation

The X and Y axis "addressing" are completely independent and driving them has completely different approach.
  • X axis: a LED is "addressable" by filling the shift registers with loading all of the 96 LEDs levels (Arduino shiftOut() function) corresponding to a specific row.
  • Y axis: a row can be selected by pulling the ROW_ID_x levels down. Obviously only one row can be selected at a time.
  • Blanking: The display can be blanked (for example during the shiftOut update period) with all the lines pulled down.

Arduino code

Arduino source code is available in the https://github.com/hsbp/arduino2mediotext(external link) repository. The master branch has code that scrolls a hardcoded text.

Remote control branch

The remote-control branch(external link) makes the Arduino a dumb framebuffer that can be controlled over a serial connection. Currently, the protocol offers only one command, block update and a speed of 19.200 bps.

Block update command

The block update command deals with 8-pixel horizontal blocks, resulting in 12 × 7 such blocks. The header bits look like the following:

11AAABBBCCCCDDDD

  • AAA is the first row to be updated (0-6)
  • BBB is the first row not to be updated (1-7)
  • CCCC is the first 8-pixel horizontal block to be updated (0-11)
  • DDDD is the first 8-pixel horizontal block not to be updated (1-12)
So the first two bytes define the command (11 = block update) and the four boundaries of the rectangle shaped block to be updated. After this header, there should be w × h bytes, where w = BBB - AAA (width) and h = DDDD - CCCC (height). Each of these represent a 8-pixel horizontal block, and the order should be left to right then top to bottom.

Python API

To make things easier, a simple Python API is implemented by the Remote class(external link), having the following methods. Pixels are expressed with tuples having two members, X and Y.
  • __init__ (serial_class=Serial) the only optional parameter can be used for testing, otherwise the /dev/ttyUSB0 (first USB-Serial converter on Linux) will be used using pySerial(external link)
  • set_pixel(pixel, value) sets the pixel specified by the first parameter to value (True means lit, False means dark)
  • get_pixel(pixel) returns the current state of the pixel specified by the only parameter
  • flush_pixels() if any pixels has changed since the last flush, it updates the affected region
Note: for performance reason, set_pixel calls doesn't take effect until the next call to flush_pixels, but get_pixel already returns the new value

If you need low-level access, the framebuf attribute stores the framebuffer as a flat list of boolean values, from left to right then top to bottom. Reading it should not cause any problems, but writing it is discouraged as the next call to flush_pixels will not know which pixels you changed.

Examples

The last two can be seen in action on YouTube: https://www.youtube.com/watch?v=OaNeMzZPdtQ(external link)

Font ideas

As seen on..

#hspbp LED display at Hacktivity

hspbp-door-led-display

Contributors to this page: dnet922 points  , eapo3484 points  and endre85 points  .
Page last modified on Thursday 29 of May, 2014 11:18:25 CEST by dnet922 points .

Upcoming events

1)  Sun 23 of Nov., 2014 15:00 CET
Pylvax: Python kezdőknek
2)  Tue 25 of Nov., 2014 19:00 CET
Plénum
3)  Thu 27 of Nov., 2014 19:00 CET
Hakk csütörtök