summaryrefslogtreecommitdiff
path: root/ldmicro/reg/tests/avr-hw.ld
blob: 7053aa46138cf1ec3e82e7666c8206aab8309080 (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=Atmel AVR ATmega128 64-TQFP
CYCLE=10000
CRYSTAL=4000000
BAUD=2400
COMPILED=C:\depot\ldmicro\reg\expected\avr-hw.hex

IO LIST
    Xinc at 2
    Aanalog at 61
END

PROGRAM
RUNG
    COMMENT The more hardware-oriented ops (PWM, ADC, UART, EEPROM), test for the\r\nAVRs.
END
RUNG
    PERSIST saved
END
RUNG
    READ_ADC Aanalog
END
RUNG
    PARALLEL
        CONTACTS Xinc 0
        GEQ Aanalog 512
    END
    OSR
    ADD saved saved 1
END
RUNG
    PARALLEL
        SERIES
            LES saved 10
            MOVE duty 20
        END
        SERIES
            GEQ saved 10
            MOVE duty 50
        END
        SET_PWM duty 2000
    END
END
RUNG
    TON Tfmtd 1000000
    OSR
    FORMATTED_STRING saved 15 115 97 118 101 100 32 61 32 92 45 53 92 114 92 110
END
RUNG
    MOVE char 'x'
END
RUNG
    TON Tutx 2000000
    OSR
    UART_SEND char
END
RUNG
    UART_RECV inchar
    EQU inchar 'a'
    MOVE saved 0
END