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.

[SOLVED] DOT matrix flickering problem/incomplete character

Status
Not open for further replies.

Umer Hassan

Newbie level 4
Joined
Sep 15, 2015
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
49
Hello, I am new to PIC UC and i am in learning phase. well i am getting problem in simulating Dot matrix that when i display only static 6 characters on the 6 8x8 dot matrix. they look perfectly fine. but when i increase the dot matrix, let say 8 8x8 dotmatrix the characters dont display properly and flickering occurs. also i need help to improve my code. Right now i have not used

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
#define data_line PORTB
#define address_line PORTC
#define digit PORTD
#define en1 PORTD.B0
#define en2 PORTD.B1
#define en3 PORTD.B2
#define en4 PORTD.B3
#define en5 PORTD.B4
#define en6 PORTD.B5
#define en7 PORTD.B6
#define en8 PORTD.B7
#define segdel 500
 
 
unsigned char i,acol, afont[10][8] = {
        0x18, 0x24, 0x24, 0x24, 0x24, 0x24, 0x18, 0x00,
        0x08, 0x18, 0x08, 0x08, 0x08, 0x08, 0x1C, 0x00,
        0x18, 0x24, 0x04, 0x1C, 0x20, 0x20, 0x3C, 0x00,
        0x18, 0x24, 0x04, 0x18, 0x04, 0x24, 0x18, 0x00,
        0x24, 0x24, 0x24, 0x3C, 0x04, 0x04, 0x04, 0x00,
        0x3C, 0x20, 0x38, 0x04, 0x04, 0x24, 0x18, 0x00,
        0x18, 0x20, 0x38, 0x24, 0x24, 0x24, 0x18, 0x00,
        0x3C, 0x04, 0x04, 0x08, 0x10, 0x10, 0x10, 0x00,
        0x18, 0x24, 0x24, 0x18, 0x24, 0x24, 0x18, 0x00,
        0x18, 0x24, 0x24, 0x1C, 0x04, 0x04, 0x18, 0x00
        };
 
unsigned int count;
void main()
{
TRISB=TRISC=TRISD=0x00;
PORTB=0x00;
en1=en2=en3=en4=en5=en6=en7=en8=0;
while(1)
{
for(acol=0;acol<8;acol++)
{
en8=0;
en1=1;
data_line = 0x00;
data_line = afont[0][acol];
address_line = acol;
delay_us(segdel);
en1=0;
en2=1;
data_line = 0x00;
data_line = afont[1][acol];
address_line = acol;
delay_us(segdel);
en2=0;
en3=1;
data_line = 0x00;
data_line = afont[2][acol];
address_line = acol;
delay_us(segdel);
en3=0;
en4=1;
data_line = 0x00;
data_line = afont[3][acol];
address_line = acol;
delay_us(segdel);
en4=0;
en5=1;
data_line = 0x00;
data_line = afont[4][acol];
address_line = acol;
delay_us(segdel);
en5=0;
en6=1;
data_line = 0x00;
data_line = afont[5][acol];
address_line = acol;
delay_us(segdel);
en6=0;
en7=1;
data_line = 0x00;
data_line = afont[6][acol];
address_line = acol;
delay_us(segdel);
en7=0;
en8=1;
data_line = 0x00;
data_line = afont[7][acol];
address_line = acol;
delay_us(segdel);
}
}
}

 

Attachments

  • Screenshot 2015-09-16 18.51.43.png
    Screenshot 2015-09-16 18.51.43.png
    52.6 KB · Views: 108
  • Screenshot 2015-09-16 18.54.36.png
    Screenshot 2015-09-16 18.54.36.png
    55.3 KB · Views: 114

Don't know what the "segment delay" value actually is, but there should be no problem to run the code in real hardware without flicker.

In case you are talking about flickering in the proteus simulation, I suspect a pure simulation problem. Adjust the timeout in the LED display properties.
 
segment delay is just a constant value for delay_us(). Well thanks bro i just adjusted the Led Trigger time and it works well.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top