18f452 interrupt problem


Closed Thread
Results 1 to 4 of 4

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    SET_TIMER needs work too. With the timer set to 16-bit read/write operation you need to write to TMR0H first, then TMR0L. Reading is just to opposite. Read TMR0L, then read TMR0H.

    And, do you really want TMR0H to be loaded with the low & then high bytes of tmr0runon?

    TMR0H=tmr0runon.Highbyte ' Save new values to TMR0
    TMR0H=tmr0runon.Lowbyte

    This wouldn't work anyhow, since you never write to TMR0L, which loads TMR0H..;o)
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  2. #2
    Join Date
    Sep 2004
    Location
    Les Angles (FRANCE)
    Posts
    18


    Did you find this post helpful? Yes | No

    Smile

    HI all,

    1- Mackrackit
    it's not working where you place them but it's working when i do :
    DEBUT:
    ENABLE
    ...
    ...
    ...
    DISABLE
    goto DEBUT

    2- Bruce
    indeed it was a 'typo' mistake i will write : TMR0L=tmr0runon.Lowbyte

    well, for now all is ok so i can go on

    thanks for helping
    Jean-François

    F4CDH

Members who have read this thread : 0

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