Mask - is a variable/constant which specifies the LEDs to use.
Set/clear the keyboard LEDs.
This command is used to control the LEDs on a computer keyboard (connected directly to the PICAXE - not the keyboard used whilst programming). The mask value sets the operation of the LEDs. Mask is used as follows:
||Scroll Lock (1=on, 0=off)
||Num Lock (1=on, 0=off)
||Caps Lock (1=on, 0=off)
||Disable Flash (1=no flash, 0=flash)
On reset mask is set to 0, and so all three LEDs will flash when the 'kbin' command detects a new key hit. This provides the user with feedback that the key press has been detected by the PICAXE. This flashing can be disabled by setting bit 7 of mask high. In this case the condition of the three LEDs can be manually controlled by setting/clearing bits 2-0.
Effect of Increased Clock Speed
This command will only function at 4MHz.
Please note the 'kbled' command is only supported for 18M2 firmware D.x (PICAXE chips labelled 18M2+) and is not available for use with 18M2 firmware 2.x (PICAXE chips labelled 18M2).
The PICAXE compiler will syntax check code for an 18M2 as correct when using the 'kbled' command but will generate an error when an attempt is made to download into an 18M2 with firmware 2.x.