This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

IO port access

how are the io ports (external devices) defined and accessed using C166 compiler?

  • It depends on what you mean by IO ports.
    If it's microcontroller IO lines (PORT0, PORT1, PORT2, ...), then use DPx and Px registers.
    If you mean peripherals on external bus, then it's memory mapped peripherals. You access them exactly the way you would write to and read from memory. Header file absacc.h provides predefined macros for accessing absolute memory locations.

    - mike