![](http://datasheet.mmic.net.cn/340000/C505L_datasheet_16463211/C505L_19.png)
LCD Control
Using the C505L
19 of 25
AP0829 05.99
sum = 0x0000;
count = 0x00;
TR0 = 1;
// reset the sum for the next average
// start timer 0
}
IADC = 0;
// Clear A/D converter interrupt request flag
}
B
LCD.c
/////////////////////////////////////////////////////////
//
THIS FILE CONVERTS THE 16 DIG REGISTERS OF THE
//
C505L INTO A SINGLE ARRAY OF TYPE DigType (DEFINED
//
IN LCD.H).
/////////////////////////////////////////////////////////
#include <LCD.h>
xdata DigType DIG[DispLen -1] _at_ 0xF3E0; // Define DIG registers as an array
C
Putchar.c
/***********************************************************************/
/* This file is part of the C51 Compiler package */
/* Copyright (c) 1995-1996 Keil Software, Inc. */
/***********************************************************************/
/* */
/* PUTCHAR.C: This routine is the general character output of C51. */
/* */
/* To translate this file use C51 with the following invocation: */
/* */
/* C51 PUTCHAR.C <memory model> */
/* */
/* To link the modified PUTCHAR.OBJ file to your application use the */
/* following BL51 invocation: */
/* */
/* BL51 <your object file list>, PUTCHAR.OBJ <controls> */
/*
/*
THIS FILE HAS BEEN MODIFIED BY MIKE COPELAND OF INFINEON.
/*
THIS FILE DIRECTS OUTPUTS TO THE LCD CONTROLLER OF THE C505L.
/*
THE FILES "LCD.H" AND "LCD.C" ARE NEEDED. SINCE THE DISPLAY IS
/*
ONLY 1 LINE THE "/n" WILL CLEAR THE DISPLAY. THE "printf"
/*
FUNCTION OF THE KEIL COMPILER USES THIS FUNCTION.7/98
/* */
/***********************************************************************/
*/
*/
*/
*/
*/
*/
#include <LCD.h>
char putchar (char c) {
DigType code ASCII_TABLE[128] =
{let_X, let_X, let_X, let_X, let_X, let_X, let_X, let_X,
let_X, let_X, let_X, let_X, let_X, let_X, let_X, let_X,
let_X, let_X, let_X, let_X, let_X, let_X, let_X, let_X,
let_X, let_X, let_X, let_X, let_X, let_X, let_X, let_X,