Toggle GPIO Output with Assembly [ SOLVED] - Raspberry Pi Forums
i'm trying blink led using gpio pin output. when plug in , test it, led turns on , stays on. doing wrong?
ps i'm using original pi model b.
ps i'm using original pi model b.
code: select all
format binary "img" org $8000 mov r11, 0x20000000 ; peripheral adr add r11, 0x200000 mov r1, 0 ; clr fsel0 0, 1 input str r1, [r11] mov r1, $9000 ; set fsel1 14, 15 output ldr r1, [r11, 4] blink: mov r1, $4000 ; 14 str r1, [r11, $1c] ; gpset mov r0, 3 bl sleep mov r1, $4000 ; 14 str r1, [r11, $28] ; gpclr mov r0, 15 bl sleep b blink
what purpose using '$' symbol before constant? doubt represents hex decimal expect. need prefix `0x`, think.
raspberrypi
Comments
Post a Comment