68HC11 port B

Jan 24, 2006 7 Replies

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.

Tim Wescott Wescott Design Services http://www.wescottdesign.com

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:

formatting link

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

Good Luck! Rich

PORTB is not bidirectional and has no DDR.

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. ;)

Register",

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

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required