📄 lowfreqsg.c.bak_smart_update
字号:
/** ###################################################################
** Filename : LowFreqSG.C
** Project : LowFreqSG
** Processor : MC68HC908LV8CFA
** Version : Driver 01.15
** Compiler : CodeWarrior HC08 C Compiler
** Date/Time : 2006-9-5, 17:47
** Abstract :
** Main module.
** Here is to be placed user's code.
** Settings :
** Contents :
** No public methods
**
** (c) Copyright UNIS, spol. s r.o. 1997-2006
** UNIS, spol. s r.o.
** Jundrovska 33
** 624 00 Brno
** Czech Republic
** http : www.processorexpert.com
** mail : info@processorexpert.com
** ###################################################################*/
/* MODULE LowFreqSG */
/* Including used modules for compiling procedure */
#include <stdio.h>
#include "Cpu.h"
#include "LCD1.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"
void main(void)
{
const unsigned char segcode[10] = {0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7d, 0x07, 0x7f, 0x6f};
unsigned char ifreq = 0;
unsigned char i;
unsigned char strbuf[9];
/* Write your local variable definition here */
/*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/
PE_low_level_init();
/*** End of Processor Expert internal initialization. ***/
/* Write your code here */
/* For example: for(;;) { } */
/*** Don't write any code pass this line, or it will be deleted during code generation. ***/
/*** Processor Expert end of main routine. DON'T MODIFY THIS CODE!!! ***/
for(;;)
{
(void)sprintf(strbuf, "%8ul", ifreq * 10 + 50);
for(i = 0; i < 8; ++i)
{
if(strbuf[i] >= '0' && strbuf[i] <= '9')
{
strbuf[i] = segcode[strbuf[i] & 0x0f];
}
else strbuf[i] = 0x00;
*(&LDAT1 + i) &= 0xe0;
*(&LDAT1 + i) |= ((strbuf[i] & 0x10) << 1) | ((strbuf[i] & 0x20) << 1) | ((strbuf[i] & 0x01) << 7);
*(&LDAT1 + i + 1) &= 0x0f;
*(&LDAT1 + i + 1) |= ((strbuf[i] & 0x08) >> 3) | ((strbuf[i] & 0x04) >> 1) | ((strbuf[i] & 0x40) >> 4) | ((strbuf[i] & 0x02) << 2);
}
}
/*** Processor Expert end of main routine. DON'T WRITE CODE BELOW!!! ***/
} /*** End of main routine. DO NOT MODIFY THIS TEXT!!! ***/
/* END LowFreqSG */
/*
** ###################################################################
**
** This file was created by UNIS Processor Expert 2.98 [03.80]
** for the Freescale HC08 series of microcontrollers.
**
** ###################################################################
*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -