Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Tools
Old 10th June 2007, 06:02 PM   #1
Default PIC 12F629 based logic probe with frequency counter concept.

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?
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com/

Last edited by blueroomelectronics; 10th June 2007 at 06:05 PM.
blueroomelectronics is offline  
Old 10th June 2007, 10:26 PM   #2
Default

Are you the same person who wrote (grin)?
Quote:
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)?
Mike, K8LH is offline  
Old 10th June 2007, 10:35 PM   #3
Default

A somewhat similar concept can seen at
http://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

Quote:
Kit Description.
This is a very simple kit consisting of only three components that an experimeter may quickly wire on a solderless breadboard to test and debug a design. It allows the experimenter to quickly determine whether a point is at a logic one, zero, open or a pulse train. There is no life threatening steel tip. Rather, the user moves a wire from point to point.
The "probe" circuit consists of a programmed PIC12C508A in an 8-pin DIP, a single 100K resistor and an LED with a built in 330 Ohm resistor. Just three components.
When the probe input is at logic zero, the LED is off. When at a logic one, the LED is full on and when open, the LED is dimly lit.
Positive transitions above 20 pulses per second cause the LED to flash at 10 pulses per second. We have verified operation to 10.0 MHz.
In addition two output leads are provided which may be used as clock sources. These supply nominally 1.0 and 10.0 pulses per second. A 330 Ohm series limiting resistor is recommended to protect the PIC if a clock output is accidentally connected to +5 or to ground is and two 330 Ohm resistors are supplied with the kit. This feature may eliminate the clutter of a 555 which many beginners use as a clock.
Note that the unit may be used as both a probe and a clock at the same time.
__________________
Please post questions to the forums. PM's are for personal communication.

BCHS/3v0's Tutorials
Junebug USB PIC programmer kit., USB Bit Whacker,
The 15 Minute Printed Circuit Board! (+drill time)
3v0 is online now  
Old 10th June 2007, 11:07 PM   #4
Default

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
Mike, K8LH is offline  
Old 10th June 2007, 11:43 PM   #5
Default

Quote:
Originally Posted by Mike, K8LH
Are you the same person who wrote (grin)?

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)?
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
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com/

Last edited by blueroomelectronics; 10th June 2007 at 11:45 PM.
blueroomelectronics is offline  
Old 11th June 2007, 12:06 AM   #6
Default

How do you test for an open circuit?
Mike, K8LH is offline  
Old 11th June 2007, 12:22 AM   #7
Default

Quote:
Originally Posted by Mike, K8LH
How do you test for an open circuit?
The theroy is using the using comparator mode 4, the input to the negative goes to the voltage divider R3 & R7 (approx 2.5V) and the CVREF voltage is set for either 3V or 1.5V to determine a Hi or Low signal. I got the idea from the description of the Engineers assistant on the Microchip site.
http://ww1.microchip.com/downloads/e...tes/00689a.pdf
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com/
blueroomelectronics is offline  
Old 11th June 2007, 12:26 AM   #8
Default

Ok, I see. An open wouldn't pull up or down. I'm stupid (grin)...
Mike, K8LH is offline  
Old 11th June 2007, 12:33 AM   #9
Default

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...
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com/

Last edited by blueroomelectronics; 11th June 2007 at 12:47 AM.
blueroomelectronics is offline  
Old 11th June 2007, 01:49 AM   #10
Default

Quote:
Originally Posted by Mike, K8LH
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.
__________________
Please post questions to the forums. PM's are for personal communication.

BCHS/3v0's Tutorials
Junebug USB PIC programmer kit., USB Bit Whacker,
The 15 Minute Printed Circuit Board! (+drill time)
3v0 is online now  
Old 11th June 2007, 01:52 AM   #11
Default

All of it comes in handy at various times. The 12F683 is my favorite 8 pin PIC...
Mike, K8LH is offline  
Old 11th June 2007, 02:23 AM   #12
Default

Quote:
Originally Posted by Mike, K8LH
All of it comes in handy at various times. The 12F683 is my favorite 8 pin PIC...
I take it that's the fully loaded 8 pin PIC?
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com/
blueroomelectronics is offline  
Old 11th June 2007, 09:14 AM   #13
Default

Quote:
Originally Posted by Mike, K8LH
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?
It's a fairly common use for 8 pin PIC's, you can easily use it as a 'super 555'.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is online now  
Old 11th June 2007, 12:28 PM   #14
Default

Quote:
I take it that's the fully loaded 8 pin PIC?
Yes and it is a wopping $1.18US.

Quote:
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.

__________________
Please post questions to the forums. PM's are for personal communication.

BCHS/3v0's Tutorials
Junebug USB PIC programmer kit., USB Bit Whacker,
The 15 Minute Printed Circuit Board! (+drill time)
3v0 is online now  
Reply

Tags
based, concept, counter, frequency, logic, pic, probe

Thread Tools
Display Modes


Similar
Title Starter Forum Replies Latest
Using Oscilloscopes mechie Electronic Theory 9 29th November 2007 10:49 PM
frequency counter SocMatt Micro Controllers 2 15th June 2004 11:52 AM
frequency counter samcheetah Electronic Projects Design/Ideas/Reviews 4 5th May 2004 11:42 PM
Frequency counter range extender ray heady General Electronics Chat 2 11th March 2004 12:12 AM
a simple frequency counter with lcd display tronix_seeker Electronic Projects Design/Ideas/Reviews 5 23rd February 2004 06:13 PM



All times are GMT. The time now is 03:08 PM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker