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

    DC variable speed motor control
    Solid state stepping switch
    Oscilloscope Preamp
    Efficient Laser Supply Circuit
    radio station blocker circuit
    Low Cost, 16Hz - 100kHz Sine-wave Generator circuit
    583 circuitsmiths electric power assist bicycle
    yamaha dspa 1 processor
    John C. BEDINI free energy Motor/Generator
    LEDs and resistors circuit
    Photoelectric high current small signal control circuit
    High-performance DC amplifier driving circuit AP500A-01



    Top