This is the
talk page for discussing improvements to the
PIC microcontrollers article. This is not a forum for general discussion of the article's subject. |
Article policies
|
Find sources: Google ( books · news · scholar · free images · WP refs) · FENS · JSTOR · TWL |
Archives: 1 |
This article is rated C-class on Wikipedia's
content assessment scale. It is of interest to the following WikiProjects: | ||||||||||||||||||||||||
|
Hi, sorry this isn't very important but just wanted to say that showing the size of an object by comparing it to a coin is not a good idea on Wikipedia because many people may have never seen that type of coin (i.e. they use different size coins in their country of origin).
A ruler like the second image is better, as long we can see what units it's in (centimetres or inches).
I'm not trying to be pedantic, it just crossed my mind that's all! :D — Preceding unsigned comment added by 124.197.6.189 ( talk) 11:35, 30 July 2011 (UTC)
I don't believe the statement, "Judicious use of simple macros can make PIC assembly language much more palatable, but at the cost of a reduction in performance." is accurate. Compiler macros should not impact performance since the compiler just expands the macro into the instructions that would have been used anyway and would not thus impact runtime performance in the way that a BASIC interpreter would work (such as the BASIC STAMP).-- P Todd ( talk) 20:59, 24 April 2009 (UTC)
OpenSourcePIC.org has almost no viable content (only two articles), not to mention their support forum returns 404 errors and the Wiki no longer exists. I believe it is in the interests of PIC enthusiasts to replace OpenSourcePIC.org with digital-diy.com Open Source PIC Projects and Programs.
digital-diy.com is a little new, though it is completely add free and has lots of viable content (over 100 articles between the PIC Programming, Handy Tips, and Projects sections). It also has an open source community based approach, where people can contribute articles, post comments, or chat in the forums. Betatester228 ( talk) 01:28, 2 May 2010 (UTC)
[1] contains a list of different PIC Microcontroller based projects. Every project is cleared described with the circuit diagram, source code in C language and working videos. Will it be helpful for Wikipedia readers to explore more on PIC microcontroller and practicing practicals on it? — Preceding
unsigned comment added by
117.196.244.148 (
talk)
05:22, 23 September 2011 (UTC)
There were plenty of spam-like external links/products starting to lurk into the wiki, I've removed a few straight forward ones, though I personally believe there's more to go. 115.69.0.101 ( talk) 06:09, 4 June 2010 (UTC)
I do not agree with the statement "The Microchip 16C84 (PIC16x84), introduced in 1993 [6] was the first[citation needed] CPU with on-chip EEPROM memory"
The MC68HC11 introduced by Motorola in 1985 (I.E. 8 years earlier) was available with EEPROM program memory - "E" suffix. —Preceding unsigned comment added by 121.72.141.204 ( talk) 12:39, 11 August 2010 (UTC)
The first 68HC11 with EEPROM was the A8 model, which came before the E model. Since Freescale bought the 68HC11 line, it has rewritten the Motorola data sheets, and any dates proving this, in this reference manual has been erased. Source http://en.wikipedia.org/wiki/Freescale_68HC11 / 68HC11 Reference Manual. 50.67.132.207 ( talk) 06:08, 7 May 2014 (UTC)
I was alarmed at the extensive negative POV of this article, I cleaned up the more blatant bashing and added a brief list of positive aspects to offset the "Limitations" section. I spent a good deal of time on it and I believe I have brought this article closer to neutral POV. DavesPlanet ( talk) 19:30, 15 February 2011 (UTC)
"Execution time can be accurately estimated by multiplying the number of instructions by two cycles" is incorrect. — Preceding unsigned comment added by 2.103.69.66 ( talk) 14:21, 16 October 2011 (UTC)
I've removed it. — Preceding unsigned comment added by 2.103.70.237 ( talk) 22:12, 23 October 2011 (UTC)
This warning has been placed here because some recent edits appear to be good-faith attempts to improve the page while others seem to have the appearance of
edit warring. Users are expected to
collaborate and discuss with others and avoid editing
disruptively.
If you find yourself in an editing dispute, use the article's talk page to discuss the changes; work towards a version that represents consensus among editors. You can post a request for help at an appropriate noticeboard or seek dispute resolution. In some cases it may be appropriate to request temporary page protection. If you engage in an edit war, you may be blocked from editing without further notice. -- Guy Macon ( talk) 18:19, 3 November 2011 (UTC)
I have lately undone some edits from user Wtshymanski on this page because he removed a lot of useful information about open source software and programmers regarding the PIC microcontroller. The editor removed (on 15 March 2011) a whole paragraph about third party programmers, and the one of open source tools.
Because Wtshymanski seems to be editing pages all day long, he keeps putting back his own edits, resulting in a couple of undo's / warring. I do agree that a long list of links is not wanted on a wikipedia page, but some information on how you can actually program a PIC and which tools to find is something that I would usually be looking for on wikipedia.
Maybe a separate page about PIC development tools and PIC Programmers (maybe two pages) might also be another solution. What do you think?
More inline references would help. I had to check each reference to find the reference for the instruction set. Also, the special purpose register table, or a reference to it. 203.206.162.148 ( talk) 05:23, 19 March 2012 (UTC)
According to PICmicro Mid-Range MCU Family Reference Manual (p. 526) the use of OPTION and TRIS instructions is not recommended because this could potentially break upward compatibility. Also, these two instructions aren't even included in the instruction set listing on p. 525 of this document. — Preceding unsigned comment added by Edigaryev ( talk • contribs) 11:22, 29 March 2014 (UTC)
This probably isn't worth bloating the article, but just for fun...
Significant changes in the PIC17 family include:
15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Mnemonic | C? | Z? | Description | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | opcode | Miscellaneous instructions | ||||||
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | NOP | No operation | |||
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | RETURN | Return from subroutine | |||
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | SLEEP | Go into standby mode | |||
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | CLRWDT | Restart watchdog timer | |||
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | RETFIE | Return from interrupt | |||
0 | 0 | opcode | d | register | ALU operations: dest ← OP(f,W) | |||||||||||||||
0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | f | MOVWF f | f ← W | ||||||||||
0 | 0 | 0 | 0 | 0 | 0 | 1 | d | f | SUBWFB f,d | C | Z | dest ← f + ~W + C (dest ← f − W − C̅) | ||||||||
0 | 0 | 0 | 0 | 0 | 1 | 0 | d | f | SUBWF f,d | C | Z | dest ← f − W (dest ← f + ~W + 1) | ||||||||
0 | 0 | 0 | 0 | 0 | 1 | 1 | d | f | DECF f,d | C | Z | dest ← f − 1 | ||||||||
0 | 0 | 0 | 0 | 1 | 0 | 0 | d | f | IORWF f,d | Z | dest ← f | W, logical inclusive or | |||||||||
0 | 0 | 0 | 0 | 1 | 0 | 1 | d | f | ANDWF f,d | Z | dest ← f & W, logical and | |||||||||
0 | 0 | 0 | 0 | 1 | 1 | 0 | d | f | XORWF f,d | Z | dest ← f ^ W, exclusive or | |||||||||
0 | 0 | 0 | 0 | 1 | 1 | 1 | d | f | ADDWF f,d | C | Z | dest ← f + W | ||||||||
0 | 0 | 0 | 1 | 0 | 0 | 0 | d | f | ADDWFC f,d | C | Z | dest ← f + W + C | ||||||||
0 | 0 | 0 | 1 | 0 | 0 | 1 | d | f | COMF f,d | Z | dest ← ~f, bitwise complement | |||||||||
0 | 0 | 0 | 1 | 0 | 1 | 0 | d | f | INCF f,d | C | Z | dest ← f + 1 | ||||||||
0 | 0 | 0 | 1 | 0 | 1 | 1 | d | f | DECFSZ f,d | dest ← f − 1, skip if zero | ||||||||||
0 | 0 | 0 | 1 | 1 | 0 | 0 | d | f | RRCF f,d | C | Z | dest ← f>>1 | C<<7, rotate right through carry | ||||||||
0 | 0 | 0 | 1 | 1 | 0 | 1 | d | f | RLCF f,d | C | Z | dest ← f<<1 | C, rotate left through carry | ||||||||
0 | 0 | 0 | 1 | 1 | 1 | 0 | d | f | SWAPF f,d | dest ← f<<4 | f>>4, swap nibbles | ||||||||||
0 | 0 | 0 | 1 | 1 | 1 | 1 | d | f | INCFSZ f,d | dest ← f + 1, skip if 0 | ||||||||||
0 | 0 | 1 | 0 | 0 | 0 | 0 | d | f | RRNCF f,d | Z | dest ← f>>1 | f<<7, rotate right (no carry) | |||||||||
0 | 0 | 1 | 0 | 0 | 0 | 1 | d | f | RLNCF f,d | Z | dest ← f<<1 | f>>7, rotate left (no carry) | |||||||||
0 | 0 | 1 | 0 | 0 | 1 | 0 | d | f | INFSNZ f,d | dest ← f + 1, skip if not 0 | ||||||||||
0 | 0 | 1 | 0 | 0 | 1 | 1 | d | f | DCFSNZ f,d | dest ← f − 1, skip if not 0 | ||||||||||
0 | 0 | 1 | 0 | 1 | opc | s | register | Two-output ALU operations: dest ← f ← OP(W) | ||||||||||||
0 | 0 | 1 | 0 | 1 | 0 | 0 | s | f | CLRF f,s | dest ← f ← 0 | ||||||||||
0 | 0 | 1 | 0 | 1 | 0 | 1 | s | f | SETF f,s | dest ← f ← 0xff | ||||||||||
0 | 0 | 1 | 0 | 1 | 1 | 0 | s | f | NEGW f,s | C | Z | dest ← f ← −W | ||||||||
0 | 0 | 1 | 0 | 1 | 1 | 1 | s | f | DAW f,s | C | dest ← f ← decimal_adjust(W) | |||||||||
0 | 0 | 1 | 1 | 0 | opcode | register | Zero-output ALU operations | |||||||||||||
0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | f | CPFSLT f | compare, skip if f < W (unsigned) | ||||||||||
0 | 0 | 1 | 1 | 0 | 0 | 0 | 1 | f | CPFSEQ f | compare, skip if f = W | ||||||||||
0 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | f | CPFSGT f | compare, skip if f > W (unsigned) | ||||||||||
0 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | f | TSTFSZ f | test f, skip if zero | ||||||||||
0 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | f | MULWF f | PRODH:PRODL ← W × f (unsigned) | ||||||||||
0 | 0 | 1 | 1 | 0 | 1 | 0 | 1 | f | (reserved) | |||||||||||
0 | 0 | 1 | 1 | 0 | 1 | 1 | x | f | (reserved) | |||||||||||
0 | 0 | 1 | 1 | 1 | bit | f | BTG f,b | f ← f ^ (1<<b), toggle bit b of f | ||||||||||||
0 | 1 | d | peripheral | register | Move between register and peripheral (addresses 0–31) | |||||||||||||||
0 | 1 | 0 | p | f | MOVPF p,f | Z | f ← p | |||||||||||||
0 | 1 | 1 | p | f | MOVFP f,p | p ← f | ||||||||||||||
1 | 0 | 0 | opc | bit | register | Bit operations (also BTG, above) | ||||||||||||||
1 | 0 | 0 | 0 | 0 | bit | f | BSF f,b | f ← f | (1<<b), set bit b of f | ||||||||||||
1 | 0 | 0 | 0 | 1 | bit | f | BCF f,b | f ← f & ~(1<<b), clear bit b of f | ||||||||||||
1 | 0 | 0 | 1 | 0 | bit | f | BTFSS f,b | Skip if bit b of f is set | ||||||||||||
1 | 0 | 0 | 1 | 1 | bit | f | BTFSC f,b | Skip if bit b of f is clear | ||||||||||||
1 | 0 | 1 | 0 | opc | t | i | register | Lookup table operations | ||||||||||||
1 | 0 | 1 | 0 | 0 | 0 | t | x | register | TLRD t,f | f ← TBLAT[t], table latch read | ||||||||||
1 | 0 | 1 | 0 | 0 | 1 | t | x | register | TLWT t,f | TBLAT[t] ← f, table latch write | ||||||||||
1 | 0 | 1 | 0 | 1 | 0 | t | i | register | TABLRD t,i,f | Table read | ||||||||||
1 | 0 | 1 | 0 | 1 | 1 | t | i | register | TABLWT t,i,f | Table write | ||||||||||
1 | 0 | 1 | 1 | opcode | literal | Literal operations: W ← OP(k,W) | ||||||||||||||
1 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | k | MOWLW k | W ← k | ||||||||||
1 | 0 | 1 | 1 | 0 | 0 | 0 | 1 | k | ADDLW k | C | Z | W ← k + W | ||||||||
1 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | k | SUBLW k | C | Z | W ← k − W | ||||||||
1 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | k | IORLW k | Z | W ← k | W, logical inclusive or | |||||||||
1 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | k | XORLW k | Z | W ← k ^ W, exclusive or | |||||||||
1 | 0 | 1 | 1 | 0 | 1 | 0 | 1 | k | XORLW k | Z | W ← k & W, logical and | |||||||||
1 | 0 | 1 | 1 | 0 | 1 | 1 | 0 | k | RETLW k | RETURN W ← k | ||||||||||
1 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | k | LCALL k | PCL ← k, PCH ← PCLATH | ||||||||||
1 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | k | MOVLB k | BSR (low half) ← k | ||||||
1 | 0 | 1 | 1 | 1 | 0 | 0 | 1 | k | (reserved) | |||||||||||
1 | 0 | 1 | 1 | 1 | 0 | 1 | x | k | 0 | 0 | 0 | 0 | MOVLR k | BSR (high half) ← k | ||||||
1 | 0 | 1 | 1 | 1 | 1 | 0 | 0 | k | MULLW k | W ← k × W | ||||||||||
1 | 0 | 1 | 1 | 1 | 1 | 0 | 1 | k | (reserved) | |||||||||||
1 | 0 | 1 | 1 | 1 | 1 | 1 | x | k | (reserved) | |||||||||||
1 | 1 | o | address | Unconditional control transfer | ||||||||||||||||
1 | 1 | 0 | k | GOTO k | Unconditional branch | |||||||||||||||
1 | 1 | 1 | k | CALL k | Subroutine call |
71.41.210.146 ( talk) 15:46, 9 August 2014 (UTC)
Are the Instruction Tables really necessary? The article is soo long and this seems to be bloating it further.
I propose they are moved into a separate article, ("PIC instruction listings", similar to x86 instruction listings). Please reply with support/objections below.
Wonderfl (reply) 11:32, 11 January 2015 (UTC)
I've been WP:BOLD and split the PIC article into the PIC instruction listings article. This significantly shortens the PIC article and removes unnecessary detail. This is similar in purpose and design to x86 instruction listings. -- Wonderfl (reply) 07:46, 15 January 2015 (UTC)
What's a "current" model? It's ambiguous I guess. Items like the PIC12C508 are still produced, but "not recomended for new designs" — Preceding unsigned comment added by 203.206.162.148 ( talk) 11:23, 26 August 2016 (UTC)
gcc
" depends on how much you like palaeontological languages like C. Personally if it won't run Python or a JVM, I've already lost interest.
Andy Dingley (
talk)
18:35, 26 September 2017 (UTC)There was a PIC14000 mid of the 90s. It is a mixed signal controller. 62.154.134.131 ( talk) 06:27, 8 May 2019 (UTC)
Just wondering, does anyone have a picture of the big machine you needed to plug these into to upload code to them? I remember them from when i was in college, but can't find a picture of such a machine anywhere.
Delt01 ( talk) 19:09, 23 March 2020 (UTC)
I want pic microcontroller for density based traffic signal light project which can be used 1.38.165.72 ( talk) 15:03, 20 December 2021 (UTC)
The article states "By 2013, Microchip was shipping over one billion PIC microcontrollers every year.". Reading the reference entry gives the rationale "Microchip delivered this 12 billionth MCU approximately 10 months after delivering its 11 billionth.". On reading the referenced press release, this is shipments to just a single customer, Nidec Corporation, so overall shipments of PICs must be considerably higher than this, and the statement is incorrect. Can anyone find a better volume source or otherwise correct accordingly? 92.40.218.153 ( talk) 14:07, 3 February 2023 (UTC)
This is the
talk page for discussing improvements to the
PIC microcontrollers article. This is not a forum for general discussion of the article's subject. |
Article policies
|
Find sources: Google ( books · news · scholar · free images · WP refs) · FENS · JSTOR · TWL |
Archives: 1 |
This article is rated C-class on Wikipedia's
content assessment scale. It is of interest to the following WikiProjects: | ||||||||||||||||||||||||
|
Hi, sorry this isn't very important but just wanted to say that showing the size of an object by comparing it to a coin is not a good idea on Wikipedia because many people may have never seen that type of coin (i.e. they use different size coins in their country of origin).
A ruler like the second image is better, as long we can see what units it's in (centimetres or inches).
I'm not trying to be pedantic, it just crossed my mind that's all! :D — Preceding unsigned comment added by 124.197.6.189 ( talk) 11:35, 30 July 2011 (UTC)
I don't believe the statement, "Judicious use of simple macros can make PIC assembly language much more palatable, but at the cost of a reduction in performance." is accurate. Compiler macros should not impact performance since the compiler just expands the macro into the instructions that would have been used anyway and would not thus impact runtime performance in the way that a BASIC interpreter would work (such as the BASIC STAMP).-- P Todd ( talk) 20:59, 24 April 2009 (UTC)
OpenSourcePIC.org has almost no viable content (only two articles), not to mention their support forum returns 404 errors and the Wiki no longer exists. I believe it is in the interests of PIC enthusiasts to replace OpenSourcePIC.org with digital-diy.com Open Source PIC Projects and Programs.
digital-diy.com is a little new, though it is completely add free and has lots of viable content (over 100 articles between the PIC Programming, Handy Tips, and Projects sections). It also has an open source community based approach, where people can contribute articles, post comments, or chat in the forums. Betatester228 ( talk) 01:28, 2 May 2010 (UTC)
[1] contains a list of different PIC Microcontroller based projects. Every project is cleared described with the circuit diagram, source code in C language and working videos. Will it be helpful for Wikipedia readers to explore more on PIC microcontroller and practicing practicals on it? — Preceding
unsigned comment added by
117.196.244.148 (
talk)
05:22, 23 September 2011 (UTC)
There were plenty of spam-like external links/products starting to lurk into the wiki, I've removed a few straight forward ones, though I personally believe there's more to go. 115.69.0.101 ( talk) 06:09, 4 June 2010 (UTC)
I do not agree with the statement "The Microchip 16C84 (PIC16x84), introduced in 1993 [6] was the first[citation needed] CPU with on-chip EEPROM memory"
The MC68HC11 introduced by Motorola in 1985 (I.E. 8 years earlier) was available with EEPROM program memory - "E" suffix. —Preceding unsigned comment added by 121.72.141.204 ( talk) 12:39, 11 August 2010 (UTC)
The first 68HC11 with EEPROM was the A8 model, which came before the E model. Since Freescale bought the 68HC11 line, it has rewritten the Motorola data sheets, and any dates proving this, in this reference manual has been erased. Source http://en.wikipedia.org/wiki/Freescale_68HC11 / 68HC11 Reference Manual. 50.67.132.207 ( talk) 06:08, 7 May 2014 (UTC)
I was alarmed at the extensive negative POV of this article, I cleaned up the more blatant bashing and added a brief list of positive aspects to offset the "Limitations" section. I spent a good deal of time on it and I believe I have brought this article closer to neutral POV. DavesPlanet ( talk) 19:30, 15 February 2011 (UTC)
"Execution time can be accurately estimated by multiplying the number of instructions by two cycles" is incorrect. — Preceding unsigned comment added by 2.103.69.66 ( talk) 14:21, 16 October 2011 (UTC)
I've removed it. — Preceding unsigned comment added by 2.103.70.237 ( talk) 22:12, 23 October 2011 (UTC)
This warning has been placed here because some recent edits appear to be good-faith attempts to improve the page while others seem to have the appearance of
edit warring. Users are expected to
collaborate and discuss with others and avoid editing
disruptively.
If you find yourself in an editing dispute, use the article's talk page to discuss the changes; work towards a version that represents consensus among editors. You can post a request for help at an appropriate noticeboard or seek dispute resolution. In some cases it may be appropriate to request temporary page protection. If you engage in an edit war, you may be blocked from editing without further notice. -- Guy Macon ( talk) 18:19, 3 November 2011 (UTC)
I have lately undone some edits from user Wtshymanski on this page because he removed a lot of useful information about open source software and programmers regarding the PIC microcontroller. The editor removed (on 15 March 2011) a whole paragraph about third party programmers, and the one of open source tools.
Because Wtshymanski seems to be editing pages all day long, he keeps putting back his own edits, resulting in a couple of undo's / warring. I do agree that a long list of links is not wanted on a wikipedia page, but some information on how you can actually program a PIC and which tools to find is something that I would usually be looking for on wikipedia.
Maybe a separate page about PIC development tools and PIC Programmers (maybe two pages) might also be another solution. What do you think?
More inline references would help. I had to check each reference to find the reference for the instruction set. Also, the special purpose register table, or a reference to it. 203.206.162.148 ( talk) 05:23, 19 March 2012 (UTC)
According to PICmicro Mid-Range MCU Family Reference Manual (p. 526) the use of OPTION and TRIS instructions is not recommended because this could potentially break upward compatibility. Also, these two instructions aren't even included in the instruction set listing on p. 525 of this document. — Preceding unsigned comment added by Edigaryev ( talk • contribs) 11:22, 29 March 2014 (UTC)
This probably isn't worth bloating the article, but just for fun...
Significant changes in the PIC17 family include:
15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Mnemonic | C? | Z? | Description | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | opcode | Miscellaneous instructions | ||||||
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | NOP | No operation | |||
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | RETURN | Return from subroutine | |||
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | SLEEP | Go into standby mode | |||
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | CLRWDT | Restart watchdog timer | |||
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | RETFIE | Return from interrupt | |||
0 | 0 | opcode | d | register | ALU operations: dest ← OP(f,W) | |||||||||||||||
0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | f | MOVWF f | f ← W | ||||||||||
0 | 0 | 0 | 0 | 0 | 0 | 1 | d | f | SUBWFB f,d | C | Z | dest ← f + ~W + C (dest ← f − W − C̅) | ||||||||
0 | 0 | 0 | 0 | 0 | 1 | 0 | d | f | SUBWF f,d | C | Z | dest ← f − W (dest ← f + ~W + 1) | ||||||||
0 | 0 | 0 | 0 | 0 | 1 | 1 | d | f | DECF f,d | C | Z | dest ← f − 1 | ||||||||
0 | 0 | 0 | 0 | 1 | 0 | 0 | d | f | IORWF f,d | Z | dest ← f | W, logical inclusive or | |||||||||
0 | 0 | 0 | 0 | 1 | 0 | 1 | d | f | ANDWF f,d | Z | dest ← f & W, logical and | |||||||||
0 | 0 | 0 | 0 | 1 | 1 | 0 | d | f | XORWF f,d | Z | dest ← f ^ W, exclusive or | |||||||||
0 | 0 | 0 | 0 | 1 | 1 | 1 | d | f | ADDWF f,d | C | Z | dest ← f + W | ||||||||
0 | 0 | 0 | 1 | 0 | 0 | 0 | d | f | ADDWFC f,d | C | Z | dest ← f + W + C | ||||||||
0 | 0 | 0 | 1 | 0 | 0 | 1 | d | f | COMF f,d | Z | dest ← ~f, bitwise complement | |||||||||
0 | 0 | 0 | 1 | 0 | 1 | 0 | d | f | INCF f,d | C | Z | dest ← f + 1 | ||||||||
0 | 0 | 0 | 1 | 0 | 1 | 1 | d | f | DECFSZ f,d | dest ← f − 1, skip if zero | ||||||||||
0 | 0 | 0 | 1 | 1 | 0 | 0 | d | f | RRCF f,d | C | Z | dest ← f>>1 | C<<7, rotate right through carry | ||||||||
0 | 0 | 0 | 1 | 1 | 0 | 1 | d | f | RLCF f,d | C | Z | dest ← f<<1 | C, rotate left through carry | ||||||||
0 | 0 | 0 | 1 | 1 | 1 | 0 | d | f | SWAPF f,d | dest ← f<<4 | f>>4, swap nibbles | ||||||||||
0 | 0 | 0 | 1 | 1 | 1 | 1 | d | f | INCFSZ f,d | dest ← f + 1, skip if 0 | ||||||||||
0 | 0 | 1 | 0 | 0 | 0 | 0 | d | f | RRNCF f,d | Z | dest ← f>>1 | f<<7, rotate right (no carry) | |||||||||
0 | 0 | 1 | 0 | 0 | 0 | 1 | d | f | RLNCF f,d | Z | dest ← f<<1 | f>>7, rotate left (no carry) | |||||||||
0 | 0 | 1 | 0 | 0 | 1 | 0 | d | f | INFSNZ f,d | dest ← f + 1, skip if not 0 | ||||||||||
0 | 0 | 1 | 0 | 0 | 1 | 1 | d | f | DCFSNZ f,d | dest ← f − 1, skip if not 0 | ||||||||||
0 | 0 | 1 | 0 | 1 | opc | s | register | Two-output ALU operations: dest ← f ← OP(W) | ||||||||||||
0 | 0 | 1 | 0 | 1 | 0 | 0 | s | f | CLRF f,s | dest ← f ← 0 | ||||||||||
0 | 0 | 1 | 0 | 1 | 0 | 1 | s | f | SETF f,s | dest ← f ← 0xff | ||||||||||
0 | 0 | 1 | 0 | 1 | 1 | 0 | s | f | NEGW f,s | C | Z | dest ← f ← −W | ||||||||
0 | 0 | 1 | 0 | 1 | 1 | 1 | s | f | DAW f,s | C | dest ← f ← decimal_adjust(W) | |||||||||
0 | 0 | 1 | 1 | 0 | opcode | register | Zero-output ALU operations | |||||||||||||
0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | f | CPFSLT f | compare, skip if f < W (unsigned) | ||||||||||
0 | 0 | 1 | 1 | 0 | 0 | 0 | 1 | f | CPFSEQ f | compare, skip if f = W | ||||||||||
0 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | f | CPFSGT f | compare, skip if f > W (unsigned) | ||||||||||
0 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | f | TSTFSZ f | test f, skip if zero | ||||||||||
0 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | f | MULWF f | PRODH:PRODL ← W × f (unsigned) | ||||||||||
0 | 0 | 1 | 1 | 0 | 1 | 0 | 1 | f | (reserved) | |||||||||||
0 | 0 | 1 | 1 | 0 | 1 | 1 | x | f | (reserved) | |||||||||||
0 | 0 | 1 | 1 | 1 | bit | f | BTG f,b | f ← f ^ (1<<b), toggle bit b of f | ||||||||||||
0 | 1 | d | peripheral | register | Move between register and peripheral (addresses 0–31) | |||||||||||||||
0 | 1 | 0 | p | f | MOVPF p,f | Z | f ← p | |||||||||||||
0 | 1 | 1 | p | f | MOVFP f,p | p ← f | ||||||||||||||
1 | 0 | 0 | opc | bit | register | Bit operations (also BTG, above) | ||||||||||||||
1 | 0 | 0 | 0 | 0 | bit | f | BSF f,b | f ← f | (1<<b), set bit b of f | ||||||||||||
1 | 0 | 0 | 0 | 1 | bit | f | BCF f,b | f ← f & ~(1<<b), clear bit b of f | ||||||||||||
1 | 0 | 0 | 1 | 0 | bit | f | BTFSS f,b | Skip if bit b of f is set | ||||||||||||
1 | 0 | 0 | 1 | 1 | bit | f | BTFSC f,b | Skip if bit b of f is clear | ||||||||||||
1 | 0 | 1 | 0 | opc | t | i | register | Lookup table operations | ||||||||||||
1 | 0 | 1 | 0 | 0 | 0 | t | x | register | TLRD t,f | f ← TBLAT[t], table latch read | ||||||||||
1 | 0 | 1 | 0 | 0 | 1 | t | x | register | TLWT t,f | TBLAT[t] ← f, table latch write | ||||||||||
1 | 0 | 1 | 0 | 1 | 0 | t | i | register | TABLRD t,i,f | Table read | ||||||||||
1 | 0 | 1 | 0 | 1 | 1 | t | i | register | TABLWT t,i,f | Table write | ||||||||||
1 | 0 | 1 | 1 | opcode | literal | Literal operations: W ← OP(k,W) | ||||||||||||||
1 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | k | MOWLW k | W ← k | ||||||||||
1 | 0 | 1 | 1 | 0 | 0 | 0 | 1 | k | ADDLW k | C | Z | W ← k + W | ||||||||
1 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | k | SUBLW k | C | Z | W ← k − W | ||||||||
1 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | k | IORLW k | Z | W ← k | W, logical inclusive or | |||||||||
1 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | k | XORLW k | Z | W ← k ^ W, exclusive or | |||||||||
1 | 0 | 1 | 1 | 0 | 1 | 0 | 1 | k | XORLW k | Z | W ← k & W, logical and | |||||||||
1 | 0 | 1 | 1 | 0 | 1 | 1 | 0 | k | RETLW k | RETURN W ← k | ||||||||||
1 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | k | LCALL k | PCL ← k, PCH ← PCLATH | ||||||||||
1 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | k | MOVLB k | BSR (low half) ← k | ||||||
1 | 0 | 1 | 1 | 1 | 0 | 0 | 1 | k | (reserved) | |||||||||||
1 | 0 | 1 | 1 | 1 | 0 | 1 | x | k | 0 | 0 | 0 | 0 | MOVLR k | BSR (high half) ← k | ||||||
1 | 0 | 1 | 1 | 1 | 1 | 0 | 0 | k | MULLW k | W ← k × W | ||||||||||
1 | 0 | 1 | 1 | 1 | 1 | 0 | 1 | k | (reserved) | |||||||||||
1 | 0 | 1 | 1 | 1 | 1 | 1 | x | k | (reserved) | |||||||||||
1 | 1 | o | address | Unconditional control transfer | ||||||||||||||||
1 | 1 | 0 | k | GOTO k | Unconditional branch | |||||||||||||||
1 | 1 | 1 | k | CALL k | Subroutine call |
71.41.210.146 ( talk) 15:46, 9 August 2014 (UTC)
Are the Instruction Tables really necessary? The article is soo long and this seems to be bloating it further.
I propose they are moved into a separate article, ("PIC instruction listings", similar to x86 instruction listings). Please reply with support/objections below.
Wonderfl (reply) 11:32, 11 January 2015 (UTC)
I've been WP:BOLD and split the PIC article into the PIC instruction listings article. This significantly shortens the PIC article and removes unnecessary detail. This is similar in purpose and design to x86 instruction listings. -- Wonderfl (reply) 07:46, 15 January 2015 (UTC)
What's a "current" model? It's ambiguous I guess. Items like the PIC12C508 are still produced, but "not recomended for new designs" — Preceding unsigned comment added by 203.206.162.148 ( talk) 11:23, 26 August 2016 (UTC)
gcc
" depends on how much you like palaeontological languages like C. Personally if it won't run Python or a JVM, I've already lost interest.
Andy Dingley (
talk)
18:35, 26 September 2017 (UTC)There was a PIC14000 mid of the 90s. It is a mixed signal controller. 62.154.134.131 ( talk) 06:27, 8 May 2019 (UTC)
Just wondering, does anyone have a picture of the big machine you needed to plug these into to upload code to them? I remember them from when i was in college, but can't find a picture of such a machine anywhere.
Delt01 ( talk) 19:09, 23 March 2020 (UTC)
I want pic microcontroller for density based traffic signal light project which can be used 1.38.165.72 ( talk) 15:03, 20 December 2021 (UTC)
The article states "By 2013, Microchip was shipping over one billion PIC microcontrollers every year.". Reading the reference entry gives the rationale "Microchip delivered this 12 billionth MCU approximately 10 months after delivering its 11 billionth.". On reading the referenced press release, this is shipments to just a single customer, Nidec Corporation, so overall shipments of PICs must be considerably higher than this, and the statement is incorrect. Can anyone find a better volume source or otherwise correct accordingly? 92.40.218.153 ( talk) 14:07, 3 February 2023 (UTC)