Project

General

Profile

Вывод РОНа » History » Version 1

krufter_multiclet, 07/18/2013 07:22 PM

1 1 krufter_multiclet
h1. Вывод РОНа
2 1 krufter_multiclet
3 1 krufter_multiclet
<pre>
4 1 krufter_multiclet
.include "HDL50001_pcf.inc"
5 1 krufter_multiclet
6 1 krufter_multiclet
.alias ron2 4
7 1 krufter_multiclet
.alias ron3 5
8 1 krufter_multiclet
9 1 krufter_multiclet
.alias UART_DATA    UART3_DATA
10 1 krufter_multiclet
.alias UART_BDR     UART3_BDR
11 1 krufter_multiclet
.alias UART_ST      UART3_ST
12 1 krufter_multiclet
.alias UART_CR      UART3_CR
13 1 krufter_multiclet
14 1 krufter_multiclet
.alias UART_PORT_PIN  0x300
15 1 krufter_multiclet
.alias UART_PORT_BPS  GPIOD_BPS
16 1 krufter_multiclet
17 1 krufter_multiclet
.text
18 1 krufter_multiclet
19 1 krufter_multiclet
paragraph1:
20 1 krufter_multiclet
    setl #ron3, 0x12345678
21 1 krufter_multiclet
    jmp initUART
22 1 krufter_multiclet
complete
23 1 krufter_multiclet
24 1 krufter_multiclet
initUART:
25 1 krufter_multiclet
    getl 0x00000300
26 1 krufter_multiclet
    wrl @1, UART_PORT_BPS
27 1 krufter_multiclet
    getl 0x00000104
28 1 krufter_multiclet
    wrl @1, UART_BDR
29 1 krufter_multiclet
    getl 0x00000003
30 1 krufter_multiclet
    wrl @1, UART_CR
31 1 krufter_multiclet
    jmp send_byte_UART
32 1 krufter_multiclet
    setl #ron2, 7
33 1 krufter_multiclet
 complete
34 1 krufter_multiclet
 
35 1 krufter_multiclet
send_byte_UART:
36 1 krufter_multiclet
    getl #ron2
37 1 krufter_multiclet
    jne @1, send_byte_UART
38 1 krufter_multiclet
    je @2, buf_TXD
39 1 krufter_multiclet
    getq #ron3
40 1 krufter_multiclet
    slrq @1, 8
41 1 krufter_multiclet
    setq #ron3, @1
42 1 krufter_multiclet
    wrl @3, UART_DATA
43 1 krufter_multiclet
    subl @7, 1
44 1 krufter_multiclet
    setl #ron2, @1
45 1 krufter_multiclet
 complete
46 1 krufter_multiclet
 
47 1 krufter_multiclet
buf_TXD:
48 1 krufter_multiclet
    rdl UART_ST
49 1 krufter_multiclet
    getl 0x00000004
50 1 krufter_multiclet
    and @1, @2
51 1 krufter_multiclet
    je @1, buf_TXD
52 1 krufter_multiclet
    jne @2, end
53 1 krufter_multiclet
complete
54 1 krufter_multiclet
55 1 krufter_multiclet
end:
56 1 krufter_multiclet
    getl 0x1000
57 1 krufter_multiclet
complete
58 1 krufter_multiclet
</pre>