HC11 question

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

HC11 question

4,688 Views
fabb
Contributor I
Hello I own a EVBU2 for the HC11 processor...I can't get software to write a simple bit pattern to DDRC (1007).  After running the program the register is simply unaffected.  If I use the mm command to modify the data manually, I get the rom- error.  This should be a writable register, can anyone help?? 
 
Kirk
Labels (1)
0 Kudos
5 Replies

546 Views
bigmac
Specialist III

Hello Kirk,

On some of the earlier Motorola MCUs, the DDR were write-only registers, so that after being written, the contents could not be read back.  I wonder if this might apply in your case?

Have you tested whether the required output pins actually operate as outputs?

Regards,
Mac

 

0 Kudos

546 Views
rocco
Senior Contributor II
Hi, Kirk:

Can you post a code snippet?

Is the radix correct? The reason I ask is that 1007 is a hex address ($1007), and your post has it as a decimal address. I don't know the mm command (we must be using different software), so I can't help much with the rom-error, except to say that it could be radix related as well.
0 Kudos

546 Views
fabb
Contributor I
Sure: Thanks for the reply
 
 
PORTC     EQU     $1003
DDRC       EQU     $1007
 
                 ORG     $C100
                 LDAA    #$01
                  STAA    DDRC
here           BRA      here
 
 
I am using the EVBU2 for the HC11, Single Chip mode with Buffalo monitor.  mm is the memory modify command...it allows for manual manipulation of a memory register.  When I try the mm command, it gives me the rom- error indicating that I cannot write to this location.  Thanks again!
 
Kirk
0 Kudos

546 Views
tonyp
Senior Contributor II

A couple of possibilities:

I see you ORG at $C100.  What type of memory is there?

It can't be internal memory because $C100 is in (unimplemented?) ROM (unless explicitly moved by writing to INIT).  If it's external you're in expanded mode, not single-chip mode, so PORTC/DDRC can't be used.  Could $C100 be a typo from $0100, a more common value used for testing short programs with EVBUs?

Second possibility, if you do load and run the program in RAM the registers may have been moved to another page by the loader.  So, DDRC could be at $0007 instead of $1007, or even some other page.

Good luck

Message Edited by tonyp on 05-05-200601:35 PM

0 Kudos

546 Views
fabb
Contributor I
Ok everyone I think I figured it out yesterday...Yes the chip is operating in Expanded mode.  There is a jumper on the board that was not in place causing the micro to reset to expanded mode thus eliminating PORTC from being general IO.  The put the jumper in place and now I can write to the registers and they operate without problem.  Aparently there is an addendum that came with my EVBU2 that states J4 was not shorted like it would be for the EVBU1.  So if I wanted to get to single chip mode I would need to place the jumper back in.  The other problem is now the amount of memory I have is significantly reduced.  Any suggestions or am I stuck with what I got???  Thanks again everyone!!
 
Kirk
0 Kudos