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.

PIC uC digital clock.

Status
Not open for further replies.

imranahmed

Advanced Member level 3
Joined
Dec 4, 2011
Messages
801
Helped
3
Reputation
6
Reaction score
2
Trophy points
1,298
Location
Karachi,Pakistan
Activity points
6,328
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,713
Reputation
3,456
Reaction score
1,678
Trophy points
1,393
Location
Pancevo-Belgrade, Serbia
Activity points
37,372
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.

You can see this project link :

A Real Time Clock IC (DS1307) project using the PIC micro
https://www.best-microcontroller-projects.com/real-time-clock-ic.html

real-time-clock-ic-block-diag.png



Source is written in MikroC.
 

imranahmed

Advanced Member level 3
Joined
Dec 4, 2011
Messages
801
Helped
3
Reputation
6
Reaction score
2
Trophy points
1,298
Location
Karachi,Pakistan
Activity points
6,328
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,792
Reputation
3,576
Reaction score
1,651
Trophy points
1,393
Location
Silicon Valley, California, USA (from Dhaka, Bangl
Activity points
30,539

tpetar

Advanced Member level 5
Joined
Sep 27, 2010
Messages
6,427
Helped
1,713
Reputation
3,456
Reaction score
1,678
Trophy points
1,393
Location
Pancevo-Belgrade, Serbia
Activity points
37,372
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.

This change thing, you say in post #3 - 89C52.


Go to this link (registration is free), MikroC source code, Tutorial:

Simple Digital clock using 8051 microcontroller (AT89C51)
**broken link removed**

**broken link removed**
 

imranahmed

Advanced Member level 3
Joined
Dec 4, 2011
Messages
801
Helped
3
Reputation
6
Reaction score
2
Trophy points
1,298
Location
Karachi,Pakistan
Activity points
6,328
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

  • DClock.txt
    943 bytes · Views: 18
  • Dclk.bmp
    2.3 MB · Views: 17

iukhan

Advanced Member level 4
Joined
Oct 4, 2007
Messages
107
Helped
31
Reputation
62
Reaction score
29
Trophy points
1,308
Location
Lahore
Activity points
1,944
...... 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
801
Helped
3
Reputation
6
Reaction score
2
Trophy points
1,298
Location
Karachi,Pakistan
Activity points
6,328
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
31
Reputation
62
Reaction score
29
Trophy points
1,308
Location
Lahore
Activity points
1,944
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
801
Helped
3
Reputation
6
Reaction score
2
Trophy points
1,298
Location
Karachi,Pakistan
Activity points
6,328
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.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top