summaryrefslogtreecommitdiff
path: root/ldmicro/sample/blink.ld
blob: e86d7a3ea720436bba8b0362c58d5f21e507e570 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
LDmicro0.1
MICRO=Microchip PIC16F877 40-PDIP
CYCLE=10000
CRYSTAL=4000000
COMPILED=C:\depot\ldmicro\pic.hex

IO LIST
    Xbutton at 21
    Yled at 30
END

PROGRAM
RUNG
    CONTACTS Xbutton 1
    CTC Cwhich 4
END
RUNG
    CONTACTS Xbutton 1
    OSF
    TOF Tdblclk 500000
    COIL Rdblclk 0 0 0
END
RUNG
    CONTACTS Xbutton 1
    CONTACTS Rdblclk 0
    MOVE Cwhich 3
END
RUNG
    CONTACTS Rfast 0
    TOF Tffast 100000
    TON Tnfast 100000
    COIL Rfast 1 0 0
END
RUNG
    CONTACTS Rslow 0
    TON Tnslow 100000
    TOF Tfslow 1000000
    COIL Rslow 1 0 0
END
RUNG
    PARALLEL
        SERIES
            EQU Cwhich 0
            CONTACTS Rfast 0
        END
        SERIES
            EQU Cwhich 1
            CONTACTS Rslow 0
        END
        SERIES
            EQU Cwhich 2
            CONTACTS Rslow 1
        END
        EQU Cwhich 3
        SERIES
            EQU Cwhich 4
            OPEN
        END
    END
    COIL Yled 0 0 0
END