![]() | ![]() | ![]() |
| | #1 |
|
Here is my code for this Nokia 7110 LCD. I also have some pictures of it. Code is in C18. Code: /* ****************************************************************************
; *
; Filename: GLCD.C *
; Date: May 23, 2009 *
; File Version: 001 *
; *
; Author: Jason Lopez *
; Company: AtomSoft *
; *
;******************************************************************************
; Parts Needed
; Graphic LCD 96x64 w/ SED1565 Controller ( mines from: dipmicro.com )
;
*/
#include <p18f2525.h>
#include <delays.h>
#include <string.h>
#pragma config WDT = OFF, LVP = OFF, OSC = INTIO67, XINST = OFF
/************************************
Prototypes
*************************************/
void main(void);
void LCD_Reset(void);
void LCD_Send(unsigned char cmd, unsigned char type);
void SendByte(unsigned char data);
void LCD_Init(void);
void CLS(void);
void LCDString(rom unsigned char *str, unsigned char myFont);
/************************************
Variables and Defines
*************************************/
unsigned char temp;
//LCD Defines
#define LCDt TRISC
#define LCD PORTC
#define RST LATCbits.LATC0
#define CS LATCbits.LATC1
#define DC LATCbits.LATC2
#define SCL LATCbits.LATC3
#define SDO LATCbits.LATC5
#pragma udata
unsigned rom char FontB[97][8]=
{
{ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, //Ascii-32
{ 0x00,0x00,0x00,0x5F,0x5F,0x00,0x00,0x00 }, //Ascii-33
{ 0x00,0x07,0x07,0x00,0x00,0x07,0x07,0x00 }, //Ascii-34
{ 0x24,0x7E,0x7E,0x24,0x7E,0x7E,0x24,0x00 }, //Ascii-35
{ 0x00,0x24,0x2E,0x6B,0x6B,0x3A,0x12,0x00 }, //Ascii-36
{ 0x00,0x66,0x36,0x18,0x0C,0x66,0x62,0x00 }, //Ascii-37
{ 0x30,0x7A,0x4F,0x5D,0x37,0x72,0x50,0x00 }, //Ascii-38
{ 0x00,0x00,0x00,0x07,0x07,0x00,0x00,0x00 }, //Ascii-39
{ 0x00,0x00,0x00,0x3E,0x7F,0x63,0x41,0x00 }, //Ascii-40
{ 0x00,0x41,0x63,0x7F,0x3E,0x00,0x00,0x00 }, //Ascii-41
{ 0x08,0x2A,0x3E,0x1C,0x1C,0x3E,0x2A,0x08 }, //Ascii-42
{ 0x00,0x08,0x08,0x3E,0x3E,0x08,0x08,0x00 }, //Ascii-43
{ 0x00,0x80,0xE0,0x60,0x00,0x00,0x00,0x00 }, //Ascii-44
{ 0x00,0x08,0x08,0x08,0x08,0x08,0x08,0x00 }, //Ascii-45
{ 0x00,0x00,0x00,0x60,0x60,0x00,0x00,0x00 }, //Ascii-46
{ 0x00,0x60,0x30,0x18,0x0C,0x06,0x03,0x00 }, //Ascii-47
{ 0x00,0x3E,0x7F,0x49,0x45,0x7F,0x3E,0x00 }, //Ascii-48
{ 0x00,0x40,0x42,0x7F,0x7F,0x40,0x40,0x00 }, //Ascii-49
{ 0x00,0x42,0x63,0x71,0x59,0x4F,0x46,0x00 }, //Ascii-50
{ 0x00,0x21,0x61,0x45,0x4F,0x7B,0x31,0x00 }, //Ascii-51
{ 0x00,0x18,0x1C,0x16,0x7F,0x7F,0x10,0x00 }, //Ascii-52
{ 0x00,0x27,0x67,0x45,0x45,0x7D,0x39,0x00 }, //Ascii-53
{ 0x00,0x3E,0x7F,0x49,0x49,0x79,0x30,0x00 }, //Ascii-54
{ 0x00,0x01,0x71,0x79,0x0D,0x07,0x03,0x00 }, //Ascii-55
{ 0x00,0x36,0x7F,0x49,0x49,0x7F,0x36,0x00 }, //Ascii-56
{ 0x00,0x06,0x4F,0x49,0x69,0x3F,0x1E,0x00 }, //Ascii-57
{ 0x00,0x00,0x00,0x36,0x36,0x00,0x00,0x00 }, //Ascii-58
{ 0x00,0x00,0x40,0x76,0x36,0x00,0x00,0x00 }, //Ascii-59
{ 0x00,0x00,0x08,0x1C,0x36,0x63,0x41,0x00 }, //Ascii-60
{ 0x00,0x24,0x24,0x24,0x24,0x24,0x24,0x00 }, //Ascii-61
{ 0x00,0x41,0x63,0x36,0x1C,0x08,0x00,0x00 }, //Ascii-62
{ 0x00,0x02,0x03,0x51,0x59,0x0F,0x06,0x00 }, //Ascii-63
{ 0x00,0x3E,0x7F,0x41,0x5D,0x57,0x5E,0x00 }, //Ascii-64
{ 0x00,0x7C,0x7E,0x13,0x13,0x7E,0x7C,0x00 }, //Ascii-65
{ 0x00,0x7F,0x7F,0x49,0x49,0x7F,0x36,0x00 }, //Ascii-66
{ 0x00,0x3E,0x7F,0x41,0x41,0x63,0x22,0x00 }, //Ascii-67
{ 0x00,0x7F,0x7F,0x41,0x63,0x3E,0x1C,0x00 }, //Ascii-68
{ 0x00,0x7F,0x7F,0x49,0x49,0x49,0x41,0x00 }, //Ascii-69
{ 0x00,0x7F,0x7F,0x09,0x09,0x09,0x01,0x00 }, //Ascii-70
{ 0x00,0x3E,0x7F,0x41,0x49,0x79,0x79,0x00 }, //Ascii-71
{ 0x00,0x7F,0x7F,0x08,0x08,0x7F,0x7F,0x00 }, //Ascii-72
{ 0x00,0x00,0x41,0x7F,0x7F,0x41,0x00,0x00 }, //Ascii-73
{ 0x00,0x20,0x60,0x40,0x40,0x7F,0x3F,0x00 }, //Ascii-74
{ 0x00,0x7F,0x7F,0x1C,0x36,0x63,0x41,0x00 }, //Ascii-75
{ 0x00,0x7F,0x7F,0x40,0x40,0x40,0x40,0x00 }, //Ascii-76
{ 0x7F,0x7F,0x06,0x0C,0x06,0x7F,0x7F,0x00 }, //Ascii-77
{ 0x00,0x7F,0x7F,0x0E,0x1C,0x7F,0x7F,0x00 }, //Ascii-78
{ 0x00,0x3E,0x7F,0x41,0x41,0x7F,0x3E,0x00 }, //Ascii-79
{ 0x00,0x7F,0x7F,0x09,0x09,0x0F,0x06,0x00 }, //Ascii-80
{ 0x00,0x3E,0x7F,0x51,0x21,0x7F,0x5E,0x00 }, //Ascii-81
{ 0x00,0x7F,0x7F,0x09,0x19,0x7F,0x66,0x00 }, //Ascii-82
{ 0x00,0x26,0x6F,0x49,0x49,0x7B,0x32,0x00 }, //Ascii-83
{ 0x00,0x01,0x01,0x7F,0x7F,0x01,0x01,0x00 }, //Ascii-84
{ 0x00,0x3F,0x7F,0x40,0x40,0x7F,0x7F,0x00 }, //Ascii-85
{ 0x00,0x1F,0x3F,0x60,0x60,0x3F,0x1F,0x00 }, //Ascii-86
{ 0x7F,0x7F,0x30,0x18,0x30,0x7F,0x7F,0x00 }, //Ascii-87
{ 0x00,0x63,0x77,0x1C,0x1C,0x77,0x63,0x00 }, //Ascii-88
{ 0x00,0x07,0x0F,0x78,0x78,0x0F,0x07,0x00 }, //Ascii-89
{ 0x00,0x61,0x71,0x59,0x4D,0x47,0x43,0x00 }, //Ascii-90
{ 0x00,0x00,0x00,0x7F,0x7F,0x41,0x41,0x00 }, //Ascii-91
{ 0x00,0x03,0x06,0x0C,0x18,0x30,0x60,0x00 }, //Ascii-92
{ 0x00,0x41,0x41,0x7F,0x7F,0x00,0x00,0x00 }, //Ascii-93
{ 0x08,0x0C,0x06,0x03,0x06,0x0C,0x08,0x00 }, //Ascii-94
{ 0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x00 }, //Ascii-95
{ 0x02,0x06,0x0C,0x08,0x00,0x00,0x00,0x00 }, //Ascii-96
{ 0x00,0x20,0x74,0x54,0x54,0x7C,0x78,0x00 }, //Ascii-97
{ 0x00,0x7F,0x7F,0x44,0x44,0x7C,0x38,0x00 }, //Ascii-98
{ 0x00,0x38,0x7C,0x44,0x44,0x44,0x00,0x00 }, //Ascii-99
{ 0x00,0x38,0x7C,0x44,0x44,0x7F,0x7F,0x00 }, //Ascii-100
{ 0x00,0x38,0x7C,0x54,0x54,0x5C,0x18,0x00 }, //Ascii-101
{ 0x00,0x04,0x7E,0x7F,0x05,0x05,0x00,0x00 }, //Ascii-102
{ 0x00,0x98,0xBC,0xA4,0xA4,0xFC,0x7C,0x00 }, //Ascii-103
{ 0x00,0x7F,0x7F,0x04,0x04,0x7C,0x78,0x00 }, //Ascii-104
{ 0x00,0x00,0x44,0x7D,0x7D,0x40,0x00,0x00 }, //Ascii-105
{ 0x00,0x80,0x80,0xFD,0x7D,0x00,0x00,0x00 }, //Ascii-106
{ 0x00,0x7F,0x7F,0x10,0x38,0x6C,0x44,0x00 }, //Ascii-107
{ 0x00,0x00,0x41,0x7F,0x7F,0x40,0x00,0x00 }, //Ascii-108
{ 0x7C,0x7C,0x0C,0x18,0x0C,0x7C,0x78,0x00 }, //Ascii-109
{ 0x00,0x7C,0x7C,0x04,0x04,0x7C,0x78,0x00 }, //Ascii-110
{ 0x00,0x38,0x7C,0x44,0x44,0x7C,0x38,0x00 }, //Ascii-111
{ 0x00,0xFC,0xFC,0x44,0x44,0x7C,0x38,0x00 }, //Ascii-112
{ 0x00,0x38,0x7C,0x44,0x44,0xFC,0xFC,0x00 }, //Ascii-113
{ 0x00,0x7C,0x7C,0x04,0x04,0x0C,0x08,0x00 }, //Ascii-114
{ 0x00,0x48,0x5C,0x54,0x54,0x74,0x24,0x00 }, //Ascii-115
{ 0x00,0x04,0x04,0x3E,0x7E,0x44,0x44,0x00 }, //Ascii-116
{ 0x00,0x3C,0x7C,0x40,0x40,0x7C,0x7C,0x00 }, //Ascii-117
{ 0x00,0x1C,0x3C,0x60,0x60,0x3C,0x1C,0x00 }, //Ascii-118
{ 0x1C,0x7C,0x60,0x30,0x60,0x7C,0x1C,0x00 }, //Ascii-119
{ 0x00,0x44,0x6C,0x38,0x38,0x6C,0x44,0x00 }, //Ascii-120
{ 0x00,0x9C,0xBC,0xA0,0xA0,0xFC,0x7C,0x00 }, //Ascii-121
{ 0x00,0x44,0x64,0x74,0x5C,0x4C,0x44,0x00 }, //Ascii-122
{ 0x00,0x00,0x08,0x3E,0x77,0x41,0x41,0x00 }, //Ascii-123
{ 0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x00 }, //Ascii-124
{ 0x00,0x41,0x41,0x77,0x3E,0x08,0x00,0x00 }, //Ascii-125
{ 0x0C,0x06,0x06,0x0C,0x18,0x18,0x0C,0x00 }, //Ascii-126
{ 0x00,0x60,0x78,0x5E,0x46,0x58,0x60,0x00 } //Ascii-127
};
unsigned rom char FontA[97][8] =
{
{ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, // ASCII - 32
{ 0x00,0x00,0x00,0x5F,0x5F,0x00,0x00,0x00 }, // ASCII - 33
{ 0x00,0x00,0x03,0x07,0x00,0x07,0x03,0x00 }, // ASCII - 34
{ 0x00,0x10,0x74,0x1C,0x77,0x1C,0x17,0x04 }, // ASCII - 35
{ 0x00,0x24,0x2E,0x2A,0x7F,0x2A,0x3A,0x10 }, // ASCII - 36
{ 0x00,0x4C,0x6A,0x76,0x1A,0x6A,0x56,0x33 }, // ASCII - 37
{ 0x00,0x30,0x7A,0x4F,0x5D,0x37,0x7A,0x48 }, // ASCII - 38
{ 0x00,0x00,0x04,0x07,0x03,0x00,0x00,0x00 }, // ASCII - 39
{ 0x00,0x00,0x00,0x1C,0x3E,0x63,0x41,0x00 }, // ASCII - 40
{ 0x00,0x00,0x41,0x63,0x3E,0x1C,0x00,0x00 }, // ASCII - 41
{ 0x00,0x08,0x2A,0x3E,0x1C,0x3E,0x2A,0x08 }, // ASCII - 42
{ 0x00,0x08,0x08,0x3E,0x3E,0x08,0x08,0x00 }, // ASCII - 43
{ 0x00,0x00,0x00,0x60,0x60,0x00,0x00,0x00 }, // ASCII - 44
{ 0x00,0x08,0x08,0x08,0x08,0x08,0x08,0x00 }, // ASCII - 45
{ 0x00,0x00,0x00,0x60,0x60,0x00,0x00,0x00 }, // ASCII - 46
{ 0x00,0x60,0x30,0x18,0x0C,0x06,0x03,0x01 }, // ASCII - 47
{ 0x00,0x1C,0x3E,0x61,0x43,0x3E,0x1C,0x00 }, // ASCII - 48
{ 0x00,0x00,0x44,0x7F,0x7F,0x40,0x00,0x00 }, // ASCII - 49
{ 0x00,0x46,0x67,0x71,0x59,0x4F,0x66,0x00 }, // ASCII - 50
{ 0x00,0x22,0x63,0x49,0x4D,0x7F,0x32,0x00 }, // ASCII - 51
{ 0x00,0x18,0x1C,0x52,0x7F,0x7F,0x50,0x00 }, // ASCII - 52
{ 0x00,0x2F,0x6F,0x45,0x45,0x7D,0x39,0x00 }, // ASCII - 53
{ 0x00,0x3C,0x7E,0x4B,0x49,0x79,0x30,0x00 }, // ASCII - 54
{ 0x00,0x07,0x43,0x71,0x7D,0x0F,0x03,0x00 }, // ASCII - 55
{ 0x00,0x36,0x7F,0x4D,0x59,0x7F,0x36,0x00 }, // ASCII - 56
{ 0x00,0x06,0x4F,0x49,0x69,0x3F,0x1E,0x00 }, // ASCII - 57
{ 0x00,0x00,0x00,0x66,0x66,0x00,0x00,0x00 }, // ASCII - 58
{ 0x00,0x00,0x00,0x66,0x66,0x00,0x00,0x00 }, // ASCII - 59
{ 0x00,0x00,0x08,0x1C,0x36,0x63,0x41,0x00 }, // ASCII - 60
{ 0x00,0x14,0x14,0x14,0x14,0x14,0x14,0x00 }, // ASCII - 61
{ 0x00,0x00,0x41,0x63,0x36,0x1C,0x08,0x00 }, // ASCII - 62
{ 0x00,0x02,0x07,0x51,0x59,0x0F,0x06,0x00 }, // ASCII - 63
{ 0x00,0x3E,0x41,0x5D,0x55,0x5D,0x51,0x1E }, // ASCII - 64
{ 0x00,0x40,0x70,0x1D,0x17,0x1F,0x78,0x60 }, // ASCII - 65
{ 0x00,0x41,0x7F,0x7F,0x49,0x4F,0x7E,0x30 }, // ASCII - 66
{ 0x00,0x1C,0x3E,0x63,0x41,0x41,0x42,0x27 }, // ASCII - 67
{ 0x00,0x41,0x7F,0x7F,0x41,0x63,0x3E,0x1C }, // ASCII - 68
{ 0x00,0x41,0x7F,0x7F,0x49,0x5D,0x41,0x63 }, // ASCII - 69
{ 0x00,0x41,0x7F,0x7F,0x49,0x1D,0x01,0x03 }, // ASCII - 70
{ 0x00,0x1C,0x3E,0x63,0x41,0x51,0x72,0x77 }, // ASCII - 71
{ 0x00,0x7F,0x7F,0x08,0x08,0x7F,0x7F,0x00 }, // ASCII - 72
{ 0x00,0x00,0x41,0x7F,0x7F,0x41,0x00,0x00 }, // ASCII - 73
{ 0x00,0x30,0x70,0x41,0x41,0x7F,0x3F,0x01 }, // ASCII - 74
{ 0x00,0x7F,0x7F,0x08,0x1C,0x77,0x63,0x41 }, // ASCII - 75
{ 0x00,0x41,0x7F,0x7F,0x41,0x40,0x60,0x70 }, // ASCII - 76
{ 0x00,0x7F,0x7E,0x0C,0x18,0x0C,0x7E,0x7F }, // ASCII - 77
{ 0x00,0x7F,0x7E,0x0C,0x18,0x30,0x7F,0x7F }, // ASCII - 78
{ 0x00,0x1C,0x3E,0x63,0x41,0x63,0x3E,0x1C }, // ASCII - 79
{ 0x00,0x41,0x7F,0x7F,0x49,0x09,0x0F,0x06 }, // ASCII - 80
{ 0x00,0x1C,0x3E,0x63,0x51,0x63,0x3E,0x1C }, // ASCII - 81
{ 0x00,0x7F,0x7F,0x09,0x19,0x7F,0x66,0x40 }, // ASCII - 82
{ 0x00,0x66,0x6F,0x4D,0x59,0x7B,0x33,0x00 }, // ASCII - 83
{ 0x00,0x03,0x41,0x7F,0x7F,0x41,0x03,0x00 }, // ASCII - 84
{ 0x00,0x3F,0x7F,0x40,0x40,0x40,0x7F,0x3F }, // ASCII - 85
{ 0x00,0x03,0x0F,0x3D,0x70,0x1D,0x07,0x01 }, // ASCII - 86
{ 0x00,0x0F,0x7F,0x30,0x1C,0x30,0x7F,0x0F }, // ASCII - 87
{ 0x00,0x63,0x77,0x1C,0x1C,0x77,0x63,0x00 }, // ASCII - 88
{ 0x01,0x03,0x47,0x7C,0x78,0x47,0x03,0x01 }, // ASCII - 89
{ 0x00,0x67,0x73,0x59,0x4D,0x67,0x73,0x00 }, // ASCII - 90
{ 0x00,0x00,0x00,0x7F,0x7F,0x41,0x41,0x00 }, // ASCII - 91
{ 0x00,0x01,0x03,0x06,0x0C,0x18,0x30,0x60 }, // ASCII - 92
{ 0x00,0x00,0x41,0x41,0x7F,0x7F,0x00,0x00 }, // ASCII - 93
{ 0x00,0x00,0x04,0x06,0x03,0x06,0x04,0x00 }, // ASCII - 94
{ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, // ASCII - 95
{ 0x00,0x00,0x01,0x03,0x06,0x04,0x00,0x00 }, // ASCII - 96
{ 0x00,0x68,0x6C,0x54,0x54,0x3C,0x78,0x40 }, // ASCII - 97
{ 0x00,0x41,0x7F,0x3F,0x6C,0x44,0x7C,0x38 }, // ASCII - 98
{ 0x00,0x38,0x7C,0x44,0x44,0x6C,0x2C,0x00 }, // ASCII - 99
{ 0x00,0x38,0x7C,0x44,0x49,0x3F,0x7F,0x40 }, // ASCII - 100
{ 0x00,0x38,0x7C,0x54,0x54,0x5C,0x58,0x00 }, // ASCII - 101
{ 0x00,0x00,0x48,0x7E,0x7F,0x49,0x0B,0x02 }, // ASCII - 102
{ 0x00,0x48,0x7C,0x34,0x34,0x2C,0x68,0x44 }, // ASCII - 103
{ 0x00,0x41,0x7F,0x7F,0x08,0x04,0x7C,0x78 }, // ASCII - 104
{ 0x00,0x00,0x44,0x7D,0x7D,0x40,0x00,0x00 }, // ASCII - 105
{ 0x00,0x60,0x60,0x04,0x7D,0x7D,0x00,0x00 }, // ASCII - 106
{ 0x00,0x41,0x7F,0x7F,0x10,0x78,0x6C,0x44 }, // ASCII - 107
{ 0x00,0x00,0x41,0x7F,0x7F,0x40,0x00,0x00 }, // ASCII - 108
{ 0x00,0x7C,0x7C,0x0C,0x78,0x0C,0x7C,0x78 }, // ASCII - 109
{ 0x00,0x44,0x7C,0x7C,0x08,0x04,0x7C,0x78 }, // ASCII - 110
{ 0x00,0x38,0x7C,0x44,0x44,0x7C,0x38,0x00 }, // ASCII - 111
{ 0x00,0x04,0x7C,0x78,0x24,0x24,0x3C,0x18 }, // ASCII - 112
{ 0x00,0x18,0x3C,0x24,0x24,0x78,0x7C,0x00 }, // ASCII - 113
{ 0x00,0x44,0x7C,0x78,0x4C,0x04,0x1C,0x18 }, // ASCII - 114
{ 0x00,0x48,0x5C,0x5C,0x74,0x74,0x24,0x00 }, // ASCII - 115
{ 0x00,0x00,0x04,0x3E,0x7F,0x44,0x24,0x00 }, // ASCII - 116
{ 0x00,0x3C,0x7C,0x40,0x40,0x3C,0x7C,0x40 }, // ASCII - 117
{ 0x00,0x04,0x1C,0x3C,0x60,0x30,0x1C,0x04 }, // ASCII - 118
{ 0x00,0x1C,0x7C,0x30,0x1C,0x30,0x7C,0x1C }, // ASCII - 119
{ 0x00,0x44,0x6C,0x3C,0x10,0x78,0x6C,0x44 }, // ASCII - 120
{ 0x00,0x44,0x4C,0x1C,0x70,0x64,0x1C,0x0C }, // ASCII - 121
{ 0x00,0x4C,0x64,0x74,0x5C,0x4C,0x64,0x00 }, // ASCII - 122
{ 0x00,0x08,0x08,0x3E,0x77,0x41,0x41,0x00 }, // ASCII - 123
{ 0x00,0x00,0x00,0x7F,0x7F,0x00,0x00,0x00 }, // ASCII - 124
{ 0x00,0x41,0x41,0x77,0x3E,0x08,0x08,0x00 }, // ASCII - 125
{ 0x00,0x02,0x01,0x01,0x03,0x02,0x02,0x01 }, // ASCII - 126
{ 0x00,0x60,0x78,0x4E,0x47,0x5E,0x78,0x60 } // ASCII - 127
};
/************************************
*************************************/
void LCD_Init(void){
Delay1KTCYx(17); //Delay 85mS
LCD_Reset();
LCD_Send(0xA6,0); //Display: Normal
LCD_Send(0xA3,0); //LCD Bias Settings: 1/7
LCD_Send(0xA1,0); //ADC Selection: Reverse
LCD_Send(0xC0,0); //Common Output: Normal Direction
LCD_Send(0x22,0); //Set the V5 output Voltage
LCD_Send(0x81,0); //Set Electronic Volume Register
LCD_Send(0x2E,0); //Power Controller Set: Booster circuit: ON/Voltage regulator circuit: ON/Voltage follower circuit: OFF
LCD_Send(0x2F,0); //Power Controller Set: Voltage follower circuit: ON
LCD_Send(0xE3,0); //Non-OPeration Command
LCD_Send(0x40,0); //Set the start line
LCD_Send(0xAF,0); //LCD On
LCD_Send(0xA5,0); //Display All Points: ON
Delay1KTCYx(34); //Delay 170mS
LCD_Send(0xA4,0); //Display All Points: NORMAL
}
void CLS(void){
unsigned char x,i,q;
unsigned char line;
line = 0xB0;
for(q=0;q<9;q++){
LCD_Send(line,0);
LCD_Send(17,0);
LCD_Send(2,0);
for(i=0;i<0x60;i++){
LCD_Send(0x00,1);
}
line++;
}
}
void SendByte(unsigned char data){
char x;
for(x=0;x<8;x++){
SCL = 0;
SDO=0;
if((data & 0x80) > 0) SDO = 1;
SCL = 1;
data <<= 1;
}
}
void LCD_Send(unsigned char cmd, unsigned char type){
DC = type;
CS = 0;
SendByte(cmd);
CS = 1;
}
void LCD_Reset(void){
CS = 1;
Delay1KTCYx(17); //Delay 85mS
RST = 1;
Delay1KTCYx(17); //Delay 85mS
}
void LCDString(rom unsigned char *str, unsigned char myFont){
char x;
char y;
while(*str != 0){
y = *str++;
y -= 0x20;
for(x=0;x<8;x++){
if(myFont == 1)
LCD_Send(FontA[y][x],1);
if(myFont == 2)
LCD_Send(FontB[y][x],1);
}
}
}
void main(void){
OSCCON = 0x72; //8MHz clock
while(!OSCCONbits.IOFS); //wait for osc stable
LCDt = 0x00;
LCD_Init();
CLS();
LCD_Send(0xB0,0); //Page 0 (0xBx (x = page))
LCD_Send(0x11,0); //Column Upper Nybble (0x1x) (x = upper Nybble)
LCD_Send(0x02,0); //Column Lower Nybble (0x0x) (x = upper Nybble)
LCDString((rom unsigned char*)" AtomSoft",1);
LCD_Send(0xB2,0); //Page 1 (0xBx (x = page))
LCD_Send(0x11,0); //Column Upper Nybble (0x1x) (x = upper Nybble)
LCD_Send(0x02,0); //Column Lower Nybble (0x0x) (x = upper Nybble)
LCDString((rom unsigned char*)"New Tech.",1);
LCD_Send(0xB3,0); //Page 0 (0xBx (x = page))
LCD_Send(0x11,0); //Column Upper Nybble (0x1x) (x = upper Nybble)
LCD_Send(0x02,0); //Column Lower Nybble (0x0x) (x = upper Nybble)
LCDString((rom unsigned char*)" New World",1);
LCD_Send(0xB4,0); //Page 1 (0xBx (x = page))
LCD_Send(0x11,0); //Column Upper Nybble (0x1x) (x = upper Nybble)
LCD_Send(0x02,0); //Column Lower Nybble (0x0x) (x = upper Nybble)
LCDString((rom unsigned char*)" New You",1);
LCD_Send(0xB6,0); //Page 1 (0xBx (x = page))
LCD_Send(0x11,0); //Column Upper Nybble (0x1x) (x = upper Nybble)
LCD_Send(0x02,0); //Column Lower Nybble (0x0x) (x = upper Nybble)
LCDString((rom unsigned char*)" Thank You",1);
while(1){
}
}
1: the above code running with 1 font 2: the above code using both fonts to compare differences Schematic coming soon!
__________________ AtomSofts eBay Store AtomSoftTech: C18 TIPS & TRICKS v9 PDF My Name: Jason Lopez http://atomsofttech.info/ | My YouTube Videos! My Favorite Store: dipmicro Electronics Last edited by AtomSoft; 24th May 2009 at 01:02 AM. | |
| |
| | #2 |
|
Here is the schematic:
__________________ AtomSofts eBay Store AtomSoftTech: C18 TIPS & TRICKS v9 PDF My Name: Jason Lopez http://atomsofttech.info/ | My YouTube Videos! My Favorite Store: dipmicro Electronics | |
| |
| | #3 |
|
Nice! I've been wanting to play with these. Any suggestions for buying the 7110 display cheap in small quantities (10-20)?? | |
| |
| | #4 |
| Graphic LCD 96x64 w/ SED1565 Controller - dipmicro electronics 1 = $2.94 QTY 25 = $2.23 each. ($55.84 total) QTY 10 = $2.43 each. ($24.29 total) Thats a great price and i always buy from there. Thats where i got this one.... ...
__________________ AtomSofts eBay Store AtomSoftTech: C18 TIPS & TRICKS v9 PDF My Name: Jason Lopez http://atomsofttech.info/ | My YouTube Videos! My Favorite Store: dipmicro Electronics | |
| |
| | #5 |
|
Very cool.
__________________ Mark Higgins | |
| |
| | #6 |
|
That's amazing, they're cheaper than 2x16 char displays. Only 25 left though.
__________________ "Because I be what I be. I would tell you what you want to know if I could, mum, but I be a cat, and no cat anywhere ever gave anyone a straight answer, har har." | |
| |
| | #7 |
|
yeah. I love these already. Thank goodness i ordered 2 lol 1 to play and one for a prototype. (when i need to make one) Im about to alter the code so you can set the speed at which it places new characters so it looks like its being typed in or faded in.
__________________ AtomSofts eBay Store AtomSoftTech: C18 TIPS & TRICKS v9 PDF My Name: Jason Lopez http://atomsofttech.info/ | My YouTube Videos! My Favorite Store: dipmicro Electronics | |
| |
| | #8 |
|
I noticed they're $1 each on e-bay. Beats the 3310 I played with last.
__________________ Mark Higgins | |
| |
| | #9 |
|
hey here is the new code with a fade in effect and a typed in effect Code: /* ****************************************************************************
; *
; Filename: GLCD.C *
; Date: May 23, 2009 *
; File Version: 001 *
; *
; Author: Jason Lopez *
; Company: AtomSoft *
; *
;******************************************************************************
; Parts Needed
; Graphic LCD 96x64 w/ SED1565 Controller ( mines from: dipmicro.com )
;
*/
#include <p18f2525.h>
#include <delays.h>
#include <string.h>
#pragma config WDT = OFF, LVP = OFF, OSC = INTIO67, XINST = OFF
/************************************
Prototypes
*************************************/
void main(void);
void LCD_Reset(void);
void LCD_Send(unsigned char cmd, unsigned char type);
void SendByte(unsigned char data);
void LCD_Init(void);
void CLS(void);
void LCDString(rom unsigned char *str, unsigned char myFont, unsigned char fade, unsigned char typed);
/************************************
Variables and Defines
*************************************/
unsigned char temp;
//LCD Defines
#define LCDt TRISC
#define LCD PORTC
#define RST LATCbits.LATC0
#define CS LATCbits.LATC1
#define DC LATCbits.LATC2
#define SCL LATCbits.LATC3
#define SDO LATCbits.LATC5
#pragma udata
unsigned rom char FontB[97][8]=
{
{ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, //Ascii-32
{ 0x00,0x00,0x00,0x5F,0x5F,0x00,0x00,0x00 }, //Ascii-33
{ 0x00,0x07,0x07,0x00,0x00,0x07,0x07,0x00 }, //Ascii-34
{ 0x24,0x7E,0x7E,0x24,0x7E,0x7E,0x24,0x00 }, //Ascii-35
{ 0x00,0x24,0x2E,0x6B,0x6B,0x3A,0x12,0x00 }, //Ascii-36
{ 0x00,0x66,0x36,0x18,0x0C,0x66,0x62,0x00 }, //Ascii-37
{ 0x30,0x7A,0x4F,0x5D,0x37,0x72,0x50,0x00 }, //Ascii-38
{ 0x00,0x00,0x00,0x07,0x07,0x00,0x00,0x00 }, //Ascii-39
{ 0x00,0x00,0x00,0x3E,0x7F,0x63,0x41,0x00 }, //Ascii-40
{ 0x00,0x41,0x63,0x7F,0x3E,0x00,0x00,0x00 }, //Ascii-41
{ 0x08,0x2A,0x3E,0x1C,0x1C,0x3E,0x2A,0x08 }, //Ascii-42
{ 0x00,0x08,0x08,0x3E,0x3E,0x08,0x08,0x00 }, //Ascii-43
{ 0x00,0x80,0xE0,0x60,0x00,0x00,0x00,0x00 }, //Ascii-44
{ 0x00,0x08,0x08,0x08,0x08,0x08,0x08,0x00 }, //Ascii-45
{ 0x00,0x00,0x00,0x60,0x60,0x00,0x00,0x00 }, //Ascii-46
{ 0x00,0x60,0x30,0x18,0x0C,0x06,0x03,0x00 }, //Ascii-47
{ 0x00,0x3E,0x7F,0x49,0x45,0x7F,0x3E,0x00 }, //Ascii-48
{ 0x00,0x40,0x42,0x7F,0x7F,0x40,0x40,0x00 }, //Ascii-49
{ 0x00,0x42,0x63,0x71,0x59,0x4F,0x46,0x00 }, //Ascii-50
{ 0x00,0x21,0x61,0x45,0x4F,0x7B,0x31,0x00 }, //Ascii-51
{ 0x00,0x18,0x1C,0x16,0x7F,0x7F,0x10,0x00 }, //Ascii-52
{ 0x00,0x27,0x67,0x45,0x45,0x7D,0x39,0x00 }, //Ascii-53
{ 0x00,0x3E,0x7F,0x49,0x49,0x79,0x30,0x00 }, //Ascii-54
{ 0x00,0x01,0x71,0x79,0x0D,0x07,0x03,0x00 }, //Ascii-55
{ 0x00,0x36,0x7F,0x49,0x49,0x7F,0x36,0x00 }, //Ascii-56
{ 0x00,0x06,0x4F,0x49,0x69,0x3F,0x1E,0x00 }, //Ascii-57
{ 0x00,0x00,0x00,0x36,0x36,0x00,0x00,0x00 }, //Ascii-58
{ 0x00,0x00,0x40,0x76,0x36,0x00,0x00,0x00 }, //Ascii-59
{ 0x00,0x00,0x08,0x1C,0x36,0x63,0x41,0x00 }, //Ascii-60
{ 0x00,0x24,0x24,0x24,0x24,0x24,0x24,0x00 }, //Ascii-61
{ 0x00,0x41,0x63,0x36,0x1C,0x08,0x00,0x00 }, //Ascii-62
{ 0x00,0x02,0x03,0x51,0x59,0x0F,0x06,0x00 }, //Ascii-63
{ 0x00,0x3E,0x7F,0x41,0x5D,0x57,0x5E,0x00 }, //Ascii-64
{ 0x00,0x7C,0x7E,0x13,0x13,0x7E,0x7C,0x00 }, //Ascii-65
{ 0x00,0x7F,0x7F,0x49,0x49,0x7F,0x36,0x00 }, //Ascii-66
{ 0x00,0x3E,0x7F,0x41,0x41,0x63,0x22,0x00 }, //Ascii-67
{ 0x00,0x7F,0x7F,0x41,0x63,0x3E,0x1C,0x00 }, //Ascii-68
{ 0x00,0x7F,0x7F,0x49,0x49,0x49,0x41,0x00 }, //Ascii-69
{ 0x00,0x7F,0x7F,0x09,0x09,0x09,0x01,0x00 }, //Ascii-70
{ 0x00,0x3E,0x7F,0x41,0x49,0x79,0x79,0x00 }, //Ascii-71
{ 0x00,0x7F,0x7F,0x08,0x08,0x7F,0x7F,0x00 }, //Ascii-72
{ 0x00,0x00,0x41,0x7F,0x7F,0x41,0x00,0x00 }, //Ascii-73
{ 0x00,0x20,0x60,0x40,0x40,0x7F,0x3F,0x00 }, //Ascii-74
{ 0x00,0x7F,0x7F,0x1C,0x36,0x63,0x41,0x00 }, //Ascii-75
{ 0x00,0x7F,0x7F,0x40,0x40,0x40,0x40,0x00 }, //Ascii-76
{ 0x7F,0x7F,0x06,0x0C,0x06,0x7F,0x7F,0x00 }, //Ascii-77
{ 0x00,0x7F,0x7F,0x0E,0x1C,0x7F,0x7F,0x00 }, //Ascii-78
{ 0x00,0x3E,0x7F,0x41,0x41,0x7F,0x3E,0x00 }, //Ascii-79
{ 0x00,0x7F,0x7F,0x09,0x09,0x0F,0x06,0x00 }, //Ascii-80
{ 0x00,0x3E,0x7F,0x51,0x21,0x7F,0x5E,0x00 }, //Ascii-81
{ 0x00,0x7F,0x7F,0x09,0x19,0x7F,0x66,0x00 }, //Ascii-82
{ 0x00,0x26,0x6F,0x49,0x49,0x7B,0x32,0x00 }, //Ascii-83
{ 0x00,0x01,0x01,0x7F,0x7F,0x01,0x01,0x00 }, //Ascii-84
{ 0x00,0x3F,0x7F,0x40,0x40,0x7F,0x7F,0x00 }, //Ascii-85
{ 0x00,0x1F,0x3F,0x60,0x60,0x3F,0x1F,0x00 }, //Ascii-86
{ 0x7F,0x7F,0x30,0x18,0x30,0x7F,0x7F,0x00 }, //Ascii-87
{ 0x00,0x63,0x77,0x1C,0x1C,0x77,0x63,0x00 }, //Ascii-88
{ 0x00,0x07,0x0F,0x78,0x78,0x0F,0x07,0x00 }, //Ascii-89
{ 0x00,0x61,0x71,0x59,0x4D,0x47,0x43,0x00 }, //Ascii-90
{ 0x00,0x00,0x00,0x7F,0x7F,0x41,0x41,0x00 }, //Ascii-91
{ 0x00,0x03,0x06,0x0C,0x18,0x30,0x60,0x00 }, //Ascii-92
{ 0x00,0x41,0x41,0x7F,0x7F,0x00,0x00,0x00 }, //Ascii-93
{ 0x08,0x0C,0x06,0x03,0x06,0x0C,0x08,0x00 }, //Ascii-94
{ 0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x00 }, //Ascii-95
{ 0x02,0x06,0x0C,0x08,0x00,0x00,0x00,0x00 }, //Ascii-96
{ 0x00,0x20,0x74,0x54,0x54,0x7C,0x78,0x00 }, //Ascii-97
{ 0x00,0x7F,0x7F,0x44,0x44,0x7C,0x38,0x00 }, //Ascii-98
{ 0x00,0x38,0x7C,0x44,0x44,0x44,0x00,0x00 }, //Ascii-99
{ 0x00,0x38,0x7C,0x44,0x44,0x7F,0x7F,0x00 }, //Ascii-100
{ 0x00,0x38,0x7C,0x54,0x54,0x5C,0x18,0x00 }, //Ascii-101
{ 0x00,0x04,0x7E,0x7F,0x05,0x05,0x00,0x00 }, //Ascii-102
{ 0x00,0x98,0xBC,0xA4,0xA4,0xFC,0x7C,0x00 }, //Ascii-103
{ 0x00,0x7F,0x7F,0x04,0x04,0x7C,0x78,0x00 }, //Ascii-104
{ 0x00,0x00,0x44,0x7D,0x7D,0x40,0x00,0x00 }, //Ascii-105
{ 0x00,0x80,0x80,0xFD,0x7D,0x00,0x00,0x00 }, //Ascii-106
{ 0x00,0x7F,0x7F,0x10,0x38,0x6C,0x44,0x00 }, //Ascii-107
{ 0x00,0x00,0x41,0x7F,0x7F,0x40,0x00,0x00 }, //Ascii-108
{ 0x7C,0x7C,0x0C,0x18,0x0C,0x7C,0x78,0x00 }, //Ascii-109
{ 0x00,0x7C,0x7C,0x04,0x04,0x7C,0x78,0x00 }, //Ascii-110
{ 0x00,0x38,0x7C,0x44,0x44,0x7C,0x38,0x00 }, //Ascii-111
{ 0x00,0xFC,0xFC,0x44,0x44,0x7C,0x38,0x00 }, //Ascii-112
{ 0x00,0x38,0x7C,0x44,0x44,0xFC,0xFC,0x00 }, //Ascii-113
{ 0x00,0x7C,0x7C,0x04,0x04,0x0C,0x08,0x00 }, //Ascii-114
{ 0x00,0x48,0x5C,0x54,0x54,0x74,0x24,0x00 }, //Ascii-115
{ 0x00,0x04,0x04,0x3E,0x7E,0x44,0x44,0x00 }, //Ascii-116
{ 0x00,0x3C,0x7C,0x40,0x40,0x7C,0x7C,0x00 }, //Ascii-117
{ 0x00,0x1C,0x3C,0x60,0x60,0x3C,0x1C,0x00 }, //Ascii-118
{ 0x1C,0x7C,0x60,0x30,0x60,0x7C,0x1C,0x00 }, //Ascii-119
{ 0x00,0x44,0x6C,0x38,0x38,0x6C,0x44,0x00 }, //Ascii-120
{ 0x00,0x9C,0xBC,0xA0,0xA0,0xFC,0x7C,0x00 }, //Ascii-121
{ 0x00,0x44,0x64,0x74,0x5C,0x4C,0x44,0x00 }, //Ascii-122
{ 0x00,0x00,0x08,0x3E,0x77,0x41,0x41,0x00 }, //Ascii-123
{ 0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x00 }, //Ascii-124
{ 0x00,0x41,0x41,0x77,0x3E,0x08,0x00,0x00 }, //Ascii-125
{ 0x0C,0x06,0x06,0x0C,0x18,0x18,0x0C,0x00 }, //Ascii-126
{ 0x00,0x60,0x78,0x5E,0x46,0x58,0x60,0x00 } //Ascii-127
};
unsigned rom char FontA[97][8] =
{
{ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, // ASCII - 32
{ 0x00,0x00,0x00,0x5F,0x5F,0x00,0x00,0x00 }, // ASCII - 33
{ 0x00,0x00,0x03,0x07,0x00,0x07,0x03,0x00 }, // ASCII - 34
{ 0x00,0x10,0x74,0x1C,0x77,0x1C,0x17,0x04 }, // ASCII - 35
{ 0x00,0x24,0x2E,0x2A,0x7F,0x2A,0x3A,0x10 }, // ASCII - 36
{ 0x00,0x4C,0x6A,0x76,0x1A,0x6A,0x56,0x33 }, // ASCII - 37
{ 0x00,0x30,0x7A,0x4F,0x5D,0x37,0x7A,0x48 }, // ASCII - 38
{ 0x00,0x00,0x04,0x07,0x03,0x00,0x00,0x00 }, // ASCII - 39
{ 0x00,0x00,0x00,0x1C,0x3E,0x63,0x41,0x00 }, // ASCII - 40
{ 0x00,0x00,0x41,0x63,0x3E,0x1C,0x00,0x00 }, // ASCII - 41
{ 0x00,0x08,0x2A,0x3E,0x1C,0x3E,0x2A,0x08 }, // ASCII - 42
{ 0x00,0x08,0x08,0x3E,0x3E,0x08,0x08,0x00 }, // ASCII - 43
{ 0x00,0x00,0x00,0x60,0x60,0x00,0x00,0x00 }, // ASCII - 44
{ 0x00,0x08,0x08,0x08,0x08,0x08,0x08,0x00 }, // ASCII - 45
{ 0x00,0x00,0x00,0x60,0x60,0x00,0x00,0x00 }, // ASCII - 46
{ 0x00,0x60,0x30,0x18,0x0C,0x06,0x03,0x01 }, // ASCII - 47
{ 0x00,0x1C,0x3E,0x61,0x43,0x3E,0x1C,0x00 }, // ASCII - 48
{ 0x00,0x00,0x44,0x7F,0x7F,0x40,0x00,0x00 }, // ASCII - 49
{ 0x00,0x46,0x67,0x71,0x59,0x4F,0x66,0x00 }, // ASCII - 50
{ 0x00,0x22,0x63,0x49,0x4D,0x7F,0x32,0x00 }, // ASCII - 51
{ 0x00,0x18,0x1C,0x52,0x7F,0x7F,0x50,0x00 }, // ASCII - 52
{ 0x00,0x2F,0x6F,0x45,0x45,0x7D,0x39,0x00 }, // ASCII - 53
{ 0x00,0x3C,0x7E,0x4B,0x49,0x79,0x30,0x00 }, // ASCII - 54
{ 0x00,0x07,0x43,0x71,0x7D,0x0F,0x03,0x00 }, // ASCII - 55
{ 0x00,0x36,0x7F,0x4D,0x59,0x7F,0x36,0x00 }, // ASCII - 56
{ 0x00,0x06,0x4F,0x49,0x69,0x3F,0x1E,0x00 }, // ASCII - 57
{ 0x00,0x00,0x00,0x66,0x66,0x00,0x00,0x00 }, // ASCII - 58
{ 0x00,0x00,0x00,0x66,0x66,0x00,0x00,0x00 }, // ASCII - 59
{ 0x00,0x00,0x08,0x1C,0x36,0x63,0x41,0x00 }, // ASCII - 60
{ 0x00,0x14,0x14,0x14,0x14,0x14,0x14,0x00 }, // ASCII - 61
{ 0x00,0x00,0x41,0x63,0x36,0x1C,0x08,0x00 }, // ASCII - 62
{ 0x00,0x02,0x07,0x51,0x59,0x0F,0x06,0x00 }, // ASCII - 63
{ 0x00,0x3E,0x41,0x5D,0x55,0x5D,0x51,0x1E }, // ASCII - 64
{ 0x00,0x40,0x70,0x1D,0x17,0x1F,0x78,0x60 }, // ASCII - 65
{ 0x00,0x41,0x7F,0x7F,0x49,0x4F,0x7E,0x30 }, // ASCII - 66
{ 0x00,0x1C,0x3E,0x63,0x41,0x41,0x42,0x27 }, // ASCII - 67
{ 0x00,0x41,0x7F,0x7F,0x41,0x63,0x3E,0x1C }, // ASCII - 68
{ 0x00,0x41,0x7F,0x7F,0x49,0x5D,0x41,0x63 }, // ASCII - 69
{ 0x00,0x41,0x7F,0x7F,0x49,0x1D,0x01,0x03 }, // ASCII - 70
{ 0x00,0x1C,0x3E,0x63,0x41,0x51,0x72,0x77 }, // ASCII - 71
{ 0x00,0x7F,0x7F,0x08,0x08,0x7F,0x7F,0x00 }, // ASCII - 72
{ 0x00,0x00,0x41,0x7F,0x7F,0x41,0x00,0x00 }, // ASCII - 73
{ 0x00,0x30,0x70,0x41,0x41,0x7F,0x3F,0x01 }, // ASCII - 74
{ 0x00,0x7F,0x7F,0x08,0x1C,0x77,0x63,0x41 }, // ASCII - 75
{ 0x00,0x41,0x7F,0x7F,0x41,0x40,0x60,0x70 }, // ASCII - 76
{ 0x00,0x7F,0x7E,0x0C,0x18,0x0C,0x7E,0x7F }, // ASCII - 77
{ 0x00,0x7F,0x7E,0x0C,0x18,0x30,0x7F,0x7F }, // ASCII - 78
{ 0x00,0x1C,0x3E,0x63,0x41,0x63,0x3E,0x1C }, // ASCII - 79
{ 0x00,0x41,0x7F,0x7F,0x49,0x09,0x0F,0x06 }, // ASCII - 80
{ 0x00,0x1C,0x3E,0x63,0x51,0x63,0x3E,0x1C }, // ASCII - 81
{ 0x00,0x7F,0x7F,0x09,0x19,0x7F,0x66,0x40 }, // ASCII - 82
{ 0x00,0x66,0x6F,0x4D,0x59,0x7B,0x33,0x00 }, // ASCII - 83
{ 0x00,0x03,0x41,0x7F,0x7F,0x41,0x03,0x00 }, // ASCII - 84
{ 0x00,0x3F,0x7F,0x40,0x40,0x40,0x7F,0x3F }, // ASCII - 85
{ 0x00,0x03,0x0F,0x3D,0x70,0x1D,0x07,0x01 }, // ASCII - 86
{ 0x00,0x0F,0x7F,0x30,0x1C,0x30,0x7F,0x0F }, // ASCII - 87
{ 0x00,0x63,0x77,0x1C,0x1C,0x77,0x63,0x00 }, // ASCII - 88
{ 0x01,0x03,0x47,0x7C,0x78,0x47,0x03,0x01 }, // ASCII - 89
{ 0x00,0x67,0x73,0x59,0x4D,0x67,0x73,0x00 }, // ASCII - 90
{ 0x00,0x00,0x00,0x7F,0x7F,0x41,0x41,0x00 }, // ASCII - 91
{ 0x00,0x01,0x03,0x06,0x0C,0x18,0x30,0x60 }, // ASCII - 92
{ 0x00,0x00,0x41,0x41,0x7F,0x7F,0x00,0x00 }, // ASCII - 93
{ 0x00,0x00,0x04,0x06,0x03,0x06,0x04,0x00 }, // ASCII - 94
{ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, // ASCII - 95
{ 0x00,0x00,0x01,0x03,0x06,0x04,0x00,0x00 }, // ASCII - 96
{ 0x00,0x68,0x6C,0x54,0x54,0x3C,0x78,0x40 }, // ASCII - 97
{ 0x00,0x41,0x7F,0x3F,0x6C,0x44,0x7C,0x38 }, // ASCII - 98
{ 0x00,0x38,0x7C,0x44,0x44,0x6C,0x2C,0x00 }, // ASCII - 99
{ 0x00,0x38,0x7C,0x44,0x49,0x3F,0x7F,0x40 }, // ASCII - 100
{ 0x00,0x38,0x7C,0x54,0x54,0x5C,0x58,0x00 }, // ASCII - 101
{ 0x00,0x00,0x48,0x7E,0x7F,0x49,0x0B,0x02 }, // ASCII - 102
{ 0x00,0x48,0x7C,0x34,0x34,0x2C,0x68,0x44 }, // ASCII - 103
{ 0x00,0x41,0x7F,0x7F,0x08,0x04,0x7C,0x78 }, // ASCII - 104
{ 0x00,0x00,0x44,0x7D,0x7D,0x40,0x00,0x00 }, // ASCII - 105
{ 0x00,0x60,0x60,0x04,0x7D,0x7D,0x00,0x00 }, // ASCII - 106
{ 0x00,0x41,0x7F,0x7F,0x10,0x78,0x6C,0x44 }, // ASCII - 107
{ 0x00,0x00,0x41,0x7F,0x7F,0x40,0x00,0x00 }, // ASCII - 108
{ 0x00,0x7C,0x7C,0x0C,0x78,0x0C,0x7C,0x78 }, // ASCII - 109
{ 0x00,0x44,0x7C,0x7C,0x08,0x04,0x7C,0x78 }, // ASCII - 110
{ 0x00,0x38,0x7C,0x44,0x44,0x7C,0x38,0x00 }, // ASCII - 111
{ 0x00,0x04,0x7C,0x78,0x24,0x24,0x3C,0x18 }, // ASCII - 112
{ 0x00,0x18,0x3C,0x24,0x24,0x78,0x7C,0x00 }, // ASCII - 113
{ 0x00,0x44,0x7C,0x78,0x4C,0x04,0x1C,0x18 }, // ASCII - 114
{ 0x00,0x48,0x5C,0x5C,0x74,0x74,0x24,0x00 }, // ASCII - 115
{ 0x00,0x00,0x04,0x3E,0x7F,0x44,0x24,0x00 }, // ASCII - 116
{ 0x00,0x3C,0x7C,0x40,0x40,0x3C,0x7C,0x40 }, // ASCII - 117
{ 0x00,0x04,0x1C,0x3C,0x60,0x30,0x1C,0x04 }, // ASCII - 118
{ 0x00,0x1C,0x7C,0x30,0x1C,0x30,0x7C,0x1C }, // ASCII - 119
{ 0x00,0x44,0x6C,0x3C,0x10,0x78,0x6C,0x44 }, // ASCII - 120
{ 0x00,0x44,0x4C,0x1C,0x70,0x64,0x1C,0x0C }, // ASCII - 121
{ 0x00,0x4C,0x64,0x74,0x5C,0x4C,0x64,0x00 }, // ASCII - 122
{ 0x00,0x08,0x08,0x3E,0x77,0x41,0x41,0x00 }, // ASCII - 123
{ 0x00,0x00,0x00,0x7F,0x7F,0x00,0x00,0x00 }, // ASCII - 124
{ 0x00,0x41,0x41,0x77,0x3E,0x08,0x08,0x00 }, // ASCII - 125
{ 0x00,0x02,0x01,0x01,0x03,0x02,0x02,0x01 }, // ASCII - 126
{ 0x00,0x60,0x78,0x4E,0x47,0x5E,0x78,0x60 } // ASCII - 127
};
/************************************
*************************************/
void LCD_Init(void){
Delay1KTCYx(17); //Delay 85mS
LCD_Reset();
LCD_Send(0xA6,0); //Display: Normal
LCD_Send(0xA3,0); //LCD Bias Settings: 1/7
LCD_Send(0xA1,0); //ADC Selection: Reverse
LCD_Send(0xC0,0); //Common Output: Normal Direction
LCD_Send(0x22,0); //Set the V5 output Voltage
LCD_Send(0x81,0); //Set Electronic Volume Register
LCD_Send(0x2E,0); //Power Controller Set: Booster circuit: ON/Voltage regulator circuit: ON/Voltage follower circuit: OFF
LCD_Send(0x2F,0); //Power Controller Set: Voltage follower circuit: ON
LCD_Send(0xE3,0); //Non-OPeration Command
LCD_Send(0x40,0); //Set the start line
LCD_Send(0xAF,0); //LCD On
LCD_Send(0xA5,0); //Display All Points: ON
Delay1KTCYx(34); //Delay 170mS
LCD_Send(0xA4,0); //Display All Points: NORMAL
}
void CLS(void){
unsigned char x,i,q;
unsigned char line;
line = 0xB0;
for(q=0;q<9;q++){
LCD_Send(line,0);
LCD_Send(17,0);
LCD_Send(2,0);
for(i=0;i<0x60;i++){
LCD_Send(0x00,1);
}
line++;
}
}
void SendByte(unsigned char data){
char x;
for(x=0;x<8;x++){
SCL = 0;
SDO=0;
if((data & 0x80) > 0) SDO = 1;
SCL = 1;
data <<= 1;
}
}
void LCD_Send(unsigned char cmd, unsigned char type){
DC = type;
CS = 0;
SendByte(cmd);
CS = 1;
}
void LCD_Reset(void){
CS = 1;
Delay1KTCYx(17); //Delay 85mS
RST = 1;
Delay1KTCYx(17); //Delay 85mS
}
void LCDString(rom unsigned char *str, unsigned char myFont, unsigned char fade, unsigned char typed){
char x;
char y;
while(*str != 0){
y = *str++;
y -= 0x20;
for(x=0;x<8;x++){
if(myFont == 1)
LCD_Send(FontA[y][x],1);
if(myFont == 2)
LCD_Send(FontB[y][x],1);
if(fade > 0)
Delay1KTCYx(fade);
}
if(typed > 0)
Delay10KTCYx(typed);
}
}
void main(void){
OSCCON = 0x72; //8MHz clock
while(!OSCCONbits.IOFS); //wait for osc stable
LCDt = 0x00;
LCD_Init();
CLS();
LCD_Send(0xB0,0); //Page 0 (0xBx (x = page))
LCD_Send(0x11,0); //Column Upper Nybble (0x1x) (x = upper Nybble)
LCD_Send(0x02,0); //Column Lower Nybble (0x0x) (x = upper Nybble)
LCDString((rom unsigned char*)" AtomSoft",1,0,50);
LCD_Send(0xB2,0); //Page 1 (0xBx (x = page))
LCD_Send(0x11,0); //Column Upper Nybble (0x1x) (x = upper Nybble)
LCD_Send(0x02,0); //Column Lower Nybble (0x0x) (x = upper Nybble)
LCDString((rom unsigned char*)"New Tech.",1,0,0);
LCD_Send(0xB3,0); //Page 0 (0xBx (x = page))
LCD_Send(0x11,0); //Column Upper Nybble (0x1x) (x = upper Nybble)
LCD_Send(0x02,0); //Column Lower Nybble (0x0x) (x = upper Nybble)
LCDString((rom unsigned char*)" New World",1,0,0);
LCD_Send(0xB4,0); //Page 1 (0xBx (x = page))
LCD_Send(0x11,0); //Column Upper Nybble (0x1x) (x = upper Nybble)
LCD_Send(0x02,0); //Column Lower Nybble (0x0x) (x = upper Nybble)
LCDString((rom unsigned char*)" New You",1,0,0);
LCD_Send(0xB6,0); //Page 1 (0xBx (x = page))
LCD_Send(0x11,0); //Column Upper Nybble (0x1x) (x = upper Nybble)
LCD_Send(0x02,0); //Column Lower Nybble (0x0x) (x = upper Nybble)
LCDString((rom unsigned char*)" Thank You",1,50,0);
while(1){
}
}
Code: void LCDString(rom unsigned char *str, unsigned char myFont); // to void LCDString(rom unsigned char *str, unsigned char myFont, unsigned char fade, unsigned char typed);
__________________ AtomSofts eBay Store AtomSoftTech: C18 TIPS & TRICKS v9 PDF My Name: Jason Lopez http://atomsofttech.info/ | My YouTube Videos! My Favorite Store: dipmicro Electronics Last edited by AtomSoft; 24th May 2009 at 04:11 AM. | |
| |
| | #10 |
|
Those types of displays are usually edge lit with surface mount LED's. You shouldn't need more than 2 LED's to lite the whole display up bright enough to see from a good distance. Try fileing the LED casing down so that it's nearly flat. As long as you're careful you can grind standard LED casing down almost to the thickness of the leads
__________________ "Because I be what I be. I would tell you what you want to know if I could, mum, but I be a cat, and no cat anywhere ever gave anyone a straight answer, har har." Last edited by Sceadwian; 24th May 2009 at 02:51 PM. | |
| |
| | #11 |
|
Here is the new Video: (clearer: Press the Play then HQ Button)
__________________ AtomSofts eBay Store AtomSoftTech: C18 TIPS & TRICKS v9 PDF My Name: Jason Lopez http://atomsofttech.info/ | My YouTube Videos! My Favorite Store: dipmicro Electronics Last edited by AtomSoft; 24th May 2009 at 03:54 PM. | |
| |
| | #12 |
|
hey guys i finally made my own BMP to Char Converter. Hope you like it .... give me about 10 minutes to finish it up
__________________ AtomSofts eBay Store AtomSoftTech: C18 TIPS & TRICKS v9 PDF My Name: Jason Lopez http://atomsofttech.info/ | My YouTube Videos! My Favorite Store: dipmicro Electronics | |
| |
| | #13 |
|
Here it is... I made this with it in seconds: ![]() Oops forgot to add the new code which include drawing the images. Here is the up to date C file. EDIT: New Program update and code. Now it creates the Variable with the HEIGHT and WIDTH in it so you dont have to enter it. You would show or draw a image like: Code: // void LCDImage(rom unsigned char *image,char left, char top); LCDImage(box,0,0); //would black your box image in the top left corner
__________________ AtomSofts eBay Store AtomSoftTech: C18 TIPS & TRICKS v9 PDF My Name: Jason Lopez http://atomsofttech.info/ | My YouTube Videos! My Favorite Store: dipmicro Electronics Last edited by AtomSoft; 24th May 2009 at 11:36 PM. | |
| |
| | #14 |
|
+ Circles + Lines
__________________ Mark Higgins | |
| |
| | #15 |
|
Lines may be easy but a circle lol i dont know math like that. lol
__________________ AtomSofts eBay Store AtomSoftTech: C18 TIPS & TRICKS v9 PDF My Name: Jason Lopez http://atomsofttech.info/ | My YouTube Videos! My Favorite Store: dipmicro Electronics | |
| |
|
| Tags |
| 96x64, controller, graphic, lcd, nokia7110, sed1565, w or |
| Thread Tools | |
| Display Modes | |
| |
Similar | ||||
| Title | Starter | Forum | Replies | Latest |
| Graphic LCD | baberjaved | Micro Controllers | 2 | 13th November 2007 05:01 PM |
| Graphic LCD | flemmard | Micro Controllers | 1 | 13th September 2007 03:32 AM |
| interfacing of PIC16F877A with graphic LCD controller T6963c | rosamma | Micro Controllers | 1 | 24th March 2007 12:29 PM |
| graphic LCD PIC MCU | tom_electronic | Micro Controllers | 4 | 28th February 2006 12:29 PM |
| graphic lcd help | jijita | General Electronics Chat | 1 | 18th August 2004 07:32 AM |