SX code snippet, please?
MacGeek117
Posts: 747
I don't have the SX Tool Kit yet, So please don't think that I'm trying to get someone to solve a problem for me, but could someone please attach a snippet of assembly code that blinks a LED twice a second?
bugg
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Boe-bot: $229
Toddler: $249
Learning Google is your friend: priceless
bugg
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Boe-bot: $229
Toddler: $249
Learning Google is your friend: priceless
Comments
<SNIP>
bugg
setb ra.0··· ;make pin ra.0 high
call delay
clrb· ra.0··· ;make ra.0 low
call delay
jmp bugg··· ;do it again
at www.sxlist.com there is a cool delay code generator. You enter the clock frequency, delay amount and it spits out the code as shown below.
http://www.sxlist.com/cgi-bin/delay.exe
The 5 uS delay shown below is running the SX at 4MHz
del_5uS
·jmp·$+1
·jmp·$+1
·jmp·$+1
·jmp·$+1
·nop
·nop
·ret
Post Edited (KenM) : 3/25/2005 2:56:21 AM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas, TX· USA
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"SX-Video Display Module" Available Now.
www.sxvm.com
"A problem well defined, is a problem·half solved."
·
bugg
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Boe-bot: $229
Toddler: $249
Learning Google is your friend: priceless
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas, TX· USA
bugg
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Boe-bot: $229
Toddler: $249
Learning Google is your friend: priceless