RLF versus RLCF


Closed Thread
Results 1 to 2 of 2

Thread: RLF versus RLCF

  1. #1
    Join Date
    Sep 2005
    Location
    France
    Posts
    50

    Default RLF versus RLCF

    Hi all,

    In my old 16f84, I used this code:

    ---------------------------
    FOR i = 1 TO 8
    IF bcounth.7 = 1 THEN
    HIGH portb.0
    ELSE
    LOW portb.0
    ENDIF
    GOSUB clock 'send a clock pulse
    asm
    rlf _bcounth,1
    endasm
    NEXT i
    -------------------------

    Now I want to use a 18f8520 and rlf doesn't exist any more, so I decide to use the new instruction " RCLF "

    rlcf _bcounth,1

    But I have now a warning:
    Warning[203] c:\pgm.asm 596 : Found opcode in column 1.(rlcf)

    In the instruction set, I can see:
    (PIC16)
    RLF f,d Rotate left f through Carry C
    (PIC18)
    RLCF f,d,a Rotate left f through Carry C,Z,N
    What mean "a" ?
    What can I do ?
    Regards

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


    Did you find this post helpful? Yes | No

    Default

    Just move the opcode RLCF out of column 1 to get rid of the warning.

    See the Instruction Set Summary section in the PIC18F8520 data sheet for a full explanation of what the 'a' signifies. It has the answers you're looking for.
    Regards,

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

Similar Threads

  1. Long shift register
    By Joe Rocci in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 18th April 2009, 19:14
  2. Optimizing DIV
    By skimask in forum mel PIC BASIC Pro
    Replies: 41
    Last Post: - 22nd September 2008, 04:58
  3. SPI configuration PIC versus Atmel
    By Pedro Santos in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 10th July 2007, 19:17
  4. 32 bit math
    By Charles Linquis in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 28th August 2006, 13:34
  5. RX / TX duo
    By mbw123 in forum General
    Replies: 19
    Last Post: - 30th July 2006, 16:07

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