Xerxes3rd / MonsoonRS400Controller

Replacement Arduino controller code for the Exo Terra Monsoon RS400.
1 stars 0 forks source link

PIC Microcontroller Identified #1

Open jwettroth opened 9 years ago

jwettroth commented 9 years ago

Enjoyed your write-up and fix for the misting system. I like your solution with the AVR and the final product with the LCD is much more practical and better looking- the manufacturer should pay you a reward!.

I took it as sort of a puzzle to see if I could figure out what the original PIC was. It "might" be of use to others that want to fix the unit with just a brain transplant. I went to the Microchip site and put it what I knew or had a good guess on: 8 bit pic, some ADC's, 18 dip and came up with a short list.

The cheapest and most likely of these is the PIC16C716 though there are others. The thing that might have thrown you off is that the designer tied some unused port pins to Vcc and Gnd making it ambiguous what the function was. Power Pins: Vdd is pin 14 and Vss is pin 5 Link to datasheet- http://ww1.microchip.com/downloads/en/DeviceDoc/41206B.pdf

In my search I found the following board from Sparkfun for a basic 18 pin pic - it sort of show in schematic form what you've got. It looks like RA2, RA3 are unused. Link to board- https://www.sparkfun.com/datasheets/PIC/PIC-P18N-sch.gif

Thanks for the diversion and thanks for sharing

Xerxes3rd commented 9 years ago

Thanks for the feedback, it was a fun project! I'm not too familiar with PICs, so I appreciate the input. From the datasheets of the PIC16F1826 and the PIC16C716, the pinouts of the 18-pin PDIP chips appear to be mostly identical (Vdd on 14, Vss on 5, XTAL on 15 and 16, etc). I'm guessing the PIC16C716 is more common than the PIC16F18 family?

It would be cool to figure out a way to reprogram the PIC while it's in the circuit. I looked at doing that for a bit, but it appeared to require cutting some traces to allow the programmer to be connected. In hindsight, I should've documented the schematic of the original circuit before tearing it apart. =)

jwettroth commented 9 years ago

Like I said, there are tons of 18 pin pics. A few are very common in hobby stuff but neither the 1826 or 716 are particularly common. You pick your features, ROM, RAM and get one. In a lot of cases, the internal die inside the part is the same and used for multiple external part numbers. I'm in the chip business and this one of the dirty secrets that you learn. You make parts that are sort of a superset, create part numbers and if a users starts to use a bazillion, they will spin the design and make one that is optimized (cut down) for you. Its a psycological thing and people don't like to pay for stuff they don't need though it doesn't matter that much to the vendor...

The schematic link for the sparkfun board shows an ISP connection at the upper right- this is what's required to plug in something like a PICKIT2, etc. Usually, if the pins aren't too heavily loaded, you can program in circuit- this is probably what the MFG did, look at the circuit and you'll find that you can probably get away with driving pins. If you need a little help, let me know.

Take Care,

John

From: Xerxes3rd [mailto:notifications@github.com] Sent: Friday, May 15, 2015 1:59 PM To: Xerxes3rd/MonsoonRS400Controller Cc: jwettroth Subject: Re: [MonsoonRS400Controller] PIC Microcontroller Identified (#1)

Thanks for the feedback, it was a fun project! I'm not too familiar with PICs, so I appreciate the input. From the datasheets of the PIC16F1826 and the PIC16C716, the pinouts of the 18-pin PDIP chips appear to be mostly identical (Vdd on 14, Vss on 5, XTAL on 15 and 16, etc). I'm guessing the PIC16C716 is more common than the PIC16F18 family?

It would be cool to figure out a way to reprogram the PIC while it's in the circuit. I looked at doing that for a bit, but it appeared to require cutting some traces to allow the programmer to be connected. In hindsight, I should've documented the schematic of the original circuit before tearing it apart. =)

— Reply to this email directly or view it on GitHub https://github.com/Xerxes3rd/MonsoonRS400Controller/issues/1#issuecomment-102472544 . https://github.com/notifications/beacon/ALCADixn0bbMHxMT-DH9bBQMCTOB7-dLks5oJitQgaJpZM4Eb84z.gif

Xerxes3rd commented 9 years ago

Interesting. Look at the board pictures again, it looks like pin 12 (ICSP clock) is connected to one of the buttons, and (I think) to a pull-up resistor. Pin 13 is connected to the output of the IR receiver. The PICKIT 3 guide states that the ICSP clock and data lines in the PICKIT have internal pull-downs, and connecting these lines to pull-ups will disrupt voltage levels. The MCLR pin (pin 4) has a 10K resistor to ground, whereas the PICKIT manual states that this line should have a pull-up on it.

I'm guessing this would mean that in order to program the chip in-circuit, I'd need to remove the resistors on the MCLR and ICSP clock pins?

Also, do you know if the PICKIT would identify a chip it's connected to, or would I already have to know the chip model beforehand?

jwettroth commented 9 years ago

That would probably be easiest at this stage.

Often, high impedances like 10k can be overdriven- look at the sink and source currents and maybe the schematic of the programmer. A 10K pulldown can be easily pulled up with anything less than about 3K or a few ma of source current, etc. Some things are done ISP, they're done by the distributor before they're put in the board. Another easy option is to add a socket and then a sort of verictal jumper socket that can isolate the pins you need for isp. You use your jig during development and debug and then remove and plug the part into the socket. Emulator companies used to make socket stacks with dip switches at every pin to isolate pins for various purposes.

I found one for a PLCC (link) but couldn't find one for a dip. http://www.emulation.com/catalog/off-the-shelf_solutions/logic_analyzer-scope_adapters/bug_isolator/plcc-qfp/plcc-qfp.cfm

Just get two 9 bit dip switches and a couple of nice sockets and you could make something like this.

Regards,