?? lcd_vim808_20.c
字號:
/***************************************************************************
* This code and information is provided "as is" without warranty of any *
* kind, either expressed or implied, including but not limited to the *
* implied warranties of merchantability and/or fitness for a particular *
* purpose. *
* *
* Copyright (C) 2005 Teridian Semiconductor Corp. All Rights Reserved. *
***************************************************************************/
//**************************************************************************
// DESCRIPTION: 71M652x POWER METER - LCD VIM-808-DP/VIM-808-2 Descriptors.
// for the 6520 demo and eval PCBs.
//
// AUTHOR: MTF
//
// HISTORY: See end of file.
//**************************************************************************
// File: LCD_VIM808.C
//
#include "options.h"
#if VIM808
#include "stdint.h"
// COM0 COM1 COM2 VIM808
// +-----a-----+ 8B - SEG0 8C - SEG0 7DP- SEG0 PIN1
// | 01h | 7B - SEG1 7C - SEG1 6DP- SEG1 PIN3
// COM0 | | 6B - SEG2 6C - SEG2 5DP- SEG2 PIN6
// f 20h 02h b 5B - SEG3 5C - SEG3 4DP- SEG3 PIN9
// ______|___________|_______ 4B - SEG4 4C - SEG4 3DP- SEG4 PIN12
// | | 3B - SEG5 3C - SEG5 2DP- SEG5 PIN15
// COM1 +-----g-----+ 2B - SEG6 2C - SEG6 1DP- SEG6 PIN18
// | 40h | 1B - SEG7 1C - SEG7 -- - SEG7 PIN20
// e c 3A - SEG8 3G - SEG8 3D - SEG8 PIN28
// | 10h 04h | 3F - SEG9 3E - SEG9 -- - SEG9 PIN29
// ______|___________|_______ 4A - SEG10 4G - SEG10 4D - SEG10 PIN30
// COM2 | 08h | 4F - SEG11 4E - SEG11 -- - SEG11 PIN31
// +-----d-----+
// 5A - SEG12 5G - SEG12 5D - SEG12 PIN33
// 5F - SEG13 5E - SEG13 -- - SEG13 PIN34
// 6A - SEG14 6G - SEG14 6D - SEG14 PIN35
// 6F - SEG15 6E - SEG15 -- - SEG15 PIN36
// 7A - SEG16 7G - SEG16 7D - SEG16 PIN38
// 7F - SEG17 7E - SEG17 -- - SEG17 PIN39
// 8A - SEG18 8G - SEG18 8D - SEG18 PIN40
// 1F - SEG29 1E - SEG29 -- - SEG29 PIN24
// 2A - SEG30 2G - SEG30 2D - SEG30 PIN25
// 2F - SEG31 2E - SEG31 -- - SEG31 PIN26
// -- - SEG32 -- - SEG32 -- - SEG32 PIN27 N/C
// -- - SEG33 -- - SEG33 -- - SEG33 PIN32 N/C
// -- - SEG34 -- - SEG34 6L - SEG34 PIN37
// 8F - SEG35 8E - SEG35 -- - SEG35 PIN41
// -- - SEG36 -- - SEG36 -- - SEG36 -----
// 1A - SEG37 1G - SEG37 1D - SEG37 PIN23
// Segments.
// 56 [1-8][a-g] (Digits).
// 7 [1-7]DP (Decimal points).
// 3 [2,4,6]L (Colons ':')
// ----------
// 66 Total
#define COM(x) (x << 8)
enum COMMONS { COM0 = COM(0), COM1 = COM(1), COM2 = COM(2), COM3 = COM(3) };
enum SEGS // List all segments of display in comm/segment order.
{
//COM0 SEGMENTS
SEG_8B = COM0 | 0, SEG_7B = COM0 | 1, SEG_6B = COM0 | 2, SEG_5B = COM0 | 3,
SEG_4B = COM0 | 4, SEG_3B = COM0 | 5, SEG_2B = COM0 | 6, SEG_1B = COM0 | 7,
SEG_3A = COM0 | 8, SEG_3F = COM0 | 9, SEG_4A = COM0 |10, SEG_4F = COM0 |11,
SEG_5A = COM0 |12, SEG_5F = COM0 |13, SEG_6A = COM0 |14, SEG_6F = COM0 |15,
SEG_7A = COM0 |16, SEG_7F = COM0 |17, SEG_8A = COM0 |18, SEG_8F = COM0 |35,
SEG_1A = COM0 |37, SEG_1F = COM0 |29, SEG_2A = COM0 |30, SEG_2F = COM0 |31,
//COM1 SEGMENTS
SEG_8C = COM1 | 0, SEG_7C = COM1 | 1, SEG_6C = COM1 | 2, SEG_5C = COM1 | 3,
SEG_4C = COM1 | 4, SEG_3C = COM1 | 5, SEG_2C = COM1 | 6, SEG_1C = COM1 | 7,
SEG_3G = COM1 | 8, SEG_3E = COM1 | 9, SEG_4G = COM1 |10, SEG_4E = COM1 |11,
SEG_5G = COM1 |12, SEG_5E = COM1 |13, SEG_6G = COM1 |14, SEG_6E = COM1 |15,
SEG_7G = COM1 |16, SEG_7E = COM1 |17, SEG_8G = COM1 |18, SEG_8E = COM1 |35,
SEG_1G = COM1 |37, SEG_1E = COM1 |29, SEG_2G = COM1 |30, SEG_2E = COM1 |31,
//COM2 SEGMENTS
SEG_7DP= COM2 | 0, SEG_6DP= COM2 | 1, SEG_5DP= COM2 | 2, SEG_4DP= COM2 | 3,
SEG_3DP= COM2 | 4, SEG_2DP= COM2 | 5, SEG_1DP= COM2 | 6,
SEG_3D = COM2 | 8, SEG_4D = COM2 |10, SEG_5D = COM2 |12, SEG_6D = COM2 |14,
SEG_7D = COM2 |16, SEG_8D = COM2 |18, SEG_1D = COM2 |37, SEG_2D = COM2 |30,
SEG_2L = COM2 |32, SEG_4L = COM2 |33, SEG_6L = COM2 |34
};
// List all segments of all LCD icons.
enum SEGS code Digit_1[] = // 1st digit.
{ SEG_1A, SEG_1B, SEG_1C, SEG_1D, SEG_1E, SEG_1F, SEG_1G };
enum SEGS code Digit_2[] = // 2nd digit.
{ SEG_2A, SEG_2B, SEG_2C, SEG_2D, SEG_2E, SEG_2F, SEG_2G };
enum SEGS code Digit_3[] = // 3rd digit.
{ SEG_3A, SEG_3B, SEG_3C, SEG_3D, SEG_3E, SEG_3F, SEG_3G };
enum SEGS code Digit_4[] = // 4th digit.
{ SEG_4A, SEG_4B, SEG_4C, SEG_4D, SEG_4E, SEG_4F, SEG_4G };
enum SEGS code Digit_5[] = // 5th digit.
{ SEG_5A, SEG_5B, SEG_5C, SEG_5D, SEG_5E, SEG_5F, SEG_5G };
enum SEGS code Digit_6[] = // 6th digit.
{ SEG_6A, SEG_6B, SEG_6C, SEG_6D, SEG_6E, SEG_6F, SEG_6G };
enum SEGS code Digit_7[] = // 7th digit.
{ SEG_7A, SEG_7B, SEG_7C, SEG_7D, SEG_7E, SEG_7F, SEG_7G };
enum SEGS code Digit_8[] = // 8th digit.
{ SEG_8A, SEG_8B, SEG_8C, SEG_8D, SEG_8E, SEG_8F, SEG_8G };
enum SEGS code Icon_DP[] = // Decimal points.
{ SEG_1DP, SEG_2DP, SEG_3DP, SEG_4DP, SEG_5DP, SEG_6DP, SEG_7DP };
enum SEGS code Icon_L[] =
{ SEG_2L, SEG_4L, SEG_6L }; // Colons ':'.
uint16_t code * code icons[] =
{
Digit_1, Digit_2, Digit_3, Digit_4,
Digit_5, Digit_6, Digit_7, Digit_8,
Icon_DP, Icon_L
};
#define ICON_SIZE sizeof (*icons[0])
// Number of segments in each icon.
uint8_t code num_segs[] =
{
sizeof (Digit_1) / ICON_SIZE, sizeof (Digit_2) / ICON_SIZE,
sizeof (Digit_3) / ICON_SIZE, sizeof (Digit_4) / ICON_SIZE,
sizeof (Digit_5) / ICON_SIZE, sizeof (Digit_6) / ICON_SIZE,
sizeof (Digit_7) / ICON_SIZE, sizeof (Digit_8) / ICON_SIZE,
sizeof (Icon_DP) / ICON_SIZE, sizeof (Icon_L) / ICON_SIZE
};
/***************************************************************************
* $Log: LCD_VIM808_20.c,v $
* Revision 1.1 2006/09/12 02:45:41 gmikef
* *** empty log message ***
*
* Revision 1.7 2006/09/09 01:09:06 gmikef
* *** empty log message ***
*
* Revision 1.6 2006/09/08 07:35:10 Michael T. Fischer
* *** empty log message ***
*
* Revision 1.5 2006/08/09 00:56:32 tvander
* *** empty log message ***
*
* Revision 1.4 2006/05/27 01:41:38 gmikef
* Corrected ICON_SIZE.
*
* Revision 1.3 2006/03/03 11:25:27 Michael T. Fischer
* Prep for 6530 LCD, etc.
*
* Revision 1.2 2006/02/08 22:35:59 gmikef
* *** empty log message ***
*
* Revision 1.1 2006/01/16 20:11:24 tvander
* Clean Keil build, all versions
*
* Revision 1.6 2005/09/22 23:45:03 tvander
* Clean build all models and unit tests, updated copyright to be fore Teridian
*
* Revision 1.5 2005/08/28 02:12:42 gmikef
* *** empty log message ***
*
* Revision 1.4 2005/08/16 02:28:29 gmikef
* Remapped LCD for 6520 Eval Board.
* Mapped CE code location to address of 'CeCode'.
*
* Revision 1.3 2005/04/27 23:38:33 gmikef
* Some MATH rountines now use 'idata'.
* Added MATH_FAST flag to 'options.h".
* Changed "6521B.Uv2" to max optimization.
*
* Copyright (C) 2005 Teridian Semiconductor Corp. All Rights Reserved. *
* this program is fully protected by the United States copyright *
* laws and is the property of Teridian Semiconductor Corporation. *
***************************************************************************/
/* lcd_vim808.c */
#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -