/*******************************************************************************
* DISCLAIMER
* This software is supplied by Renesas Electronics Corporation and is only
* intended for use with Renesas products. No other uses are authorized. This
* software is owned by Renesas Electronics Corporation and is protected under
* all applicable laws, including copyright laws.
* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
* Renesas reserves the right, without notice, to make changes to this software
* and to discontinue the availability of this software. By using this software,
* you agree to the additional terms and conditions found by accessing the
* following link:
* http://www.renesas.com/disclaimer
*
* Copyright (C) 2011 Renesas Electronics Corporation. All rights reserved.
*******************************************************************************/
/*******************************************************************************
* File Name : r_pdl_lcd.c
* Version : 1.0
* Device(s) : R5F10RLC
* Tool-Chain : IDE, Compiler (inc. version)
* OS : none
* H/W Platform : WaterMeter
* Description : This is the main tutorial code.
* Operation : 1. Compile and download the sample code. Click ¡®Reset Go¡¯
* to start the software. <- Required for main app file only
* Limitations : Interrupts must be disabled for this sample <- OPTIONAL
******************************************************************************/
/******************************************************************************
* History : DD.MM.YYYY Version Description
* : 18.01.2012 1.00 First Release
******************************************************************************/
/******************************************************************************
Includes <System Includes> , Project Includes
******************************************************************************/
#include "r_marco.h"
#include "r_pdl_lcd.h"
unsigned char Disp_Data_Temp[6]={0x00,0x00,0x00,0x00,0x00,0x00};
extern unsigned char System_Time[7];
extern unsigned char Total_Water[3];
extern unsigned char RTC_Count;
const unsigned char distable[16] =
{
_a+_b+_c+_d+_e+_f+00, //0
00+_b+_c+00+00+00+00, //1
_a+_b+00+_d+_e+00+_g, //2
_a+_b+_c+_d+00+00+_g, //3
00+_b+_c+00+00+_f+_g, //4
_a+00+_c+_d+00+_f+_g, //5
_a+00+_c+_d+_e+_f+_g, //6
_a+_b+_c+00+00+00+00, //7
_a+_b+_c+_d+_e+_f+_g, //8
_a+_b+_c+_d+00+_f+_g, //9
_a+_b+_c+00+_e+_f+_g, //a
00+00+_c+_d+_e+_f+_g, //b
00+00+00+_d+_e+00+_g, //c
00+_b+_c+_d+_e+00+_g, //d
_a+00+00+_d+_e+_f+_g, //e
_a+00+00+00+_e+_f+_g //f
};
/******************************************************************************
* ID : 1.0 <- OPTIONAL
* Outline : Main <- OPTIONAL if ¡®Funct Name¡¯ used
* Include : r_pdl_lcd.h <- OPTIONAL
* Declaration : void main(void) <- OPTIONAL
* Function Name : main <- OPTIONAL if ¡®Outline¡¯ used
* Description : Main function and set some SFR registers.
* Argument : none <- (include range of values)
* Return Value : none <- (include range of values)
* Calling Functions : none <- OPTIONAL
******************************************************************************/
void R_LCD_Init(void)
{
/*configure LCDM0
b7:b6 LCD drive voltage generator selection
b5 LCD display waveform selection
b4:b2 Selection of time slice of LCD display
b1:b0 LCD display bias mode selection */
LCDM0 = 0x8d; //capacitor spilt mode,waveform A,4-time,1/3 bias
/*configure LCDM1
b7:b6 LCD display enable/disable
b5 Voltage boost circuit or capacitor split circuit operation enable/disable
b4:b3 Display data area control
b2:b1 reserved set to 0
b0 Control of default value of voltage boosting */
LCDM1 = 0x21; //display off,capacitor enable,low 4-bit,vdd<=3.8v
/*configure LCDC0
b7:b6 reserved set to 0
b5:b0 LCD clock (LCDCL) */
LCDC0 = 0x06; // 0x06:256Hz; 0x07:fLCD = fSUB/2^8 = 128Hz
/*configure MLCD
b7 LCD display waveform selection
b6 COM4/COMEXP/SEG0 pin selection
b5 reserved set to 0
b4 Option clock enable/disable
b3 reserved set to 0
b2:b0 Selection of option clock (division ratio of LCD clock (LCDCL)) */
MLCD = 0x00; //waveform A,COMEXP is SEG0,option clock is disable
/*configure VLCD
b7:b5 reserved set to 0
b4:b0 Reference voltage selection & VL4 voltage */
VLCD = 0x04; //reference voltage is 1.0V,VL4 is 3.0V
/*configure ISCLCD
b7:b2 reserved set to 0
b1 VL3/P125 pin Schmitt trigger buffer control
b0 CAPL/P126, CAPH/P127 pins Schmitt trigger buffer control */
ISCLCD = 0x00; //vl3 and capl,caph is invalid
/*configure PFSEG0
b7:b4 PFSEG07~PFSEG04
b3:b0 reserved set to 0 */
PFSEG0 = 0xf0; //seg4~seg7
/*configure PFSEG1
b7:b0 PFSEG08~PFSEG15 */
PFSEG1 = 0x3f; //seg8~seg13,seg14&seg15 is port
/*configure PFSEG2
b7:b0 PFSEG16~PFSEG23 */
PFSEG2 = 0x00; //seg16~seg23 is port
/*configure PFSEG3
b7:b0 PFSEG24~PFSEG31 */
PFSEG3 = 0x00; //seg24~seg31 is port
/*configure PFSEG4
b7 reserved set to 0
b6:b0 PFSEG32~PFSEG38 */
PFSEG4 = 0x00; //seg32~seg38 is port
PM1 &= 0x1f; //p15,p16,p17 output
PM5 &= 0xe0; //p50~p54 output
PM7 &= 0xe7; //p73,p74 output
}
/******************************************************************************
* ID : 1.0 <- OPTIONAL
* Outline : Main <- OPTIONAL if ¡®Funct Name¡¯ used
* Include : r_pdl_lcd.h <- OPTIONAL
* Declaration : void main(void) <- OPTIONAL
* Function Name : main <- OPTIONAL if ¡®Outline¡¯ used
* Description : Main function and set some SFR registers.
* Argument : none <- (include range of values)
* Return Value : none <- (include range of values)
* Calling Functions : none
没有合适的资源?快使用搜索试试~ 我知道了~
基于RL78XX芯片设计IC卡智能水表主控板硬件(原理图+PCB+BOM)文件+software软件代码.zip
共41个文件
c:10个
h:10个
rel:10个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 81 浏览量
2024-04-26
07:23:46
上传
评论
收藏 524KB ZIP 举报
温馨提示
基于RL78XX芯片设计IC卡智能水表主控板硬件(原理图+PCB+BOM)文件+software软件代码,硬件采用2层板设计,大小为72*50 mm,包括完整的原理图及PCB图文件,仅供学习及设计参考。 void main(void) { DI(); R_System_Init(); R_RTC_Start(); R_Interval_Start(); R_LCD_On(); R_Clock_Halt_Init(); Feed_dog(); EI();
资源推荐
资源详情
资源评论
收起资源包目录
基于RL78XX芯片设计IC卡智能水表主控板硬件(原理图+PCB+BOM)文件+software软件代码.zip (41个子文件)
RL78WaterMeterSolution.PcbDoc 652KB
RL78WaterMeterSolution_SCH.pdf 673KB
RL78WaterMeterSolution_Broc.pdf 89KB
software
WaterMeter_Standard
src
r_pdl_ad.h 1KB
r_pdl_card.h 2KB
r_pdl_port.h 1KB
r_main.c 6KB
r_pdl_rtc.c 8KB
r_pdl_clock.h 1KB
r_pdl_ad.c 8KB
r_pdl_intp.h 1KB
r_pdl_clock.c 8KB
r_pdl_port.c 11KB
r_pdl_intp.c 4KB
r_pdl_rtc.h 1KB
r_pdl_system.c 5KB
r_pdl_timer.h 1KB
r_marco.h 1KB
marco.h 1KB
r_pdl_timer.c 5KB
r_pdl_lcd.h 3KB
r_pdl_lcd.c 11KB
r_pdl_card.c 7KB
WaterMeter_Standard.mtpj 99KB
DefaultBuild
r_pdl_clock.rel 2KB
r_pdl_rtc.rel 3KB
r_pdl_ad.rel 2KB
r_pdl_intp.rel 3KB
r_pdl_lcd.rel 5KB
r_pdl_timer.rel 3KB
WaterMeter_Standard.map 20KB
WaterMeter_Standard.sym 2KB
r_main.rel 5KB
r_pdl_port.rel 3KB
r_pdl_card.rel 7KB
WaterMeter_Standard.hex 91KB
r_pdl_system.rel 2KB
WaterMeter_Standard.lmf 23KB
WaterMeter_Standard.Spring.Wang.mtud 316KB
RL78WaterMeterSolution.SchDoc 276KB
RL78WaterMeterSolution_BOM.pdf 15KB
共 41 条
- 1
资源评论
GJZGRB
- 粉丝: 1953
- 资源: 7024
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功