ROHM FAQ

FAQ's
  • When programming with C language using the SFR (Special Function Register) name, how should I proceed?
    • When programming with C language using the SFR name, make sure to include a target header file corresponding to the microcontroller you use.
      Check the target header file corresponding to your microcontroller, select [Start] -> [All Programs] -> [U8 Tools] -> [About Model Information File] on Windows after installing U8 Development Tools.
      (*Note in a model information name written in "About Model Information File" (U8DevInf_j.htm) opened as described above, "Q" for the flash ROM version, and "P" for the temperature extension are not attached.)

      For example, ML610Q482 is displayed as "m610482.h" in the target header file. Include "m610482.h" using the #include preprocessing command.

      (Program code example)
      #include <m610482.h> /* Including the target header file */

      void initial_timer(void)
      {
      TM0CON0 = 0x08; /* Timer control register setting */
      TM0D = 0x7f;  /* Timer data register setting */
      ETM0 = 1;  /* Timer interrupt permission */
      T0RUN = 1;  /* Start timer count */
      }

      The target header file is installed in "C:\Program Files\U8Dev\Inc" folder when U8 Development Tools are installed by default.
      For details on SFR referencing, also see "1.1 How to Refer SFR" in "CCU8 Programming Guide".

      Related Products: ML610(Q)48x

    • Products: General-purpose MCUs (16bit) , Speech Playback MCUs (8bit)