bankA issues


Results 1 to 7 of 7

Thread: bankA issues

Threaded View

  1. #6
    Join Date
    May 2006
    Location
    Del Rio, TX, USA
    Posts
    343


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by SteveB
    Shouldn't the ASM intructions include the memory access bit=1, as indicated by the bold changes, so that the command uses the bank selected by BSR rather than the access bank?
    I’m responding to my own post/question. This will save Darrel the trouble and may help others.

    After more careful examination of the datasheets, it looks like the default values for ‘d’ and ‘a’ are 1 for most of the 18F instructions. This is not clearly listed in “Complete PIC18 Reference Manual,” but was listed in the 18F4620 datasheet, so I missed it on first inspection. That being said, it appears that the previously listed code could be simply:
    Code:
        CHK?RP    _V24
        incfsz    _V24
        goto      NoCarry
        incfsz    _V24 + 1
        goto      NoCarry
        incfsz    _V24 + 2
    This would default to saving the result back to the _V24, and using BSR to select the bank. Haven't checked ALL the instructions that use these bits, nor ALL the 18Fs, so YMMV.

    EDIT: I also found this note in the datasheet:
    Note: If the register is specified with the full 12-bit address, the assembler will automatically force the access bit to a ’0’ (when the address is in the access RAM area) or a ’1’ (for all other addresses).

    Steve
    Last edited by SteveB; - 23rd July 2006 at 02:12.

Similar Threads

  1. Instant Interrupts - Revisited
    By Darrel Taylor in forum Code Examples
    Replies: 772
    Last Post: - 17th February 2016, 22:14
  2. USB with 20 pins anyone? PIC18F14K50 issues
    By ScaleRobotics in forum USB
    Replies: 6
    Last Post: - 17th July 2009, 15:39
  3. I2C Master Slave issues.
    By cpayne in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 29th March 2008, 19:33
  4. calibration clock 12f508
    By volcane in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 5th December 2006, 10:33
  5. Still HSEROUT woes
    By Charles Linquis in forum mel PIC BASIC Pro
    Replies: 34
    Last Post: - 11th July 2006, 21:13

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