PIC 12F629 based logic probe with frequency counter concept.

Status
Not open for further replies.

blueroomelectronics

Well-Known Member
As a cheap & cheerful kit aimed at less than $10 I'd like to build a simple logic probe and frequency counter using the minimal of parts. Of couse the counter will not be accurate beyond the RC calibration of the 16F629 but should give an indication of something running

I'll add the caps to the design 10uf & 0.1uf of course.

Opps MCLR & VDD are reversed, I'll fix that too.

Comments?
**broken link removed**
 
Last edited:
Are you the same person who wrote (grin)?
I've never figured out why people use a tiny 8 pin PIC when a larger PIC would do the job better.
Anyway, a couple comments, if I may.

(1) You don't need to tie up a pin to "gate" the counter input. Gate the counter input by changing the pin from an input to an output. Actually, since you're using TMR1 instead of TMR0, you could probably just toggle the TMR1ON bit.
Code:
 ;
        movlw   TRISIO          ; TRISIO register address         |B0
        movwf   FSR             ; setup indirect access           |B0
;
;  perform new 200-msec count
;
        bsf     INDF,GP1        ; T1CKI gate 'on' (input)         |B0
        DelayUS 200000          ; delay 200-msecs                 |B0
        bcf     INDF,GP1        ; T1CKI gate 'off' (output)       |B0
(2) Use a 2-pin Red/Green LED to save another pin. Besides, how do you count Red, Green, and Yellow pulses all at the same time (grin).

Now you have 2 pins left over. What other functions can be added (grin)?
 
A somewhat similar concept can seen at
https://www.phanderson.com/logic_probe.html
It is a bit simpiler on the frequency counter end and includes a clock output. It is $2.49

 
While Mr. Anderson's kit isn't that impressive in and of itself, his mention of using it for a 555 replacement is very interesting.

I wonder how many different 555 functions you could emulate with an 8 pin PIC? Perhaps use a pot' for frequency, another pot' for duty cycle, a serial interface to actually see what those settings are (hey, why not? you only need 1 pin). A couple jumpers to select the mode; Astable, One-Shot, etc.

I can imagine several uses for it. What do you think guys?

Mike
 
The comparator is not to gate TMR1 (it has a special gated mode on the 12F629) it's designed to test for an open circuit at low pulse rates. Changing the VREF D/A over two levels should be an indication of Hi, Low or open.

An open condition would leave all LEDs off, Above 3.0V High LED on, below 1.5V Lo LED on.

The amber LED would be flashing with the other two at frequencies above 10Hz

Ie

500 Hz
Green 5 flashes wait
Red 0 flashes
Amber 1 flash wait (multiplier = 1 zero)

82 Hz
Green 8 flashes wait
Red 2 flashes wait
Amber on solid if >10Hz or <100Hz

3 Hz
Red and Green (oversampled using VREF) will attempt to display true data using the comparator mode
Amber off
 
Last edited:
Hey it's a theory, might not work in practice but that's why I posted it.

Just don't dig up my old MyBlueRoom posts (you'll see stupid)

I'll simulate the design with the 16F88 and debugger.

Now the real question are what should TTL High min and TTL Lo max values be?

I've seen 2.0V and 0.8V (VREF = 0.833 & 2.083V) at 5V or slightly lower because of the 0.7V diode drop. Must calculate...
 
Last edited:
Mike said:
While Mr. Anderson's kit isn't that impressive in and of itself, his mention of using it for a 555 replacement is very interesting.
Mike

Never said I was impressed.

When one sets out to design most anything it is a good idea to look at what is already out there. It does provide the clock outputs and another way to deal with pulses/frequency.

For about ten cents more you can move up to the PIC12F683 with twice the mem, 10 bit ADC, and PWM. Not sure if any of that would come in handy.
 

It's a fairly common use for 8 pin PIC's, you can easily use it as a 'super 555'.
 
I take it that's the fully loaded 8 pin PIC?
Yes and it is a wopping $1.18US.

All of it comes in handy at various times. The 12F683 is my favorite 8 pin PIC...
I am sure it does. But I was working in the context of Bill's probe idea.

 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…