Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| ctboard:peripherals:led [2016/01/26 12:39] – feur | ctboard:peripherals:led [2022/12/23 11:06] (current) – ruan | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== LED ====== | ====== LED ====== | ||
| - | On the CT Board are 32 LEDs mounted. They are arranged in 4 groups of 8 LEDs and are **" | + | The CT Board features |
| E.g. the LEDs are on if a logical **" | E.g. the LEDs are on if a logical **" | ||
| - | > {{ctboard_mode_1.svg? | + | > {{ctboard:ctboard_mode_1.svg? |
| - | > Supported modes: **1**, **2**, **3** | + | > Supported |
| + | \\ | ||
| ===== Registers ===== | ===== Registers ===== | ||
| - | The Registers | + | The registers |
| - | |< 100% 10em >| | + | \\ {{ctboard_led_reg.svg}} \\ \\ |
| - | ^ Address | + | |
| - | ^ 0x6000' | + | |
| - | ^ 0x6000' | + | |
| - | ^ 0x6000' | + | |
| - | ^ 0x6000' | + | |
| ===== Diagram ===== | ===== Diagram ===== | ||
| - | \\ {{: | + | \\ {{: |
| + | |||
| + | ===== Programming Example ===== | ||
| + | |||
| + | The code snippets below show how to use the LEDs. | ||
| + | |||
| + | <code c> | ||
| + | #include " | ||
| + | |||
| + | CT_LED-> | ||
| + | CT_LED-> | ||
| + | CT_LED-> | ||
| + | </ | ||
| + | \\ | ||
| + | |||
| + | <code asm> | ||
| + | ADDR_LED | ||
| + | |||
| + | LDR r0, =ADDR_LED | ||
| + | STRB r1, [r0, #0] ; Write byte of data to LED7..0. | ||
| + | STRH r1, [r0, #2] ; Write half word of data to LED31..16. */ | ||
| + | STR r1, [r0, #0] ; Write word of data to all LEDs. */ | ||
| + | </ | ||
| + | \\ | ||