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.

Problems with 7 Segment display

Status
Not open for further replies.
Advanced Member level 6
Joined
Dec 4, 2012
Messages
4,280
Helped
822
Reputation
1,654
Reaction score
791
Trophy points
1,393
Location
Bangalore, India
Visit site
Activity points
0
I need to display 4 three digit numbers (integers) on 7 Segment displays. I have written a code but it is not displaying properly. Only one digit lights up. I am attaching files (mikroC + Proteus). There are two problems and I don't know what are causing those problems.

1. The SSD[][] array's 2nd, 3rd, 4th rows are being loaded with wrong SSD data.
2. Displays doesn't light up properly.

CA SSDs are used. First I used interrupt to display the data but it didn't work. So I have commented the Timer initialization and have placed the code inside while(1) loop. Now ISR doesn't work. I am only testing code inside while(1) loop.

I have debugged the code in mikroC Compiler, then in Proteus, and finally in hardware using mikroProg but the same problem in all. The array gets loaded with wrong data.

Please somebody solve the problem.
 
Last edited:

What is the solution if any?

Why wrong data is being loaded to SSD[]1, SSD[2] and SSD[3]? display[] contains right data.

Edit:

Oops... Sorry, I read the data backwards. The data are correct.


Edit2: Thank you very much FvM. I edited the SSD model timing property and it now displays fine. I still have to make it work in hardware. Working simulation attached.

97481d1382211965-ssd-dbg1.png
 

Attachments

  • ssd dbg1.png
    ssd dbg1.png
    327.2 KB · Views: 123
  • SSD rev1.rar
    20.5 KB · Views: 61
Last edited:

It is working fine in simulation but I see something strange. In the above image, the number[] array should be showing 1, 91, 181, 271 but it is showing some other values but display[][] and SSD[][] contain right data. How? display[][] gets data loaded from number[].
 

sir u should switch all segment within 1/60 th second so it will look like stable that is perception of vision. and according to me u should put data on seven segment in interrupt which will periodic and handle stabality.will you post your code.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top