Connect with us

68HC11 port B

Discussion in 'Electronic Design' started by john, Jan 24, 2006.

Scroll to continue with content
  1. john

    john Guest

    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
     
  2. Tim Wescott

    Tim Wescott Guest

    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.
     
  3. James Beck

    James Beck Guest

    Not PORTB.
     
  4. Rich Grise

    Rich Grise Guest

    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
     
  5. James Beck

    James Beck Guest

    PORTB is not bidirectional and has no DDR.
     
  6. Rich Grise

    Rich Grise Guest

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

    Thanks,
    Rich
     
  7. James Beck

    James Beck Guest

    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. ;)
     
  8. bruce varley

    bruce varley Guest

    And in expanded mode it outputs low order address bits. Could that be your
    problem?
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-