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.

8x8 DOT MATRIX_o/p is flip scrolling and brightness issues.......

Status
Not open for further replies.

dattlara76

Junior Member level 2
Junior Member level 2
Joined
Mar 1, 2019
Messages
21
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
291
HI ALL,
I am trying to convert the code written for avr into XC8 16F877A(https://circuitdigest.com/microcontroller-projects/8x8-led-matrix-with-avr-atmega8)
and the modified code.
The ckt diagram and dot matrix with internal pin configuration(from datasheet) what I am using is also been attached.
>>>>But why not getting EXPECTED O/P in the display? Only getting invert character.
I have tested LEFT-UPPER-MOST-CORNER LED to check the position for placement of the module and the same LED is glow when pin (9) -> is given GND and pin (13) -> is provided VCC.
The module has been placed as per image shown here.
>>>>And another issue that, along with inverse character some LEDs glowing brightly and some dimmed?
What i am doing wrong for both cases.

Thnk in advance..


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
136
// CONFIG
#pragma config FOSC = HS        // Oscillator Selection bits (HS oscillator)
#pragma config WDTE = OFF       // Watchdog Timer Enable bit (WDT disabled)
#pragma config PWRTE = ON       // Power-up Timer Enable bit (PWRT enabled)
#pragma config BOREN = ON       // Brown-out Reset Enable bit (BOR enabled)
#pragma config LVP = OFF        // Low-Voltage (Single-Supply) In-Circuit Serial Programming Enable bit (RB3 is digital I/O, HV on MCLR must be used for programming)
#pragma config CPD = OFF        // Data EEPROM Memory Code Protection bit (Data EEPROM code protection off)
#pragma config WRT = OFF        // Flash Program Memory Write Enable bits (Write protection off; all program memory may be written to by EECON control)
#pragma config CP = OFF         // Flash Program Memory Code Protection bit (Code protection off)
 
// #pragma config statements should precede project file includes.
// Use project enums instead of #define for ON and OFF.
 
#include <xc.h>
#include <stdint.h>         // include stdint header
 
/* To display a still letter 'F' in the display */
 
#define _XTAL_FREQ 20000000
 
//static int ALPHA[26][8]= {
const char ALPHA [26][8] = {    
    {0,0b01111111,0b11111111,0b11001100,0b11001100,0b11001100,0b11111111,0b01111111},           //A//1
 
    {0,0b00111100,0b01111110,0b11011011,0b11011011,0b11011011,0b11111111,0b11111111},            //B//2
 
    {0,0b11000011,0b11000011,0b11000011,0b11000011,0b11100111,0b01111110,0b00111100},            //C//3
 
    {0,0b01111110,0b10111101,0b11000011,0b11000011,0b11000011,0b11111111,0b11111111},            //D//4
 
    {0,0b11011011,0b11011011,0b11011011,0b11011011,0b11011011,0b11111111,0b11111111},            //E//5
 
    {0,0b11011000,0b11011000,0b11011000,0b11011000,0b11011000,0b11111111,0b11111111},            //F//6
 
    {0b00011111,0b11011111,0b11011000,0b11011011,0b11011011,0b11011011,0b11111111,0b11111111},   //G//7
 
    {0,0b11111111,0b11111111,0b00011000,0b00011000,0b00011000,0b11111111,0b11111111},             //H//8
 
    {0b11000011,0b11000011,0b11000011,0b11111111,0b11111111,0b11000011,0b11000011,0b11000011},    //I//9
 
    {0b11000000,0b11000000,0b11000000,0b11111111,0b11111111,0b11000011,0b11001111,0b11001111},     //J//10
 
    {0,0b11000011,0b11100111,0b01111110,0b00111100,0b00011000,0b11111111,0b11111111},               //K//11
 
    {0b00000011,0b00000011,0b00000011,0b00000011,0b00000011,0b00000011,0b11111111,0b11111111},      //L//12
 
    {0b11111111,0b11111111,0b01100000,0b01110000,0b01110000,0b01100000,0b11111111,0b11111111},      //M//13
 
    {0b11111111,0b11111111,0b00011100,0b00111000,0b01110000,0b11100000,0b11111111,0b11111111},       //N//14
 
    {0b01111110,0b11111111,0b11000011,0b11000011,0b11000011,0b11000011,0b11111111,0b01111110},       //O//15
 
    {0,0b01110000,0b11111000,0b11001100,0b11001100,0b11001100,0b11111111,0b11111111},                 //P//16
 
    {0b01111110,0b11111111,0b11001111,0b11011111,0b11011011,0b11000011,0b11111111,0b01111110},         //Q//17
 
    {0b01111001,0b11111011,0b11011111,0b11011110,0b11011100,0b11011000,0b11111111,0b11111111},         //R//18
 
    {0b11001110,0b11011111,0b11011011,0b11011011,0b11011011,0b11011011,0b11111011,0b01110011},          //S//19
 
    {0b11000000,0b11000000,0b11000000,0b11111111,0b11111111,0b11000000,0b11000000,0b11000000},              //T//20
 
    {0b11111110,0b11111111,0b00000011,0b00000011,0b00000011,0b00000011,0b11111111,0b11111110},              //U//21
 
    {0b11100000,0b11111100,0b00011110,0b00000011,0b00000011,0b00011110,0b11111100,0b11100000},              //V//22
 
    {0b11111110,0b11111111,0b00000011,0b11111111,0b11111111,0b00000011,0b11111111,0b11111110},              //W//23
 
    {0b01000010,0b11100111,0b01111110,0b00111100,0b00111100,0b01111110,0b11100111,0b01000010},              //X//24
 
    {0b01000000,0b11100000,0b01110000,0b00111111,0b00111111,0b01110000,0b11100000,0b01000000},              //Y//25
 
    {0b11000011,0b11100011,0b11110011,0b11111011,0b11011111,0b11001111,0b11000111,0b11000011}               //Z//26
    
    };//characters a,b,c,d,e,f,g,...z binary codecs
 
 
int main(void)
{
 
    TRISB = 0x00;//PORTB,C,D are set as output
    TRISC = 0x00;
    TRISD = 0x00;
    
    //PORT[8] = {1,2,4,8,16,32,64,128};//pin values of PORTD
    int VAL[8] = {1,2,4,8,16,32,64,128};//pin values of PORTD
                                            
 
    char NAME[]={2,8,17,2,20,8,19,3,8,6,4,18,19};///circuitdigest character values
    uint8_t l =0;
    while(1)
        {
            for (int m=0;m<sizeof NAME;m++)
                {
                    l = NAME[m];
                    for (int n=0;n<200;n++)//execute 200 times for the eye to catch
                        {
                                for (int j=0;j<4;j++)
 
                                {
                                                PORTB = ~VAL[j];// ROW
                                                PORTD = ALPHA[l][j];//show half of character (COLUMN)
                                                __delay_us(500);
 
                                }
 
                                PORTB=0xFF;//clear screen after show
 
                                for (int k=0;k<4;k++)
 
                                {
                                                PORTC = ~VAL[k];// ROW
                                                PORTD = ALPHA[l][k+4];//show other half of character(COLUMN)
                                                __delay_us(500);
 
                                }
 
                                PORTC=0xFF;//clear screen after show.
 
                        }
 
                }
 
                __delay_ms(220);
 
                __delay_ms(220);
 
                __delay_ms(220);
 
                __delay_ms(220);
 
                __delay_ms(220);
 
        }
 
}

 

Attachments

  • DOT.png
    DOT.png
    118.9 KB · Views: 152

First of all, you are not using any current limiting resistors in the microcontroller outputs, and according to the datasheet, a maximum current is not defined, but a typical range. Furthermore, what do you mean by inverted character? Orientation? Inverted 'colors' (dark/light)?
 

hi,
sorry to say that the, Limit resistor R330 of 8 nos had inclUded at RD0 to RD7 PIN of MCU and same connected with DOT module pin from (1) to pin (7) bur here in sche. forgot to mention/show.
If = 20mA(max),
Vr = 5v(min).

I mean displaying each character in Oriented manner and brightness of some of them which is glowing (under oriented) is less compared to others under glowing under the same character..
tnx.
 

I appreciate it isn't easy to photograph a dynamic display but it would help if we could see the problem. Note that the maximum current available from any PIC pin is 20mA and there is also a limit for the port as a whole, you might be exceeding it.

Brian.
 

Hi,
Is the code and pin connection in correct way.
Is the array "ALPHA[]" for particular alphabets are according to my ckt connection.

"C" is displaying as "U"
pl suggest
tnx
 

Hi,
Is the array "ALPHA[]" for particular alphabets are according to my ckt connection.

"C" is displaying as "U"

My recommendation (this is how we need to check it, too):
Take a sheet of checkered paper and do the paintwork yourself:
For every byte take 8 boxes in a row..
For every "1" fill the box with dark color, for every "0" leave the box blank.

Klaus
 

"C" is displaying as "U"

Surely the following routine will be useful to you, obviously with the appropriate modifications. In the case, I used it just to remap the character's fonts, and with the output of the execution, I replaced the original map.

https://www.edaboard.com/blog/1913

BTW, considering that the display has a clear symmetry in rows/colums, why not just physicaly turning the display itself by 90 degrees?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top