read memorybank
HI,
how can i get data from memory bank ? fill works fine but reading isnt work.
:main
bank $10
mov tmp,rb
mov $1F,tmp ;fill
mov tmp,rb
mov $1E,tmp
mov rc,$1F ??????? ;read
jmp:main
thanks for help
how can i get data from memory bank ? fill works fine but reading isnt work.
:main
bank $10
mov tmp,rb
mov $1F,tmp ;fill
mov tmp,rb
mov $1E,tmp
mov rc,$1F ??????? ;read
jmp:main
thanks for help
![confused.gif](http://forums.parallax.com/images/smilies/confused.gif)
Comments
I suspect that you have not setup port RC as outputs.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheap 4-digit LED display with driver IC·www.hc4led.com
COMING SOON "SD DATA LOGGER" www.sddatalogger.com
"I reject your reality, and substitute my own." Mythbusters
·
ok. sorry
;=======================================================================
;TITLE: Mem Test.src
;
;PURPOSE: Simple Mem example SX28AC/DP
;
;AUTHOR: A S
;
;REVISIONS: 1.1
50 MHZ
;
; no sync
; 08.05.2005
;
;
;CONNECTIONS:
; RA Out
; RB Input
; RC Out
;
;
DEVICE DIRECTIVES
DEVICE SX28,OSCHS3,TURBO
IFDEF __SASM ;SASM Directives
DEVICE STACKX,OPTIONX
IRC_CAL IRC_FAST
ELSE ;Parallax Assember Directives
DEVICE STACKX_OPTIONX
ENDIF
FREQ 50_000_000
RESET Main
org $08
tmp ds 1
org $000
Main
;
Datenspeicher auf NULL setzen
clr fsr
:ClearData
sb fsr.4
Setb fsr.3
clr ind
ijnz fsr,:ClearData
;
end
;Port IO Setzen
mov !ra, #%00000000 ;Port A output LED Port RA3 0=an 1= aus
mov ra,#%00000000 ;Port A all bit output 0.
mov !rb, #%11111111 ;Port B input
mov rb,#%00000000 ;Port B all bit input 0.
mov !rc, #%00000000 ;Port C output
mov rc,#%00000000 ;Port C all bit output 0.
;
end
;Initialisierung
mov fsr,#$FF
;Hauptschleife
:main
mov rb,#%11111111
bank $10 ; Speicherbank aktiv
mov tmp,rb ; lese und Hilfsvariable legen
mov $1F,tmp ; speicher ab
mov tmp,rb
mov $1E,tmp
mov tmp,rb
mov $1D,rb
mov tmp,rb
mov $1C,rb
mov tmp,rb
mov $1B,rb
mov tmp,rb
mov $1A,rb
mov tmp,rb
mov $19,rb
mov tmp,rb
mov $18,rb
mov tmp,rb
mov $17,rb
mov tmp,rb
mov $16,rb
mov tmp,rb
mov $15,rb
mov tmp,rb
mov $14,rb
mov tmp,rb
mov $13,rb
mov tmp,rb
mov $12,rb
mov tmp,rb
mov $11,rb
mov tmp,rb
mov $10,rb
mov rc,#$12
mov rc,#$13
mov rc,#$14
mov rc,#$15
mov rc,#$16
mov rc,#$17
mov rc,#$18
mov rc,#$19
mov rc,#$1A
mov rc,#$1B
mov rc,#$1C
mov rc,#$1D
mov rc,#$1E
mov rc,#$1F
jmp :main