68HC11 port B

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

Reply to
john
Loading thread data ...

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
Reply to
Tim Wescott

Not PORTB.

Reply to
James Beck

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

Reply to
Rich Grise

PORTB is not bidirectional and has no DDR.

Reply to
James Beck

So, the OP is Simply Out of Luck. )-;

Thanks, Rich

Reply to
Rich Grise

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

Reply to
James Beck

Register",

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

Reply to
bruce varley

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.