/*
* Copyright (C) NEC Electronics Corporation 2006
* NEC ELECTRONICS CONFIDENTIAL AND PROPRIETARY
* All rights reserved by NEC Electronics Corporation.
* This program must be used solely for the purpose for which
* it was furnished by NEC Electronics Corporation. No part of this
* program may be reproduced or disclosed to others, in any
* form, without the prior written permission of NEC Electronics
* Corporation. Use of copyright notice dose not evidence
* publication of the program.
*/
//-----------------------------------------------------------------------------
// #pragma directive for CC78K0
//-----------------------------------------------------------------------------
#pragma sfr
#pragma di
#pragma ei
#pragma interrupt INTTM50 isr_INTTM50
//-----------------------------------------------------------------------------
// Include files
//-----------------------------------------------------------------------------
#include "defines.h"
#include "lcd.h"
//-----------------------------------------------------------------------------
// Function prototyps
//-----------------------------------------------------------------------------
extern void WaitBase50ms(unsigned char number);
//-----------------------------------------------------------------------------
// Extern variables/constants
//-----------------------------------------------------------------------------
extern volatile unsigned char sw3_in;
extern volatile unsigned char cRemCode; // Remocon code
extern volatile unsigned char aLcdRam[28];
//
// < Segment placement of aLcdRam[28] >
//
// +27 +26 +25 +24 +23 +22 +21 +20 +19 +18 +17 +16 +15 +14 +13 +12 +11 +10 +9 +8 +7 +6 +5 +4 +3 +2 +1 +0
// bit7 AL AM PM Sun moo sun Mon K0 Tue Wed Thu Fri Sat V A mA Hz ROM Bt3 Bt2 Bt1 BtM An5 An4 An3 An2 An1 AnM
// bit6 520 510 500 440 430 420 410 400 340 330 320 310 300 040 030 020 010 000 140 130 120 110 100 240 230 220 210 200
// bit5 521 511 501 441 431 421 411 401 341 331 321 311 301 041 031 021 011 001 141 131 121 111 101 241 231 221 211 201
// bit4 522 512 502 442 432 422 412 402 342 332 322 312 302 042 032 022 012 002 142 132 122 112 102 242 232 222 212 202
// bit3 523 513 503 443 433 423 413 403 343 333 323 313 303 043 033 023 013 003 143 133 123 113 103 243 233 223 213 203
// bit2 524 514 504 444 434 424 414 404 344 334 324 314 304 044 034 024 014 004 144 134 124 114 104 244 234 224 214 204
// bit1 525 515 505 445 435 425 415 405 345 335 325 315 305 045 035 025 015 005 145 135 125 115 105 245 235 225 215 205
// bit0 526 516 506 446 436 426 416 406 346 336 326 316 306 046 036 026 016 006 146 136 126 116 106 246 236 226 216 206
// |||
// ||+-- A position in a figure long
// |+--- A wide position in a figure
// +---- Figure of LCD panel
//
// < LCD PANEL >
// +-----------------------------------------------------+
// | +-----------------------------------------------+ |
// | | indicator | |
// | +----------------------------------------+ | |
// | +--+ +----+ +----+ +----+ +----+ +----+ | | |
// | | | | | | | | | | | | | | | |
// | | | | | | | | | | | | | | | |
// | +--+ +----+ +----+ +----+ +----+ +----+ +------+ |
// | +5 +4 +3 +2 +1 +0 <--- figure |
// | +-----------------------------------------------+ |
// | | indicator | |
// | +-----------------------------------------------+ |
// +-----------------------------------------------------+
//
// < figure >
// +----+----+----+----+----+
// | | | | | | +6 <--- A position in a figure long
// +----+----+----+----+----+
// | | | | | | +5
// +----+----+----+----+----+
// | | | | | | +4
// +----+----+----+----+----+
// | | | | | | +3
// +----+----+----+----+----+
// | | | | | | +2
// +----+----+----+----+----+
// | | | | | | +1
// +----+----+----+----+----+
// | | | | | | +0
// +----+----+----+----+----+
// +4 +3 +2 +1 +0 <-------- A wide position in a figure
//
// < other >
// indicator around dot matrix
//
//-----------------------------------------------------------------------------
// Global constants
//-----------------------------------------------------------------------------
//character table ,Support ascii/iso 0x20-0x7a(' '-'z')
static const unsigned char characters[][5]=
{// I0123456 ----------- A position in a figure long (I:Indicator)
// +-- A wide position in a figure
// |
{/*" "*/
0b00000000 // 0
,0b00000000 // 1
,0b00000000 // 2
,0b00000000 // 3
,0b00000000 // 4
},
{/*"!"*/
0b00000000 // 0
,0b00000000 // 1
,0b01001111 // 2
,0b00000000 // 3
,0b00000000 // 4
},
{/*"""*/
0b00000001 // 0
,0b00000010 // 1
,0b00000000 // 2
,0b00000001 // 3
,0b00000010 // 4
},
{/*"#"*/
0b00010100 // 0
,0b01111111 // 1
,0b00010100 // 2
,0b01111111 // 3
,0b00010100 // 4
},
{/*"$"*/
0b00010010 // 0
,0b00101010 // 1
,0b01111111 // 2
,0b00101010 // 3
,0b00100100 // 4
},
{/*"%*/
0b01100010 // 0
,0b01100100 // 1
,0b00001000 // 2
,0b00010011 // 3
,0b00100011 // 4
},
{/*"&*/
0b01011000 // 0
,0b00100000 // 1
,0b01010110 // 2
,0b01001001 // 3
,0b00110110 // 4
},
{/*"'"*/
0b00000000 // 0
,0b00000001 // 1
,0b00000010 // 2
,0b00000000 // 3
,0b00000000 // 4
},
{/*"("*/
0b00000000 // 0
,0b01000001 // 1
,0b00100010 // 2
,0b00011100 // 3
,0b00000000 // 4
},
{/*")"*/
0b00000000 // 0
,0b00011100 // 1
,0b00100010 // 2
,0b01000001 // 3
,0b00000000 // 4
},
{/*"*"*/
0b00010100 // 0
,0b00001000 // 1
,0b00111110 // 2
,0b00001000 // 3
,0b00010100 // 4
},
{/*"+"*/
0b00001000 // 0
,0b00001000 // 1
,0b00111110 // 2
,0b00001000 // 3
,0b00001000 // 4
},
{/*","*/
0b00000000 // 0
,0b00000000 // 1
,0b00110000 // 2
,0b01010000 // 3
,0b00000000 // 4
},
{/*"-"*/
0b