I am making an effort to understand word sizes, program counters, and memory size. Looking over data sheet for the PIC12F629 under "Memory Organization" in section 2.0, the datasheet states:
Word size for this MCU is 14-bits wide. My understanding is that most instructions are 1 word, and a few are 2 words. The instructions reside in the program memory, which is why it is 14 bits wide. 8K x 14 means that the program memory can hold ~8,000 lines of instructions, each 14 bits wide. The Program counter is only 13 bits wide, but that's because the instructions themselves don't actually get moved into the program counter, it is just there to address the line the actual instruction resides on in the program memory? It is 13 bits wide because that is the necessary number of bits required to address up to 8K?
I think all of that is right, but I'm looking for confirmation on my understanding of it. The next question I have is, when it says that only the first 1K x 14 is implemented, what does that mean? Does that mean that this particular MCU's program memory is actually only 1K x 14 rather than 8K x 14? If that is the case, why not just specify that program memory size is 1K x 14 and use a program counter that is only 10 bits wide?
And finally, if someone could explain what is meant by "addressing a location above these boundaries will cause a wrap-around within the first 1K x 14 space".
Thank you for the help.
Ryan
The PIC12F629/675 devices have a 13-bit program counter capable of addressing an 8K x 14 program memory space. Only the first 1K x 14 (0000h-03FFh) for the PIC12F629/675 devices is physically implemented. Accessing a location above these boundaries will cause a wrap-around within the first 1K x 14 space
Word size for this MCU is 14-bits wide. My understanding is that most instructions are 1 word, and a few are 2 words. The instructions reside in the program memory, which is why it is 14 bits wide. 8K x 14 means that the program memory can hold ~8,000 lines of instructions, each 14 bits wide. The Program counter is only 13 bits wide, but that's because the instructions themselves don't actually get moved into the program counter, it is just there to address the line the actual instruction resides on in the program memory? It is 13 bits wide because that is the necessary number of bits required to address up to 8K?
I think all of that is right, but I'm looking for confirmation on my understanding of it. The next question I have is, when it says that only the first 1K x 14 is implemented, what does that mean? Does that mean that this particular MCU's program memory is actually only 1K x 14 rather than 8K x 14? If that is the case, why not just specify that program memory size is 1K x 14 and use a program counter that is only 10 bits wide?
And finally, if someone could explain what is meant by "addressing a location above these boundaries will cause a wrap-around within the first 1K x 14 space".
Thank you for the help.
Ryan