[PIC] multiplexing 7 Segment

Status
Not open for further replies.

adimadayan

Newbie level 4
Joined
Oct 27, 2013
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
46
can any one please help me to make MicroC Pro for Pic code for the attached schematic. the 4SSDs to display 4digit numbers set by the 3Buttons

Thanks
Madayan

http://obrazki.elektroda.pl/6007905700_1382893799.jpg

- - - Updated - - -



MPLXING SSDs
 

your circuit is wrong...
pins 1 2 3 and 4 are the selection lines of LCD planes.
You don't need any pull ups to those pins. Also those pull ups are the mistakes in your circuit...
 

Hi post the compressed proteus project and Do you want to just adjust the values in the display by 3 buttons?? like one is used for selecting the segment one for increment and another one for decrement??
 


Thank you for your reply Mr.Vengadesh.
there are three buttons
BUTTON - 1 SET/SHIFT/SAVE ( press once D1 blinks, press again blinks D2, press again blinks D3, press again to store the all 3D values)

BUTTON - 2 UP (press to change the values up in D1,D2 and D3 those which selected by BUTTON-1)

BUTTON - 3 DOWN (press to change the values down in D1,D2 and D3 those which selected by BUTTON-1 )

this project is to display a Three digit desired numbers to Display like 888, 123,999,963 set by user.
I attached the Proteus project file

please help
thanks
madayan
 

Attachments

  • MPLX SSD.zip
    37.7 KB · Views: 110
Last edited:

Hi here is a trick to open a proteus 8 project file with proteus 7... open the above MPLX SSD.zip file with 7z and now double click the MPLX SSD.pdsprj, You will get the dsn and project files so extract them and use.........
 

Attachments

  • Desktop.7z
    15 KB · Views: 107
I dont have proteus 7 so may be try this, open proteus and go to the open project now select design files in the bottom now try opening .DSN file...
 

Last edited:

hi guys you are all discussing beyond my level please help me to make my project
thanks

Madayan
 

Hi HAPPY DEPAVALI TO ALL

here I attached proteus7.7 file and mikroC PRO for PIC code please help

Thanks

Madayan
 

Attachments

  • 3x7Seg.zip
    248.5 KB · Views: 84

thanks Mr.Vengadesh it works in proteus I ll check it in hardware and reply u

thanks again

Madayan
 

hi, guys can some one help me in this project
i was make with 6 digit 7 seg counter witch i found it in internet put it don't work well
and when i serch in this forum i ffound this project whitch mr Venkadesh_M was posted i try to to play but it also don't work well
can some help me
this is the Venkadesh_M circuit


this is my 6 digit 7seg counter mikoc code
HTML:
//PIC16F627A
//4MHz Internal OSC
//MUX by the MUC itself with Interrupt
//TMR0 .. check the prescelar+delay in scan routine as they are related
//punkky@gmail.com
unsigned short number [10] = {0x5F, 0x06, 0x9b, 0x8f, 0xC6, 0xCd, 0xDD, 0x07, 0xDf, 0xCf};
unsigned short digit [6];
unsigned short counter;
unsigned short shift_register;
unsigned short x1;
unsigned short x2;
unsigned short x3;
unsigned short x4;
unsigned short x5;
unsigned short x6;
unsigned short tick;
void interrupt ()
{
    if (INTCON.T0IF)
    {
        //Scan digits with TMR0
        INTCON.T0IF = 0;
        if (counter == 5)
        {
            PORTA = number [digit [counter]];
            Delay_us (500);
            shift_register = 0x01;
            PORTB = ~shift_register;
            PORTA = 0x00;
            counter = 0;
        } else
        {
            PORTA = number [digit [counter]];
            Delay_us (500);
            shift_register = shift_register << 1;
            PORTB = ~shift_register;
            PORTA = 0x00;
            counter ++;
        }
    }
    if (PIR1.TMR1IF)
    {
        TMR1H = 0x80;
        PIR1.TMR1IF = 0;
        tick = 1;
        //update current time
        x6 ++;
        if (x6 > 9)
        {
            x6 = 0;
            x5 ++;
            if (x5 > 9)
            {
                x5 = 0;
                x4 ++;
                if (x4 > 9)
                {
                    x4 = 0;
                    x3 ++;
                    if (x3 > 9)
                    {
                        x3 = 0;
                        x2 ++;
                        if (x2 > 9)
                        {
                            x2 = 0;
                            x1 ++;
                            if (x1 > 9)
                            {
                                x1 = 0;
                            }
                        }
                    }
                }
            }
        }
    }
}
void main ()
{
    //Digital I/O for PORTA
    CMCON = 0x07;
    TRISA = 0x00;
    PORTA = 0x00;
    TRISB = 0x00;
    PORTB = 0x00;
    //Internal Clock 4MHz
    PCON.OSCF = 1;
    counter = 0;
    // Enable TMR0
    OPTION_REG.T0CS = 0;
    // Enable Prescaler
    OPTION_REG.PSA = 0;
    // PS0,1,2 = 010 = 3
    // 3 means 1:8 prescaler
    // 1:2, 1:4, 1:8, 1:16, 1:32, 1:64, 1:128, 1:256
    OPTION_REG.PS2 = 0;
    OPTION_REG.PS1 = 1;
    OPTION_REG.PS0 = 0;
    INTCON.T0IF = 0;
    INTCON.T0IE = 1;
    INTCON.GIE = 1;
    INTCON.PEIE = 1;
    T1CON = 0x0F;
    TMR1H = 0x80;
    TMR1L = 0x00;
    // Enable TMR1 interrupt
    PIE1.TMR1IE = 1;
    shift_register = 0x01;
    x1 = 0;
    x2 = 0;
    x3 = 0;
    x4 = 0;
    x5 = 0;
    x6 = 0;
    while (1)
    {
        if (tick)
        {
            tick = 0;
            //update digits
            digit [0] = x1;
            digit [1] = x2;
            digit [2] = x3;
            digit [3] = x4;
            digit [4] = x5;
            digit [5] = x6;
        }
    }
}

 

Zip and post your complete project files + Proteus file. It is better to use PORTB for SSD data and PORTA to SSD En pins.

https://embedded-lab.com/blog/?p=2086ion

Mention your Fosc and type of SSD (CC or CA). Is it possible for you to use PORTB for SSD data instead of PORTA?
 
Last edited:

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…