Maker Pro
Maker Pro

68HC11 port B

J

john

Jan 1, 1970
0
Hi,

I am having problems with the port B. Its an output port and I am
writing the whole port. My code is as follows

ORG 2000
LDAA $# FF
STAA $1004

Now, if I write 00 hex or FF to theport. The port is always floating.
I tried pull ups and pull downs but no difference. Please advice.
Thanks

Regards
John
 
T

Tim Wescott

Jan 1, 1970
0
john said:
Hi,

I am having problems with the port B. Its an output port and I am
writing the whole port. My code is as follows

ORG 2000
LDAA $# FF
STAA $1004

Now, if I write 00 hex or FF to theport. The port is always floating.
I tried pull ups and pull downs but no difference. Please advice.
Thanks

Regards
John
The 68HC11 that I worked with allowed you to program the direction of
the port -- with the direction bit flipped one way (0 IIRC) the port was
a high-impedance input, and with the direction bit flipped the other the
port was an output. Most of those ports could also be configured for
open-drain output, if you so desired.
 
J

James Beck

Jan 1, 1970
0
The 68HC11 that I worked with allowed you to program the direction of
the port -- with the direction bit flipped one way (0 IIRC) the port was
a high-impedance input, and with the direction bit flipped the other the
port was an output. Most of those ports could also be configured for
open-drain output, if you so desired.
Not PORTB.
 
R

Rich Grise

Jan 1, 1970
0
I am having problems with the port B. Its an output port and I am
writing the whole port. My code is as follows

ORG 2000
LDAA $# FF
STAA $1004

Now, if I write 00 hex or FF to theport. The port is always floating.
I tried pull ups and pull downs but no difference. Please advice.
Thanks

Take a look at the data sheet, and look for the "Data Direction Register",
or DDR. You'll need to configure the port as "output".

In case you're trying to do this without a data sheet, here's one:
http://www.freescale.com/files/microcontrollers/doc/data_sheet/M68HC11E.pdf

Also, are you trying to run it in expanded or special test modes?

Good Luck!
Rich
 
J

James Beck

Jan 1, 1970
0
Take a look at the data sheet, and look for the "Data Direction Register",
or DDR. You'll need to configure the port as "output".

PORTB is not bidirectional and has no DDR.
 
J

James Beck

Jan 1, 1970
0
So, the OP is Simply Out of Luck. )-;

Thanks,
Rich
Well, yes and no.
He wants to treat it like an output, so I guess it is fortunate that
PORTB is an output only port, but if it is truly "floating" then he is
screwed. ;)
 
B

bruce varley

Jan 1, 1970
0
James Beck said:
PORTB is not bidirectional and has no DDR.

And in expanded mode it outputs low order address bits. Could that be your
problem?
 

Similar threads

B
Replies
2
Views
1K
Rich Grise
R
G
Replies
1
Views
1K
James Beck
J
R
Replies
12
Views
2K
Jasen Betts
J
Top