Connect with us

PIC program clock delay question ?

Discussion in 'Electronic Basics' started by sunny, Aug 31, 2003.

Scroll to continue with content
  1. sunny

    sunny Guest

  2. Dana Raymond

    Dana Raymond Guest

    You're missing the /4 stage between Fosc and the mux. Hence rate = 1/32768
    *4 *32 *256 = 1Hz.
    T0CS selects one count for every INSTRUCTION cycle, not oscillator cycle.

    Hope this helps.
    Dana Frank Raymond
  3. sunny

    sunny Guest

    What is the delay here:

    use timer0
    ; prescaler set to 1:16
    ; rolls over each 1/125 th second

    4mhz/4cycles = 1mhz
    1/1,000,000*256*16=.004096 which is not 1/125 ?

  4. The Butcher

    The Butcher Guest

    Why are you dividing by 1,000,000 you need to divide by 32768

    1 / 32768 * 4 * 256 * 16 is a period of 0,5s

    4 cause of the internal instruction cycle
    16 prescaler
    256 timer overloop (interrupt)

    When you take a prescaler of 32 you have an exact period of 1s

    Grtz The Butcher
    You need info about infrared remote protocols, 1 link:
    !!! Remove f*ckspam in email address .
  5. sunny

    sunny Guest

    What is the delay here:
    I have not got this oscillator, I am referring to the internal 4mhz one.
  6. its view menu:simulator trace
  7. sunny

    sunny Guest

    Is there a way to simulate the ADC ?
  8. Not that I know of. It would be quite useful, however, to be able to specify
    voltage ramps (ala the piecewise waveforms of spice fame) and have the PIC
    simulator react that that.

    Bob Monsen
  9. nope
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day