                                                               +--------------+
                                                               | IO90385-003E |
                                                               +--------------+























                           SAMPLE I/O REGISTER FILES
                      FOR F2MC-16LX FAMILY MB90385/455 SERIES

                                 USERS MANUAL

                                FUJITSU LIMITED

                                 VERSION 3.0

Preface

  The sample I/O register files for MB90385/455 series declares and defines
  symbols, thereby enabling the I/O registers
  of the F2MC-16LX family to be handled as Asembler symbols.
  This manual describes the configuration of the I/O register files,
  symbol declaration and definition.




Items to note before using I/O register files

  - The I/O register files are intended for specific series of
    MB90385/455 series.
    Before applying these programs to any other series of MB90385/455 series,
    therefore, be sure to modify the I/O register files.

  - When a program for I/O register operation is coded, the I/O register
    access sequence and timing must be considered. Please refer to the
    related hardware manuals.

  - The I/O register files are provided as valuable aids in developing the
    application programs for MB90385/455 series. In practice, however,
    some of these programs may need be modified depending on the
    target system. Before using any of them, therefore, be sure to verify
    the actual operation of the program.

  - Fujitsu may assume no liability for errors in the I/O register files and
    no responsibility for correcting errors immediately even if they are found.

Reference manuals

  I/O register files for MB90385/455 series (Version 3.0) are made based
  on the following manuals.

    - MB90385 series HARDWARE MANUAL(CM44-10118-1E.pdf)
    - MB90455 series HARDWARE MANUAL(CM44-10124-1E.pdf)

Contents

CHAPTER 1  CONFIGURATION OF I/O REGISTER FILES

CHAPTER 2  USAGE OF I/O REGISTER FILES

CHAPTER 3  DECLARATION OF I/O REGISTER DECLARATION FILES

CHAPTER 4  SYMBOL NAMES USED IN I/O REGISTER DECLARATION FILES
           FOR MB90385/455 SERIES

CHAPTER 1  CONFIGURATION OF I/O REGISTER FILES

 ${FETOOL}             (Directory set in environment variable FETOOL)
  +-lib
    +-907
      +-include
        +-sample
          +-mb90385
            +-_ffmc16.h  (I/O register declaration file)
            |
            +-_mb90385.h (I/O register declaration file for MB90385/455 series)
            +-_ra90385.h (I/O register structure declaration file
            |                                           for MB90385/455 series)
            |
            +-_ffmc16_a.asm (I/O register definition file)

  - I/O register declaration file

    This file declares all the associated I/O register symbols (symbols
    corresponding to I/O registers).
    Please include this file when coding a program that handles associated
    I/O registers.

  - I/O register declaration file for MB90385/455 series

    This file declares all the structure types corresponding to I/O registers
    for MB90385/455 series.

  - I/O register structure declaration file for MB90385/455 series

    This file declares all the structure types corresponding to I/O registers
    for MB90385/455 series.

  - I/O register definition file for each I/O register

    This file defines each the associated I/O register symbol and specifies
    arrangement address.

CHAPTER 2  USAGE OF I/O REGISTER FILES

  (1) Please assemble the I/O register definition file with the CPU option
      of using MB number.
        example:  > fasm907s -cpu mb90*** _ffmc16_a.asm

  (2) When you describe the application program which refers to the I/O
      registers, please include the I/O register declaration file.

        example:  #include "_ffmc16.h"

                         .....
                    SETB  IO_TCCS_MODE
                         .....

  (3) Please assemble the application program file with the CPU option of
      using MB number.

        example:  > fasm907s -cpu mb90*** sample.asm

        Note: When the MB number of the specified CPU option cannot be used
              for the I/O register file, the following messages are output.

                #error "The I/O register file of the specified CPU option
                        does not exist"

  (4) Please link the I/O register definition object file and the application
      program object file.

        example: > flnk907s -cpu mb90*** -o sample.abs _ffmc16_a.obj sample.obj

CHAPTER 3  DECLARATION OF I/O REGISTER DECLARATION FILES

  Each I/O register declaration file declares the symbols corresponding to
  I/O register names and bit names as follows:

    - The I/O register symbols that can be accessed in bits are declared in
      bit type.

    - The I/O register symbols that must be accessed in 1, 2 or 4 bytes
      are declared in byte type.

    - Basically, each symbol name is declared in the form of the
      corresponding I/O  register name plus '_IO_'.
      (However, for access convenience, two or more I/O registers may be
       declared by one symbol name.)

    - A bit symbol name is declared by the corresponding bit name.
      (some bits are declared in one symbol name for access convenience)


  [Example]  Declaration for I/O register PDR0

    - I/O register structure

          7       6       5       4       3       2       1       0    bit No.
      +-------+-------+-------+-------+-------+-------+-------+-------+
      |   P07 |   P06 |   P05 |   P04 |   P03 |   P02 |   P01 |   P00 | PDR0
      +-------+-------+-------+-------+-------+-------+-------+-------+

    - Contents of declaration (used macro statement)

        #macro io_pdr0 symbol
                BYTE_MEM
                STRUCT_TYPE_B
                        UCHARBIT(       PD00, 1)
                        UCHARBIT(       PD01, 1)
                        UCHARBIT(       PD02, 1)
                        UCHARBIT(       PD03, 1)
                        UCHARBIT(       PD04, 1)
                        UCHARBIT(       PD05, 1)
                        UCHARBIT(       PD06, 1)
                        UCHARBIT(       PD07, 1)
                STRUCT_TYPE_E(bit)
        #endm

        __IO_EXTERN  UNION_D(io_pdr0,   IO_PDR0)

    - Contents of macro spread

        [At I/O register define]                 [At I/O register declare]
                      .GLOBAL _IO_PDR0             .GLOBAL _IO_PDR0
        _IO_PDR0      .res.b  0                    .GLOBAL _IO_PDR0_PD00
                      .GLOBAL _IO_PDR0_PD00        .GLOBAL _IO_PDR0_PD01
        _IO_PDR0_PD00 .RES.i  1                    .GLOBAL _IO_PDR0_PD02
                      .GLOBAL _IO_PDR0_PD01        .GLOBAL _IO_PDR0_PD03
        _IO_PDR0_PD01 .RES.i  1                    .GLOBAL _IO_PDR0_PD04
                      .GLOBAL _IO_PDR0_PD02        .GLOBAL _IO_PDR0_PD05
        _IO_PDR0_PD02 .RES.i  1                    .GLOBAL _IO_PDR0_PD06
                      .GLOBAL _IO_PDR0_PD03        .GLOBAL _IO_PDR0_PD07
        _IO_PDR0_PD03 .RES.i  1
                      .GLOBAL _IO_PDR0_PD04
        _IO_PDR0_PD04 .RES.i  1
                      .GLOBAL _IO_PDR0_PD05
        _IO_PDR0_PD05 .RES.i  1
                      .GLOBAL _IO_PDR0_PD06
        _IO_PDR0_PD06 .RES.i  1
                      .GLOBAL _IO_PDR0_PD07
        _IO_PDR0_PD07 .RES.i  1

CHAPTER 4  SYMBOL NAMES USED IN I/O REGISTER DECLARATION FILES
           FOR MB90385/455 SERIES

<<I/O port>>

  - MB number containing this I/O register

  - I/O register structure

        7       6       5       4       3       2       1       0     bit No.
    +-------+-------+-------+-------+-------+-------+-------+-------+
    |  Pn7  |  Pn6  |  Pn5  |  Pn4  |  Pn3  |  Pn2  |  Pn1  |  Pn0  | PDRn
    +-------+-------+-------+-------+-------+-------+-------+-------+
    +-------+-------+-------+-------+-------+-------+-------+-------+
    |  Dn7  |  Dn6  |  Dn5  |  Dn4  |  Dn3  |  Dn2  |  Dn1  |  Dn0  | DDRn
    +-------+-------+-------+-------+-------+-------+-------+-------+
    +-------+-------+-------+-------+-------+-------+-------+-------+
    |  ADE7 |  ADE6 |  ADE5 |  ADE4 |  ADE3 |  ADE2 |  ADE1 |  ADE0 | ADER
    +-------+-------+-------+-------+-------+-------+-------+-------+

  - Usable symbol name

    --------------------------------------------------------------------------
      Register name  At access in 1/2/4bytes  At access in bits
    --------------------------------------------------------------------------
      PDRn              _IO_PDRn              _IO_PDRn_Pnx(x:0 - 7)
      (n=1 - 5)

      DDRn              _IO_DDRn              _IO_DDRn_Dnx(x:0 - 7)
      (n=1 - 5)

      ADER              _IO_ADER              _IO_ADER_ADEx(x:0 - 7)
    --------------------------------------------------------------------------

<<UART>>

  - I/O register structure

        7       6       5       4       3       2       1       0     bit No.
    +-------+-------+-------+-------+-------+-------+-------+-------+
    |  MD1  |  MD0  |  CS2  |  CS1  |  CS0  |  RST  |  SCKE |  SOE  | SMRn
    +-------+-------+-------+-------+-------+-------+-------+-------+
    +-------+-------+-------+-------+-------+-------+-------+-------+
    |  PEN  |    P  |  SBL  |   CL  |   AD  |  REC  |  RXE  |  TXE  | SCRn
    +-------+-------+-------+-------+-------+-------+-------+-------+
    +-------+-------+-------+-------+-------+-------+-------+-------+
    |   D7  |   D6  |   D5  |   D4  |   D3  |   D2  |   D1  |   D0  | SIDRn/
    +-------+-------+-------+-------+-------+-------+-------+-------+ SODRn
    +-------+-------+-------+-------+-------+-------+-------+-------+
    |   PE  |  ORE  |  FRE  |  RDRF |  TDRE |  BDS  |  RIE  |  TIE  | SSRn
    +-------+-------+-------+-------+-------+-------+-------+-------+
    +-------+-------+-------+-------+-------+-------+-------+-------+
    |   MD  |   -   |   -   |   -   |reserve|  DIV2 |  DIV1 |  DIV0 | CDCRn
    +-------+-------+-------+-------+-------+-------+-------+-------+

  - Usable variable and member name

    --------------------------------------------------------------------------
      Register name  At access in 1/2/4bytes  At access in bits
    --------------------------------------------------------------------------
      SMRn              _IO_SMRn              _IO_SMRn_SOE
      (n:1)                                   _IO_SMRn_SCKE
                                              _IO_SMRn_RST
                                              _IO_SMRn_CS     [CS0 - CS2]
                                              _IO_SMRn_MD     [MD0 - MD1]

      SCRn              _IO_SCRn              _IO_SCRn_TXE
      (n:1)                                   _IO_SCRn_RXE
                                              _IO_SCRn_REC
                                              _IO_SCRn_AD
                                              _IO_SCRn_CL
                                              _IO_SCRn_SBL
                                              _IO_SCRn_P
                                              _IO_SCRn_PEN

      SIDRn/SODRn       _IO_SIDRn             _IO_SIDRn_D     [D0 - D6]
      (n:1)

      SSRn              _IO_SSRn              _IO_SSRn_TIE
      (n:1)                                   _IO_SSRn_RIE
                                              _IO_SSRn_BDS
                                              _IO_SSRn_TDRE
                                              _IO_SSRn_RDRF
                                              _IO_SSRn_FRE
                                              _IO_SSRn_ORE
                                              _IO_SSRn_PE

      CDCRn             _IO_CDCRn             _IO_CDCRn_DIV   [DIV0 - DIV2]
      (n:1)                                   _IO_CDCRn_MD
    --------------------------------------------------------------------------
      Note: When using a simple assignment statement to write data to CDCRn
            (member _IO_CDCRn), be sure to write 0 to reserved bit.

<<DTP/external interrupts>>

  - I/O register structure

        7       6       5       4       3       2       1       0     bit No.
    +-------+-------+-------+-------+-------+-------+-------+-------+
    |  EN7  |  EN6  |  EN5  |  EN4  |  EN3  |  EN2  |  EN1  |  EN0  | ENIR
    +-------+-------+-------+-------+-------+-------+-------+-------+
    +-------+-------+-------+-------+-------+-------+-------+-------+
    |  ER7  |  ER6  |  ER5  |  ER4  |  ER3  |  ER2  |  ER1  |  ER0  | EIRR
    +-------+-------+-------+-------+-------+-------+-------+-------+

      15  14  13  12  11  10  9   8   7   6   5   4   3   2   1   0   bit No.
    +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
    |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   | ELVR
    +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
      |   LA7 |   LA6 |   LA5 |   LA4 |   LA3 |   LA2 |   LA1 |   LA0
      LB7     LB6     LB5     LB4     LB3     LB2     LB1     LB0

  - Usable symbol name

    --------------------------------------------------------------------------
      Register name  At access in 1/2/4bytes  At access in bits
    --------------------------------------------------------------------------
      ENIR              _IO_ENIR              _IO_ENIR_ENx(x:0 - 7)

      EIRR              _IO_EIRR              _IO_EIRR_ERx(x:0 - 7)

      ELVR              _IO_ELVR              _IO_ELVR_LALBx(x:0 - 7)
                                                                  [LAx,LBx]
    --------------------------------------------------------------------------

<<A/D converter>>

  - I/O register structure

        7       6       5       4       3       2       1       0     bit No.
    +-------+-------+-------+-------+-------+-------+-------+-------+
    |  MD1  |  MD0  |  ANS2 |  ANS1 |  ANS0 |  ANE2 |  ANE1 |  ANE0 | ADCSL
    +-------+-------+-------+-------+-------+-------+-------+-------+
    +-------+-------+-------+-------+-------+-------+-------+-------+
    |  BUSY |  INT  |  INTE |  PAUS |  STS1 |  STS0 |  STRT |reserve| ADCSH
    +-------+-------+-------+-------+-------+-------+-------+-------+
    +-------+-------+-------+-------+-------+-------+-------+-------+
    |   D7  |   D6  |   D5  |   D4  |   D4  |   D2  |   D1  |   D0  | ADCRL
    +-------+-------+-------+-------+-------+-------+-------+-------+
    +-------+-------+-------+-------+-------+-------+-------+-------+
    |  S10  |  ST1  |  ST0  |  CT1  |  CT0  |   -   |   D9  |   D8  | ADCRH
    +-------+-------+-------+-------+-------+-------+-------+-------+

  - Usable symbol name

    --------------------------------------------------------------------------
      Register name  At access in 1/2/4bytes  At access in bits
    --------------------------------------------------------------------------
      ADCSL             _IO_ADCSL             _IO_ADCSL_ANE     [ANE0 - ANE2]
                                              _IO_ADCSL_ANS     [ANS0 - ANS2]
                                              _IO_ADCSL_MD      [MD0 - MD1]

      ADCSH             _IO_ADCSH             _IO_ADCSH_STRT
                                              _IO_ADCSH_STS     [STS0 - STS1]
                                              _IO_ADCSH_PAUS
                                              _IO_ADCSH_INTE
                                              _IO_ADCSH_INT
                                              _IO_ADCSH_BUSY

      ADCRL,ADCRH       _IO_ADCRLH
                        _IO_ADCRLH_DATA8      [ADCRL       D0-D7]
                        _IO_ADCRLH_DATA10     [ADCRL,ADCRH D0-D9]
                        _IO_ADCRLH_ADCRH
    --------------------------------------------------------------------------
      Note 1: Data write to ADCSH is enabled by assigning a value to symbol
              _IO_ADCSH with the MOV instruction.
              (Always write 0 to reserved bit.)
      Note 2: Data write to ADCRH is enabled by assigning a value to symbol
              _IO_ADCRLH_ADCRH with the MOV instruction.

<<8/16-bit PPG>>

  - I/O register structure

      15  14  13  12  11  10  9   8   7   6   5   4   3   2   1   0   bit No.
    +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
    |   | - |   |   |   |   |   |rsv|   | - |   |   |   | - | - |rsv| PPGCn
    +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
      |       |  PIE1 |   MD1 |       |       |  PIE0 |
     PEN1    PE1     PUF1     MD0    PEN0    PE0     PUF0

        7       6       5       4       3       2       1       0     bit No.
    +-------+-------+-------+-------+-------+-------+-------+-------+
    |  PCS2 |  PCS1 |  PCS0 |  PCM2 |  PCM1 |  PCM0 |   -   |   -   | PPGn
    +-------+-------+-------+-------+-------+-------+-------+-------+

      31          24  23          16  15           8  7            0  bit No.
    +-------------------------------+-------------------------------+
    |              PRLH             |              PRLL             |
    +---------------+---------------+---------------+---------------+ PRLxy
    |     PRLHy     |     PRLLy     |     PRLHx     |     PRLLx     |
    +---------------+---------------+---------------+---------------+

  - Usable symbol name

    --------------------------------------------------------------------------
      Register name  At access in 1/2/4bytes  At access in bits
    --------------------------------------------------------------------------
      PPGCn             _IO_PPGCn             _IO_PPGCn_PUF0
      (n=01,23)                               _IO_PPGCn_PIE0
                                              _IO_PPGCn_PE0
                                              _IO_PPGCn_PEN0
                                              _IO_PPGCn_MD      [MD0 - MD1]
                                              _IO_PPGCn_PUF1
                                              _IO_PPGCn_PIE1
                                              _IO_PPGCn_PE1
                                              _IO_PPGCn_PEN1

      PPGn              _IO_PPGn              _IO_PPGn_PCM      [PCM0 - PCM2]
      (n=01,23)                               _IO_PPGn_PCS      [PCS0 - PCS2]

      PRLn              _IO_PRLxy             none
      (xy=01,23)        _IO_PRLxy_PRLx
                        _IO_PRLxy_PRLy
                        _IO_PRLxy_PRLLx
                        _IO_PRLxy_PRLHx
                        _IO_PRLxy_PRLLy
                        _IO_PRLxy_PRLHy
    --------------------------------------------------------------------------
      Note: When using MOVW instruction to write data to PPGCn
            (symbol _IO_PPGCn), be sure to write 1 to reserved bit.

<<16-bit I/O timer>>

  - I/O register structure

      15                                                           0  bit No.
    +---------------------------------------------------------------+
    |                                                               | TCDT
    +---------------------------------------------------------------+

        7       6       5       4       3       2       1       0     bit No.
    +-------+-------+-------+-------+-------+-------+-------+-------+
    |  IVF  |  IVFE |  STOP |reserve|  CLR  |  CLK2 |  CLK1 |  CLK0 | TCCS
    +-------+-------+-------+-------+-------+-------+-------+-------+

      15                                                           0  bit No.
    +---------------------------------------------------------------+
    |                                                               | IPCPn
    +---------------------------------------------------------------+

        7       6       5       4       3       2       1       0     bit No.
    +-------+-------+-------+-------+-------+-------+-------+-------+
    |  ICP1 |  ICP0 |  ICE1 |  ICE0 |  EG11 |  EG10 |  EG01 |  EG00 | ICSxy
    +-------+-------+-------+-------+-------+-------+-------+-------+

  - Usable variable and member name

    --------------------------------------------------------------------------
      Register name  At access in 1/2/4bytes  At access in bits
    --------------------------------------------------------------------------
      TCDT              _IO_TCDT               none

      TCCS              _IO_TCCS              _IO_TCCS_CLK    [CLK0 - CLK2]
                                              _IO_TCCS_CLR
                                              _IO_TCCS_STOP
                                              _IO_TCCS_IVFE
                                              _IO_TCCS_IVF

      IPCPn             _IO_IPCPn              none
      (n:0 - 3)

      ICSxy             _IO_ICSxy             _IO_ICSxy_EG0   [EG00 - EG01]
      (x:01,23)                               _IO_ICSxy_EG1   [EG10 - EG11]
                                              _IO_ICSxy_ICE0
                                              _IO_ICSxy_ICE1
                                              _IO_ICSxy_ICP0
                                              _IO_ICSxy_ICP1
    --------------------------------------------------------------------------
      Note: When using a simple assignment statement to write data to TCCS
            (member _IO_TCCS), be sure to write 0 to reserved bit.

<<16-bit reload timer>>

  - I/O register structure

      15  14  13  12  11  10  9   8   7   6   5   4   3   2   1   0   bit No.
    +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
    | - | - | - | - |   |   |   |   |   |   |   |   |   |   |   |   | TMCSRn
    +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
                      |  CSL0 |  MOD1 |  OUTE |  RELD |   UF  |   TRG
                     CSL1    MOD2    MOD0    OUTL    INTE    CNTE

      15                                                           0  bit No.
    +---------------------------------------------------------------+
    |                                                               | TMRn/
    +---------------------------------------------------------------+TMRLRn

  - Usable symbol name

    --------------------------------------------------------------------------
      Register name  At access in 1/2/4bytes  At access in bits
    --------------------------------------------------------------------------
      TMCSRn            _IO_TMCSRn            _IO_TMCSRn_TRG
      (n=0 - 1)                               _IO_TMCSRn_CNTE
                                              _IO_TMCSRn_UF
                                              _IO_TMCSRn_INTE
                                              _IO_TMCSRn_RELD
                                              _IO_TMCSRn_OUTL
                                              _IO_TMCSRn_OUTE
                                              _IO_TMCSRn_MOD    [MOD0 - MOD2]
                                              _IO_TMCSRn_CSL    [CSL0 - CSL1]

      TMRn/TMRLRn       _IO_TMR+n
      (n=0,2)
    --------------------------------------------------------------------------

<<ROM mirror function selection module>>

  - I/O register structure

        7       6       5       4       3       2       1       0     bit No.
    +-------+-------+-------+-------+-------+-------+-------+-------+
    |   -   |   -   |   -   |   -   |   -   |   -   |   -   |   MI  | ROMM
    +-------+-------+-------+-------+-------+-------+-------+-------+

  - Usable symbol name

    --------------------------------------------------------------------------
      Register name  At access in 1/2/4bytes  At access in bits
    --------------------------------------------------------------------------
      ROMM              _IO_ROMM              none
    --------------------------------------------------------------------------

<<CAN controller>>

  - I/O register structure

        7       6       5       4       3       2       1       0     bit No.
    +-------+-------+-------+-------+-------+-------+-------+-------+
    | BVAL7 | BVAL6 | BVAL5 | BVAL4 | BVAL3 | BVAL2 | BVAL1 | BVAL0 | BVALR
    +-------+-------+-------+-------+-------+-------+-------+-------+
    +-------+-------+-------+-------+-------+-------+-------+-------+
    | TREQ7 | TREQ6 | TREQ5 | TREQ4 | TREQ3 | TREQ2 | TREQ1 | TREQ0 | TREQR
    +-------+-------+-------+-------+-------+-------+-------+-------+
    +-------+-------+-------+-------+-------+-------+-------+-------+
    | TCAN7 | TCAN6 | TCAN5 | TCAN4 | TCAN3 | TCAN2 | TCAN1 | TCAN0 | TCANR
    +-------+-------+-------+-------+-------+-------+-------+-------+
    +-------+-------+-------+-------+-------+-------+-------+-------+
    |  TC7  |  TC6  |  TC5  |  TC4  |  TC3  |  TC2  |  TC1  |  TC0  | TCR
    +-------+-------+-------+-------+-------+-------+-------+-------+
    +-------+-------+-------+-------+-------+-------+-------+-------+
    |  RC7  |  RC6  |  RC5  |  RC4  |  RC3  |  RC2  |  RC1  |  RC0  | RCR
    +-------+-------+-------+-------+-------+-------+-------+-------+
    +-------+-------+-------+-------+-------+-------+-------+-------+
    | RRTR7 | RRTR6 | RRTR5 | RRTR4 | RRTR3 | RRTR2 | RRTR1 | RRTR0 | RRTRR
    +-------+-------+-------+-------+-------+-------+-------+-------+
    +-------+-------+-------+-------+-------+-------+-------+-------+
    | ROVR7 | ROVR6 | ROVR5 | ROVR4 | ROVR3 | ROVR2 | ROVR1 | ROVR0 | ROVRR
    +-------+-------+-------+-------+-------+-------+-------+-------+
    +-------+-------+-------+-------+-------+-------+-------+-------+
    |  RIE7 |  RIE6 |  RIE5 |  RIE4 |  RIE3 |  RIE2 |  RIE1 |  RIE0 | RIER
    +-------+-------+-------+-------+-------+-------+-------+-------+

    +---------------------------------------------------------------+
    |                  General-purpose RAM (32byte)                 | RAM
    +---------------------------------------------------------------+

      31  30  29  28  27  26  25  24  23  22  21  20  19  18  17  16
    +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+-
    |   |   |   |   |   | - | - | - |   |   |   |   |   |   |   |   |
    +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+-
      |  ID3  |  ID1  |               |  ID11 |  ID9  |  ID7  |  ID5
     ID4     ID2     ID0             ID12    ID10    ID8     ID6
        15  14  13  12  11  10  9   8   7   6   5   4   3   2   1   0   bit No.
     -+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
      |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   | IDRy
     -+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
        |  ID19 |  ID17 |  ID15 |  ID13 |  ID27 |  ID25 |  ID23 |  ID21
       ID20    ID18    ID16    ID14    ID28    ID26    ID24    ID22

      15  14  13  12  11  10  9   8   7   6   5   4   3   2   1   0   bit No.
    +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
    | - | - | - | - | - | - | - | - | - | - | - | - |   |   |   |   | DLCRy
    +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
                                                      |  DLC2 |  DLC0
                                                     DLC3    DLC1

      63                                                           0  bit No.
    +-------+-------+-------+-------+-------+-------+-------+-------+
    | BYTE7 | BYTE6 | BYTE5 | BYTE4 | BYTE3 | BYTE2 | BYTE1 | BYTE0 | DTRy
    +-------+-------+-------+-------+-------+-------+-------+-------+

      15  14  13  12  11  10  9   8   7   6   5   4   3   2   1   0   bit No.
    +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
    |   |   | - | - | - |   |   |   |   | - | - | - | - |   | - |   | CSR
    +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
      |   RS              NT  |  NS0  |                  NIE     HALT
      TS                     NS1     TOE

        7       6       5       4       3       2       1       0     bit No.
    +-------+-------+-------+-------+-------+-------+-------+-------+
    |  NTE  |  TCE  |  RCE  |   -   |   -   |  MBP2 |  MBP1 |  MBP0 | LEIR
    +-------+-------+-------+-------+-------+-------+-------+-------+

      15  14  13  12  11  10  9   8   7   6   5   4   3   2   1   0   bit No.
    +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
    |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   | RTEC
    +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
      |  TEC6 |  TEC4 |  TEC2 |  TEC0 |  REC6 |  REC4 |  REC2 |  REC0
     TEC7    TEC5    TEC3    TEC1    REC7    REC5    REC3    REC1
    +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
    | - |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   | BTR
    +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
        TS2.2 | TS2.0 | TS1.2 | TS1.0 |  RSJ0 |  PSC4 |  PSC2 |  PSC0
            TS2.1   TS1.3   TS1.1    RSJ1    PSC5    PSC3    PSC1

        7       6       5       4       3       2       1       0     bit No.
    +-------+-------+-------+-------+-------+-------+-------+-------+
    |  IDE7 |  IDE6 |  IDE5 |  IDE4 |  IDE3 |  IDE2 |  IDE1 |  IDE0 | IDER
    +-------+-------+-------+-------+-------+-------+-------+-------+
    +-------+-------+-------+-------+-------+-------+-------+-------+
    | TRTR7 | TRTR6 | TRTR5 | TRTR4 | TRTR3 | TRTR2 | TRTR1 | TRTR0 | TRTRR
    +-------+-------+-------+-------+-------+-------+-------+-------+
    +-------+-------+-------+-------+-------+-------+-------+-------+
    | RFWT7 | RFWT6 | RFWT5 | RFWT4 | RFWT3 | RFWT2 | RFWT1 | RFWT0 | RFWTR
    +-------+-------+-------+-------+-------+-------+-------+-------+
    +-------+-------+-------+-------+-------+-------+-------+-------+
    |  TIE7 |  TIE6 |  TIE5 |  TIE4 |  TIE3 |  TIE2 |  TIE1 |  TIE0 | TIER
    +-------+-------+-------+-------+-------+-------+-------+-------+

      15  14  13  12  11  10  9   8   7   6   5   4   3   2   1   0   bit No.
    +-------+-------+-------+-------+-------+-------+-------+-------+
    |  AMS7 |  AMS6 |  AMS5 |  AMS4 |  AMS3 |  AMS2 |  AMS1 |  AMS0 | AMSR
    +-------+-------+-------+-------+-------+-------+-------+-------+

      31  30  29  28  27  26  25  24  23  22  21  20  19  18  17  16
    +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+-
    |   |   |   |   |   | - | - | - |   |   |   |   |   |   |   |   |
    +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+-
      |  AM3  |  AM1  |               |  AM11 |  AM9  |  AM7  |  AM5
     AM4     AM2     AM0             AM12    AM10    AM8     AM6
        15  14  13  12  11  10  9   8   7   6   5   4   3   2   1   0   bit No.
     -+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
      |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   | AMR0,
     -+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
        |  AM19 |  AM17 |  AM15 |  AM13 |  AM27 |  AM25 |  AM23 |  AM21
       AM20    AM18    AM16    AM14    AM28    AM26    AM24    AM22

  - Usable variable and member name

    --------------------------------------------------------------------------
     Register name At access in 1/2/4bytes   At access in bits
    --------------------------------------------------------------------------
     BVALR         _IO_BVALR                 _IO_BVALR_BVALx(x:0-7)
     TREQR         _IO_TREQR                 _IO_TREQR_TREQx(x:0-7)
     TCANR         _IO_TCANR                 _IO_TCANR_TCANx(x:0-7)
     TCR           _IO_TCR                   _IO_TCR_TCx(x:0-7)
     RCR           _IO_RCR                   _IO_RCR_RCx(x:0-7)
     RRTRR         _IO_RRTRR                 _IO_RRTRR_RRTRx(x:0-7)
     ROVRR         _IO_ROVRR                 _IO_ROVRR_ROVRx(x:0-7)
     RIER          _IO_RIER                  _IO_RIER_RIEx(x:0-7)

     RAM           _IO_CANID_RAM+x           none
                   (x:0 - 15)

     IDRy         _IO_CANID_IDR_y            _IO_CANID_IDR_y_IDx(x:0-28)
     DLCRy        _IO_CANID_DLCR_y           _IO_CANID_DLCR_y_DLC  [DLC0-3]
     (y:0 - 7)

     DTRy          _IO_CANID_DTR_y_BYTE0_3   none
     (y:0 - 7)     _IO_CANID_DTR_y_BYTE4_7   none

     CSR           _IO_CANCT_CSR             _IO_CANCT_CSR_HALT
                                             _IO_CANCT_CSR_NIE
                                             _IO_CANCT_CSR_TOE
                                             _IO_CANCT_CSR_NS   [NS0 - NS1]
                                             _IO_CANCT_CSR_NT
                                             _IO_CANCT_CSR_RS
                                             _IO_CANCT_CSR_TS

     LEIR          _IO_CANCT_LEIR            _IO_CANCT_LEIR_MBP [MBP0-MBP2]
                                             _IO_CANCT_LEIR_RCE
                                             _IO_CANCT_LEIR_TCE
                                             _IO_CANCT_LEIR_NTE

     RTEC          _IO_CANCT_RTEC_REC        none
                   _IO_CANCT_RTEC_TEC

     BTR           _IO_CANCT_BTR             _IO_CANCT_BTR_PSC  [PSC0-PSC5]
                                             _IO_CANCT_BTR_RSJ  [RSJ0-RSJ1]
                                             _IO_CANCT_BTR_TS1  [TS1.0 - 3]
                                             _IO_CANCT_BTR_TS2  [TS2.0 - 2]

     IDER          _IO_CANCT_IDER            _IO_CANCT_IDER_IDEx(x:0-7)
     TRTRR         _IO_CANCT_TRTRR           _IO_CANCT_TRTRR_TRTRx(x:0-7)
     RFWTR         _IO_CANCT_RFWTR           _IO_CANCT_RFWTR_RFWTx(x:0-7)
     TIER          _IO_CANCT_TIER            _IO_CANCT_TIER_TIEx(x:0-7)
     AMSR          _IO_CANCT_AMSR            _IO_CANCT_AMSR_AMSx(x:0-7)
     AMR0          _IO_CANCT_AMR0            _IO_CANCT_AMR0_AMx(x:0-28)
     AMR1          _IO_CANCT_AMR1            _IO_CANCT_AMR1_AMx(x:0-28)
    --------------------------------------------------------------------------
      Note 1: Data write to CSR is enabled by assigning a value to symbol
              _IO_CANCT_CSR with the MOVW instruction.
      Note 2: The usage of bit access symbols of CSR are limited to the
              reading description.
      Note 3: Data write to IDRy is enabled by assigning a value to symbol
              _IO_CANID_IDR_y with the MOVL instruction.
      Note 4: The usage of bit access symbols of IDRy are limited to the
              reading description.
      Note 5: Data write to DLCRy is enabled by assigning a value to symbol
              _IO_CANID_DLCR_y with the MOVW instruction.
      Note 6: The usage of bit access symbols of DLCRy are limited to the
              reading description.
      Note 7: Data write to DTRy is enabled by assigning a value to symbol
              _IO_CANID_DTR_y_BYTE0_3 and _IO_CANID_DTR_y_BYTE4_7 with the
              MOVL instruction.

<<Address match detection function>>

  - I/O register structure

      23                16  15                 8  7                0  bit No.
    +---------------------+---------------------+-------------------+
    |       HIGH          |        MID          |       LOW         | PADRn
    +---------------------+---------------------+-------------------+

        7       6       5       4       3       2       1       0     bit No.
    +-------+-------+-------+-------+-------+-------+-------+-------+
    |reserve|reserve|reserve|reserve|  AD1E |reserve|  AD0E |reserve| PACSR
    +-------+-------+-------+-------+-------+-------+-------+-------+

  - Usable symbol name

    --------------------------------------------------------------------------
      Register name  At access in 1/2/4bytes  At access in bits
    --------------------------------------------------------------------------
      PADRn             _IO_PADR_n            none
      (n:0 - 1)         _IO_PADR_n_LOW
                        _IO_PADR_n_MID
                        _IO_PADR_n_HIGH

      PACSR             _IO_PACSR             _IO_PACSR_AD0E
                                              _IO_PACSR_AD1E
    --------------------------------------------------------------------------
      Note: When using the MOV instruction to write data to PACSR
            (symbol _IO_PACSR), be sure to write 0 to reserved bit.

<<Delay interrupt generation module>>

  - I/O register structure

        7       6       5       4       3       2       1       0     bit No.
    +-------+-------+-------+-------+-------+-------+-------+-------+
    |   -   |   -   |   -   |   -   |   -   |   -   |   -   |   R0  | DIRR
    +-------+-------+-------+-------+-------+-------+-------+-------+

  - Usable symbol name

    --------------------------------------------------------------------------
      Register name  At access in 1/2/4bytes  At access in bits
    --------------------------------------------------------------------------
      DIRR              _IO_DIRR              _IO_DIRR_R0
    --------------------------------------------------------------------------
      Note:  When DIRR is accessed, bits should be operated considering
             future expansion.

<<Low power consumption mode>>

  - I/O register structure

        7       6       5       4       3       2       1       0     bit No.
    +-------+-------+-------+-------+-------+-------+-------+-------+
    |  STP  |  SLP  |  SPL  |  RST  |  TMD  |  CG1  |  CG0  |reserve| LPMCR
    +-------+-------+-------+-------+-------+-------+-------+-------+
    +-------+-------+-------+-------+-------+-------+-------+-------+
    |  SCM  |  MCM  |  WS1  |  WS0  |  SCS  |  MCS  |  CS1  |  CS0  | CKSCR
    +-------+-------+-------+-------+-------+-------+-------+-------+

  - Usable variable and member name

    --------------------------------------------------------------------------
      Register name  At access in 1/2/4bytes  At access in bits
    --------------------------------------------------------------------------
      LPMCR             _IO_LPMCR             _IO_LPMCR_CG      [CG0 - CG1]
                                              _IO_LPMCR_TMD
                                              _IO_LPMCR_RST
                                              _IO_LPMCR_SPL
                                              _IO_LPMCR_SLP
                                              _IO_LPMCR_STP
                                              _IO_LPMCR_SLPSTP

      CKSCR             _IO_CKSCR             _IO_CKSCR_CS      [CS0 - CS1]
                                              _IO_CKSCR_MCS
                                              _IO_CKSCR_SCS
                                              _IO_CKSCR_WS      [WS0 - WS1]
                                              _IO_CKSCR_MCM
                                              _IO_CKSCR_SCM
    --------------------------------------------------------------------------
      Note: Always write 0 to reserved bit of LPMCR.

<<Watchdog timer>>

  - I/O register structure

        7       6       5       4       3       2       1       0     bit No.
    +-------+-------+-------+-------+-------+-------+-------+-------+
    |  PONR |   -   |  WRST |  ERST |  SRST |  WTE  |  WT1  |  WT0  | WDTC
    +-------+-------+-------+-------+-------+-------+-------+-------+

  - Usable symbol name

    --------------------------------------------------------------------------
      Register name  At access in 1/2/4bytes  At access in bits
    --------------------------------------------------------------------------
      WDTC              _IO_WDTC              _IO_WDTC_SRST
                                              _IO_WDTC_ERST
                                              _IO_WDTC_WRST
                                              _IO_WDTC_PONR
    --------------------------------------------------------------------------
      Note 1: WT0,WT1,WTE of WDTC are write-only bits;
              symbols to be accessed in bits are not declared.
              Data write to WDTC is enabled by assigning a value to symbol
              _IO_WDTC with the MOV instruction.
      Note 2: The usage of bit access symbols of WDTC are limited to the
              reading description.

<<Timebase timer>>

  - I/O register structure

        7       6       5       4       3       2       1       0     bit No.
    +-------+-------+-------+-------+-------+-------+-------+-------+
    |reserve|   -   |   -   |  TBIE |  TBOF |  TBR  |  TBC1 |  TBC0 | TBTC
    +-------+-------+-------+-------+-------+-------+-------+-------+

  - Usable symbol name

    --------------------------------------------------------------------------
      Register name  At access in 1/2/4bytes  At access in bits
    --------------------------------------------------------------------------
      TBTC              _IO_TBTC              _IO_TBTC_TBC      [TBC0 - TBC1]
                                              _IO_TBTC_TBR
                                              _IO_TBTC_TBOF
                                              _IO_TBTC_TBIE
    --------------------------------------------------------------------------
      Note 1: Data write to TBTC is enabled by assigning a value to symbol
              _IO_TBTC with the MOV instruction.
              (Always write 1 to reserved bit.)
      Note 2: The usage of bit access symbols of TBTC are limited to the
              reading description.

<<Clock timer>>

  - I/O register structure

        7       6       5       4       3       2       1       0     bit No.
    +-------+-------+-------+-------+-------+-------+-------+-------+
    |  WDCS |  SCE  |  WTIE |  WTOF |  WTR  |  WTC2 |  WTC1 |  WTC0 | WTC
    +-------+-------+-------+-------+-------+-------+-------+-------+

  - Usable symbol name

    --------------------------------------------------------------------------
      Register name  At access in 1/2/4bytes  At access in bits
    --------------------------------------------------------------------------
      WTC               _IO_WTC               _IO_WTC_WTC       [WTC0 - WTC2]
                                              _IO_WTC_WTR
                                              _IO_WTC_WTOF
                                              _IO_WTC_WTIE
                                              _IO_WTC_SCE
                                              _IO_WTC_WDCS
    --------------------------------------------------------------------------
      Note: Data write to WTC is enabled by assigning a value to symbol
            _IO_WTC with the MOV instruction.

<<Flush memory interface>>

  - I/O register structure

        7       6       5       4       3       2       1       0     bit No.
    +-------+-------+-------+-------+-------+-------+-------+-------+
    |  INTE | RDYINT|   WE  |  RDY  |reserve|  LPM1 |reserve|  LPM0 | FMCS
    +-------+-------+-------+-------+-------+-------+-------+-------+

  - Usable symbol name

    --------------------------------------------------------------------------
      Register name  At access in 1/2/4bytes  At access in bits
    --------------------------------------------------------------------------
      FMCS              _IO_FMCS              _IO_FMCS_LPM0
                                              _IO_FMCS_LPM1
                                              _IO_FMCS_RDY
                                              _IO_FMCS_WE
                                              _IO_FMCS_RDYINT
                                              _IO_FMCS_INTE
    --------------------------------------------------------------------------
      Note : When using MOV instruction to write data to FMCS
             (symbol _IO_FMCS), be sure to write 0 to reserved bit.

<<Interrupt controller>>

  - I/O register structure

    [ICRn]

        7       6       5       4       3       2       1       0     bit No.
    +-------+-------+-------+-------+-------+-------+-------+-------+
    |  ICS3 |  ICS2 |  ICS1 |  ICS0 |  ISE  |  IL2  |  IL1  |  IL0  | write
    +-------+-------+-------+-------+-------+-------+-------+-------+
    +-------+-------+-------+-------+-------+-------+-------+-------+
    |   -   |   -   |   S1  |   S0  |  ISE  |  IL2  |  IL1  |  IL0  | read
    +-------+-------+-------+-------+-------+-------+-------+-------+

  - Usable symbol name

    --------------------------------------------------------------------------
      Register name  At access in 1/2/4bytes  At access in bits
    --------------------------------------------------------------------------
      ICRn(n:00 - 15)   _IO_ICRn              _IO_ICRn_IL       [IL0 - IL2]
                                              _IO_ICRn_ISE
                                              _IO_ICRn_S        [S0 - S1]
    --------------------------------------------------------------------------
      Note 1: Data write to ICRn is enabled by assigning a value to symbol
              _IO_ICRn with the MOV instruction.
      Note 2: The usage of bit access symbols of ICRn are limited to the
              reading description.

<<Extended intelligent I/O service descriptor>>

  - I/O register structure

    [ISDn]

      15                           8  7                            0  bit No.
    +-------------------------------+-------------------------------+
    |             BAPM              |             BAPL              | BAPML
    +-------------------------------+-------------------------------+
                                    |             BAPH              | BAPH
                                    +-------------------------------+
                                    |             ISCS              | ISCS
    +-------------------------------+-------------------------------+
    |             IOAH              |             IOAL              | IOA
    +-------------------------------+-------------------------------+
    |             DCTH              |             DCTL              | DCT
    +-------------------------------+-------------------------------+

  - Usable symbol name

    --------------------------------------------------------------------------
      Register name  At access in 1/2/4bytes  At access in bits
    --------------------------------------------------------------------------
      ISDn(n:0 - 15)    _IO_ISD_n             none
                        _IO_ISD_n_BAPML
                        _IO_ISD_n_BAPH
                        _IO_ISD_n_ISCS
                        _IO_ISD_n_IOA
                        _IO_ISD_n_DCT
    --------------------------------------------------------------------------
      Note 1: An I/O service function of Extended Intelligent I/O Service
              (EIIOS) has the limitation to uses with the REALOS/907
              (JCTX instruction).
              Please find the hardware manual of each microcontrollers for
              detailed limitation.
      Note 2: When you describe the application program which refers to ISDn,
              please assemble the I/O register definition files with
              "-D USE_ISD" option.

                example:  > fasm907s -cpu mb90xxx -D USE_ISD _ffmc16_a.asm





+-----------------------------------------------------------------------------+
|1. The contents of this document are subject to change without notice.       |
|   Customers are advised to consult with FUJITSU sales representatives       |
|   beforeordering.                                                           |
|2. The information and circuit diagrems in this document presented as        |
|   examples of semiconductor device applications, and are not intended to be |
|   incorporated in devices for actual use. Also FUJITSU is unable to assume  |
|   responsibility for infringement of any patent rights or other rights of   |
|   third parties arising from the use of this information or circuit         |
|   diagrams.                                                                 |
|3. The contents of this document may not be reproduced or copied without the |
|   permission of FUJITSU LIMITED.                                            |
|4. FUJITSU semiconductor devices are intended for use in standard            |
|   applications (computers, office automation and other office equipments,   |
|   industrial, communications, and measurement equipments, personal or       |
|   household devices, etc.).                                                 |
|   CAUTION:                                                                  |
|   Customers considering the use of our products in special applications     |
|   where failure or abnormal operation may directly affect human lives or    |
|   cause physical injury or property damage, or where extremely high levels  |
|   of reliability are demanded (such as aerospace systems, atomic energy     |
|   controls, sea floor repeaters, vehicle operating controls, medical        |
|   devices for life support, etc.) are requested to consult with FUJITSU     |
|   sales representatives before such use. The company will not be            |
|   responsible for damages arising from such use without prior approval.     |
|5. Any semiconductor devices have inherently a certain rate of failure. You  |
|   must protect against injury, damage or loss from such failures by         |
|   incorporating safety design measures into your facility and equipment     |
|   such as redundancy, fire protection, and prevention of over-current       |
|   levels and other abnormal operating conditions.                           |
|6. If any products described in this document represent goods or             |
|   technologies subject to certain restrictions on export under the Foreign  |
|   Exchange and Foreign Trade Control Law of Japan, the prior authorization  |
|   by japanese government should be required for export of those products    |
|   from Japan.                                                               |
+-----------------------------------------------------------------------------+
 (C)2002  FUJITSU LIMITED Printed in Japan
