First, let's take a look at my board (s3c2440)
It can be seen that to make the LED tube light up, just set nLED1 to a low level, that is, set the corresponding GPIO pin to a low level.
From the above two pictures, we can find that LED1, LED2, and LED4 correspond to the GPF port of S3c2440. So, by consulting the manual
You can know the address of the corresponding register. Then you can start programming.
.text
.global _start
_start:
@Configure GPF as an output pin
LDR R0, =0x56000050
MOV R1, #0x00005500
STR R1, [R0]
@Output low level
LDR R0, =0x56000054
MOV R1, #0x00000050
STR R1, [R0]
MAIN_LOOP:
B MAIN_LOOP
Makefile
led_on.bin: led_on.S
arm-linux-gcc -g -c -o led_on.o led_on.S
arm-linux-ld -Ttext 0x00000000 -g led_on.o -o led_on_elf
arm-linux-objcopy -O binary -S led_on_elf led_on.bin
clean:
rm -f led_on.bin led_on_elf *.o *.bak
Then pass
tftp 30000000 led_on.bin
nand write bootloader led_on.bin 4000
Just burn the executable file to Nand Flash.
Previous article:LPC ARM uses SPI bus to control 8 LED lights
Next article:SPI driver example in LPC1768 - based on SST25VF016B
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Download from the Internet--ARM Getting Started Notes
- Learn ARM development(22)
- Learn ARM development(21)
- Learn ARM development(20)
- Learn ARM development(19)
- Learn ARM development(14)
- Learn ARM development(15)
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- Has your iPhone 13 arrived? Here comes the real iPhone 13 series disassembly
- EEWORLD University Hall ---- Industrial innovation applications based on DLP
- About the test of Gaoyun Yunyuan software ERROR (PA2050): Module 'xx' is instantiated but n...
- About the power consumption optimization design in embedded DSP design
- About the peripheral circuit of single chip microcomputer to measure the frequency of alternating current
- Why does TPS92691 recommend adding resistors and capacitors to the Vin design?
- Static Timing Analysis Basics and Applications
- How much do you know about the performance improvement of Wi-Fi 6 routers?
- What is the problem with amplifier instability?
- 【RPi PICO】Breathing light