RT Config issue


Closed Thread
Results 1 to 3 of 3

Thread: RT Config issue

  1. #1
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107

    Default RT Config issue

    I have been successfully using DT's RTCONFIG with an offset,
    For example

    @ ReadConfig?CB _CONFIG1H, _OSCTYPE


    But when I try to use the line

    @ ReadConfig?BB 200000h, _User1

    I get the error message

    "Register in operand not in bank0. Ensure that bank bits are correct."

    Can someone tell me what I'm doing wrong?
    Charles Linquist

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    HI Charles,

    The @ ReadConfig?BB macro uses a BYTE variable as an offset from 300000h (CONFIG space). It can't read the ID locations (200000).

    You can read them with the ?CB macro ...
    Code:
    @ ReadConfig?CB 200000h, _User1
        --OR-- 
    @ ReadConfig?CB _IDLOC0, _User1
    Or you could add this macro to the RTconfig include, which will let you use an offset from the first ID loc...
    Code:
    ReadID?BB  macro  Breg, Bout 
            movlw    upper(_IDLOC0)
            movwf    TBLPTRU, A
            movlw    high(_IDLOC0)
            movwf    TBLPTRH, A
            movff    Breg, TBLPTRL
            TBLRD*                            ; read the ID byte
            movff    TABLAT, Bout
        endm
    Then you could ...
    Code:
    FOR X = 7 to 0 STEP -1
        @ ReadID?BB  _X, _User1
        LCDOUT HEX2 User1
    NEXT X
    DT

  3. #3
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    Thanks!

    I should have looked at your code for the answer, but it is month-end around here and I don't even have time to do anything constructive!
    Charles Linquist

Similar Threads

  1. A/D conversion with PIC18F67J50
    By ScaleRobotics in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 8th May 2009, 01:48
  2. 18F4550 Bootloader enter via eeprom setting
    By bradb in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 22nd November 2008, 23:51
  3. Error 0X0000008E when connecting a 18F2550 USB HID
    By FranciscoMartin in forum USB
    Replies: 8
    Last Post: - 16th October 2008, 17:20
  4. PortE problems (PIC18F4455)
    By RubenR in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 12th July 2006, 15:26
  5. Installation sequence
    By Demon in forum General
    Replies: 23
    Last Post: - 11th July 2006, 03:56

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