main.c.bak

来自「富士通单片机MB902420系列The internal LCD-cotroll」· BAK 代码 · 共 66 行

BAK
66
字号
/* THIS SAMPLE CODE IS PROVIDED AS IS AND IS SUBJECT TO ALTERATIONS. FUJITSU */
/* MICROELECTRONICS ACCEPTS NO RESPONSIBILITY OR LIABILITY FOR ANY ERRORS OR */
/* ELIGIBILITY FOR ANY PURPOSES.                                             */
/*                 (C) Fujitsu Microelectronics Europe GmbH                  */
/*---------------------------------------------------------------------------
  MAIN.C
  - description
  - See README.TXT for project description and disclaimer.
/*---------------------------------------------------------------------------*/

#include "mb90425.h"

/*---------------------------------------------------------------------------
  #Defines
/*---------------------------------------------------------------------------*/


/*---------------------------------------------------------------------------
  Globals
/*---------------------------------------------------------------------------*/


/*---------------------------------------------------------------------------
  Functions
/*---------------------------------------------------------------------------*/

/* Note:
   The -A and -B versions include a CPU Detection Reset Circuit. 
   This must be cleared periodically to prevent program reset.

   The conditions for clearing the counter of this circuit are given below:
   1. Writing 0 to CL bit of LVRC register
   2. Internal reset
   3. Stopping main oscillation clock
   4. Transition to sleep mode
   5. Transition to time-base timer mode or timer mode
   6. Starting hold
*/

void clear_CPU_operation_detection (void)
{
 LVRC = 0x35;	        /* clears CPU operation detection */
}

/*---------------------------------------------------------------------------
  Interrupts
/*---------------------------------------------------------------------------*/


/*---------------------------------------------------------------------------
  MAIN.C
/*---------------------------------------------------------------------------*/

void main(void)
{ 
  clear_CPU_operation_detection();
  InitIrqLevels();
  __set_il(7);                /* allow all levels */
  __EI();                     /* globaly enable interrupts */

  /* Initialisation of LCD-controller */

  LCRL = 0x2d;  /* internal Resistor, Main Clock                  */
  LCRH = 0x6f;  /* use all 24 segment-lines SEG00...SEG23, DTCH=0 */

/* In 1/2bias, 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?