Help me about font for glcd 240x128

GLCD Font Creator software is the ultimate solution to create personalized fonts, symbols and icons for Graphic LCDs. It generates code compatible with All mikroElektronika compilers
Post Reply
Author
Message
quoctuantu
Posts: 39
Joined: 06 May 2012 04:30

Help me about font for glcd 240x128

#1 Post by quoctuantu » 07 Oct 2012 07:36

i created font from GLCD FONT CREATOR SOFTWARE,and then i inserted to my promgame, but it having an error <<108 313 Too many actual parameters SPI_T6963C_240x128.c>>
my this code for below :
#include "__SPIT6963C.h"

/*
* bitmap pictures stored in ROM
*/

//Font Generated by MikroElektronika GLCD Font Creator 1.2.0.0
//MikroElektrnika 2011
//http://www.mikroe.com

//GLCD FontName : Untitled12x20
//GLCD FontSize : 12 x 20

const unsigned short Untitled12x20[] = {
0x00,
0x00,
0x30,0x00,
0x39,0x00,
0x14,
0x00,
0x0B,0x30,0x00,0x00,
0x07,0x58,0x00,0x00,
0x0B,0x6C,0x00,0x00,
0x0B,0x94,0x00,0x00,
0x0C,0xBC,0x00,0x00,
0x0B,0xE4,0x00,0x00,
0x0B,0x0C,0x01,0x00,
0x0B,0x34,0x01,0x00,
0x0B,0x5C,0x01,0x00,
0x0B,0x84,0x01,0x00,
0x00,0x00,0xF8,0x00,0xFC,0x01,0x8E,0x03,0x06,0x03,0x07,0x03,0x03,0x07,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x07,0x07,0x03,0x06,0x03,0x8E,0x03,0xFC,0x01,0xF8,0x00,0x00,0x00,0x00,0x00, // Code for char num 48
0x00,0x60,0x70,0x78,0x7F,0x7F,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x00,0x00, // Code for char num 49
0x00,0x00,0xF8,0x00,0xFE,0x01,0x8E,0x03,0x07,0x07,0x03,0x07,0x00,0x07,0x00,0x03,0x00,0x03,0x80,0x01,0xC0,0x00,0x70,0x00,0x38,0x00,0x1C,0x00,0x0E,0x00,0x07,0x00,0xFF,0x07,0xFF,0x07,0x00,0x00,0x00,0x00, // Code for char num 50
0x00,0x00,0xF8,0x00,0xFE,0x01,0x86,0x03,0x07,0x03,0x00,0x03,0x00,0x03,0x80,0x01,0xF0,0x00,0xF0,0x01,0x80,0x03,0x00,0x07,0x00,0x06,0x03,0x06,0x07,0x07,0x8E,0x03,0xFC,0x01,0xF8,0x00,0x00,0x00,0x00,0x00, // Code for char num 51
0x00,0x00,0x80,0x03,0x80,0x03,0xC0,0x03,0xE0,0x03,0xE0,0x03,0xB0,0x03,0x98,0x03,0x98,0x03,0x8C,0x03,0x86,0x03,0x86,0x03,0xFF,0x0F,0xFF,0x0F,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x00,0x00,0x00,0x00, // Code for char num 52
0x00,0x00,0xFE,0x03,0xFE,0x03,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0xFE,0x00,0xFE,0x01,0x86,0x03,0x00,0x07,0x00,0x06,0x00,0x06,0x03,0x07,0x07,0x07,0x8E,0x03,0xFC,0x01,0xF8,0x00,0x00,0x00,0x00,0x00, // Code for char num 53
0x00,0x00,0xF8,0x00,0xFC,0x03,0x8E,0x03,0x06,0x07,0x07,0x00,0x07,0x00,0xF3,0x00,0xFF,0x01,0x8F,0x03,0x03,0x07,0x03,0x06,0x03,0x06,0x07,0x07,0x06,0x07,0x8E,0x03,0xFC,0x01,0xF8,0x00,0x00,0x00,0x00,0x00, // Code for char num 54
0x00,0x00,0xFF,0x07,0xFF,0x07,0x00,0x07,0x00,0x03,0x80,0x03,0x80,0x01,0x80,0x01,0xC0,0x01,0xC0,0x00,0xE0,0x00,0x60,0x00,0x60,0x00,0x70,0x00,0x30,0x00,0x38,0x00,0x18,0x00,0x1C,0x00,0x00,0x00,0x00,0x00, // Code for char num 55
0x00,0x00,0xF8,0x00,0xFE,0x01,0x8E,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x8E,0x03,0xF8,0x01,0xFC,0x01,0xCE,0x03,0x07,0x03,0x03,0x06,0x03,0x06,0x07,0x07,0x87,0x03,0xFE,0x03,0xF8,0x00,0x00,0x00,0x00,0x00, // Code for char num 56
0x00,0x00,0xF8,0x00,0xFE,0x01,0x8E,0x03,0x07,0x03,0x03,0x07,0x03,0x07,0x03,0x06,0x07,0x07,0x8E,0x07,0xFE,0x07,0x78,0x07,0x00,0x07,0x00,0x03,0x87,0x03,0x86,0x03,0xFE,0x01,0x78,0x00,0x00,0x00,0x00,0x00 // Code for char num 57
};

// Port Expander module connections
sbit SPExpanderRST at RC0_bit;
sbit SPExpanderCS at RC1_bit;
sbit SPExpanderRST_Direction at TRISC0_bit;
sbit SPExpanderCS_Direction at TRISC1_bit;
// End Port Expander module connections

void main() {
char txt1[] = " XXXXXXXXXXOOOOOOOOOOOOOOOOO";
char txt[] = " ZZZZZZZZZZZZZZZZHHHHHHHHHHH";

unsigned char panel; // Current panel
unsigned int i; // General purpose register
unsigned char curs; // Cursor visibility
unsigned int cposx, cposy; // Cursor x-y position

//#define COMPLETE_EXAMPLE // comment this line to make simpler/smaller example
ANSEL = 0; // Configure AN pins as digital I/O
ANSELH = 0;
C1ON_bit = 0; // Disable comparators
C2ON_bit = 0;

TRISB0_bit = 1; // Set RB0 as input
TRISB1_bit = 1; // Set RB1 as input
TRISB2_bit = 1; // Set RB2 as input
TRISB3_bit = 1; // Set RB3 as input
TRISB4_bit = 1; // Set RB4 as input

// If Port Expander Library uses SPI1 module
SPI1_Init(); // Initialize SPI module used with PortExpander

// // If Port Expander Library uses SPI2 module
// SPI2_Init(); // Initialize SPI module used with PortExpander

/*
* init display for 240 pixel width and 128 pixel height
* 8 bits character width
* data bus on MCP23S17 portB
* control bus on MCP23S17 portA
* bit 2 is !WR
* bit 1 is !RD
* bit 0 is !CD
* bit 4 is RST
* chip enable, reverse on, 8x8 font internaly set in library
*/

SPI_T6963C_Config(240, 128, 8, 0, 2, 1, 0, 4);
Delay_ms(500);
/*
* Enable both graphics and text display at the same time
*/
SPI_T6963C_graphics(1);
SPI_T6963C_text(1);

panel = 0;
i = 0;
curs = 0;
cposx = cposy = 0;
/*
* Text messages
*/

SPI_T6963C_Set_Font_Adv(&Untitled12x20, 1, 1,);
SPI_T6963C_Write_Text_Adv("0 1 2 3 4 5 6 7 8 9", 0, 0);

delay_ms(2000);
SPI_T6963C_write_text(txt, 0, 0, SPI_T6963C_ROM_MODE_XOR);
SPI_T6963C_write_text(txt1, 0, 15, SPI_T6963C_ROM_MODE_XOR);


/*
* Draw rectangles
*/
SPI_T6963C_rectangle(0, 0, 239, 127, SPI_T6963C_WHITE);
SPI_T6963C_rectangle(20, 20, 219, 107, SPI_T6963C_WHITE);
SPI_T6963C_rectangle(40, 40, 199, 87, SPI_T6963C_WHITE);
SPI_T6963C_rectangle(60, 60, 179, 67, SPI_T6963C_WHITE);

/*
* Draw a cross
*/
SPI_T6963C_line(0, 0, 239, 127, SPI_T6963C_WHITE);
SPI_T6963C_line(0, 127, 239, 0, SPI_T6963C_WHITE);

/*
* Draw solid boxes
*/
SPI_T6963C_box(0, 0, 239, 8, SPI_T6963C_WHITE);
SPI_T6963C_box(0, 119, 239, 127, SPI_T6963C_WHITE);

}

quoctuantu
Posts: 39
Joined: 06 May 2012 04:30

Re: Help me about font for glcd 240x128

#2 Post by quoctuantu » 08 Oct 2012 03:30

any one to help me ?

User avatar
janko.kaljevic
Posts: 3565
Joined: 16 Jun 2011 13:48

Re: Help me about font for glcd 240x128

#3 Post by janko.kaljevic » 08 Oct 2012 13:46

Hello,

Probably just a typing error:

Code: Select all

SPI_T6963C_Set_Font_Adv(&Untitled12x20, 1, 1,);
There is a comma after last parameter.
Delete it and your code will compile fine.

Best regards.

quoctuantu
Posts: 39
Joined: 06 May 2012 04:30

Re: Help me about font for glcd 240x128

#4 Post by quoctuantu » 08 Oct 2012 15:59

oh... ^o^ the foolish error !
thanks janko.kaljevic so much

quoctuantu
Posts: 39
Joined: 06 May 2012 04:30

Re: Help me about font for glcd 240x128

#5 Post by quoctuantu » 08 Oct 2012 18:22

but i can not change bigger font by this code (glcd t6963c), any code to do this ?
can u give me an advice ?

User avatar
janko.kaljevic
Posts: 3565
Joined: 16 Jun 2011 13:48

Re: Help me about font for glcd 240x128

#6 Post by janko.kaljevic » 09 Oct 2012 09:33

Hello,

If you want to use bigger fonts you should generate another font table.
For this purpose use GLCD Font Creator application or VisualGLCD Tool.

Best regards.

quoctuantu
Posts: 39
Joined: 06 May 2012 04:30

Re: Help me about font for glcd 240x128

#7 Post by quoctuantu » 10 Oct 2012 02:47

I did, but it had not working in T6369C(i using Proteus Software to simulation), and this code for below:

#include "__SPIT6963C.h"

/*
* bitmap pictures stored in ROM
*/


//Font Generated by MikroElektronika GLCD Font Creator 1.2.0.0
//MikroElektrnika 2011
//http://www.mikroe.com

//GLCD FontName : Times_New_Roman11x15
//GLCD FontSize : 11 x 15

const unsigned short font11x15[] = {
0x00,
0x00,
0x30,0x00,
0x3A,0x00,
0x0F,
0x00,
0x0A,0x34,0x00,0x00,
0x09,0x52,0x00,0x00,
0x0B,0x70,0x00,0x00,
0x0A,0x8E,0x00,0x00,
0x0A,0xAC,0x00,0x00,
0x0A,0xCA,0x00,0x00,
0x0A,0xE8,0x00,0x00,
0x0B,0x06,0x01,0x00,
0x0A,0x24,0x01,0x00,
0x0A,0x42,0x01,0x00,
0x04,0x60,0x01,0x00,
0x70,0x00,0x88,0x00,0x8C,0x01,0x04,0x01,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x04,0x01,0x8C,0x01,0x88,0x00,0x70,0x00, // Code for char num 48
0x60,0x00,0x78,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xF8,0x01, // Code for char num 49
0xF8,0x00,0xFC,0x01,0x84,0x03,0x02,0x03,0x02,0x03,0x00,0x03,0x00,0x01,0x80,0x00,0x80,0x00,0x40,0x00,0x20,0x00,0x10,0x00,0x08,0x06,0xFC,0x03,0xFE,0x03, // Code for char num 50
0x78,0x00,0xFC,0x01,0xC2,0x01,0x80,0x01,0x80,0x01,0x80,0x00,0xE0,0x00,0xF0,0x01,0x80,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x01,0x86,0x00,0x7E,0x00, // Code for char num 51
0xC0,0x00,0xC0,0x00,0xE0,0x00,0xD0,0x00,0xD0,0x00,0xC8,0x00,0xC4,0x00,0xC4,0x00,0xC2,0x00,0xC1,0x00,0xFF,0x03,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00, // Code for char num 52
0xF0,0x03,0xF0,0x01,0x08,0x00,0x08,0x00,0x3C,0x00,0xFC,0x00,0xE0,0x01,0x80,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x01,0x86,0x00,0x7C,0x00, // Code for char num 53
0x80,0x03,0xE0,0x00,0x30,0x00,0x18,0x00,0x0C,0x00,0x0C,0x00,0xF6,0x00,0x8E,0x01,0x06,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x0C,0x01,0x88,0x01,0xF0,0x00, // Code for char num 54
0xFC,0x07,0xFC,0x03,0x06,0x02,0x02,0x01,0x00,0x01,0x00,0x01,0x80,0x00,0x80,0x00,0x40,0x00,0x40,0x00,0x40,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x10,0x00, // Code for char num 55
0xF8,0x00,0x8C,0x01,0x06,0x03,0x06,0x03,0x0E,0x03,0x9C,0x01,0x78,0x00,0xF0,0x00,0xC8,0x01,0x84,0x03,0x06,0x03,0x06,0x03,0x06,0x03,0x8C,0x01,0xF8,0x00, // Code for char num 56
0x78,0x00,0x8C,0x00,0x84,0x01,0x06,0x03,0x06,0x03,0x06,0x03,0x0E,0x03,0x0C,0x03,0xF8,0x03,0x80,0x01,0x80,0x01,0xC0,0x00,0x60,0x00,0x38,0x00,0x0E,0x00, // Code for char num 57
0x00,0x00,0x00,0x00,0x0C,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x0C // Code for char num 58
};


// Port Expander module connections
sbit SPExpanderRST at RC0_bit;
sbit SPExpanderCS at RC1_bit;
sbit SPExpanderRST_Direction at TRISC0_bit;
sbit SPExpanderCS_Direction at TRISC1_bit;
// End Port Expander module connections

void main() {
unsigned char panel; // Current panel
unsigned int i; // General purpose register

//#define COMPLETE_EXAMPLE // comment this line to make simpler/smaller example
ANSEL = 0; // Configure AN pins as digital I/O
ANSELH = 0;
C1ON_bit = 0; // Disable comparators
C2ON_bit = 0;

TRISB0_bit = 1; // Set RB0 as input
TRISB1_bit = 1; // Set RB1 as input
TRISB2_bit = 1; // Set RB2 as input
TRISB3_bit = 1; // Set RB3 as input
TRISB4_bit = 1; // Set RB4 as input

// If Port Expander Library uses SPI1 module
SPI1_Init(); // Initialize SPI module used with PortExpander
SPI_T6963C_Config(240, 128, 8, 0, 2, 1, 0, 4);
Delay_ms(500);
/*
* Enable both graphics and text display at the same time
*/
SPI_T6963C_graphics(1);
SPI_T6963C_text(1);
/*
* Text messages
*/
SPI_T6963C_Set_Font_Adv(&font11x15, 1, 0);
SPI_T6963C_Write_Text_Adv("349", 10, 3);
delay_ms(1000);
SPI_T6963C_txtFill(0);
SPI_T6963C_Write_Text_Adv("765", 10, 3);
delay_ms(1000);
}

Could you send me a sample code for T6963 ?

Post Reply

Return to “GLCD Font Creator Software”