⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 eeprom.c

📁 飞思卡尔单片机MC9SDG128B的EEPROM程序
💻 C
字号:
/** ###################################################################
**     Filename  : EEPROM.C
**     Project   : EEPROM
**     Processor : MC9S12DG128BCFU
**     Version   : Driver 01.11
**     Compiler  : Metrowerks HC12 C Compiler
**     Date/Time : 2008-3-3, 下午 04:20
**     Abstract  :
**         Main module.
**         Here is to be placed user's code.
**     Settings  :
**     Contents  :
**         No public methods
**
**     (c) Copyright UNIS, spol. s r.o. 1997-2005
**     UNIS, spol. s r.o.
**     Jundrovska 33
**     624 00 Brno
**     Czech Republic
**     http      : www.processorexpert.com
**     mail      : info@processorexpert.com
** ###################################################################*/
/* MODULE EEPROM */

/* Including used modules for compiling procedure */
#include "Cpu.h"
#include "IEE1.h"
#include "Byte1.h"
/* Include shared modules, which are used for whole project */
#include "PE_Types.h"
#include "PE_Error.h"
#include "PE_Const.h"
#include "IO_Map.h"
 byte data6=0;
void main(void)
{   byte a;
    byte data1=0;
  /*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/
  PE_low_level_init();
  /*** End of Processor Expert internal initialization.                    ***/
   DDRB=0XFF;
  /* Write your code here */
   PORTB=0X0F;
  
  for(;;){
       if(PTM_PTM0==1) {
        a=IEE1_SetByte(0x1801,0x0F);
        a=IEE1_GetByte(0x1801,&data1);
         PORTB=data1;
       // =*data1; 
      // PORTB_BIT3=1;
      }
      if(PTM_PTM5==1) {
        a=IEE1_SetByte(0x1801,0xF0);
        a=IEE1_GetByte(0x1801,&data1);
        PORTB=data1;
      //  PORTB_BIT1=data1&2;
      
       // PORTB_BIT3=0;
      } 
  }
  /*** Processor Expert end of main routine. DON'T MODIFY THIS CODE!!! ***/
  for(;;){}
  /*** Processor Expert end of main routine. DON'T WRITE CODE BELOW!!! ***/
} /*** End of main routine. DO NOT MODIFY THIS TEXT!!! ***/

/* END EEPROM */
/*
** ###################################################################
**
**     This file was created by UNIS Processor Expert 2.96 [03.76]
**     for the Freescale HCS12 series of microcontrollers.
**
** ###################################################################
*/

⌨️ 快捷键说明

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