Discussion:
HC11 noobie problem
(too old to reply)
CHz
2006-12-03 04:50:48 UTC
Permalink
I'm currently using the 68HC11 for my undergraduate project but i can't
seems to get the chip to work properly, i'm trying out a simple program
of turining the LEDs on at a 10101010 sequence but when i supply a 5V
to turn on the chip, all the LED light up. Should i be using the
bootstrap mode or other mode of the HC11?? please advice .

This is the code i programmed into the EEPROM
ORG $B600
START LDX #$1000

HERE LDAA $%10101010
STAA PORTB,X
BRA HERE

ORG $BFFE
FDB START

Thx :-)
Everett M. Greene
2006-12-03 14:13:03 UTC
Permalink
Post by CHz
I'm currently using the 68HC11 for my undergraduate project but i can't
seems to get the chip to work properly, i'm trying out a simple program
of turining the LEDs on at a 10101010 sequence but when i supply a 5V
to turn on the chip, all the LED light up. Should i be using the
bootstrap mode or other mode of the HC11?? please advice .
This is the code i programmed into the EEPROM
ORG $B600
START LDX #$1000
HERE LDAA $%10101010
STAA PORTB,X
BRA HERE
ORG $BFFE
FDB START
What are you trying to accomplish and what is the
problem? If you're trying to have some sort of
changing pattern in the LEDs, your code won't do it.
You are repeatedly writing the same pattern which
won't change a thing.

If the problem is all the LEDs lighting regardless
of the value you write to port B, the problem may
well be that port B isn't been configured for
output having been set to input by reset. Look
at the description for DDRB and see what the manual
says.
james
2006-12-05 03:11:33 UTC
Permalink
First off you use boostrap mode to load code into the eprom or eeprom
area. You do not run the code loaded into eeprom while in bootstrap
mode. Some versions of the HC11 family will erase the eeprom when
incorrect ack is not recieved when in bootstrap mode.

Also you code will not overwrite teh bootstrap reset vector. Most
likely the the code is trying to run the boot code even with multiple
pressing of the reset button.

Since this fragment appears to be incomplete, I can't help you much
more with your code. I could write y ou homework for a fee, but t hen
you would gain no experience by doing so. Post a more complete code
and maybe someone can answer to specific lines.

james
+++I'm currently using the 68HC11 for my undergraduate project but i can't
+++seems to get the chip to work properly, i'm trying out a simple program
+++of turining the LEDs on at a 10101010 sequence but when i supply a 5V
+++to turn on the chip, all the LED light up. Should i be using the
+++bootstrap mode or other mode of the HC11?? please advice .
+++
+++This is the code i programmed into the EEPROM
+++ORG $B600
+++START LDX #$1000
+++
+++HERE LDAA $%10101010
+++ STAA PORTB,X
+++ BRA HERE
+++
+++ ORG $BFFE
+++ FDB START
+++
+++Thx :-)
Loading...