Avisaro Online Documentation - Wiki
Impressum Kontakt Sitemap

SETLEDS

Description

There is a new structure to control I/O ports more effectively. See Mehr here for a description on how to control I/O ports.

The SETLEDS command enables a program to switch some digital I/O lines. SETLEDS needs exactly one argument which contains the bits. A zero bit switches a port OFF as a one bit switches it ON. The pin-assignment of the bits is:

Bits 0,1,2,3 These bits control the internal LEDs on the MCU module.

Bits 4 and 5 These bits control the external LEDS on the trailer module

Bit 6 Controls the RTS line on the RS232 connector, but only if the RS232 driver doesn't use hardware flow control

Bit 7 Controls the DTR line on the RS232 connector.

Example

The following example let all the LEDs flash

let a = 1 
do
   setleds a
   let a = a*2
   if a = 64 then
     let a = 1
   end if
   sleep 100
loop

Remarks

All bits above Bit7 are ignored. See also the KEYS, PUT and GET commands.