Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
03/20/06 10:58
Read: times


 
#112558 - problem in displaying numeric values.
Responding to: ???'s previous message
Hello sir,
Thankyou for for your reply.I used that type of declaration in my code as follows:

#define SEV_SEG_0 0x3e, 0x51, 0x49, 0x45, 0x3e, 0x00 // '0'
#define SEV_SEG_1 0x00, 0x42, 0x7f, 0x40, 0x00, 0x00 // '1'
#define SEV_SEG_2 0x42, 0x61, 0x51, 0x49, 0x46, 0x00 // '2'
#define SEV_SEG_3 0x21, 0x41, 0x45, 0x4b, 0x31, 0x00 // '3'
#define SEV_SEG_4 0x18, 0x14, 0x12, 0x7f, 0x10, 0x00 // '4'

unsigned char ArrayNumCode[30]={SEV_SEG_0,SEV_SEG_1, SEV_SEG_2,SEV_SEG_3,SEV_SEG_4};

void display(void)
{
LCD_CS1 = 1;
LCD_CS2 = 1;
Write(0xb8,0);
Write(0x40,0);

rpm2 = rpm%10; //if rpm=25
for(i=0;i<30;i++)
b[i]=ArrayNumCode[i];
for(i=0;i<30;i++)
Write(b[i],1); //should display '5'
}

But the problem is it executes as ArrayNumCode[5]and displays ' 'equivalent to ArrayNameCode[0x00] instead of displaying the SEV_SEG_4.

Here, ArrayNameCode[5] produces error 'Too many initialisers'.

suggest me a solution to get the value displayed correctly.


List of 3 messages in thread
TopicAuthorDate
How to use the font table in graphic LCD            01/01/70 00:00      
   Use Arrays or Structures            01/01/70 00:00      
   problem in displaying numeric values.            01/01/70 00:00      

Back to Subject List