I picked up an old KVM switch which is of no use to me but had lots of socketed chips inside. Four of these chips are PIC16F873-04/SP. enter image description here
The data sheet for these is this sheet
Is there any way I can program and make use of these pulled chips? I am 100% new to anything PIC or chip based, however know about electronics.
-
\$\begingroup\$ If you want to learn about microcontrollers, pick something modern like ARM instead. There's no merit in studying microcontroller archaeology. \$\endgroup\$Lundin– Lundin2017年12月12日 10:14:10 +00:00Commented Dec 12, 2017 at 10:14
-
1\$\begingroup\$ Btw be extra careful not to use parts that are older than the serial ICD era. Before the 2000s, everyone did programming over horrible, manufacturer-specific crap with x pins that should be pulled this way or that, parallel programming, exotic programming voltages well over 5V, mysterious UART boatloaders etc etc. Not to forget external LVD/brown-out protection that had to be designed by you. This was all just TRASH and I would love to never work with any of it again. Modern parts use JTAG or similar serial interfaces that just work without problems and you don't have to care about how. \$\endgroup\$Lundin– Lundin2017年12月12日 15:05:06 +00:00Commented Dec 12, 2017 at 15:05
2 Answers 2
Yes, you can erase and program these chips. The program will be read-locked but it can always be fully erased.
The development environment is free (MPLAB-X) and you can get a demo mode XC8 compiler from Microchip for free (does not optimize in free/demo mode), or use assembly (quite easy for small programs, more fiddly as you run into banking).
To erase and program the chips physically you need a programmer which you can make or buy. A Pickit 3 clone is about 10ドル from China, or there are many ways to make a simple programmer, including with an Arduino and no additional hardware for LVP (low voltage programming), however it may not work on those particular chips since they are not virgin and may have LVP disabled. Full-function programmers put a relatively high voltage on the /MCLR pin. In the more recent (relatively speaking) PIC16F8*** parts such as this one, the high voltage is merely an input state and is not used directly to program the flash memory cells- another high voltage is generated internally for that purpose.
Programming specifications for this part are in the document DS39025F. Any voltage from Vdd + 3.5 to 13.5V is acceptable on /MCLR for high voltage programming.
Microchip is still releasing parts in the PIC16 series, and some of the parts developed in recent years have very interesting peripherals such as numerically controlled oscillators, small programmable logic blocks and so on. But generally if you were to pick a PIC to start with it might be the PIC24, PIC32 or PIC18 unless you are designing a cost-sensitive product that cries out for an 8-bit micro.
-
\$\begingroup\$ "8 bit is cheaper" is a 1990s argument. 32 bit ARM M0 are much cheaper than 8 bit junk, and they have been so for at least 10 years. About same chip price as the 8 bit junk, but much more code effective, meaning you get much more memory for the same cash. Not to mention dollar/MIPS. PIC in particular is very expensive, given that it is by far the least code effective core still manufactured. The only reason why anyone professional would use 8 bit MCUs in new designs, is perhaps extreme low power applications. \$\endgroup\$Lundin– Lundin2017年12月12日 10:11:19 +00:00Commented Dec 12, 2017 at 10:11
-
\$\begingroup\$ I can't get that excited about the differences. Usually one or the other will be the clear choice for a given application when you look at total system cost, life cycle and design costs and so on. The market volume is still heavily in favor of 8-bit (unit sales) and about equal (dollar sales) between 8/32. M0+ processors tend to be more 'needy' with multiple power domains, no real EEPROM on chip, 3.6V max supply, low output drive, lack of tight I/O coupling and so on, as well as being more $$ to begin with. At the MCU higher end, eg. M7, ARM Cortex with DSP is fantastic. \$\endgroup\$Spehro 'speff' Pefhany– Spehro 'speff' Pefhany2017年12月12日 14:33:23 +00:00Commented Dec 12, 2017 at 14:33
-
\$\begingroup\$ The main difference is programming. The CPU is slow and programming an 8-bitter is generally painful. You constantly have to micro-manage types and arithmetic, and keep everything at 8 or 16 bit whenever possible. On top of that you get the C language implicit promotion of small integer types = major bug generator. Also all 8-bitters on the market are filled to the brim with oddities. For example PIC stack depth and system clock pre-scaling, up-counting stacks etc etc. \$\endgroup\$Lundin– Lundin2017年12月12日 14:50:59 +00:00Commented Dec 12, 2017 at 14:50
-
\$\begingroup\$ Then there's the issue with more than 65kb address space, where you have to use icky banking mechanisms and "far pointers", which is painful, dangerous and buggy. \$\endgroup\$Lundin– Lundin2017年12月12日 14:51:13 +00:00Commented Dec 12, 2017 at 14:51
-
\$\begingroup\$ 3.3V isn't really an issue unless you are doing automotive electronics, in which case you wouldn't be using a PIC. Rather, 3.3V is an advantage since all other circuits will be 3.3V, no need for buffer circuits and multiple supplies. No true EEPROM can be a problem, although many families have good data flash with small sector sizes. This is mostly manufacturer-specific: some manufacturers decided to drop data flash for reasons unknown, while others have plenty of options there. \$\endgroup\$Lundin– Lundin2017年12月12日 14:57:36 +00:00Commented Dec 12, 2017 at 14:57
You can but I think you are starting from the wrong end. To program and debug them you will need a PIC programmer/debugger pillbox. Also I would suggest you get a breadboard and a power supply. By that time you have spend fifty times more then what you have extracted from the KVM switch and you don't even know if they still work.
Post edit: Just looked at internet, They are no longer pill boxes I see,
-
\$\begingroup\$ I a.ready have a stable 5v power supply and a large breadboard and board wires. \$\endgroup\$DevelopedLogic– DevelopedLogic2017年12月09日 14:30:28 +00:00Commented Dec 9, 2017 at 14:30
-
\$\begingroup\$ And it appears I can with a little work make an arduino I have a programmer \$\endgroup\$DevelopedLogic– DevelopedLogic2017年12月09日 14:32:28 +00:00Commented Dec 9, 2017 at 14:32
-
1\$\begingroup\$ if you already have an arduino, why would you want a couple of decade-outdated PICs? I respect your desire for adventure, but these chips have 128 bytes (not kB!) of RAM, they use a lot more power than their modern counterparts, they are relatively slow, they are awkward to write code for – you're really not gaining anything by recycling these total 1€ worth in ICs. For what it takes in voltage translation and cables to wire up a programmer, you could also just buy a modern Microcontroller... and you'd also be sure that on that new microcontroller, noone burnt the "programming lock" fuse. \$\endgroup\$Marcus Müller– Marcus Müller2017年12月09日 14:39:06 +00:00Commented Dec 9, 2017 at 14:39
-
\$\begingroup\$ I have worked with PIC and Atmel. I don't want to start a flame war but if you are going to use the PIC I wish you lots of luck and patience and more luck and especially even more patience. \$\endgroup\$Oldfart– Oldfart2017年12月09日 14:39:58 +00:00Commented Dec 9, 2017 at 14:39
-
\$\begingroup\$ @user3535598 No Atmel anymore anyway, it's all Microchip. Which should bode well for availability of parts, at least. Sanghi (CEO) is a cool guy and has implemented a very successful strategy. \$\endgroup\$Spehro 'speff' Pefhany– Spehro 'speff' Pefhany2017年12月09日 17:36:49 +00:00Commented Dec 9, 2017 at 17:36