Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic 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.

Register Log in

PIC uC digital clock.

Status
Not open for further replies.

imranahmed

Advanced Member level 3
Joined
Dec 4, 2011
Messages
731
Helped
3
Reputation
6
Reaction score
2
Trophy points
1,298
Location
Karachi,Pakistan
Activity points
5,927
Please let me know that I`m going to build digital clock by using 7-segment display.
Please can anyone refer me any link or C-code tricks by using PIC uC.
 

tpetar

Advanced Member level 5
Joined
Sep 27, 2010
Messages
6,427
Helped
1,712
Reputation
3,454
Reaction score
1,677
Trophy points
1,393
Location
Pancevo-Belgrade, Serbia
Activity points
37,376

imranahmed

Advanced Member level 3
Joined
Dec 4, 2011
Messages
731
Helped
3
Reputation
6
Reaction score
2
Trophy points
1,298
Location
Karachi,Pakistan
Activity points
5,927
Your given circuit is great but I want to make digital clock by only using uC (PIC or AT89C52).
Please refer any link or hint.
 

Tahmid

Advanced Member level 5
Joined
Jun 17, 2008
Messages
4,758
Helped
1,791
Reputation
3,574
Reaction score
1,650
Trophy points
1,393
Location
Silicon Valley, California, USA (from Dhaka, Bangl
Activity points
30,545

tpetar

Advanced Member level 5
Joined
Sep 27, 2010
Messages
6,427
Helped
1,712
Reputation
3,454
Reaction score
1,677
Trophy points
1,393
Location
Pancevo-Belgrade, Serbia
Activity points
37,376

imranahmed

Advanced Member level 3
Joined
Dec 4, 2011
Messages
731
Helped
3
Reputation
6
Reaction score
2
Trophy points
1,298
Location
Karachi,Pakistan
Activity points
5,927
Please check my code and circuit.
Question is that I want to make digital clock 4-digits for Hours and Minutes.The minutes digit increase after every 60 secs and hour digits increase after every 60 mins but problem is that if i add delay() function for 1 sec the display off and on and cannot display without flickering how to avoid this problem.
Please run my circuit.

- - - Updated - - -

Tahmid please read my code and circuit and please find any hint for solving problem.
 

Attachments


iukhan

Advanced Member level 4
Joined
Oct 4, 2007
Messages
107
Helped
30
Reputation
60
Reaction score
29
Trophy points
1,308
Location
Lahore
Activity points
1,846
...... but problem is that if i add delay() function for 1 sec the display off and on and cannot display without flickering how to avoid this problem.

- - - Updated - - -
Adding delay of 1 sec will definatly flicker your display. Dont add delay() function, instead use timer interrupt function for updation of sec. OR you can add 1 ms delay () function and update a variable of millisecond variable, and when millisecond is equal to 1000 increase the sec variable and so on.
 

imranahmed

Advanced Member level 3
Joined
Dec 4, 2011
Messages
731
Helped
3
Reputation
6
Reaction score
2
Trophy points
1,298
Location
Karachi,Pakistan
Activity points
5,927
In uC 89c52 there are 2 timer interrupt 1)interrpt 0 and interrupt 3.
My question is that can we use interrupt 1 or 3 two,three,four times and so on OR use interrupt only for one task.?

- - - Updated - - -

In uC 89c52 there are 2 timer interrupt 1)interrpt 0 and interrupt 3.
My question is that can we use interrupt 1 or 3 two,three,four times and so on OR use interrupt only for one task.?
 

iukhan

Advanced Member level 4
Joined
Oct 4, 2007
Messages
107
Helped
30
Reputation
60
Reaction score
29
Trophy points
1,308
Location
Lahore
Activity points
1,846
In uC 89c52 there are 2 timer interrupt 1)interrpt 0 and interrupt 3.
My question is that can we use interrupt 1 or 3 two,three,four times and so on OR use interrupt only for one task.?
You can use interrupt for more task, its all depends on programing style and requirment.
 

imranahmed

Advanced Member level 3
Joined
Dec 4, 2011
Messages
731
Helped
3
Reputation
6
Reaction score
2
Trophy points
1,298
Location
Karachi,Pakistan
Activity points
5,927
Means if I used interrupt 3 (its timer interrupt) for any task then I can use same interrupt 3 for another task in same program.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top