Reading variables - more clock cycles?


Results 1 to 2 of 2

Threaded View

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


    Did you find this post helpful? Yes | No

    Default

    They are all equal.

    TMR1H = %01010101
    TMR1L = %11110001

    Produces;
    Code:
       MOVLW 0x55                
       MOVWF TMR1H               
       MOVLW 0xf1                
       MOVWF TMR1L
    HighTimes = 10
    LowTimes = 20 ' loading these vars is the only real time difference

    TMR1H = HighTimes
    TMR1L = LowTimes

    Produces;
    Code:
       MOVF _HighTimes, W        
       MOVWF TMR1H               
       MOVF _LowTimes, W         
       MOVWF TMR1L
    The 2nd version of course depends on which bank your vars are in.
    Could take more code if they're not in bank0.
    Last edited by Bruce; - 23rd February 2008 at 20:15. Reason: Example
    Regards,

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

Similar Threads

  1. PBP instruction clock cycles
    By MOUNTAIN747 in forum General
    Replies: 4
    Last Post: - 31st January 2009, 02:53
  2. EM4095 Chip, get Clock and Data signals?
    By mindthomas in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 19th August 2008, 06:27
  3. Shiftout/in
    By BobEdge in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 23rd August 2007, 11:48
  4. Help with sound command in 2 programs
    By hyperboarder in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 5th July 2007, 20:36
  5. Reading Array values into variables
    By Tom Gonser in forum mel PIC BASIC Pro
    Replies: 19
    Last Post: - 21st March 2005, 10:30

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