Pic PIC16F627A Part of a none working kit. - Page 1
Forum section: electronics / general

author: BrainPain
author_rank: Newbie
timestamp: June 08, 2024, 08:12:45 pm
content: Hello,I ordered a frequency counter kit "5 Digits Display Digital Frequency Counter Module 1Hz-50MHz Crystal Oscillator Frequency Counter Tester" I assembled it and it does nothing. I have checked power. My question is,is there a way to check the pic ic "PIC16F627A" with out a "PICKIT PROGRAMER" ? Is there a way to use a Arduino UNO to query the pic with out scrambling what ever is suppost to be programed in to it? I'm just curious if the project can be fixed. I did get my money back and I ordered another kit.Many thanks

author: macboy
author_rank: Super Contributor
timestamp: June 08, 2024, 11:15:30 pm
content: The 627A is an older one and supported by many programmers. You can definitely find an Arduino sketch for uno/nano which acts as a PIC programmer. The old school JDM style DIY programmer also supports this, but many PC's don't have true rs232 serial ports any longer. It only works well with "real" 16cX50 UART based serial ports having +-12V outputs, not with USB adapters.The Arduino sketches will work IF the '627A was originally programmed with LVP (low voltage programming) enabled in the config bits. Otherwise you need high voltage programming mode which requires extra circuitry.

author: BrainPain
author_rank: Newbie
timestamp: June 09, 2024, 01:17:38 am
content: Thank you macboy.

author: Ian.M
author_rank: Super Contributor
timestamp: June 09, 2024, 08:48:53 am
content: That PIC *CANT* be LVP programmed for this application!If LVP is enabled, the pin RP4/PGM is not available for application use.,See:https://www.qsl.net/dl4yhf/freq_counter/freq_counter.htmland:https://github.com/Ho-Ro/DL4YHF-Frequency-CounterRB4 is needed to drive one of the display segments, and there are no spare pins to replace it.Therefore if an Arduino running a PIC programmer sketch, without hardware to provide the approx 13V Vpp that chip needs for high voltage programming, can read the chip, it must not have been programmed with the application firmware.There are Arduino PIC programmers with HV programming support - the easiest approach is to run the Arduino from your bench supply to Vin, and set the supply to the required Vpp for your PIC, then use a P-MOSFET or PNP transistor to switch Vpp to the /MCLR pin, with a 1K pulldown to take it low. It also needs an NPN or a N-MOSFET to level shift from the Arduino pin logic level up to the Vpp supply level.See:https://www.eevblog.com/forum/microcontrollers/cheap-usb-pic16f628-programmer-options/The easiest way to check if they forgot to program this PIC would be to pop it in a breadboard, supplying 5V Vdd and Vss (Gnd), with a 100nF decoupling capacitor between Vdd (14) and Vss (5), with RC oscillator components connected to pin RA7/OSC1/CLKIN (16) and check for a squarewave on pin RA6/OSC2/CLKOUT. If you've got a scope, try RC components of a 5K1 pullup and 100pF to Vss which should give you approx 250KHz on CLKOUT. If not, a 100K pullup and 1nF to Vss will get CLKOUT below 10KHz so you can check it with a crystal earpiece, or (attenuated) to the input of an audio amplifier or with a DMM with a frequency range.If you get oscillation with those components, it means the FOSC bits in the CONFIG word are set to 111 - RC oscillator, their unprogrammed state, and as the application requires 010 - HS Crystal oscillator, its good evidence they forgot to program it!

author: BrainPain
author_rank: Newbie
timestamp: June 09, 2024, 03:50:10 pm
content: Thank you Ian.M