User Tools

Site Tools


elektor-spl-en

Serial Programmable LEDs (SPL)

Introduction

This library supports the Elektor Serial Programmable LEDs, SPL, project which was published in december 2013.
Its a very economically priced DIY 'Bus' for controlling LEDs in buildings and so on.


Setup


Only the serial port must be selected the line settings are fixed:

  • 9600-n-1


Addressing

Switch, Signal and Output objects are supported.

Address Home number 1…255
Port LED number 1…8


Signal Aspects

The Signal support is for Control type Aspect number only.
The Aspect number must be set accordingly to which LED(s) must be set.

Aspect # L1 L2 L3 L4 L5
0
1 X
2 X
3 X X
4 X
5 X X
6 X X
7 X X X
8 X
9 X X
10 X X
11 X X X
12 X X
13 X X X
14 X X X
15 X X X X
16 X
17 X X


Programming a module address


With the SPL dialog the address can be programmed of a module.

  • Set the IID field to the SPL library as configured in the Rocrail Controllers.
  • Set address to 255 if the module did not became an address before and set the new address as desired.
  • Set address to the actual module address to program the new address.

With the Set button the address will be programmed.

Note: The module shows its address at startup with the connected LEDs at startup until the first PC command is received.


Random LED Control


To generate random LED activity can be programmed on the Control tab of the SPL dialog.
Check the 8 LEDs option if the modules are supporting 8 instead of 5 LEDs. (GCA)
Set the module range and program it by the Set button.

  • To disable this Random LED Control both addresses should be set to zero.
  • The random pause between the random actions is between 500ms and 3500ms.
  • The random action will flip the actual LED status.


Hardware

GCA has SPL compatible hardware:


Protocol

    Adressering van de module
    Voer de volgende tekenreeks in om een adres in het interne EEPROM-geheugen van de PIC- te zetten:

    ‘H’ : Huis
    ‘F’ : Hoogste byte van het hexadecimale adres: F voor niet-geprogrammeerde modules
    ‘F’ : Laagste byte van het hexadecimale adres: F voor niet-geprogrammeerde modules
    ‘P’ : Commando P voor programmeren
    ‘a’
    ‘a’
    ‘5’: Beveiligingscode tegen per ongeluk programmeren
    ‘5’: Beveiligingscode tegen per ongeluk programmeren
    ‘x’: Hoogste byte van het te programmeren hex-adres: x = 0-9, A-F
    ‘y’: Laagste byte van het te programmeren hex-adres: y = 0-9, A-F
    ‘CR’: Carriage Return als afsluiting

    Voer in het terminalprogramma ‘HFFPaa55’ in. De module reageert door alle LED’s in te schakelen.
    Voer dan het gewenste adres in (xy) en stuur een CR (druk op de Enter-toets). De LED’s doven dan.
    Als nu de voeding wordt uit- en weer inge- schakeld, is het adres geprogrammeerd.
    Gebruik dezelfde procedure om het adres van de module later te veranderen als dat nodig is.
    Voorbeeld: Om een nog niet geprogrammeerde module in te stellen op adres 23h, voeren we ‘HFFPaa5523’ in en drukken op ‘ENTER’.

    LED-patronen instellen
    Aansturen van een module:
    ‘H’ : Huis
    ‘x’: Hoogste byte van het adres van het aan te sturen huis, x = 0-9, A-F
    ‘y’: Laagste byte van het adres van het aan te sturen huis, y = 0-9, A-F
    ‘S’: Commando S voor Set
    ‘a’: In te schakelen LED’s: hoogste byte, 0-1
    ‘b’: In te schakelen LED’s: laagste byte, 0-9, A-F
    ‘CR’: Carriage Return als afsluiting

    De invoer is dus HxySab ENTER, waarbij xy het adres van de module aangeeft en na
    de S de hexadecimale waarde van de in te schakelen LED’s volgt. Met het bereik van
    00h tot 1Fh zijn alle 32 mogelijke combinaties van de vijf LED’s afgedekt.

    Voorbeeld: Om LED 3 en 5 van module 12 te activeren, voeren we H12S14 ENTER in op de terminal.

Output Type LED

Rocrail revision 14.386+

This is a protocol extension for controlling individual LEDs on Arduino and compatible boards. This is not part of the official Elektor protocol.

If the Output Type is set to type LED, the following command will be send over the serial connection:

HxxExxVxx\r
Char Value Rocrail
H Module number (Home) Output address
E LED number Output port
V Value Output value


xx is a hexadecimal representation in the range of 00 to FF. (0…255)


elektor-spl-en.txt · Last modified: 2021/07/01 00:48 by rainerk