CrazyEngineers
  • i am connecting 8 pieces of 7 segment displays with a microcontroller, the text "CALEDONI" is displayed but its stand still.. i need to know how to make it flash? the source code which is compiled by the CodeWarrior software is written below..


    thank u ^.^




    #pragma LINK_INFO DERIVATIVE "SampleS12"

    void initPort(void);
    void initPort(void) {
    DDRA=0xFF;
    DDRB=0xFF;
    }
    void delay(unsigned int);
    void delay(unsigned int x) {
    int y;
    while(x>0){
    for(y=0;y<200;y++) {;}
    x--;
    }
    }

    void main(void) {
    char alpha[]={0x08,0x03,0x46,0x21,0x06,0x0E,0x10,0x09,0x79,0x71,0x7F,
    0x47,0x7F,0x2B,0x40,0x0C,0x7F,0x0F,0x12,0x07,0x41,0x7F,0x7F,0x7F,0x11,0x7F};
    char segment[]={
    0xFE,0xFD,0xFB,0xF7,0xEF,0xDF,0xBF,0x7F
    };
    char size;
    unsigned char x;
    unsigned int disp;
    char name[]="CALEDONI";
    initPort();


    EnableInterrupts;
    for(;😉 {
    for(size=0;name[size+7]!='\0';size++){
    for(disp=0;disp<75;disp++){
    for(x=0;x<8;x++){
    PORTA = alpha[name[size+x]-65];
    PORTB = segment[x];
    delay(5);
    PORTB = 0xFF;
    delay(0);
    }
    }
    }


    }
    }
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • Harshad Italiya

    MemberOct 11, 2011

    You want to Blink Text on Display or Want to Flash letter one by one?

    If you want to blink whole word then simply Turn off once you send all the character data to segment. You are using any shift register IC to Display or you have connected all 64 Pins with segment?
    Are you sure? This action cannot be undone.
    Cancel
  • suga_babe

    MemberOct 11, 2011

    yeah i want the whole text to blink.. they are connected directly
    any idea where i can get a C program for this?
    Are you sure? This action cannot be undone.
    Cancel
  • Harshad Italiya

    MemberOct 11, 2011

    First tell me one thing. The code you posted is working or not? I mean by this code you are able to get steady Text on Segment or not?
    Are you sure? This action cannot be undone.
    Cancel
  • suga_babe

    MemberOct 11, 2011

    yes it is working.. up to here the text is only stand still
    Are you sure? This action cannot be undone.
    Cancel
  • Harshad Italiya

    MemberOct 11, 2011

    or(;😉 {
    for(size=0;name[size+7]!='\0';size++){
    for(disp=0;disp<75;disp++){
    for(x=0;x<8;x++){
    PORTA = alpha[name[size+x]-65];
    PORTB = segment[x];
    delay(5);
    PORTB = 0xFF;
    delay(0);
    }
    Now after delay(0) Send 0x00 or 0xFF to all your segments depending on your segment display Common Anode or Common Cathode. then keep same data for little time say one second after that send the data again from your array consisting your texts.

    get the point or not?
    Are you sure? This action cannot be undone.
    Cancel
  • suga_babe

    MemberOct 15, 2011

    umm.. i didnt really get the idea :s
    i tried different ways but still i didnt get the result.. i should probably mention i am not an expert when comes to C
    thanking you all for any help provided
    Are you sure? This action cannot be undone.
    Cancel
  • Harshad Italiya

    MemberOct 16, 2011

    suga_babe
    umm.. i didnt really get the idea :s
    i tried different ways but still i didnt get the result.. i should probably mention i am not an expert when comes to C
    thanking you all for any help provided
    Let me know if you still want to give it a try we can work on this. Don't give up.
    Are you sure? This action cannot be undone.
    Cancel
  • suga_babe

    MemberOct 18, 2011

    i am not giving up at all.. i am looking forward to getting more suggestions
    Are you sure? This action cannot be undone.
    Cancel
  • Harshad Italiya

    MemberOct 18, 2011

    suga_babe
    i am not giving up at all.. i am looking forward to getting more suggestions
    Is it possible to post the circuit diagram So i can simulate it here at my side.
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register