Searching \ for '[PIC]: 16F84 and Analog2Digital conversion' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/ios.htm?key=analog
Search entire site for: '16F84 and Analog2Digital conversion'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: 16F84 and Analog2Digital conversion'
2002\04\18@114834 by Byron A Jeff

face picon face
On Thu, Apr 18, 2002 at 05:12:14PM +0200, Raymond Mouthaan wrote:
> Hello there,
>
> I have found a circuit which does A2D conversion (see attachment). Does anyone know how this works?
> I don't know what the pins of the 16F84 (circuit) do, how the software looks like.
>
> Hopefully you kan help me out.

Well let's roll back about 10 steps. What is it that you want to do?
As I've been pointing out over the last several months, the 16F84 was pretty
cool and useful hardware for its time. However because of its hardware
limitations folks often had to create external hardware solutions or innovative
and/or convoluted software solutions to solve problems.

If this is a learning exercise, then certainly have a go at it. However if
you simply need an A/D converter, then you're looking at the wrong PIC.

Take the PIC 16F872 for example. Twice the program memory, nearly twice the
RAM, more hardware (USART, 3 timers, capture/compare, PWM, I2C/SPI), and
most importantly a 5 channel 10 bit A/D converter. It also carries more I/O
than the 16F84 and can both be low voltage programmed and self programmed,
neither of which the 16F84 can accomplish.

By the way it's cheaper than the 16F84 and 16F84A in both small and large
quantities.

So if the task at hand is trying to solve a problem that uses A/D, I would ask
"How does A/D work on 16F872's?" instead of "how does this somewhat
complicated external A/D converter work on the 16F84?"

Good luck on solving your problem.

BAJ

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\04\18@121133 by Olin Lathrop

face picon face
>>
I have found a circuit which does A2D conversion (see attachment). Does
anyone know how this works?
I don't know what the pins of the 16F84 (circuit) do, how the software looks
like.
<<

This appears to be using the opamp as an integerator and apparently
measuring the time it takes the intergrator output to pass a threshold.  I
don't like this because there can be large variation in logic threshold
levels on the PIC inputs.  The 16F628 has comparators which would be better
because they can be set to flip at well defined voltage levels.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\04\18@134501 by Raymond Mouthaan

flavicon
face
Hello Byron A Jeff,

Thank you for replying. I thought it myself to use a different controller.
But the thing is I don't know if my programmer can be used for the 16F872.
My programmer is a "simple" COMport programmer.

The attachment contains the circuit of it, maybe you can have a look to it
and see if I still can use it.
If not maybe you know a different circuit (I do prefer COMport circuit).

Thanks,

Ray


{Original Message removed}

2002\04\18@142239 by Byron A Jeff

face picon face
On Thu, Apr 18, 2002 at 07:42:33PM +0200, Raymond Mouthaan wrote:
> Hello Byron A Jeff,
>
> Thank you for replying. I thought it myself to use a different controller.
> But the thing is I don't know if my programmer can be used for the 16F872.
> My programmer is a "simple" COMport programmer.

It rarely matters. any hardware that can program a 16F84 can program a 16F87X
or 16F62X part.

The only tricky part is the programming software. Since most every part has
more program memory, the programming software may run into trouble if your
program exceeds the original 1K memory limit that the 16F84 has.

>
> The attachment contains the circuit of it, maybe you can have a look to it
> and see if I still can use it.
> If not maybe you know a different circuit (I do prefer COMport circuit).

No attachment in either post.

I developed the TRIVIAL LVP Tail style parallel programmer precisely for
simple programming tasks. You can find it here:

http://www.finitesite.com/d3jsys

BAJ

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\04\18@204417 by Russell McMahon

face
flavicon
face
> I have found a circuit which does A2D conversion
> (see attachment). Does anyone know how this works?
> I don't know what the pins of the 16F84 (circuit) do,
> how the software looks like.

________

The design is arguably a little confused.
The end of the 4n7 that goes to would be better going to ground.

Pin A is an input, Pin B an output.

Valid input voltage ranges are 0 to Vcc
The circuit workds as follows.The TLC272 is (used here as) a comparator that
thinks its an integrator :-).
The non-inverting (+) input of the comparator is held at hald supply by the
2 x 100k voltage divider.
The software endeavours to hold the comparators inverting (-) input at the
same level. When the - input is too high the TLC output goes low and when -
input is too low the TLC output goes high. The software can adjust pin B
high or low to raise or lower the voltage on the + inpu

The voltage on the + input is provided by a voltage divider between the
input and pin B.
If the opamp did not operate the time constant of the cct would be formed by
(100k//100k) & 4n7 ~~= 1/4000 sec = 250 usec. As the processor can switch
pin B high or low at a much faster rate than this it can alter the voltage
on the + input after it has changed only very slightly.

If the 4n7 was connected to ground as above the software could EITHER
provide a simple PWM signal that equalised the time that pin A was  high and
low OR more likely simply drive pin B to always match pin A level. Averaging
the resultant 0's and 1's allows you to determine the input voltage. This is
SIMILAR to a sigma delta converter.

Connecting the 4n7 as shown actually complicates matters as the comparator
now thinks it is an opamp (which it is entitled to as it IS in fact an opamp
:-) ) and will slew as an integrator. There will now be an indeterminate
period when pin B is near half supply and whether it is high or low is
uncertain. Using the opamp as a comparartoir as above will almost certainly
produce a more certain result.


   Russell McMahon

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\04\18@220406 by Byron A Jeff

face picon face
> Here is the attachment to........Sorry

It's a typical serial port driven PIC programmer. There are a few things that
I don't like about it right off the bat.

* As with all serial port programmers it trusts that that PC serial port is
going to generate legitimate RS-232 voltages. However many serial port,
especially laptop ones, cheat by outputting voltages less than the +12 and -12
volts in the spec.

* Personally I'm not thrilled about trusting the PIC's clamp diodes to
 protect the part from out of spec voltages on RB6 and RB7. It would have
 been better if external clamp diodes, like zeners, were used to limit
 the voltage.

* The circuit trusts that the +5 output of RB7 will be sufficient to drive
 CTS. The voltage drop over a moderate length cable could cause problems.

But as I said in my other post, if it programs a 16F84 then most likely the
other PIC parts will have no problems.

My advise is to take a look at David Tait's FPP located here:

http://people.man.ac.uk/~mbhstdj/piclinks.html

in addition to being able to program my Trivial LVP programmer, FPP can easily
be configured to drive most any parallel or serial port hardware. Simply setup
the correct pin configurations and off you go.

BTW the Trivial LVP can be found here:

http://www.finitesite.com/d3jsys

Hope this helps.

BAJ

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


More... (looser matching)
- Last day of these posts
- In 2002 , 2003 only
- Today
- New search...