• AVR Freaks

Hot!EEPROM Memory PIC16F877A

Page: 123 > Showing page 1 of 3
Author
delfindelfin
Super Member
  • Total Posts : 387
  • Reward points : 0
  • Joined: 2017/01/19 12:32:58
  • Location: Mexico
  • Status: offline
2019/06/12 06:52:53 (permalink)
1 (1)

EEPROM Memory PIC16F877A

I think I am not understanding this. but the memory that stores in the banks the General Purpose Registers and the Special Function Registers is the EEPROM Memory? ... I don't find in which part of datasheet explains that

MPLAB X IDE v5.05
XC8 2.00
#1

52 Replies Related Threads

    ric
    Super Member
    • Total Posts : 23851
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: offline
    Re: EEPROM Memory PIC16F877A 2019/06/12 06:54:48 (permalink)
    +2 (2)
    delfindelfin
    I think I am not understanding this. but the memory that stores in the banks the General Purpose Registers and the Special Function Registers is the EEPROM Memory?

    No.
    The EEPROM is entirely separate memory.
    There is 256 bytes of it. It is accessed via a couple of the SFR registers.

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #2
    pcbbc
    Super Member
    • Total Posts : 1321
    • Reward points : 0
    • Joined: 2014/03/27 07:04:41
    • Location: 0
    • Status: online
    Re: EEPROM Memory PIC16F877A 2019/06/12 07:21:41 (permalink)
    +1 (1)
    A Datasheet search for EEPROM will tell you everything you need to know in section...
    3.0 DATA EEPROM AND FLASH PROGRAM MEMORY
     
    Specifically...
    3.3 Reading Data EEPROM Memory
    3.4 Writing to Data EEPROM Memory
     
    You can also use the same registered to read/write the Flash Program Memory.  But you can ignore those sections:
    3.5 Reading Flash Program Memory
    3.6 Writing to Flash Program Memory
    #3
    delfindelfin
    Super Member
    • Total Posts : 387
    • Reward points : 0
    • Joined: 2017/01/19 12:32:58
    • Location: Mexico
    • Status: offline
    Re: EEPROM Memory PIC16F877A 2019/06/12 07:28:25 (permalink)
    -1 (1)
    So, in wich memory are stored the General Purpose Registers and the Special Function Registers? I have other questions: What is it mean by 8K word? What is the meaning of word in that context? I think is used when talking about "program EEPROM" instead of "data EEPROM"
    post edited by delfindelfin - 2019/06/12 07:32:18

    MPLAB X IDE v5.05
    XC8 2.00
    #4
    1and0
    Access is Denied
    • Total Posts : 9748
    • Reward points : 0
    • Joined: 2007/05/06 12:03:20
    • Location: Harry's Gray Matter
    • Status: offline
    Re: EEPROM Memory PIC16F877A 2019/06/12 07:30:05 (permalink)
    +1 (1)
    delfindelfin
    So, in wich memory are stored the General Purpose Registers and the Special Function Registers?

    RAM. That is described in section 2.2 of your PIC datasheet.
    #5
    1and0
    Access is Denied
    • Total Posts : 9748
    • Reward points : 0
    • Joined: 2007/05/06 12:03:20
    • Location: Harry's Gray Matter
    • Status: offline
    Re: EEPROM Memory PIC16F877A 2019/06/12 07:31:19 (permalink)
    +1 (1)
    delfindelfin
    I have other questions: What is it mean by 8K word? What is the meaning of word in that context?

    PIC16 has 14-bit instructions. One word = one instruction = 14-bit in this context.
    #6
    ric
    Super Member
    • Total Posts : 23851
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: offline
    Re: EEPROM Memory PIC16F877A 2019/06/12 07:35:22 (permalink)
    +1 (1)
    delfindelfin
    So, in wich memory are stored the General Purpose Registers and the Special Function Registers?

    In the General Purpose Registers and Special function registers.
     
    What other sort of answer did you expect?
     

    I have other questions: What is it mean by 8K word? What is the meaning of word in that context?

    As 1and0 already mentioned, "word" in this context means 14 bits, in contrast to a byte which is 8 bits.
    Each instruction is one word.
     

    I think is used when talking about "program EEPROM" instead of "data EEPROM"

    Where did you see the expression "program EEPROM" ?
     

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #7
    1and0
    Access is Denied
    • Total Posts : 9748
    • Reward points : 0
    • Joined: 2007/05/06 12:03:20
    • Location: Harry's Gray Matter
    • Status: offline
    Re: EEPROM Memory PIC16F877A 2019/06/12 07:39:39 (permalink)
    +1 (1)
    For goodness' sake, open up your PIC datasheet to page 1 and take a close look at the table on the bottom.
    #8
    delfindelfin
    Super Member
    • Total Posts : 387
    • Reward points : 0
    • Joined: 2017/01/19 12:32:58
    • Location: Mexico
    • Status: offline
    Re: EEPROM Memory PIC16F877A 2019/06/12 07:41:42 (permalink)
    -1 (1)
    ric
    What other sort of answer did you expect?

    In wich memory are stored those registers, but as 1and0 said, is the RAM memory
     
    ric
    Where did you see the expression "program EEPROM" ?



    In page 33 of the PIC16F877A datasheet: 
    "The EEADRH:EEADR register pair can address up to a maximum of 256 bytes of data EEPROM or up to a maximum of 8K words of program EEPROM."
    post edited by delfindelfin - 2019/06/12 07:43:47

    MPLAB X IDE v5.05
    XC8 2.00
    #9
    1and0
    Access is Denied
    • Total Posts : 9748
    • Reward points : 0
    • Joined: 2007/05/06 12:03:20
    • Location: Harry's Gray Matter
    • Status: offline
    Re: EEPROM Memory PIC16F877A 2019/06/12 08:16:22 (permalink)
    +2 (2)
    Technically, flash memory is a type of EEPROM, and the PIC program memory is stored in the flash memory.  
     
    The main difference between EEPROM and flash memory is that most EEPROM can erase any byte of memory at any time. Flash memory can only erase an entire chunk, or "sector" or "page", of memory at a time.
     
    To make your life easier, in the PIC micro context:
    • instruction opcodes are stored in program flash memory,
    • GPRs and SFRs are stored in data RAM memory,
    • data EEPROM is used to store settings between power cycles as it's non-volatile, meaning it will retain memory even when power is turned off.
    Edit: Flash memory is non-volatile too, but EEPROM has much higher endurance, meaning it can be erased and written to more times.
    post edited by 1and0 - 2019/06/12 08:37:43
    #10
    delfindelfin
    Super Member
    • Total Posts : 387
    • Reward points : 0
    • Joined: 2017/01/19 12:32:58
    • Location: Mexico
    • Status: offline
    Re: EEPROM Memory PIC16F877A 2019/06/12 09:08:26 (permalink)
    0
    So, there isn't "program EEPROM"? .. The datasheet refers with this to "program FLASH memory" ... Is there a book about computer architecture that you recommend to learn this? It is the first time I heard the expression "Data Memory" and "Program Memory", or at least the first time I pay attention to them

    MPLAB X IDE v5.05
    XC8 2.00
    #11
    1and0
    Access is Denied
    • Total Posts : 9748
    • Reward points : 0
    • Joined: 2007/05/06 12:03:20
    • Location: Harry's Gray Matter
    • Status: offline
    Re: EEPROM Memory PIC16F877A 2019/06/12 09:36:26 (permalink)
    +1 (1)
    delfindelfin
    So, there isn't "program EEPROM"? .. The datasheet refers with this to "program FLASH memory" ...

    As I said before, program is stored in the flash memory, and flash memory is a type of EEPROM.  I would not refer to it as "program EEPROM"; I rather use "program memory" or "flash memory".
     

    Is there a book about computer architecture that you recommend to learn this? It is the first time I heard the expression "Data Memory" and "Program Memory", or at least the first time I pay attention to them

    "Data memory" is where you stored your data and "program memory" is where you stored your program. :)  A quick search on google yields link such as this: https://www.arlabs.com/help.html
    #12
    pcbbc
    Super Member
    • Total Posts : 1321
    • Reward points : 0
    • Joined: 2014/03/27 07:04:41
    • Location: 0
    • Status: online
    Re: EEPROM Memory PIC16F877A 2019/06/12 09:59:52 (permalink)
    +2 (2)
    delfindelfin
    So, there isn't "program EEPROM"? .. The datasheet refers with this to "program FLASH memory"

    FLASH can be considered a sub-type of EEPROM, as both are "Electrically Erasable Programmable Read-Only Memory".  But typically FLASH is used to refer to the memory which must be erased and written in blocks.  Whereas EEPROM can be erased and written at a byte level.
     
    ... Is there a book about computer architecture that you recommend to learn this? It is the first time I heard the expression "Data Memory" and "Program Memory", or at least the first time I pay attention to them

    You should bush up on the difference between Von Neumann architecture and Harvard architecture.
     
    Put very simply...
    Von Neumann architecture: Probably what you are used to up until now if you have been working with PCs.  Program Code and Data are stored in the same memory address space and accessed via the same data bus.
    Harvard architecture: What the PIC uses.  Program Code and Data are stored in different memory address spaces and accessed via separate address buses.
    #13
    delfindelfin
    Super Member
    • Total Posts : 387
    • Reward points : 0
    • Joined: 2017/01/19 12:32:58
    • Location: Mexico
    • Status: offline
    Re: EEPROM Memory PIC16F877A 2019/06/12 12:00:31 (permalink)
    -1 (1)
    And where can you read about the PIC CPU itself? .. There is a section called "SPECIAL FEATURES OF THE CPU" .. But, is this all? I am just curious ... It seems that PIC's CPU is RISC, still, not really sure about what that means
     
    I want to make an interactive graph using a GLCD .. But to make it interactive I was thinking in use the "Data EEPROM" to store previous coordinates ... So, probably is a dumb question, but is it a good idea to use EEPROM this way?  or should I use the RAM memory?
    post edited by delfindelfin - 2019/06/12 12:37:48

    MPLAB X IDE v5.05
    XC8 2.00
    #14
    mlp
    boots too small
    • Total Posts : 804
    • Reward points : 0
    • Joined: 2012/09/10 15:12:07
    • Location: previously Microchip XC8 team
    • Status: offline
    Re: EEPROM Memory PIC16F877A 2019/06/12 12:41:30 (permalink)
    0
    delfindelfin
    And where can you read about the PIC CPU itself?

    In the datasheet.
    If you cannot understand a specific part of the datasheet, describe here in detail what you don't understand, and tell us what bits around it you do understand, and perhaps we will be able to help fill in the gaps.
     
    It seems that PIC's CPU is RISC

    That'll be a firm "no" from me.
    It's a small instruction set, but it lacks vital bits of "the RISC philosophy".
    ARM and MIPS actually are RISC.

    Mark (this opinion available for hire)
    #15
    mbrowning
    USNA79
    • Total Posts : 1535
    • Reward points : 0
    • Joined: 2005/03/16 14:32:56
    • Location: Melbourne, FL
    • Status: offline
    Re: EEPROM Memory PIC16F877A 2019/06/12 13:02:24 (permalink)
    +3 (3)
    To be fair the 877a datasheet is inadequate to gain an understanding of the CPU, but it seems the OP doesn't do much personal research as simple reading of section 1.0 of the datasheet finds a reference to the Mid Range Reference Manual. On the Microchip website PIC16F877A product page are a wealth of documents under "Reference Manual" which includes this gem:
    Architecture - PICmicro Mid-Range MCU Family
     

    Go Navy! Beat Army!
    #16
    NKurzman
    A Guy on the Net
    • Total Posts : 17846
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: offline
    Re: EEPROM Memory PIC16F877A 2019/06/12 13:44:41 (permalink)
    0
    mark.pappin
    That'll be a firm "no" from me.
    It's a small instruction set, but it lacks vital bits of "the RISC philosophy".
    ARM and MIPS actually are RISC.



    So only a Little RISCy
     RISC = Reduced Instruction Set Computer
     CISC = Complex Instruction Set Computer
    Google for Details.  But if You are Coding in C the distinction is not of great importance.
     
    You are the second beginner using a GLCD a a PIC16F877A this week.  Class Assignment?
     
    #17
    delfindelfin
    Super Member
    • Total Posts : 387
    • Reward points : 0
    • Joined: 2017/01/19 12:32:58
    • Location: Mexico
    • Status: offline
    Re: EEPROM Memory PIC16F877A 2019/06/12 14:47:14 (permalink)
    0
    NKurzman 
    You are the second beginner using a GLCD a a PIC16F877A this week.  Class Assignment?

    Probably, the other person was me too ... I am trying to do a PID temperature controller ... The GLCD is for the user interface ... Am I really a beginner? How much time is it going to take me to become good? I would like to be good
    post edited by delfindelfin - 2019/06/12 14:49:14

    MPLAB X IDE v5.05
    XC8 2.00
    #18
    NKurzman
    A Guy on the Net
    • Total Posts : 17846
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: offline
    Re: EEPROM Memory PIC16F877A 2019/06/12 15:08:20 (permalink)
    +1 (1)
    You chose a poor PIC for the project.
    Floats eat up a lot of code and RAM.
    But PID does not require floats. It can be done with all integer math.
    You certainly did not chose a simple project to start with.

    How long does it take to get good at anything?
    #19
    delfindelfin
    Super Member
    • Total Posts : 387
    • Reward points : 0
    • Joined: 2017/01/19 12:32:58
    • Location: Mexico
    • Status: offline
    Re: EEPROM Memory PIC16F877A 2019/06/12 16:03:26 (permalink)
    0
    NKurzman
    You chose a poor PIC for the project.

    Which one would you recommend me?
     
    NKurzman
    You certainly did not chose a simple project to start with.

    It's ok, it keeps me motivated since is going to help some people .. So, as fast as I finish it, it would be great .. Besides, to finish it I need to do a lot of small projects, like turning on a LED, make a buzzer sound, controlling a GLCD, reading a k-type thermocouple .. So I guess it is fine, fair enough ... It would be boring, otherwise, if I don't see an application of it ... I mean, if after finishing it, I don't see it using it in the world by some people whose improvement of lifes depend on that ... I guess, you can say, you could do that with something simpler, like an arduino .. But, I really want to learn this, since is going to be good for other projects in the future
     
    NKurzman
    How long does it take to get good at anything?

    I don't know .. But I would like to know ...
     
     
    post edited by delfindelfin - 2019/06/12 16:13:43

    MPLAB X IDE v5.05
    XC8 2.00
    #20
    Page: 123 > Showing page 1 of 3
    Jump to:
    © 2019 APG vNext Commercial Version 4.5