Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
ctboard:peripherals:7segment_bin [2018/01/14 09:36] – [Registers] ruanctboard:peripherals:7segment_bin [2026/06/25 14:59] (current) – [Programming Example] scbj
Line 7: Line 7:
 > Supported [[ctboard:mode_switch|modes]]: **1**, **2**, **3**, **4**  > Supported [[ctboard:mode_switch|modes]]: **1**, **2**, **3**, **4** 
 \\ \\
 +
 +===== Registers =====
 +
 +The registers are read / write.
 +
 +\\ {{ctboard_7seg_bin_reg.svg}} \\ \\
 +
 +===== Diagram =====
 +
 +\\ {{ctboard_7seg_bin.svg?700em}} \\ \\
  
 ===== Programming Example ===== ===== Programming Example =====
  
-The code snippet bellow shows how to use the 7 segment display as HEX display.+The code snippet below shows how to use the 7-segment display as HEX display.
  
 <code c> <code c>
Line 20: Line 30:
 \\ \\
  
-<code asm+<code text
-ADDR_SEG7_BIN   EQU      0x60000114+.equ ADDR_SEG7_BIN,  0x60000114
  
-                LDR      r0, =ADDR_SEG7_BIN +        ldr     r0,  =ADDR_SEG7_BIN 
-                STRB     r1, [r0, #0]                     ; Write byte of binary data to DS1..0. +        strb    r1,  [r0, #0]          // Write byte of binary data to DS1..0. 
-                STRH     r1, [r0, #0]                     ; Write half word of binary data to all displays.+        strh    r1,  [r0, #0]          // Write half word of binary data to all displays.
 </code> </code>
 \\ \\
  
-===== Registers ===== 
- 
-The registers are read / write. 
- 
-\\ {{ctboard_7seg_bin_reg.svg}} \\ \\ 
- 
-===== Diagram ===== 
- 
-\\ {{ctboard_7seg_bin.svg?700em}} \\ \\ 
  • ctboard/peripherals/7segment_bin.1515922601.txt.gz
  • Last modified: 2018/01/14 09:36
  • by ruan