Please help me understand this code


Results 1 to 15 of 15

Threaded View

  1. #10
    Join Date
    May 2009
    Location
    Montreal, QC, Canada
    Posts
    118


    Did you find this post helpful? Yes | No

    Default

    I don't know what's going on here!

    Using MPSIM with watch window
    I have TIMER1 running, I can observe that TMR1H=218 and TMR1L=8

    testa is a word variable.

    I execute this operation:
    testa = TMR1H
    and I see that testa = 218
    Then I do this:
    testa = TMR1H * 256 + TMR1L
    However now testa = 8 instead of 55816

    What am I missing?

    PS: Sorry for mistyping Darrel's name in post #8, I know a Daryl and it just came out without thinking!

    Mike
    Last edited by lilimike; - 3rd May 2010 at 04:37. Reason: PS for Darrel

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