2
\$\begingroup\$

While studying about PIC18 I came across this weird thing. I understand what instruction format means and I also know what '8 bit' means in case of 8 bit Microcontroller. But my doubt is that, "If the Microcontroller is having 8bit architecture then how does it have 16 bit instruction format?"

\$\endgroup\$

2 Answers 2

6
\$\begingroup\$

When the PIC18 series are referred to as 8-bit microcontrollers, its the size of the data words which these micros use which is being specified.
Their registers and RAM are 8-bit wide, and computations and operations are typically done on 8-bits at a time.

However, since the PICs use a Harvard architecture, their data and program memories are kept completely separate.

This means that there is no link between the size of the data words and the size of the program code words.

When looking at the different sub-groups in the 8-bit PIC family, you can see that there are different groups with different code word sizes. The PIC18's have 16-bit code words, while the PIC12's have 12-bit code words.
Once upon a time there was also a PIC14 with a 14-bit code word.

You may have noticed that PIC12=12-bit, PIC14=14-bit, but PIC18 doesn't correspond with an 18-bit code word.
This is because the PIC18's were developed as an upgrade to the PIC16 series and PIC16=16-bit.

\$\endgroup\$
2
  • \$\begingroup\$ There was a PIC17 family for a little while which also had a 16-bit code word (anyone want to buy some obsolete 'PIC-Master' development equipment for their museum .... ?) \$\endgroup\$
    – brhans
    Commented Apr 23, 2015 at 17:05
  • \$\begingroup\$ Thanks @brhans for your help. Got the answer to my commented question "Thank you very much for this...". I got the answer in a YouTube video link... Thanks for giving me starting boost. \$\endgroup\$ Commented May 31, 2015 at 12:05
2
\$\begingroup\$

Besides the PIC situation described by brhans, other 8-bit microcontrollers and microprocessors can have 8, 16, or 24 bit instructions. These instructions will occupy 1, 2, or 3 bytes of memory. The first byte is the actual instruction, while the second and third bytes will contain a memory address or immediate data that will be used by the instruction.

\$\endgroup\$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.