Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

improper fixup error in keil

Status
Not open for further replies.

tu122221

Newbie
Joined
Sep 19, 2017
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
62
to display 8x6 text character on dot matrix display i am using code memory to store fonts array in 4 different tables and calling them using pointer. here is the code for it.....



Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
#include <reg51.h>
#include <stdio.h>
unsigned char code table1[]={
 0x80,0x80,0x80,0x80,0x80,0x80, // SPACE
 0x80,0x80,0x5F,0x80,0x80,0x80, // !
 0x04,0x02,0x05,0x02,0x01,0x80, // "
 0x14,0x7F,0x14,0x7F,0x14,0x80, // # 
 0x26,0x49,0x7F,0x49,0x32,0x80,// $
 0x22,0x10,0x08,0x04,0x22,0x80,// %
 0x80,0x36,0x49,0x36,0x28,0x80,// &
 0x04,0x02,0x01,0x80,0x80,0x80,// '
 0x08,0x14,0x22,0x41,0x80,0x80,// (
 0x80,0x41,0x22,0x14,0x08,0x80,// )
 0x2A,0x1C,0x08,0x1C,0x2A,0x80,// *
 0x08,0x08,0x3E,0x08,0x08,0x80,// +
 0x80,0x58,0x38,0x80,0x80,0x80,// ,
 0x08,0x08,0x08,0x08,0x08,0x80,// -
 0x40,0x80,0x80,0x80,0x80,0x80,// .
 0x20,0x10,0x08,0x04,0x02,0x80}; // ;
 
 
unsigned char code table2[]={
 0x3E,0x41,0x41,0x41,0x3E,0x80,// 0  
 0x80,0x42,0x0FF,0x40,0x80,0x80,// 1 
 0x42,0x61,0x51,0x49,0x46,0x80,// 2 
 0x49,0x49,0x49,0x49,0x36,0x80,// 3
 0x07,0x08,0x08,0x08,0x77,0x80,// 4
 0x4F,0x49,0x49,0x49,0x39,0x80,// 5 
 0x3E,0x49,0x49,0x49,0x32,0x80,// 6
 0x41,0x21,0x11,0x09,0x07,0x80,// 7
 0x3E,0x49,0x49,0x49,0x3E,0x80,// 8
 0x06,0x09,0x09,0x09,0x7E,0x80,// 9
 0x80,0x80,0x22,0x80,0x80,0x80,// :
 0x80,0x40,0x32,0x80,0x80,0x80,// ;
 0x08,0x14,0x22,0x41,0x80,0x80,// <
 0x14,0x14,0x14,0x14,0x14,0x80,// =
 0x80,0x41,0x22,0x14,0x08,0x80,// >
 0x06,0x01,0x51,0x09,0x06,0x80}; // ?
 
unsigned char code table3[]={
 0x3E,0x4D,0x53,0x1D,0x1E,0x80,// @
 0x7C,0x12,0x11,0x12,0x7C,0x80,// A
 0x7F,0x49,0x49,0x49,0x36,0x80,// B
 0x3E,0x41,0x41,0x41,0x22,0x80,// C
 0x7F,0x41,0x41,0x22,0x1C,0x80,// D
 0x7F,0x49,0x49,0x49,0x41,0x80,// E
 0x7F,0x09,0x09,0x09,0x01,0x80,// F
 0x3E,0x41,0x49,0x49,0x7A,0x80,// G
 0x7F,0x08,0x08,0x08,0x7F,0x80,// H
 0x80,0x41,0x7F,0x41,0x80,0x80,// I
 0x20,0x40,0x41,0x3F,0x01,0x80,// J
 0x7F,0x08,0x14,0x22,0x41,0x80,// K
 0x7F,0x40,0x40,0x40,0x40,0x80,// L
 0x7F,0x02,0x0C,0x02,0x7F,0x80,// M
 0x7F,0x04,0x08,0x10,0x7F,0x80,// N
 0x3E,0x41,0x41,0x41,0x3E,0x80};// O
 
unsigned char code table4[]={
 0x7F,0x09,0x09,0x09,0x06,0x80,// P  
 0x3E,0x41,0x51,0x21,0x5E,0x80,// Q
 0x7F,0x09,0x19,0x29,0x46,0x80,// R
 0x46,0x49,0x49,0x49,0x31,0x80,// S 
 0x01,0x01,0x7F,0x01,0x01,0x80,// T
 0x3F,0x40,0x40,0x40,0x3F,0x80,// U
 0x1F,0x20,0x40,0x20,0x1F,0x80,// V
 0x3F,0x40,0x30,0x40,0x3F,0x80,// W
 0x63,0x14,0x08,0x14,0x63,0x80,// X
 0x07,0x08,0x70,0x08,0x07,0x80,// Y
 0x61,0x51,0x49,0x45,0x43,0x80,// Z
 0x7F,0x41,0x41,0x41,0x80,0x80,// [
 0x02,0x04,0x08,0x10,0x40,0x80,// ""
 0x80,0x41,0x41,0x41,0x7F,0x80,// ]
 0x04,0x02,0x01,0x02,0x04,0x80,// ^
 0x40,0x40,0x40,0x40,0x40,0x80}; //  _
 
unsigned char * table (unsigned char);
void displaycolumn(void);   
unsigned char count=0,j=0,a=0;
unsigned char decoder=0;
unsigned char *c,*d; 
unsigned char idata msg[]={"Hello world"};
void main(void)
 { 
    
   TMOD = (TMOD & 0x0F) | 0x32;
   TH0=0x00;
   TR0=1;
     
   // Write your code here
   
   do{a++;
     count++;
   }while(msg[a]!=0);
   a=0;
while(1);   } 
   
 
 unsigned char *table (unsigned char x)
{
if(x==2)
return table1;
 
else if(x==3)
return table2;
 
else if(x==4)
return table3;
 
else if(x==5)
return table4;
 
else 
return 0;
}
 
void timer0_ISR (void) interrupt 1 
 {
   if(decoder<12) decoder++;
   else decoder=0x00; 
      P2=0xFF & decoder;
 
if((msg[a]!=0)&&(a<count))
{
c=table((msg[a]&0xf0)>>4);
d=c+(6*(msg[a]&0x0f));
    displaycolumn();
    }}
  void displaycolumn(void)
 { 
  P0= *d++;  
    j++;
    if(j==6) {
       a++;
       j=0;
       }}

.............



this is it.... i am stuck with an error called .. ERROR L121: IMPROPER FIXUP..
please help..
 
Last edited by a moderator:

The exact place where the fixup error happens matters.

The posted code however compiles for me in Keil V7 without errors.
 

now i figured out that the problem was in the compilers .dll files which got fixed after i reinstalled keil..anyway thanks...
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top