45111 Parallax Inc, 45111 Datasheet - Page 161

MANUAL FOR SX-KEY/BLITZ VER. 2.0

45111

Manufacturer Part Number
45111
Description
MANUAL FOR SX-KEY/BLITZ VER. 2.0
Manufacturer
Parallax Inc
Datasheet

Specifications of 45111

Accessory Type
Manual
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
For Use With/related Products
Parallax microcontroller
For Use With
70002PAR - GUIDE PROG THE SX MICRO -DAUBACH
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Contains lead / RoHS non-compliant
This example for the SX20/28 will clear every General Purpose RAM register on every bank using
indirect addressing.
15.2.12 The Bank Instruction
Often it is desirable to set the bank select bits of the FSR with one instruction cycle (the MOV FSR,
#literal commands above take two cycles). The SX instruction set offers such an instruction called Bank.
The Bank instruction sets the upper bits of the FSR to point to the RAM bank required. Note: On the
SX48/52, the BANK instruction only selects one of 8 banks in either the lower 8 or upper 8 banks. FSR.7 selects
the lower or upper group of 8 banks. To select a bank, use MOV FSR, #literal or add an SETB FSR.7 instruction
after the BANK instruction. Here’s an example of how to use the Bank instruction on the SX20/28:
Init
Loop
$00-
$01-
$02-
$0F-
4
fr (5-bit address in instruction)
mov FSR, #$10
clr
inc
setb FSR.4
cjne FSR, #$10, Loop ; Repeat until all registers
Global
RTCC
IND
$0F
PC
3
Figure 29 - SX48/52 Indirect register addressing
Must be = $00
IND
FSR
2
7
$10-
$11-
$12-
$1F-
Bank Selection Bits
1
6
Bank 0
$0
$1
$2
$F
; FSR = addr of 1
; Clear register
; Point to next register
; Keep us on G.P. RAM area
; have been cleared
SX-Key/Blitz Development System Manual 2.0 Parallax, Inc. Page 161
0
5
Bank 1
$0
$1
$2
$F
15 Appendix E: SX Data Sheet
FSR ($04)
4
Bank 2
$F
$0
$1
$2
st
3
$00
RAM Reg.
$01 - $FF
Register Address
———
2
Bank 15
1
$0
$1
$2
$F
0

Related parts for 45111