how to know how many bits a microcontroller has?

How can I know what kind of architecture a microcontroller has? For example where can I read in the datasheet of the pic 16F873 how many bits architecture is? 8, 16, 32?

Next question what does: What does mean: Up to 256 x 8 bytes of EEPROM Data Memory. Mean that there are 256 slots of 8 bytes? Or (256 x 8) bytes? So 256 slots of 8 bit each? I don’t think it’s explained really well :S. Thx for answers :)

• Read the datasheet. That's how you learn the internal workings of a particular microcontroller (and any other IC for that matter). – Nick Alexeev Nov 11 '14 at 20:59
• It's perfectly well explained, you just need to understand the technical jargon. – markt Nov 11 '14 at 21:19
• "256 x 8 bytes" ? sure you don't mean 8 bits? – Chris Stratton Nov 11 '14 at 22:48

With PICs in particular, sometimes you find what you need in the Family Reference Manual as opposed to the data sheet. In this case, the mid-range family ref manual has a chapter on architecture that you might find of use, and its in a different tone than the chip's datasheet.

For PICs datasheets tend to have a ton of chip specific info,but the Family Ref Manuals tend to show a more global picture.

• Sorry, -1 because I don't like answers that say "there is PDF with 688 pages and you can find answer there". – Kamil Nov 11 '14 at 22:49
• @Kamil People keep pointing to the data sheet, and that's not necessarily the best resource for this type of question. In learning PICs it took me a while to realize that the family refs existed, and that sometimes they're valuable, so I thought I'd provide the shortcut for a new user. There was no need to repeat the info in the answers already provided. I was a bit divided on commenting vs answering, but I thought there was enough archival value to make this an answer – Scott Seidman Nov 11 '14 at 22:57
• OK, you convinced me. Please edit something so I can rollback my downvote. – Kamil Nov 11 '14 at 23:16
• +1 for pointing people at the right documentation - especially one many might not realize exists! – Grant Nov 12 '14 at 0:57

Page 1 top of the page then further down in the architecture there are the clues: -

256 x 8 usually means 256 bytes each byte is 8 bits wide.

• The 'up to' part is caused by the fact that the datasheet describes multiple devices: the 16F873 that has 128 bytes EPROM, and the 16F876 that has 256 bytes. – Wouter van Ooijen Nov 11 '14 at 21:10

The datasheet states categorically the core CPU size on the title page:

28/40-Pin 8-Bit CMOS FLASH

The EEPROM is arranged in 8-bit bytes, and there are 256 of them.

It's a Harvard architecture 8-bit processor with a 14-bit instruction width.

That's why a 4096-word program memory is listed as 7.2K (7168) bytes.

The 16F873 is an 8-bit microcontroller. Its internal registers are 8 bits wide. The data sheet should say so, but maybe it assumes you already know that -- the person writing it may have thought it was too obvious to mention. The internal RAM and EEPROM are also 8 bits wide.

As for the EEPROM, 256 x 8 in this context means 256 8-bit locations in the memory. 256 slots of 8 bits each. It's not well explained, by the sound of it.

There are many Microchip microcontroller families.

8-bit: PIC10, PIC12, PIC16, PIC18

16bit: PIC24, PIC30, PIC33

32bit: PIC32

If you go to Microchip website and enter microcontrollers (link) you will see these families on the left side.

Regarding 256 x 8 bytes - I agree that this may mislead.

256 x 8 means: 256 directly addressable 8-bit registers of memory (256*8 bits).

address  data
0x0000   xxxxxxxx (byte 0)
0x0001   xxxxxxxx (byte 1)
0x0002   xxxxxxxx (byte 2)
0x0003   xxxxxxxx (byte 3)


If that would be

256 x 16 - thay would be 512 bytes, but only 256 directly addressable (you have to store 16 bits at once) and you cannot directly access each byte.

address  data
0x0000   xxxxxxxx xxxxxxxx (byte 0, byte 1)
0x0001   xxxxxxxx xxxxxxxx (byte 2, byte 2)


In Intel x86 - most of registers are 32-bit wide. You cannot read only one byte, you have to read whole register to get one byte from it.