Talk:PIC microcontrollers

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Size of Chips Shown with Coin[edit]

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)[reply]

Macros and Performance[edit]

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)[reply]

I think this phrase relates to programming in assembler language and then it is mostly true. I agree with you for C-language. NobbiP (talk) 21:39, 24 April 2009 (UTC)[reply]


External links[edit]

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)[reply]

  • We were one of the orignal developers of tools for picmicro. With wide acceptance across the community. There were serveral books written around our products and PICmicros. Would our link to some of the books or our site in the external links section or referrence be acceptable? Http://www.basicmicro.com


[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)[reply]

Removed Spam[edit]

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)[reply]

First Micro based on EEPROM memory???[edit]

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)[reply]

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)[reply]

POV[edit]

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)[reply]

Seriously? This article sounds like advertising material.98.95.155.10 (talk) 15:46, 3 November 2011 (UTC)[reply]

Wrong[edit]

"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)[reply]

I've removed it. — Preceding unsigned comment added by 2.103.70.237 (talk) 22:12, 23 October 2011 (UTC)[reply]

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.

  • Do not edit war even if you believe you are right.

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)[reply]

WP:NOTDIRECTORY. There are other web sites out there that are supposed to specialize in links. This isn' tone of them. --Wtshymanski (talk) 19:42, 3 November 2011 (UTC)[reply]
And see WP:EL which says in part ... Long lists of links are not acceptable. A directory link may be a permanent link or a temporary measure put in place while external links are being discussed on the article's talk page. Many options are available; the Open Directory Project is often a neutral candidate, and may be added using the {{dmoz}} template. --Wtshymanski (talk) 21:34, 3 November 2011 (UTC)[reply]
I am with Wtshymanski on this one. If you read the policies he references above, a big chunk of what is currently on this page should be deleted. --Guy Macon (talk) 22:39, 3 November 2011 (UTC)[reply]
I agree with Wtshymanski's interpretation of the policy. The "stable" state of this page is the way it existed on October 30th, which is sans external links. Atomsmith (talk) 02:16, 4 November 2011 (UTC)[reply]
Done. Still could use some trimming, though. Do we really need the instruction set tables? Guy Macon (talk) 09:22, 4 November 2011 (UTC)[reply]

Late edits / undo's by Wtshymanski and me (fransschreuder)[edit]

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?

Wtshymanski has been a problem for all of us who edit engineering and technology articles for a long time. He has become quite the expert at staying just within the rules while still making Wikipedia a hostile place. That's why you see him posting bogus arguments - he has no intention of actually working cooperatively, but he knows that when someone complains about his behavior, an admin will check to see if he is "discussing" things on the talk page. All he needs to do is to make it look technical enough so the admin can't follow the argument.
The best response to Wtshymanski's ongoing disruptive behavior is twofold: First, become very familiar with Wikipedia policies and guidelines, and make sure your own behavior is squeaky-clean. (see WP:BOOMERANG). Second, insist that he also follow the rules. If you get frustrated, drop me a line on my userpage. I am confident that eventually an admin will identify the chaos Wtshymanski is causing and will apply some behavioral restrictions such as a topic ban or a 1RR restriction.
I think a separate page titled "List of PIC development tools" would be a very good thing. I suggest that you be WP:BOLD and go ahead and create it. IMO two pages are not needed, just a section on hardware development tools and another section on software development tools. --Guy Macon (talk) 21:20, 4 November 2011 (UTC)[reply]

inline references[edit]

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)[reply]

OPTION and TRIS instructions in 14-bit instruction set listing[edit]

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 (talkcontribs) 11:22, 29 March 2014 (UTC)[reply]

Thanks, marked as deprecated. 71.41.210.146 (talk) 16:23, 9 August 2014 (UTC)[reply]

PIC17 instruction set[edit]

This probably isn't worth bloating the article, but just for fun...

Significant changes in the PIC17 family include:

  • Program memory expanded to 216 words (128 KiB)
  • Register space expanded to 256 bytes
  • All peripherals are in the range 0–0x17
  • Peripherals from 0x10–0x17 are banked, controlled by lower nibble of bank select register (BSR)
  • RAM from 0x20–0xFF is banked, controlled by upper nibble of BSR
  • Direct memory-memory moves are possible if one of the registers is in the range 0–0x1F
  • The W register now has an address (WREG = 0x0A)
  • MOVF f,W is replaced with MOVFP f,WREG
  • A few instructions unconditionally write f, and may optionally write W as well
  • One-step compare-and-skip instructions have been added
  • Operations have been added to read and write program memory. They copy bytes to the high or low half of a 16-bit table latch (TBLAT), performing 16-bit transfers to program memory before reading the low byte or after writing the high byte. Optionally, the TBLPTR is also incremented.
PIC17 16-bit instruction set (PIC17C42/42A/43/44/CR42A/CR43 Datasheet)
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)[reply]

  • @Ohayo: Even if the PIC17 was not as successful commercially, it still introduced a number of features and was a step in the development worth mentioning. Also, why did you delete the Milandr clones as "illegal"? Milandr got an ARM license, so it stands to reason that they obtained a license from Microchip as well (even though I could not find a reference for that). Drahtlos (talk) 02:41, 22 October 2017 (UTC)[reply]

Remove Instruction Tables[edit]

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)[reply]

I don't think lists of opcodes are notable enough to be articles in a general purpose encyclopedia. Wikipedia is not a textbook and enumeration of the opcodes for every variant of a processor is padding. We love padding on Wikipedia, though; padding looks just like an article to a bot, so no-one minds it. The manufacturer can darn well pay to support his own web site with developer information on it. Mind, I'm a dangerous heretic (as labeled above) and a well known disruptive editor, so you ought not to ask my opinion. --Wtshymanski (talk) 17:35, 12 January 2015 (UTC)[reply]

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)[reply]

. All current models use Flash memory[edit]

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)[reply]

This article (especially parts about hobbyist use) seems to be stuck in mid-00s. 32-bit ARM microcontrollers are 'the thing' now with PICs becoming more and more irrelevant every year because they lack decent tools like gcc and the architecture itself is ancient (memory banking? really?). — Preceding unsigned comment added by 37.26.194.193 (talkcontribs) 18:32, 26 September 2017 (UTC)[reply]
Moore's Law applies to all architectures, including PIC. Talk to some devoted PIC developers today and they'll simply say the same thing about how much PICs have progressed in a similar time. "Decent tools like 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)[reply]

PIC14 missing[edit]

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)[reply]

Programming hardware[edit]

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)[reply]

I've never used a big machine for this. Mostly I used very small machines - couple of chips with a ZIF socket, plugged into a laptop. This last time I used a 'big machine' for this it was before PICs, and was an Intel MDS, a 'big blue cube' [2]. Later (with PICs) I'd have used something medium-sized like a Softy S4.[3] Andy Dingley (talk) 19:52, 23 March 2020 (UTC)[reply]
Delt01, are you perhaps talking about the kinds of machines pictured in the Programmer (hardware) article? --DavidCary (talk) 01:43, 20 January 2023 (UTC)[reply]

Pic microcontroller[edit]

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)[reply]

Shipment Volumes[edit]

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)[reply]

I agree -- I also would like a better source than a press release. However, the statement in the body of this Wikipedia article seems correct to me -- Microchip ships over a billion microcontrollers every year, whichever way you interpreted that confusingly-worded press release. I see you interpreted it as "a billion units going to one customer, with total shipments considerably higher" (which seems unlikely to me); but it could also be interpreted as "a billion units total shipments, with one particular unit (the 12 billionth one shipped) going to this particular customer" (which seems more likely to me). --DavidCary (talk) 22:24, 16 February 2023 (UTC)[reply]