Page 1 of 3 123 LastLast
Results 1 to 10 of 25

Thread: Renard firmware Timer1

  1. #1
    Join Date
    Feb 2008
    Location
    Warminster, PA
    Posts
    1,301

    Default Renard firmware Timer1

    I'm working on a small project that I'm editing the existing Renard firmward and I need to use timer1. My project is strictly using dc but I've come to realize that if it works for ac it could be of some use too.
    In the app notes in the beginning of the code it states that timer1 is not being used but down in the code timer1 gets initialized to count the interval between zero-crossings.
    I have removed(actually just remarked) all references to timer1. Will this have any impact on how the code dims(using ac)?
    I'm going to give it a try once I've ironed out my code, I just want to know if there's anything I should look for.

    Thanks!

  2. #2
    Join Date
    May 2007
    Posts
    4,184

    Default Re: Renard firmware Timer1

    Yes, that code adjusts the timing to go along with the AC power-line frequency.
    Phil

  3. #3
    Join Date
    May 2007
    Posts
    4,184

    Default Re: Renard firmware Timer1

    You might want to consider switching to the PIC16F1823. It is cheaper, has a compatible pinout, is faster, and has an extra timer. The internal register architecture is a bit different, and the firmware would take some work to make it run on that architecture.
    Phil

  4. #4
    Join Date
    Feb 2008
    Location
    Warminster, PA
    Posts
    1,301

    Default Re: Renard firmware Timer1

    Ok, thanks Phil. I'll just stick with using it for DC purposes.

  5. #5
    Join Date
    Jan 2008
    Location
    Fountain Valley, CA (Orange County, So. Cal)
    Posts
    1,763

    Default Re: Renard firmware Timer1

    Quote Originally Posted by ctmal View Post
    I'm working on a small project that I'm editing the existing Renard firmward and I need to use timer1.
    How do you want to use Timer1? You might be able to reuse or extend how Timer1 is currently being used without affecting the operation of the existing code.

    don
    Click for display details >>
    web site: http://www.eShepherdsOfLight.com or http://www.facebook.com/eShepherdsOfLight
    technical articles: http://downloads.eshepherdsoflight.com

  6. #6
    Join Date
    Feb 2008
    Location
    Warminster, PA
    Posts
    1,301

    Default Re: Renard firmware Timer1

    Quote Originally Posted by P. Short View Post
    You might want to consider switching to the PIC16F1823. It is cheaper, has a compatible pinout, is faster, and has an extra timer. The internal register architecture is a bit different, and the firmware would take some work to make it run on that architecture.
    I'll look into that. Thanks again Phil.

  7. #7
    Join Date
    Feb 2008
    Location
    Warminster, PA
    Posts
    1,301

    Default Re: Renard firmware Timer1

    Quote Originally Posted by djulien View Post
    How do you want to use Timer1? You might be able to reuse or extend how Timer1 is currently being used without affecting the operation of the existing code.

    don
    I need it to get a 100ms or 50ms pulse. Currently the speed it is set up for is way too fast to get that.

  8. #8
    Join Date
    Nov 2010
    Location
    Placerville, CA
    Posts
    1,826

    Default Re: Renard firmware Timer1

    How about using it at the current setting and have the code count the pulses to get the timing you need? If it is set to 1MS, count 100 or 50 ticks and use THAT for your timing. Too fast is usually workable that way, too SLOW is what sucks (like it is set to 200MS and you need a 100 or 50MS timing).

    Kirk
    "Beam me up Scotty, there are only limited pockets of intelligent life on this planet!!"
    Communicating humor in a text only medium is an art form subject to imprecise interpretation by the audience...

  9. #9
    Join Date
    May 2007
    Location
    Apple Valley, MN
    Posts
    3,220

    Default Re: Renard firmware Timer1

    It's easy to waste time, a bit tougher to make it.
    A mediocre person tells. A good person explains. A superior person demonstrates. A great person inspires others to see for themselves.

    Click here to show/hide my display details ...
    Click here to show/hide DIYC Links ...

  10. #10
    Join Date
    Jun 2009
    Location
    Ottawa, Ontario, Canada
    Posts
    2,504

    Default Re: Renard firmware Timer1

    Quote Originally Posted by ErnieHorning View Post
    It's easy to waste time, a bit tougher to make it.
    Unless your PIC is bigger on the inside than the outside... and/or you are working with Ponds.
    Standard Disclaimers apply:
    "Product may not appear as shown, your mileage may vary, I'm not a doctor nor do I play one on television, these are not the droids you seek"

Bookmarks

Posting Permissions

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