Hardware Recommendations?
Archiver
Posts: 46,084
I bought an MC68HC11 kit from Axiom Manufacturing a while back but couldn't get
it to do what I wanted it to. I am looking for some advice on the best (least
expensive) way to achieve my goal. Is this possible with a single Stamp?
I am trying to measure two inputs at the same time. One is a square wave that
will have a variable frequency and pulse width. I will be keeping track of the
total time that this signal is high. At the same time, I will be counting the
number of pulses coming from another sensor. Based on the readings from these
two signals, I will do some calcs (floating point would be nice, but I could
probably get around that) about every second, and display the results on an LCD.
The problem that I was having with the 68HC11 was that I was missing either the
rising or the falling edge of the square wave so I would then be measuring the
low time instead of high. I am assuming that this is because my calcs were
taking too long. Is there any way to get around this with the 68HC11? Is there
any way to interface a Stamp with the 68HC11 so one can monitor each signal?
Thanks in advance for any input on this.
Joe Furedy
Phoenix, AZ
it to do what I wanted it to. I am looking for some advice on the best (least
expensive) way to achieve my goal. Is this possible with a single Stamp?
I am trying to measure two inputs at the same time. One is a square wave that
will have a variable frequency and pulse width. I will be keeping track of the
total time that this signal is high. At the same time, I will be counting the
number of pulses coming from another sensor. Based on the readings from these
two signals, I will do some calcs (floating point would be nice, but I could
probably get around that) about every second, and display the results on an LCD.
The problem that I was having with the 68HC11 was that I was missing either the
rising or the falling edge of the square wave so I would then be measuring the
low time instead of high. I am assuming that this is because my calcs were
taking too long. Is there any way to get around this with the 68HC11? Is there
any way to interface a Stamp with the 68HC11 so one can monitor each signal?
Thanks in advance for any input on this.
Joe Furedy
Phoenix, AZ
Comments
cheaper than some of the other microprocessors so perhaps two $5.00 pic's
are better than one $35.00 stamp. I'd assume Al Williams might have the
very item your looking for already developed?
David Fixemer
control of the finished product, but the trade-off is the time and effort
needed to develop it. If you know up front a stamp won't do what you want,
then the decision is obvious.
Something to be aware of is that a $5 PIC requires programming software and
hardware. A friend of mine does 80c51 stuff in his sleep, and he has a $250
emulator and a $600 C compiler package, not to mention a $50 burner for the
chips. When you buy a stamp, you are paying for their development. I think
its a pretty sweet deal.
Just to give you an idea of the time involved, he spent 20+ hours writing
code to drive an H-bridge module for a custom motor controller -- and this
does not include any speed feedback or high-level commands like a MotorMind
B. In less than half the time, I had my bot moving around and avoiding
walls.
For me, the fun of building the robot is in the mechanical hardware. I gave
up writing serious low-level code when IBM 360/370 assembler was still
widely used. If I had to write all of the operating code in C or assembler,
chances are I would not want to waste my time.
Original Message
> I really have no idea what I'm talking about, however, PIC's are much
> cheaper than some of the other microprocessors so perhaps two $5.00 pic's
> are better than one $35.00 stamp. I'd assume Al Williams might have the
> very item your looking for already developed?
The task definitely will require an external timer chip, either the
'HC11 or a PIC or SX chip. You didn't say how fast the signals were,
but if the chip does not have to do anything else but watch the two
input signals and the timer, it should be possible to write a very
tight polling loop. The SX chip is very good for these tight timing
loops, because of its turbo mode. See Steve Parkis' TM1 chip at:
http://home.earthlink.net/~parkiss/
Once per second, the special chip could send the counts to the Stamp
via RS232 at a high baud rate, and the Stamp could do the
calculation/display. The Stamp does not do floating point, but there
are workarounds.
-- regards,
Tracy Allen
electronically monitored ecosystems
http://www.emesystems.com
>I bought an MC68HC11 kit from Axiom Manufacturing a while back but
>couldn't get
>it to do what I wanted it to. I am looking for some advice on the best (least
>expensive) way to achieve my goal. Is this possible with a single Stamp?
>
>I am trying to measure two inputs at the same time. One is a square wave that
>will have a variable frequency and pulse width. I will be keeping
>track of the
>total time that this signal is high. At the same time, I will be counting the
>number of pulses coming from another sensor. Based on the readings from these
>two signals, I will do some calcs (floating point would be nice, but I could
>probably get around that) about every second, and display the
>results on an LCD.
>
>The problem that I was having with the 68HC11 was that I was missing
>either the
>rising or the falling edge of the square wave so I would then be measuring the
>low time instead of high. I am assuming that this is because my calcs were
>taking too long. Is there any way to get around this with the
>68HC11? Is there
>any way to interface a Stamp with the 68HC11 so one can monitor each signal?
>Thanks in advance for any input on this.
>Joe Furedy
>Phoenix, AZ
Hi Joe,
The task definitely will require an external timer chip, either the
'HC11 or a PIC or SX chip. You didn't say how fast the signals were,
but if the chip does not have to do anything else but watch the two
input signals and the timer, it should be possible to write a very
tight polling loop. The SX chip is very good for these tight timing
loops, because of its turbo mode. See the TM1 chip at:
http://home.earthlink.net/~parkiss/
Once per second, as determined by the timer on your chip, it could
send the counts to the Stamp via RS232 at a high baud rate, and the
Stamp could do the calculation/display. The Stamp does not do
floating point, but there are workarounds.
-- regards,
Tracy Allen
electronically monitored ecosystems
http://www.emesystems.com
> From: "jfuredy" <jfuredy@i...>
>I am trying to measure two inputs at the same time.
>One is a square wave that will have a variable frequency and
>pulse width. I will be keeping track of the total time that
>this signal is high. At the same time, I will be counting the
>number of pulses coming from another sensor.
You could use two external count accumulators with latch and
serial data transfer to slower processor which resets them
eventually - depends how close to real time you need to get.
[noparse][[/noparse]you gate a clock into the accumulator to get on time...].
.......
>The problem that I was having with the 68HC11 was that I was
>missing either the rising or the falling edge of the square
>wave so I would then be measuring the low time instead of high.
You could put in an external state transition memory [noparse][[/noparse]XOR gate
with diode & capacitor on input works] and read that - depends
on how much error you can stand in reading the timing as the micro
read cycle is still involved.
Good luck, premena
________________________________________________________________
GET INTERNET ACCESS FROM JUNO!
Juno offers FREE or PREMIUM Internet access for less!
Join Juno today! For your FREE software, visit:
http://dl.www.juno.com/get/tagj.
I'll try to help you, since I'd like to make some experiments with the
68HC11 too. I have a little experience with the Stamp, but it just makes me
curious of other 'programable things' :-)
Just a few questions :
- what type of 68HC11 do you use ? (A1, E1, F1...)
- what are the frequencies / pulse widths of your two input signals ?
- how fast is the variation of the frequency ?
Since the cycle time is only 0.5 µs (as I know), it must be possible to read
relatively slow signals.
Phil.
Original Message
From: "jfuredy" <jfuredy@i...>
To: <basicstamps@yahoogroups.com>
Sent: Tuesday, April 03, 2001 11:38 PM
Subject: [noparse][[/noparse]basicstamps] Hardware Recommendations?
>
>
> I bought an MC68HC11 kit from Axiom Manufacturing a while back but
couldn't get
> it to do what I wanted it to. I am looking for some advice on the best
(least
> expensive) way to achieve my goal. Is this possible with a single Stamp?
>
> I am trying to measure two inputs at the same time. One is a square wave
that
> will have a variable frequency and pulse width. I will be keeping track
of the
> total time that this signal is high. At the same time, I will be counting
the
> number of pulses coming from another sensor. Based on the readings from
these
> two signals, I will do some calcs (floating point would be nice, but I
could
> probably get around that) about every second, and display the results on
an LCD.
>
> The problem that I was having with the 68HC11 was that I was missing
either the
> rising or the falling edge of the square wave so I would then be measuring
the
> low time instead of high. I am assuming that this is because my calcs
were
> taking too long. Is there any way to get around this with the 68HC11? Is
there
> any way to interface a Stamp with the 68HC11 so one can monitor each
signal?
>
> Thanks in advance for any input on this.
> Joe Furedy
> Phoenix, AZ
>
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
cleanest way to do this. But I need a little bit more information, if you don't
mind.
OK, I think I understand what you are saying, conceptually. But since I'm new
to the hardware side of this thing, could you give me some part numbers to start
searching on to find the accumulators, gates, and latches?
And what is an external state transition memory? A little more detail or a
sketch of a schematic would be incredibly helpful.
Thanks in advance,
Joe Furedy
________________________________________________________________________
Message: 16
Date: Wed, 4 Apr 2001 12:26:35 -0600
From: s premena <premzee@j...>
Subject: RE:Hardware Recommendations?
> Date: Tue, 3 Apr 2001 14:38:41 -0700
> From: "jfuredy" <jfuredy@i...>
>I am trying to measure two inputs at the same time.
>One is a square wave that will have a variable frequency and
>pulse width. I will be keeping track of the total time that
>this signal is high. At the same time, I will be counting the
>number of pulses coming from another sensor.
You could use two external count accumulators with latch and
serial data transfer to slower processor which resets them
eventually - depends how close to real time you need to get.
[noparse][[/noparse]you gate a clock into the accumulator to get on time...].
.......
>The problem that I was having with the 68HC11 was that I was
>missing either the rising or the falling edge of the square
>wave so I would then be measuring the low time instead of high.
You could put in an external state transition memory [noparse][[/noparse]XOR gate
with diode & capacitor on input works] and read that - depends
on how much error you can stand in reading the timing as the micro
read cycle is still involved.
Good luck, premena