Chip with simple program for Toy

thx chris....

adding uc was an option i thought about earlier but d cct handles lots
more function than just keypad reading...tis includes alarm,lcd
interface,relays n stuff...n i hv only 6 IO lines to spare.... besides...
the cct is already made finalize

wht i still dont get is tis

a) how to make a source code that will enable uc read d 5 input taken
from 74c922....74c922 takes in 16 values(from 4x4 matrix) and decode it
into a 4 bit binary code to the uc plus a DA line.....
do i hv to include d conversion table(from 16 to 5) in the program source
code?

b)how do i know
whts d approprite delay time for key bounce routine....if im using an
atmel89s8252..is there a mathematical calculation involved in estimating
it?

c)and finally in c -language....
is library file-> reg52.h, reg51.h and declaration term'sbit'....ANSI
standard...?

when i compile d program it gives me error..cannot define reg 52.h and
term sbit
im using turbo c++ 4.5


:)
 
bb wrote:
thx chris....

adding uc was an option i thought about earlier but d cct handles lots
more function than just keypad reading...tis includes alarm,lcd
interface,relays n stuff...n i hv only 6 IO lines to spare.... besides...
the cct is already made finalize

wht i still dont get is tis

a) how to make a source code that will enable uc read d 5 input taken
from 74c922....74c922 takes in 16 values(from 4x4 matrix) and decode it
into a 4 bit binary code to the uc plus a DA line.....
do i hv to include d conversion table(from 16 to 5) in the program source
code?

b)how do i know
whts d approprite delay time for key bounce routine....if im using an
atmel89s8252..is there a mathematical calculation involved in estimating
it?

c)and finally in c -language....
is library file-> reg52.h, reg51.h and declaration term'sbit'....ANSI
standard...?

when i compile d program it gives me error..cannot define reg 52.h and
term sbit
im using turbo c++ 4.5


:)
Hi, bb. In the data sheet, it shows how to calculate the debounce time
based on the caps selected. Read the data sheet.

You should be able to read the DA bit directly in C. Just jump on zero
or not zero. As far as the 4-bit pushbutton data, you can read the
byte, mask off the bits you don't need, rearrange if necessary (usually
the case -- somehow, it seems to be trivially easy to transpose bits on
a PC board), then shift as necessary to make it the low nybble. Then
just read the data. Or if it takes fewer instructions/time, read the
four bits individually, then multiply/shift as necessary and add to
form the data nybble. Your call.

I don't know the Atmel C compiler you're talking about. If you need
help with code, you might want to go to one of the Atmel groups.

I've found it usually helps a lot to read the manuals and data sheets.
Even if you spend some time looking, that's just a free opportunity to
learn something else along the way.

By the way, please take a chance to glance at this:

http://groups.google.com/support/bin/answer.py?answer=12348&topic=250

and also, please don't use TXT lingo unless you're posting from your
cell phone. Us older cripples find it somewhat obscure. I know -- our
problem, and we'll soon enough be dead. But if fossils can't
understand, fossils can't help, can they?

And it actually sounds more like the TXT lingo poster can't even take
the time or show the respect to express himself carefully. Whether
that's interpreted as panic, extreme hurry, or a lack of respect by the
person who's taking the time to help and craft a response, it probably
won't help the OP.

And a fossil might just answer:

havnt a clue wot U' spoutin', m8. hOp U git out of d car trunk s%n!

( http://www.transl8it.com/cgi-win/index.pl for us fossils out there
;-)

Good luck
Chris
 
hehe....

thank you chris.....understanding the needs of fossil over here( can you
see...all lengthy words-ohmygoditiskilling-but its ok )...

young blokes lik me always in a hurry.....*wink *wink *smile
 
Tim Williams wrote:

Which one "pinches off" the current?

The flat (high drain impedance) region is known as the saturation
region,
because the current is saturated and won't increase with more Vds.
The
linear region is usually under a half volt or so (depending on
transistor),
where current increases in proportion to gate and drain voltages.
(This is
confusingly opposite the terminology used for bipolar transistors,
where the
"switch" is "saturated" in the low-voltage region, and the
high-impedance
region is called "linear" because a linear amplifier operates in
that
region.)

At least that's what I remember. I would just as soon call the
high-impedance region on all transistors the linear region and the
other for
saturation, just for simplicity.

Tim

Oh, but one is _current_ saturated and the other is _voltage_
saturated.
Is it obvious now? :)

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

Posting from Google? See http://cfaj.freeshell.org/google/
 
"James Kelly" <apollo46@warpmail.net> wrote in message
news:UaOdnWamQ_rUr7HZRVnyrg@giganews.com...
Hi,

I've recently moved to London in the UK and brought along my trusty
cooker. It states that it requires 120V @60/1235 watts. After some
research on the net it was apparant that transformers that provide
1000W
are at least the size of a shoebox and around $70-100. However, I
later
came across a transformer sold by jWin which rates upto 1600W and is
as
small as an average 100w transformer and costs about $10. You can
see it
here - http://tinyurl.com/hra3r I called the shop selling them and
they
confirmed the specs.... am I wasting my time? You get what you pay
for
right? Any help would be much appreciated.

James


Take my advice- don't take chances with 240V supplies. It is far
easier to
get a fatal shock from 220/240V than N American 120V supplies,
although
ELCBs are very common now.. Using one of these cheap converters is
dicing
with danger, if a short occurs and damages the converter, full 240V
mains
voltage will be present in your appliance, and because there's
seemingly no
earth on this converter, if there's a short to the oven's case you
could be
killed- it's that simple. Even steam/moisture settling inside the oven
could
bridge from live to chassis causing a shock hazard.

I can tell you by just looking at the picture that this converter is
clearly
not intended for use with apparatus like ovens, and it doesn't appear
to be
intended for use with earthed appliances. Either keep this converter
for a
CD player or shaver, or send it back! I would even go so far as to say
it is
not safe to plug into a UK wall outlet. It will require a UK 3-pin to
'shaver' style converter for starters, which are not intended to be
used for
appliances drawing 5 Amps!


Incidentally, there's also the issue of liability should anything
happen, is
it worth it?

Dave
 
On Tue, 4 Apr 2006 00:29:33 +0100, "techie_alison"
<techie_alison@yahoo.co.uk> wrote:

Hi there,

Just bought one of these to further my dev work;
http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=7605129050

So far I've searched but haven't found out any real information on what I
have bought, would anyone be able to shed some light on it's spec and the
various options included? Has anyone owned or used one of these?

Really just looking for any info at all before it arrives in the next few
days. An engineer friend speaks very highly of R&S so hopefully I found a
bargain?

Thanks kindly,

Aly

Congratulations. You will soon have something that a friend of yours
says it's very good. For me, a bargain is something that fulfills a
need at a very low cost. If you don't even know what you bought, I
doubt that you really had a need.

Best,
 
"Mochuelo" <cucafera@RE_MO_VE_THIStelefonica.net> wrote in message
news:cfg432t15k6pi6fo23ghe67po6gidfvjli@4ax.com...
On Tue, 4 Apr 2006 00:29:33 +0100, "techie_alison"
techie_alison@yahoo.co.uk> wrote:

Congratulations. You will soon have something that a friend of yours
says it's very good. For me, a bargain is something that fulfills a
need at a very low cost. If you don't even know what you bought, I
doubt that you really had a need.

Best,
Oh I have a need alright, just not an endless bank balance. I obviously
know what a logic analysis is, just as I do a digital scope. There's NO
information on this product out there. It's like buying a car when you
don't know what size engine it has, how fast it goes etc. etc.

I'm just looking to find someone who either has one of these models or has
used one, ie. someone who has some info?? Other people I'm not looking for.
:)
 
sorry forgot to connect pin 12 to ground..however my values for the
said pins are now equal

pin 5,4,3 an2 = 80mV

please help
 
On Thu, 06 Apr 2006 06:46:24 GMT, John Doe <jdoe@usenet.love.invalid>
wrote:

"JAD" <kapasitor earthcharter.net> wrote:
nothing worth repeating

A top posting troll who's been corrected for giving bad advice more
than once, and just can't handle it.
Same thing happened when I was having a discussion with D.Maynard.
JAD jumped to defend him, someone who "can't cope with dissension.
When someone disagrees with him, he immediately resorts to attacking
their character". Other things he does: denies what he just said, or
changes the topic.

Geo
 
electro wrote:
sorry forgot to connect pin 12 to ground..however my values for the
said pins are now equal

pin 5,4,3 an2 = 80mV

please help
Are you sure that the chip is functional? Did you possibly damage
something by accident when you didn't have the ground connected?

When faced with unexpected results, I try to back up and see if I can
get things working in a known environment. What I am trying to say
here, is perhaps you are biting off too much unknown in one pass. Try
implementing the F-V converter on the bench, using one of the sample
circuits in the data sheet and see if you can get "good" results that
way first.

The LM2917N has been around a long time and should be a reliable
device. I was planning on using one in the project I am working on,
but the requirements were changed on me and I no longer need the
functionality of it, otherwise I would offer you better specifics on
the circuit implementation.
 
electro wrote:
im trying to explore the operation of the chip in zener regulated F>V
circuit with 250mVpp @ 1khz,12V Vcc as prescirbed in the datasheet.my
threshold levels are rated +-50mVpp so im quite sure that proper output
Voh(8.3) and Vol(2.3) shoudl be produced at pin 2 or 3...
my R1 is 100k C1 is 20nF and C2 is 1uF and a 10k transistor
output(pin5)...

my problem is:

1.my reading at pin 2 is 580 mVdc max
2.my reading at pin 3 is 520mVdc max
-> shouldnt it be equal to ic x R1 = 185uA x 100k = 18.5V where my ic
or I2=I3 is rated to be about 185uA @ 25degree celsius as based from
the datasheet graph
3.my reading at pin 5 is 420mVdc max
-> the output voltage which says Vout = 66Hz/volt is nowhere to be
attained. changing the input frequency from my function gen. doesnt
alter the Vout in anyway...why?
4.my application is in metal detedector. i have a lc tuned oscillator
and i want to use the frequency change as my indicator of metal
presence as opposed to "mixing"...or dou you have any other way to do
this? meaning a simple switch in which when a certain threshold
frequency is attained, it outputs a certain voltge level?

thanks!
help please!

sorry forgot to connect pin 12 to ground..however my values for the
said pins are now equal

pin 5,4,3 an2 = 80mV

please help
Hi, Electro. It looks like you're doing the 14-pin version of the app
circuit, "Zener Regulated Frequency To Voltage Converter" on the top of
p.9 of the data sheet.

It _does_ work. That happens to be the first one I tried the first
time I got the IC.

You can't expect an output voltage greater than the supply voltage in
this circuit -- actually, your maximum frequency should be about 360Hz
(Vz - 2V * (1V/66Hz) ). Anything over that will show about 5.5V.

Here's what to do. First, turn the power off. Then, copy the circuit
shown on p.9 on a sheet of paper, and transpose the pin numbers for the
14 pin IC. Make a Xerox of your artwork. Now get a cup of coffee and
think about something else for 10 minutes. Once your mind is fresh,
re-trace your wiring point-to-point, using a colored marker to track
out each node of the circuit on a piece of paper. Once every line is
colored in, you know the circuit is wired correctly. It's important to
draw out the entire circuit before you wire it up.

You have already indicated that you had at least one wiring problem.
Sometimes running an IC without the GND pin (12 on this IC) connected
is fatal, sometimes not. You'll definitely have some interesting
current paths.

I don't know if you remembered that the 8-pin version has the charge
pump connected to the input of the output op amp, where you have to
make that connection externally with the 14-pin version. If you
haven't made this connection (pin 3 to pin 4 on the 14-pin IC), that
might be the source of your problem.

If you triple-check the wiring, and it still doesn't work, there's a
possibility you smoked the IC. Try a new one and see if it works.

You haven't given enough information to determine whether this is the
way to go here. Metal detectors typically operate at RF (radio
frequency). This is too high a frequency for the LM2917 to detect.
Are you mixing your sensing signal with a known oscillator frequency?
I know it's sometimes easier to read a meter than listening, but your
ears are very sensitive to small changes in tone, actually much better
than a voltmeter. Not only that, but your ear can normalize for slow
drift in the reference frequency, where you'll have to be constantly
nulling the voltmeter. There's a reason why most of these circuits use
an output tone.

Do you have a link, or can you provide a schematic for your proposed
circuit?

Good luck
Chris
 
thank you for your kind thoughts...
yes im referring to the zener F>V converter circuit

initially, i made a circuit that operates in mixing mode.i have a fixed
oscillator of about 480khz and then another one
with almost the same frequency and is made variable by the loop
inductance..my problem however was that i cant get
my signal mix or extract the difference signal. i tried single ended
bjt mixer as well as diode but cant get a good output..
also, i would like to indicate metal presence not by an audio tone but
by a pic mcu.my initial setup was to rectify and extract
the input frequency and input it to my pic mcu which is then compared
to a reference voltage which will be pre-calibrated.
but having found of chips that can do frequecny to voltage conversion,
i opted for this chip now...
my application is very simple.i will just calibrate my pic reference
voltage and then from there any change in frequency will correspond to
a certain voltage...
these are my problems:
1. the maximum input frequency based on datasheet is fmax =
I2/(C1xVcc)...from datasheet, for a supply voltage of 12V,my I2=I3 is
about 185uA..also, C1 should be at least 500pf due to timing
considerations...so that will give me about 30.8khz maximum..my plan is
to further increase my loop inductance to b e in the range of
20-30khz.now my question is how sensitive will this be with the
presence of metal?
2.what waveform will i expect from pin 2 and 3?
I2 is mirrored to I3 right? isnt it i should be seing a waveform in
which its voltage changes from about 8.3 then discharges to about 2.3
which indicated the Voh and Vol for the pin3?
3.my Vout should be varying when i vary my input frequency right?
it seems im not gettng the sensible outputs.....
please help...
_i connected pin3 and 4

lastly,

any idea on a simpler way to realize my application?
 
electro wrote:
thank you for your kind thoughts...
yes im referring to the zener F>V converter circuit

initially, i made a circuit that operates in mixing mode.i have a fixed
oscillator of about 480khz and then another one
with almost the same frequency and is made variable by the loop
inductance..my problem however was that i cant get
my signal mix or extract the difference signal. i tried single ended
bjt mixer as well as diode but cant get a good output..
also, i would like to indicate metal presence not by an audio tone but
by a pic mcu.my initial setup was to rectify and extract
the input frequency and input it to my pic mcu which is then compared
to a reference voltage which will be pre-calibrated.
but having found of chips that can do frequecny to voltage conversion,
i opted for this chip now...
my application is very simple.i will just calibrate my pic reference
voltage and then from there any change in frequency will correspond to
a certain voltage...
these are my problems:
1. the maximum input frequency based on datasheet is fmax =
I2/(C1xVcc)...from datasheet, for a supply voltage of 12V,my I2=I3 is
about 185uA..also, C1 should be at least 500pf due to timing
considerations...so that will give me about 30.8khz maximum..my plan is
to further increase my loop inductance to b e in the range of
20-30khz.now my question is how sensitive will this be with the
presence of metal?
2.what waveform will i expect from pin 2 and 3?
I2 is mirrored to I3 right? isnt it i should be seing a waveform in
which its voltage changes from about 8.3 then discharges to about 2.3
which indicated the Voh and Vol for the pin3?
3.my Vout should be varying when i vary my input frequency right?
it seems im not gettng the sensible outputs.....
please help...
_i connected pin3 and 4

lastly,

any idea on a simpler way to realize my application?
If you want to operate a metal detector at low frequencies, you'd
better bring a plastic wheelbarrow to carry the thing. You'll need a
lot of windings to get the inductance you'll need for a large air coil
to oscillate at lower frequencies.

Small pieces of metal will make small changes in the oscillating
frequency -- possibly tens or hundreds of Hz out of hundreds of KHz. A
tenth of a percent or less. Dividing it down to a frequency accessible
by a PIC will mean you lose the information you need.

Metal detection is inherently an RF enterprise -- hate to say it, but
get used to it. It's an analog world. And the LM2917 is made for
tachometer-speed applications (RPMs rather than KHz).

If you really want a voltage output, get the beat frequency oscillator
working, and then work on changing the audio beat frequency into a
voltage. You can do that easily by using a comparator to change the
audio into a digital output, and then use a 555 to output a brief pulse
for every beat oscillation. You can then use an R-C filter to get a DC
voltage you can read with a meter or your PIC. You also might want to
try just counting the beats with a PIC, but that will have limitations,
too. You have to watch out for maximum frequency.

If you are allergic to the whole mixer concept, you might just want to
get a handheld frequency counter, and pick off the RF oscillator
output. Inexpensive handheld frequency counters can give you the
resolution you'll need, but it gets tiring looking at the display. The
idea is to wander blithely down the beach waving the finder back and
forth, and having an excuse to scope out the scenery while you're
nominally being industrious. ;-)

Good luck
Chris
 
i have a working lc tuned oscillator now.my loop is about 5 inches wide
with 20 windings,im getting a 37.9uH
from that setup...can i simply port that to the ADC unit of my
PIC876A?how will the digital value relate to my frequency?
also, since resonance is dependent on capacitor and inductor, why cant
i select capacitor values and still have a tolerable amount of
inductance air coil winding?

thanks!
 
electro wrote:
i have a working lc tuned oscillator now.my loop is about 5 inches
wide with 20 windings,im getting a 37.9uH
from that setup...can i simply port that to the ADC unit of my
PIC876A?how will the digital value relate to my frequency?
also, since resonance is dependent on capacitor and inductor, why cant
i select capacitor values and still have a tolerable amount of
inductance air coil winding?

thanks!
maybe you first read up a bit how such a thing works. when you have 400kHz
oscillator, it will maybe change its frequency 100Hz with a big chunk of
metal, lets say a treasure buried a few inches below ground, that is 0.025%.
http://home.clara.net/saxons/bfo.htm that is why another oscillator is used.
It is very easy to mix the two outputs, just with resistors.
Since both oscillators are similar the frequency drift gets cancelled and
you can listen to the more stable beat frequency. A PIC will not help, when
you do not have the front end right.
--
ciao Ban
Apricale, Italy
 
or cant i use the built-in comparator of my pic...sine i have a sine
wave signal at zero dc offset,
i will count the interval between successive zero crossings that is i
will set my zero volt level as my reference...
will that be possible?
 
On Fri, 28 Sep 2001 16:36:49 -0600, "bg" <bmge@xmission.com> wrote:

Some electronic equipment ties one side of the power cord to the chassis.
Imagine what happens if your TV has the hot side connected to the chassis
and the VCR has the low side connected to the chassis. Big smoke right ,
when you connect the two together with a video cable or your hand. If an
isolation transformer(s) was used in this case, a direct connection across
the power line would not be possible.
bg
Winston Goh wrote in message <3bb4ba9e$1@news.starhub.net.sg>...

The questiion now is how does it serve as an safety device? I am using one
with an open classis monitor and the manual say an isolation devices is
required as it will save my life if I ever touch anything that is live, but
I still don't get it.


remove zzz to email
 
What I have is a PWM logic signal that varies between 0 and nearly +5v,
in frequencies ranging from really slow to about 1Mhz. There's only
about 5ma available.

Why? What's the criteria for "really slow"?
OK... what I hope to have here is 9 or so PWM outputs, driven by
configurable timers (x count ON, y count OFF, repeat). It'a a Diamond
GPIO-MM board.

Some of these PWM outputs I want to use to generate audio tones. The
timers are 16 bits wide and count at 4Mhz, so I can get audio down to
about 64Hz. (Hence really slow). Of course, it will be a square wave,
but I expect to fool with resistors and caps to get a slightly less
hard edged audio signal - I just need some audible tones, it doesn't
have to sound wonderful.

4 of the PWM outputs are going to be used to drive an analog dimmer,
which takes in 4 channels of 0-10v and dims or brightens accordingly. I
figure as long as the PWM cycles on and off (at whatever duty cycle) at
about 20kHz or faster, I should have absolutely no trouble getting a
usable output, to make the dimmer happy. (I worry that the frequency
might show up as ripple in the AC output of the dimmer, and below 20kHz
could cause audible "singing" in the light bulbs, which, in this case,
would be really bad.)

I'm a software guy - I want the hardware to be small, cheap, simple to
build, and foolproof. Simple to build is my main criteria. I'm a danger
to society with a soldering iron in my hands. So I'm trying to get this
PWM out, pushed up to 10v, and smoothed with as few components as
possible, with absolutely no risk to the (very expensive) PWM board -
with very little fuss.

For the audio output I can use a ULN2003, which can sink plenty of
current and is capable of driving a small speaker directly. I've done
that before and it works fine. But the dimmer takes 4 control lines, to
be to be varied at 0 to +10v, and a common ground. So for that I need
components that can source voltage - sinking is no good.

Last time I did this I used an LN3900, and it worked, but I see the
part is obsoleted, and I'd like to stick to components that I can
easily replace in 15 years.

On the face of it, this is just "make a square wave bigger", which
sounds like an ideal job for a single transistor. I should be able to
take my PWM signal though a 1K current-limiting resistor and into the
base of, say, a 2N2222, used as an emitter follower with +12v on the
collector and a few K of resistance between the emitter and ground. The
emitter should provide about +11v when the PWM is "full on", and then
I'd expect to take it across a small cap and into the dimmer. A diode
or voltage divider should provide any additional voltage drop I need.

Now I'm not overjoyed with this solution - 4 discrete transistors, 8
resistors, and then there's the RC network to smooth it. A lot of
components. And folk here are warning that it won't work.

I also looked at using an optoisolator (PS2501), which after all is a
lot like an NPN, except that if the dimmer goes haywire and dumps
120VAC back at me, there is less risk to the PWM board. But
optoisolators are slow, and want 5ma to turn on, and have a lifespan
that's just a little shorter than I want for this device. I also looked
at a CMOS buffer, but the 5V output of the PWM board doesn't seem to be
enough to turn it on.

What I'm looking for is

^ +12v
|
----[magic in here]---------------------> 0 to +10v
| |
v =
|
v

where the input is 0/+5v. I imagined that this sort of thing would be
pretty common and there would be an off the shelf IC for it - but I'm
guessing not.
 
If you have control of the PWM, you can adjust your duty cycle in
S/W to limit the positive excursion to 10V. Since the ULN is only
an NPN darlington, your pulses will be inverted, but that can be
fixed in S/W, or you could use a 2803 (8 sections) and double up
on them to get another stage of inversion.

Hm. I do have control over the PWM. I've been so focused on having the
dimmer controlled in 255 steps (I used to use 8 bit PWM for this) that
it didn't occur to me that yeah, I have 16 bits in the timers now, I
can select 256 levels of brightness with an array of on and off
intervals, and what I call "full on" in my code doesn't have to mean
65535 On, 0 off. It can map to something that happens to cut +12v down
to 10v. AND I can calibrate the voltage in software. Of course, if the
sofrware goes mad and stuffs the PWM to full on, I'll dump 12v into the
dimmer and probably fry it. But I code better than that. :)

The ULN2003 won't do it, because it's common emitter and I need common
collector. The last time I looked for a ULN that was common collector,
all I found was obsolete parts. Is there an equivalent?
 
ScottM wrote:
(snip)
What I'm looking for is

^ +12v
|
----[magic in here]---------------------> 0 to +10v
| |
v =
|
v

where the input is 0/+5v. I imagined that this sort of thing would be
pretty common and there would be an off the shelf IC for it - but I'm
guessing not.
I still think you should use LM324 quad opamps to drive the outputs.
Something like: (set your newsreader to fixed width font)
+12
|\|
0 to 5 volt PWM --R--+-------|+\(1/4 of LM324)
| | >--+--out
C +---|-/ |
| | |/| |
gnd | gnd |
+----R1---+
|
R1
|
gnd
R and C set the filter time constant that smooths the PWM pulses. R
can be on the order of 100k ohms, so the loading on the PIC PWM output
is minuscule. R1 can also be on the order of 100k. That's 3
resistors and a capacitor and a quarter of a chip to produce a voltage
output that can source or sink current. This circuit has a zero to 10
volt output for a 5 volt, 0 to 100% duty cycle input.
 

Welcome to EDABoard.com

Sponsor

Back
Top