4-bit binary counters
4-bit binary counters
(OP)
This is embarressingly basic, but my brain is fried from going round in circles.
I have a set of wall sensors that all have individual binary codes that need addressed to step through each module and request the state of all the sensors on each module. The information is sent back to a computer where the info is displayed.
I`m trying to find a simple to implement (preferably hardware, but by software if necessary) a count through from 0 to 16 and loop which will deal with the sensors, but if possible to take take each pulse and use it to increment the program to cycle through each wall module on the computer, ie when the wall module addressing increments from, say, 11 to 12, the computer will increment the "data page" from 11 to 12 as well so the info being fed back is shown in the right place.
ATM, I`m looking at a 2-part binary counter with a separate crystal oscillator. Does anyone have any ideas on all-in-one packages that are cheap and easy to work with?
Any more info ya need, just ask :)
Thanks a lot,
Kenny
I have a set of wall sensors that all have individual binary codes that need addressed to step through each module and request the state of all the sensors on each module. The information is sent back to a computer where the info is displayed.
I`m trying to find a simple to implement (preferably hardware, but by software if necessary) a count through from 0 to 16 and loop which will deal with the sensors, but if possible to take take each pulse and use it to increment the program to cycle through each wall module on the computer, ie when the wall module addressing increments from, say, 11 to 12, the computer will increment the "data page" from 11 to 12 as well so the info being fed back is shown in the right place.
ATM, I`m looking at a 2-part binary counter with a separate crystal oscillator. Does anyone have any ideas on all-in-one packages that are cheap and easy to work with?
Any more info ya need, just ask :)
Thanks a lot,
Kenny





RE: 4-bit binary counters
Gunnar Englund
www.gke.org
RE: 4-bit binary counters
Thanks!
Kenny
RE: 4-bit binary counters
Hint: A PC's parallel port can be made to do almost anything.
RE: 4-bit binary counters
Gunnar Englund
www.gke.org
RE: 4-bit binary counters
1.) you want to read 16 sensors, perhaps with individual
calibration factors, process the data, display,
perhaps store and perform some kind of statistics
and other operations.
2.) I don't think it is reasonable to do it with pure
hardware --you need some computer.
3.) Around 70 bucks you can get PC compatible business
card size computer which I would program in some
BASIC.
4.) Can you build the interface logic ?
==================================================
To give some real help, we need more data:
1.) Sensors make and type#
2.) a simple pseudo-program e.g.
; temp : integer array of 16
10 times
{ for address = 0 to 15
{ output adress
input t
add t to temp( address) }
}
divide the temp array by 10
display temp array (Format ??)
reset temp array
etc.
Or at least a very good description of what do
you want to do with the sensor readings ?
<nbucska@pc33peripherals.com> omit 33 Use subj: ENG-TIPS
Plesae read FAQ240-1032
RE: 4-bit binary counters
The door sensors are very basic- sending a "1" or a "0" depending on the state of the sensors. No calibration, but storage and display are needed. To be able to take the data and use it in statistics, graphs etc would be nice, but is considered a luxery and not expected of what i`ve been asked. I was thinking af avoiding 0000 and 1111 as sensor readings for power-on reset and keeping 1111 just in case so 14 actual wall modules- omitting 0000 and 1111 from the cycle doesnt matter- there just wont be any wall modules with those codes.
I`ve yet to really get into the programming so cant knock together a demo code yet, sorry.
I had a quick play with the 74HC161 earlier today, but no crystal kicking around to use with it straight away unfortunately :( A bit of wire connected to the 5V rail should do though, right?
:)
Kenny
RE: 4-bit binary counters
Please read the )(&*^%&(&&% FAQ !!!
and then why don't you just tell us, what are you trying to do.
It may be simpler to design the circuit than finding out
what you want.
<nbucska@pc33peripherals.com> omit 33 Use subj: ENG-TIPS
Plesae read FAQ240-1032
RE: 4-bit binary counters
Gunnar Englund
www.gke.org
RE: 4-bit binary counters
'Situation normal' for most projects. Deep inside every huge project is a ten minute design exercise.
RE: 4-bit binary counters
Remember, with a free running counter, the computer doesn't know when the counter is being incremented, so it's easy for the computer to read the data from sensor N+1 when the computer thinks it's looking at sensor N.
This can happen despite the presence of command pulses sent from computer to counter, index pulses sent from counter to computer, or even complicated handshake sequences between the two devices, because the computer's response time, thanks to Windoze, is not known, predictable, or limited.
BETTER that the computer should generate the binary address internally, use the exact same storage location as the index for the storage array, and send out the polling address as it is needed, when it is needed, using the simplest, dumbest possible hardware.
This has the further advantage that the sensors can be polled in any order, and the frequency of polling may be individually adjusted as needs change.
Mike Halloran
Pembroke Pines, FL, USA
RE: 4-bit binary counters
RE: 4-bit binary counters
Gunnar Englund
www.gke.org
RE: 4-bit binary counters
Of course, the odd cosmic ray would auto- increment the address when it wasn't supposed to increment, or transients would make an increment pulse disappear, and pretty soon the programmer would be tasked with figuring out which channel had actually been read, using hardware that was smart enough to get in the way, not smart enough to check itself, and not dumb enough to work right.
As a former Professional Programmer (when that didn't mean Web Developer) and Hacker (when that was a good thing), I hate 'smart' hardware. And 'high level' and 'third generation' languages, but that's a different discussion.
Mike Halloran
Pembroke Pines, FL, USA
RE: 4-bit binary counters
In the 80-s I worked for a start-up. We had one PDP-11 with
30 terminals for engineering, inventory,payroll etc.
The two 10 Mb disk was enough for more than two years.
We had less/no bells and whistles but no virus, spam,
and seldom any bug.
My productivity as user/programmer/designer was higher.
<nbucska@pc33peripherals.com> omit 33 Use subj: ENG-TIPS
Plesae read FAQ240-1032
RE: 4-bit binary counters
It always worked.
Keith Cress
Flamin Systems, Inc.- http://www.flaminsystems.com - kcress@<solve this puzzle>
RE: 4-bit binary counters
<nbucska@pc33peripherals.com> omit 33 Use subj: ENG-TIPS
Plesae read FAQ240-1032
RE: 4-bit binary counters
Loved the colour of those toggle switches. Pinkish/violetish on the -11 and yellowish/brownish on the -8E. If I remember right.
Gunnar Englund
www.gke.org
RE: 4-bit binary counters
Ours was a gorgeous burnt orange with white switches. I think the disk (15inch?) was 5MB.
Keith Cress
Flamin Systems, Inc.- http://www.flaminsystems.com - kcress@<solve this puzzle>
RE: 4-bit binary counters
You were lucky, you.
Gunnar Englund
www.gke.org
RE: 4-bit binary counters
Here's what ours looked like:
Even with paper notes stuck on it to list those first few instructions in binary!
http://
Those were the days.. Amazing really, to realize how far we've come in computing in just a few years.
Keith Cress
Flamin Systems, Inc.- http://www.flaminsystems.com - kcress@<solve this puzzle>
RE: 4-bit binary counters
Aside from disk head crashes due to building work (dust is not kind to hard disks...) it went wrong twice in 8 years: once when the dma card died & once when a zonky 40A diode in the linear psu went s/c coz its mounting nut had come loose.
I'll never forget the smoke from the psu when that happened...
Test equipment ran on GA SPC16 computers with core memory.
As you say, no viruses, no GUI, and green screens that didn't hurt your eyes.
RE: 4-bit binary counters
TTFN
RE: 4-bit binary counters
Gunnar Englund
www.gke.org
RE: 4-bit binary counters
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"It's the questions that drive us"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
RE: 4-bit binary counters
Proper hard disk drives that took two people to mount into a 19inch rack... 5Mb cartridge & 5Mb fixed platter...
RE: 4-bit binary counters
Gunnar Englund
www.gke.org
RE: 4-bit binary counters
Is it just me?
Mike Halloran
Pembroke Pines, FL, USA
RE: 4-bit binary counters
TTFN
RE: 4-bit binary counters
The old DOS screens were dark, with greyish text. Sometimes amber or green. Remember doing around-the-clock work with no problems.
We may be on to something. A new trend. "NOSOREYES"(TM) screens?
Gunnar Englund
www.gke.org
RE: 4-bit binary counters
In my collection of valuable artifacts (i.e. junk) I have a PC-XT with a mono screen.
Once in a blue moon I turn it on & am always amazed at how wonderfully clear the text on the screen appears.
RE: 4-bit binary counters
TTFN
RE: 4-bit binary counters
Keith Cress
Flamin Systems, Inc.- http://www.flaminsystems.com - kcress@<solve this puzzle>
RE: 4-bit binary counters
Gunnar Englund
www.gke.org
RE: 4-bit binary counters
RE: 4-bit binary counters
I ran basic on them.
Oh oh!! And playing Star Trek on them.. You'd do a sector scan and it would print out radial sectors.. Then you'd do some trig and put in an angle. Launch photon torpedoes. Bingo! Of course that was between the Least Squares curve fitting you were doing...
Keith Cress
Flamin Systems, Inc.- <http://www.flaminsystems.com> - kcress@<solve this puzzle>
RE: 4-bit binary counters
I didnt think about that aspect, so when i`m done and being asked/interrogated about my design choices I can mention that :D
RE: 4-bit binary counters
People are very impressed by that...
RE: 4-bit binary counters
Anybody remember the old curb feelers on cars?
RE: 4-bit binary counters
Gunnar Englund
www.gke.org
RE: 4-bit binary counters
Keith Cress
Flamin Systems, Inc.- <http://www.flaminsystems.com> - kcress@<solve this puzzle>