TIMER for pic16f877a_HI TECH C

Discussion in 'Embedded Systems and Microcontrollers' started by Jaden5165, Dec 3, 2011.

  1. Jaden5165

    Thread Starter Member

    Sep 9, 2011
    69
    0
    I want to learn TIMER for pic16f877a in HTC.can anyone teacn me?I duno how to use it.
    http://www.microcontrollerboard.com/pic-timer0-tutorial.html

    i try to learn from this website but it seem like not really clear because i hv seen from other website they will calculate in other method.confusing me!
    i just want to know timer for pic16f877a and how we going to use it in a better way and the calculation method.


    thank you^^
     
  2. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    4,887
    1,015

    That is a pretty good website, It is the one of the ones I used to learn how to use timers. I am not sure what we can well you that the website does not. Maybe is you had specific questions?

    You might also try this site
    http://www.mikroe.com/eng/products/view/285/book-pic-microcontrollers-programming-in-c/

    Another excellent site.
     
    Jaden5165 likes this.
  3. DerStrom8

    Well-Known Member

    Feb 20, 2011
    2,428
    1,328
    I can tell you from personal experience that the MOST IMPORTANT thing you need when learning how to use timers (and various other things) is the processor's datasheet. It's easy enough to find--just google PIC16F877A, select the Microchip link, and open the datasheet. Trust me, you WILL NOT understand timers unless you read about the module on the datasheet. Once you read that, if you still have questions, we can help you then.

    Regards,
    Der Strom
     
    Jaden5165 likes this.
  4. Jaden5165

    Thread Starter Member

    Sep 9, 2011
    69
    0
  5. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    4,887
    1,015
    It might help to mention which calculations and exactly where they can be found on each page. If you expect people to help you then you need to put some effort into helping them to help you.
     
  6. T.Jackson

    New Member

    Nov 22, 2011
    328
    14
    Can we ask why you require the timer? I know the 16F877a I help you.
     
  7. Jaden5165

    Thread Starter Member

    Sep 9, 2011
    69
    0
    @T.Jackson

    I need timer to run my ultrasonic sensor.but before that i hope to learn timer in a most basic way like you timer to turn on a led or do other thing.
     
  8. Jaden5165

    Thread Starter Member

    Sep 9, 2011
    69
    0
    @spinnaker

    Sorry i thought that the link i gave will direct you to the calculation part.When you click into the link the calculation part is actually at the Description tab.
     
  9. T.Jackson

    New Member

    Nov 22, 2011
    328
    14
    You know you really need to have a scientific calculator coupled with some basic exp knowledge too.

    Some of these formulas are bordering on complex calculus types.

    Can you transpose boolean algebra equations?
     
  10. Jaden5165

    Thread Starter Member

    Sep 9, 2011
    69
    0
    @T.Jackson

    Ya i know boolean algebra.you mean the calculation using 0 and 1?
     
  11. T.Jackson

    New Member

    Nov 22, 2011
    328
    14
    No. I mean more so algebraic transpositions sorry.

    Like: c = a x b
    Therefore b = ?

    Or ...

    a / b = c / d
    a x d = b x c

    Therefore a = ?
    b = ?
    c = ?
    d = ?

    If you cannot do this, then you cannot work with the timer on a pic properly.
     
    Last edited: Dec 5, 2011
  12. T.Jackson

    New Member

    Nov 22, 2011
    328
    14
    Bases, you at least need to know bases to use on your calculator for dealing with uS, nS etc ...

    You there boss?
     
  13. AlexR

    Well-Known Member

    Jan 16, 2008
    735
    54
    What a load of rubbish!
    PIC timer calculations only involve simple algebra, they involve absolutely no calculus nor any Boolean algebra. If you can transpose a simple equation you can do the timer calculations.
    A simple calculator does speed things up but is not essential as the arithmetic is pretty basic and can easily done with a pencil and paper.

    For reasonable tutorials on PIC timers take a look at lessons 9 and 10 at http://www.gooligum.com.au/tut_midrange_C.html
     
  14. T.Jackson

    New Member

    Nov 22, 2011
    328
    14
    I will have a simple calculator project for you next year. Just some simple buttons and a simple LCD.
     
Loading...