Newsgroups: sci.electronics,comp.robotics
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!news.mathworks.com!uhog.mit.edu!bloom-beacon.mit.edu!eru.mt.luth.se!news.luth.se!sunic!erinews.ericsson.se!eua.ericsson.se!ericom!epk.ericsson.se!epklell
From: epklell@epk.ericsson.se (Lennart Lindell)
Subject: Re: 68HC16 bank switching
Message-ID: <1995Feb7.124422.27998@ericsson.se>
Sender: news@ericsson.se
Nntp-Posting-Host: ka117.ericsson.se
Organization: EP Consulting Group AB, Karlskrona, Sweden
References:  <3h7gma$h6a@caravan.ksu.ksu.edu>
Date: Tue, 7 Feb 1995 12:44:22 GMT
Lines: 39
Xref: glinda.oz.cs.cmu.edu sci.electronics:118557 comp.robotics:17694

In article <3h7gma$h6a@caravan.ksu.ksu.edu>, elrich@ksu.ksu.edu (Kip J Mussatt) writes:
|> Greetings all!
|> 	I am working on a project that needs to do bank switching
|> between the 0 and 1st memory banks on an hc16z1.  I have some of the
|> Moto manuals, but they are not very direct.  What topics (other than
|> bank switching) would I find some answers?  Does anyone have some
|> answers they are willing to share ?  I assume there is a register 
|> somewhere that needs to be set, but which one?  Where is it at? 
|> etc. etc.  All help is greatly appreciated!!
|> Please e-mail as well as post if you can.  I need to get this problem
|> fixed *very* soon.  Thanks!!
|> 
|> -Kip
|> elrich@ksu.ksu.edu


Give us some more information.

In the program area you not have to worry about bankswitching
because the PC is 20-bits and JMP and JSR have a 20-bits address
field, and all relative branches use all bits when calculating
the new address.

To set an index register, you have to do it in two steps, example:

   LDX  lowpart
   LDAB highpart
   TBXK

When IX is changed ie:
   INX  oooups! I mean  AIX  #1

all 20 bits of IX is affected.



/Lennart


