chiark / gitweb /
undo broken deletion
[trains.git] / detpic / routines-led.asm
1 ;**********************************************************************
2 ; routines-led
3 ; subroutines for controlling the per-pic LED (pin 21, DS100)
4
5         include         common.inc
6
7         code
8
9 ;----------------------------------------
10 led_red @
11 ; makes the LED be red (or orange), no matter its previous state
12 ; no RAM locations used or modified
13 ; W is unchanged
14         bcf             LATD, 2, 0              ; output low
15         bcf             TRISD, 2, 0             ; output enabled
16         return
17
18 ;----------------------------------------
19 led_green @
20 ; makes the LED be green (or blue), no matter its previous state
21 ; no RAM locations used or modified
22 ; W is unchanged
23         bsf             LATD, 2, 0              ; output high
24         bcf             TRISD, 2, 0             ; output enabled
25         return
26
27 ;----------------------------------------
28 led_black @
29 ; makes the LED be black (off), no matter its previous state
30 ; no RAM locations used or modified
31 ; W is unchanged
32         bsf             TRISD, 2, 0             ; disable flasher output
33         return
34
35         include         final.inc