pic16f877 based controllable digital 25


Posted on Feb 5, 2014

Using PIC16 simulator (Proteus) you can verify this digital clock code and change it according to your needs. Using three push buttons (As shown in figure below) you can adjust time as you desire. This code is written in C language using MPLAB with HI-TECH C compiler. You can download this code from the `Downloads`section at the bottom of this pag


pic16f877 based controllable digital 25
Click here to download the full size of the above Circuit.

e. The above figure was taken after setting time to 07:58:54, timer0 is used as the base for digital clock generation. Timer0 is used here to generate 1msec interrupts. After every 1msec a global variable namedmsCounterincrements. WhenmsCounterreaches a value of 1000 then another global variable namedsecCounterincrements and this process repeats itself. Similarly, whensecCounterreaches 60, then minCounterincrements. And whenminCounterreaches 60 thenhrCounterincrements. This process continues untilhrCounterreaches 24 then all of these variables reset their values. LCD is updated with the new values ofhrCounter, minCounterandsecCounterafter every second. You can set time using three push buttons attached onRE0, RE1andRE2pins (As shown in the above figure). By pressing `Set Time` button one time, code enters in configuration state. Hoursvalue starts to blink and you can modify it usingUpandDownbuttons. PressingUpbutton increments the value and pressingDownbutton decrements the value. When you are done settingHoursvalue, press`Set Time` button again, thenMinutesvalue will start to blink and you can adjust this value usingUpandDownbuttons. Similarly, after setting Minutes value, you canpress`Set Time` button again, thenSecondsvalue will start to blink and you can adjust this value usingUpandDownbuttons. When you are done adjusting the time, then press`Set Time` button for the last time and this clock will start to work normally.




Leave Comment

characters left:

Related Circuits

  • New Circuits

    .

     


    Popular Circuits

    Sound effect generator
    Positive And Negative Voltage Switching Supply
    Telephone Voice Mail Alert Circuit
    passive riaa preamplifier
    Oscillator operation-working-feedback circuit block diagram
    DC Motor Speed Controller
    Precision Peak voltage detector with a long memory time
    Ballroom synchronous voice switching circuit with music



    Top