Microchip AN615


Closed Thread
Results 1 to 18 of 18

Thread: Microchip AN615

  1. #1
    Join Date
    Jun 2006
    Location
    Bangalore, India
    Posts
    136

    Question Microchip AN615

    This application note features a 24 hour, 7 segment LED clock...
    How can i modify to make it a 12 hour clock ???
    AN615 --> http://ww1.microchip.com/downloads/e...tes/00615b.pdf
    Last edited by shahidali55; - 4th November 2006 at 18:37.

  2. #2
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    I think that if you make one on your own using PBP, it would take less time compared to modifying AN615.


    Search the forum.

    ------------------------
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  3. #3
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,614


    Did you find this post helpful? Yes | No

    Wink Few changes ....

    Hi, Shahid

    Just have a look to listing lines 79 and 80

    Values Hour_HD_Max to be changed from 2 to 1, and Hour_LD_Max to be changed from 4 to 2 ...

    Note Interesting lines are 300 - 330 ...

    that might work like that ...

    No, no, no flowers ... thanks

    Alain
    Last edited by Acetronics2; - 4th November 2006 at 20:02.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  4. #4
    Join Date
    Jun 2006
    Location
    Bangalore, India
    Posts
    136


    Did you find this post helpful? Yes | No

    Exclamation

    Thanks Acetronics, i'll try that out.
    But sayzer, i want to use a PIC16C54A. It does not have TMR0 interrupt.
    I have to mux 4 displays, check 4 buttons and keep accurate time.
    How can i keep track of time without the interrupt???
    Is there a way to keep time accurately without using hardware interrupts and do the rest of the stuff in PBP???
    I have made a clock using a F84 and TMR0 interrupt...
    Now i want to do the same thing without the TMR0 interrupt in PBP...
    Last edited by shahidali55; - 5th November 2006 at 14:50.

  5. #5
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,614


    Did you find this post helpful? Yes | No

    Unhappy 16C54 >>> "newer pics"

    Hi, Shahid

    You're so right not to move to other Pics ... I tried some times ago from a 16C54 to a 16F84 ... ( was a " Berliner clock " !!! )

    Result was not that !!! The differences between program counters and adressing make things really tricky ... possible to do, but very high upon my Pic's knowledge !!!

    One thing about your program, I didn't tell you anything about PM and AM ...

    if you want to use the alarm function, you'll have to add a flag for that ... look carefully at the digit overflows section : there are lines where hours units are cleared after hours tenths overflow : just toggle your flag here !!!
    Of course, add a flag check to digits check for alarm raising ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  6. #6
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    Ali,

    I guess you are targeting a low cost solution by selecting PIC16C54.

    Am I right?

    Edit: Ok. I just found this in your other post.
    "I dont want to spend too much cash on erasable PICs cause once i give away the projects the IC will never be erased again..."


    In this case, are there any other factors that make you use this chip?


    --------------------------------
    Last edited by sayzer; - 5th November 2006 at 17:10.
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  7. #7
    Join Date
    Jun 2006
    Location
    Bangalore, India
    Posts
    136


    Did you find this post helpful? Yes | No

    Question

    Ya i need to make these circuits at a low cost...
    Actually i am facing a major problem with chips that do not have a TMR0 interrupt (12C508A).
    All the devices need to have a basic accurate clock running in the background.
    How can a implement a hour minute clock on PICs which do not have the TMR0 interrupt (but have timer0) and do other stuff also without much interference from the clock routine?
    Is there a way i can do it in PICBASIC PRO ???

  8. #8
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    I never found a PIC with a accurate internal clock. It shift at least with temperature.

    You can still skip the interrupt and use MPASM Stopwatch (or else) to trim your program timing using a simple loop.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  9. #9
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,614


    Did you find this post helpful? Yes | No

    Wink THE Gag ...

    Hi, Steve

    IF you want a program for a real time clock ( trimmable ) with a lonesome 12C50x ...

    I Have !!!

    hi,Hi ...

    Alain

    OK, there's a trick somewhere ... but it works !!!

    PS: Even OTP device programs can be modified ( "1"s can be overwritten by "0"s ) ... do not repeat it !!!
    Last edited by Acetronics2; - 7th November 2006 at 10:54.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  10. #10
    Join Date
    Jun 2006
    Location
    Bangalore, India
    Posts
    136


    Did you find this post helpful? Yes | No

    Post

    Can anyone give me a piece of code that can do the time keeping in PICBASIC without using interrupts ? ? ? Even if it just detects the roll-over and polls a flag, it'll do...
    I wrote a PICBASIC code for a digital clock without interrupts.
    No matter what prescaller i select, the clock runs 3 times slower.
    I check the timer roughly every 50 instructions for a roll-over (By checking the MSB). . .
    When i enable interrupts for the same code with same prescaler, it works fine.
    Last edited by shahidali55; - 7th November 2006 at 16:35.

  11. #11
    Join Date
    Mar 2006
    Location
    Hyderabad (India)
    Posts
    123


    Did you find this post helpful? Yes | No

    Default

    Hi
    try out latest version 16f54 as anyhow you have to programm few times to before you freeze the software-- it will help you being a flash device-- yesy one off costly and later as you finish you can finally use 16c54--

    i have piece working with clk8.asm file as provded in the application note. Reg 12hr mode -yes let me also try
    Last edited by mvs_sarma; - 8th November 2006 at 19:14.
    Regards,
    Sarma

  12. #12
    Join Date
    Jun 2006
    Location
    Bangalore, India
    Posts
    136


    Did you find this post helpful? Yes | No

    Talking I've done it ! ! !

    Hey everyone,
    I finally got the clock running, without using any interrupts !!!
    Its giving equal accuracy as the one using Instant interrupts . . .
    Now next i'm going to make a 4 segment led clock using the PIC12C508A.
    Using the 12C508A, i can make a complete clock for less than $1.49 ! ! !
    Last edited by shahidali55; - 11th November 2006 at 16:29.

  13. #13
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by shahidali55
    ...
    Now next i'm going to make a 4 segment led clock using the PIC12C508A.
    Using the 12C508A, i can make the clock for less than $0.59 ! ! !

    How will you use 12C508A to drive 4 segments?

    You need 8 pins for LEDs and 4 pins for the commons; Totally 12 pins.

    Will you use a serial 4x7 LED display?
    If yes, it won't save you much money.


    -------------------------
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  14. #14
    Join Date
    Jun 2006
    Location
    Bangalore, India
    Posts
    136


    Did you find this post helpful? Yes | No

    Smile

    (not possible in $0.59 so i've updated my previous message)
    Total cost will be atleast $1.49 (upto $1.79).
    I will be using a shift register in combination with a BCD 7segment driver IC
    (74HC595 = $0.2 , CD4511 = $0.2)
    (12C508
    Last edited by shahidali55; - 12th November 2006 at 05:19.

  15. #15
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    a single pic will cost you less and will take less PCB room.. let's say 16f630 or grandpa 16F628
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  16. #16
    Join Date
    Jun 2006
    Location
    Bangalore, India
    Posts
    136


    Did you find this post helpful? Yes | No

    Exclamation

    Total cost using PIC16F628 = $2.79
    Total cost using PIC12C508A = $1.79
    Total cost using PIC12F629 = $2.39

    Because of better accuracy with interrupts,
    I will have to consider using the 12F629 . . .
    There is a lot of space behind the displays, so space is not a problem . . .
    Last edited by shahidali55; - 12th November 2006 at 16:05.

  17. #17
    Join Date
    Mar 2006
    Location
    Hyderabad (India)
    Posts
    123


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by shahidali55 View Post
    This application note features a 24 hour, 7 segment LED clock...
    How can i modify to make it a 12 hour clock ???
    AN615 --> http://ww1.microchip.com/downloads/e...tes/00615b.pdf
    Hi, it is Sarma from Hyderabad India

    today i saw one site
    http://www.josepino.com/pic_projects...?led_clock.jpc
    where 12hour mode clock is described

    please see it for a difference and for appreciation
    Regards,
    Sarma

  18. #18
    Join Date
    Jun 2006
    Location
    Bangalore, India
    Posts
    136


    Did you find this post helpful? Yes | No

    Smile

    Hello Sarma,
    The link you have posted , was infact my first microcontroller project.
    Before i came across this project, i knew nothing about microcontrollers.
    I simply built it. and guess what it worked!!!
    But that was a long time ago. As i was amazed after making this project,
    i just went on learning more and more about mcu's with the help of the net.
    Now i have re-written the code for this clock (as i couldn't get the original code), with more features such as battery back up, and even a night power save mode(as it runs on solar power)).
    This project by Josepino is an excellent one ! ! !
    Last edited by shahidali55; - 9th March 2007 at 12:48.

Similar Threads

  1. Microchip Code Issues
    By Destovi in forum General
    Replies: 4
    Last Post: - 20th March 2008, 13:32
  2. PBP is no longer a stranger to Microchip
    By MarioC in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 12th March 2008, 22:59
  3. Microchip Ethernet controllers
    By Philip in forum Documentation
    Replies: 23
    Last Post: - 2nd November 2007, 01:30
  4. Replies: 1
    Last Post: - 22nd June 2007, 00:57
  5. Microchip PIC silicon Revs's
    By fbraun in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 1st March 2005, 15:07

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts