1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

New PIC16 chips GPR memory org.

Discussion in 'Microcontrollers' started by Mosaic, Jun 23, 2017.

  1. Mosaic

    Mosaic Well-Known Member

    Joined:
    Jun 3, 2010
    Messages:
    2,568
    Likes:
    128
    Location:
    Caribbean
    Hi all:
    I read somewhere that the newer enhanced 16F PIC chips have a 'flat' memory organization (GPR) with no banking issues. Is this accurate?
    Eg. 16F18857 or 16F1936
     
  2. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,205
    Likes:
    640
    Location:
    Derbyshire, UK
    ONLINE
    Not exactly - you can however access the memory in a fairly linear fashion by correctly setting the options.

    I used a 16F1827 for exactly that reason, configured a linear buffer in the memory, downloaded GSM txt messages to it, and then searched the buffer to identify required strings.
     
  3. Mike - K8LH

    Mike - K8LH Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    3,637
    Likes:
    109
    Location:
    Michigan, USA
    Do you need help finding the datasheets?
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. Mosaic

    Mosaic Well-Known Member

    Joined:
    Jun 3, 2010
    Messages:
    2,568
    Likes:
    128
    Location:
    Caribbean

    If u can point out the relevant section, mike, that would be helpful
     
  6. jpanhalt

    jpanhalt Well-Known Member Most Helpful Member

    Joined:
    Jun 21, 2006
    Messages:
    5,887
    Likes:
    500
    Location:
    Cleveland, OH, USA
  7. Mosaic

    Mosaic Well-Known Member

    Joined:
    Jun 3, 2010
    Messages:
    2,568
    Likes:
    128
    Location:
    Caribbean
    John, can u advise on the FSR access to the 'linear' GPR being only 9FF bytes long?
    The 16F18857 has 1000h bytes of GPR. How would these extra bytes be mirrored?
     
  8. jpanhalt

    jpanhalt Well-Known Member Most Helpful Member

    Joined:
    Jun 21, 2006
    Messages:
    5,887
    Likes:
    500
    Location:
    Cleveland, OH, USA
    Fortunately or unfortunately, depending on your point of view, I have never had to do that. I do find the much easier FSRx and tables a real boon. Also, the added instructions and direct access to WREG have been appreciated. The 12F1840 has replaced the 12F683 as my simple chip. I like the 16F1829 too. I have not gotten into the newest versions like the 16F18857. I am still wed to MPLab 8.92, so some new stuff is not available to me. I plan to change that in the future.

    John
     
  9. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,205
    Likes:
    640
    Location:
    Derbyshire, UK
    ONLINE
    A quick glance at my old source code shows declaring the linear buffer using cblock.

    Code (text):

    cblock   0x2050                ;receive buffer starting in bank1
                   Buff:Buff_Size   ;240 character receive buffer
    endc
     
     

Share This Page