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] msg scroling on 7 segments

Status
Not open for further replies.

sahu

Advanced Member level 2
Joined
Oct 9, 2009
Messages
516
Helped
68
Reputation
130
Reaction score
62
Trophy points
1,308
Location
Uttar pradesh (INDIA)
Activity points
3,876
How scroll any chrector with 3 pc 7segments?
Left to right & right to left
I want using pic mcu
Any body help me
 

Question too vague
You did not specify any issue.
 

I want scroll some alfabet msg on 7 segment.
Like ASCtrbdFhH etc on 7seg.
Scroll this msg left to right & rightto left
 

On a 7-segment display, you can only shift the message by full character positions, in contrast to the smooth scrolling on a matrix display. The "jumpy" display doesn't deserve the name scrolling, I think. Only a limited choice of alphabetic characters can be displayed on 7-segment, poor appearance and hard to read.

If you already realized the limitations of 7-segment scrolling, what's the problem? Elementary C coding?
 

Question still too vague, there is not any problem reported so far.
There are a lot of projects you can find on the Web covering this subject.

Anyway, you cannot display alphanumeric characters in 7-segment displays.
 

To be fair, Sahu did only list characters that can be formed from a standard 7-segment pattern.

The characters can't be soft scrolled though as FvM explained, the only way to do it to write the whole character to the next display to the left or right. The method in doing that is exactly the same as writing a single character, it just has to be done to the appropriate digit.

Brian.
 

That's up to you but bear in mind that scrolling displays normally use LED matrix displays for a good reason. They rarely use 7 segment types because of they do not allow you to smoothly scroll the character. Matrix dislays can also show all characters and have some graphics capability too.

Brian.
 

then leave this idea ?

That is up to you, but perhaps more importantly what is the objective here? Is this some sort of school project that you have to select then implement or is this just for the sake of learning how to do something you've never tried to do before?
 

He wants to do this. See attached Proteus Simulation. For people who don't have Proteus, I have attached Simulation Video.

Is this some sort of school project that you have to select then implement or is this just for the sake of learning how to do something you've never tried to do before?

I think he is making some product and wants to implement his company name scrolling on the 7 Segment Display used in his products.
 

Attachments

  • Proteus Simulation.rar
    49.5 KB · Views: 97

He wants to do this. See attached Proteus Simulation. For people who don't have Proteus, I have attached Simulation Video.



I think he is making some product and wants to implement his company name scrolling on the 7 Segment Display used in his products.

yes yes i want same to same that's shown on video .
thank u @Okada for understand me .
if posibal pl give me example code
 

Code is very easy. You have to use interrupts and pointers. Try to write a code first. Scrolling from left to right is not good because it will be difficult to read it.
 

Sahu, we are very willing to guide you and explain the way code and hardware work - but we are not here to do your work for you.

Just think of what the displays will show at each step of scrolling your message and write the appropriate pattern to the segments in sequence.

1. decide what each digit is to display
2. put the data for the first digit on the PIC data lines, turn the transistor for that digit on, wait a few mS then off again.
3. repeat for the second and third digits.
4. go back to step 1.

Brian.
 

Here is the code which I wrote. See if you can modify it for 4 digit display. Let us see if you can make that small change.


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
#define SSD_DATA_PORT PORTC
#define SSD_CONTROL_PORT PORTE
 
const unsigned char cc_mask_sf[] = {0x00, 0x00, 0x00, 0x6D, 0x77, 0x76, 0x3E, 0x00, 0x00};
const unsigned char *ptr2_cc_mask_sf;
unsigned char select = 0;
unsigned int delay_counter = 0;
unsigned int raw_adc_value = 0, previous_raw_adc_value = 0, required_delay = 0;
 
//Timer1
//Prescaler 1:1; TMR1 Preload = 63536; Actual Interrupt Time : 2 ms
//Place/Copy this part in declaration section
void InitTimer1() {
    T1CON = 0x01;
    TMR1IF_bit = 0;
    TMR1H = 0xF8;
    TMR1L = 0x30;
    TMR1IE_bit = 1;
    INTCON = 0xC0;
}
 
long map(long x, long in_min, long in_max, long out_min, long out_max) {
    return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
}
 
void Interrupt(){
    if(TMR1IF_bit) {
       //Enter your code here
       SSD_CONTROL_PORT = 0x00;
 
       switch(select) {
           case 0:
                 SSD_DATA_PORT = *ptr2_cc_mask_sf;
                 SSD_CONTROL_PORT = 0x01;
                 break;
           case 1:
                 SSD_DATA_PORT = *(ptr2_cc_mask_sf + 1);
                 SSD_CONTROL_PORT = 0x02;
                 break;
           case 2:
                 SSD_DATA_PORT = *(ptr2_cc_mask_sf + 2);
                 SSD_CONTROL_PORT = 0x04;
                 break;
       };
 
       if(++delay_counter == required_delay) {
            if(ptr2_cc_mask_sf++ == &cc_mask_sf[6]) {
                 ptr2_cc_mask_sf = &cc_mask_sf[0];
            }
            
            delay_counter = 0;
       }
 
       if(++select >= 3) {
          select = 0;
       }
 
       TMR1IF_bit = 0;
       TMR1H = 0xF8;
       TMR1L = 0x30;
    }
}
 
void main() {
 
    CMCON = 0x07;
 
    ADCON0 = 0x40;
    ADCON1 = 0xCE;
 
    TRISA = 0xFF;
    TRISB = 0xFF;
    TRISC = 0x00;
    TRISD = 0xFF;
    TRISE = 0x00;
 
    PORTA = 0x00;
    PORTB = 0x00;
    PORTC = 0x00;
    PORTD = 0x00;
 
    Delay_ms(200);
 
    ptr2_cc_mask_sf = &cc_mask_sf;
    
    InitTimer1();
 
    while(1) {
 
          raw_adc_value = ADC_Read(0);
          
          if(previous_raw_adc_value != raw_adc_value) {
              required_delay = map(raw_adc_value, 0, 1024, 250, 501);
              previous_raw_adc_value = raw_adc_value;
          }
    }
}

 

Attachments

  • Scrolling 7 Segment Display Using Pointers.rar
    62.6 KB · Views: 91
  • Like
Reactions: sahu

    sahu

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top