


/***************************
* File name: Seven_Seg_Symbols.h
* Has the numberic equivalents of
* possible 7 segement charecters
* Numbers in table: active high segments, (bit0,bit1..bit6,bit7) correspond to
* segments (a,b..g,h). Many fonts are defined as three horizontal bars to indicate
* that how to define them on 7-segment display is not known
***************************/

#ifndef _SEVEN_SEGEMENT_SYMBOLS_H
#define _SEVEN_SEGEMENT_SYMBOLS_H


//Numbers
#define NUMERIC_ZERO  0x3F
#define NUMERIC_ONE   0x06
#define NUMERIC_TWO   0x5B
#define NUMERIC_THREE 0x4F
#define NUMERIC_FOUR  0x66
#define NUMERIC_FIVE  0x6D
#define NUMERIC_SIX   0x7D
#define NUMERIC_SEVEN 0x07
#define NUMERIC_EIGHT 0x7F
#define NUMERIC_NINE  0x6F

//Aplhabets

//Capitals
//The value is left to 0x49 if not possible

#define CAPITAL_A 0x77
#define SMALL_a   0x5F
#define CAPITAL_B 0x49 //Not possible
#define SMALL_b   0x7C
#define CAPITAL_C 0x39
#define SMALL_c   0x58
#define CAPITAL_D 0x49 //Not possible
#define SMALL_d   0x5E
#define CAPITAL_E 0x79
#define SMALL_e   0x7B
#define CAPITAL_F 0x71
#define SMALL_f   0x71
#define CAPITAL_G 0x7D
#define SMALL_g   0x6F
#define CAPITAL_H 0x76
#define SMALL_h   0x74
#define CAPITAL_I 0x06
#define SMALL_i   0x04
#define CAPITAL_J 0x0E
#define SMALL_j   0x0E
#define CAPITAL_K 0x49 //Not possible
#define SMALL_k   0x49 //Not possible
#define CAPITAL_L 0x38
#define SMALL_l   0x06 
#define CAPITAL_M 0x49 //Not possible
#define SMALL_m   0x49 //Not possible 
#define CAPITAL_N 0x37
#define SMALL_n   0x54 
#define CAPITAL_O 0x3F
#define SMALL_o   0x5C 
#define CAPITAL_P 0x73
#define SMALL_p   0x73 
#define CAPITAL_Q 0x49 //Not possible
#define SMALL_q   0x67 
#define CAPITAL_R 0x49 //Not possible
#define SMALL_r   0x50 
#define CAPITAL_S 0x6D
#define SMALL_s   0x6D 
#define CAPITAL_T 0x49 //Not possible
#define SMALL_t   0x49 //Not possible
#define CAPITAL_U 0x3E
#define SMALL_u   0x1C
#define CAPITAL_V 0x49 //Not possible
#define SMALL_v   0x49 //Not possible
#define CAPITAL_W 0x49 //Not possible
#define SMALL_w   0x49 //Not possible
#define CAPITAL_X 0x49 //Not possible
#define SMALL_x   0x49 //Not possible
#define CAPITAL_Y 0x6E
#define SMALL_y   0x6E
#define CAPITAL_Z 0x5B
#define SMALL_z   0x5B

#define NUMERIC_NULL 0x49

unsigned char SevenSeg_DisplayNumber(unsigned char Value)
{
	switch(Value)
	{

		case 0x00:
		{
			return NUMERIC_ZERO;
		}

		case 0x01:
		{
			return NUMERIC_ONE;
		}

		case 0x02:
		{
			return NUMERIC_TWO;
		}

		case 0x03:
		{
			return NUMERIC_THREE;
		}

		case 0x04:
		{
			return NUMERIC_FOUR;
		}

		case 0x05:
		{
			return NUMERIC_FIVE;
		}

		case 0x06:
		{
			return NUMERIC_SIX;
		}

		case 0x07:
		{
			return NUMERIC_SEVEN;
		}

		case 0x08:
		{
			return NUMERIC_EIGHT;
		}

		case 0x09:
		{
			return NUMERIC_NINE;
		}
		
		default:
		{
			return NUMERIC_NULL;
		}
	}
}

#endif
