|
|
| Author |
Message |
clusardi2k@aol.com science forum beginner
Joined: 20 Oct 2005
Posts: 16
|
Posted: Fri Jul 07, 2006 12:23 pm Post subject:
S/W Eng Asks For Intuitive Explanation Of Logic Diagrams Using C Code (And, Or, Min/Max Limiter, One Frame Delay, etc.)
|
|
|
Hello,
Can you give me small descriptive examples in the computer language C
on how to use the logic gates given on the subject line? I would also
like information and code on integators with variable gain.
Do you have a good book that would help me on these gates and other
similar ones? I have books (10 years old) from my circuits courses, but
I do not know how to bridge the gap between discrete components that
use voltage and software.
Any help appreciated,
Christopher M. Lusardi |
|
| Back to top |
|
 |
Patricia Shanahan science forum Guru Wannabe
Joined: 13 May 2005
Posts: 214
|
Posted: Fri Jul 07, 2006 1:29 pm Post subject:
Re: S/W Eng Asks For Intuitive Explanation Of Logic Diagrams Using C Code (And, Or, Min/Max Limiter, One Frame Delay, etc.)
|
|
|
Chris L wrote:
| Quote: | Hello,
Can you give me small descriptive examples in the computer language C
on how to use the logic gates given on the subject line? I would also
like information and code on integators with variable gain.
Do you have a good book that would help me on these gates and other
similar ones? I have books (10 years old) from my circuits courses, but
I do not know how to bridge the gap between discrete components that
use voltage and software.
Any help appreciated,
Christopher M. Lusardi
|
sci.logic is not a good newsgroup for this. It is concerned with a much
more abstract form of logic than computer hardware.
I came to the same problem from the opposite direction, as an
experienced programmer and software architect in a job where I needed to
communicate with hardware logic designers.
"And" and "Or" map directly to the C operators && and || when given
inputs that are all either zero or one. I'm not familiar with Min/Max
Limiter. Delays don't really make sense in software, other than hardware
simulators that model a clock. To make sense of them, you have to think
of mappings between the state on e.g. one positive clock edge and the
state on the next positive clock edge.
You may find it helpful to learn a hardware description language, such
as Verilog or VHDL. They are programming languages that can be used to
write hardware. That is, they have a subset that can be compiled to a
gate list.
I liked "Digital Design: Principles & Practices" by John F. Wakerly.
However, it shows boolean equations for gates, rather than C. Your
mileage may vary.
Patricia |
|
| Back to top |
|
 |
clusardi2k@aol.com science forum beginner
Joined: 20 Oct 2005
Posts: 16
|
Posted: Fri Jul 07, 2006 2:32 pm Post subject:
Re: S/W Eng Asks For Intuitive Explanation Of Logic Diagrams Using C Code (And, Or, Min/Max Limiter, One Frame Delay, etc.)
|
|
|
Patricia Shanahan wrote:
| Quote: | You may find it helpful to learn a hardware description language, such
as Verilog or VHDL. They are programming languages that can be used to
write hardware. That is, they have a subset that can be compiled to a
gate list.
|
I fell in love with VHDL 8/9 years ago, so I photocopied a few of the
common books. I basically felt that VHDL is a different programming
style just like Object Oriented Programming is a different style.
I'll find my stash of papers over the weekend. But, I have to humble
myself and say I admit that I had difficulty using VHDL! My forte is
programming in C etc, but I noticed VHDL goes way way way beyound my
simple notion of what programming is. With VHDL, you simulate hardware
that's the miracle! And, I was only briefly exposed to electronics 10
years ago and probably do not have the experience required. I did use
VHDL in a few very small projects. I'll try tomorrow, I promise!
Thank you,
Christopher M. Lusardi |
|
| Back to top |
|
 |
Jerry Avins science forum Guru
Joined: 03 May 2005
Posts: 534
|
Posted: Fri Jul 07, 2006 2:51 pm Post subject:
Re: S/W Eng Asks For Intuitive Explanation Of Logic Diagrams Using C Code (And, Or, Min/Max Limiter, One Frame Delay, etc.)
|
|
|
Chris L wrote:
| Quote: | Hello,
Can you give me small descriptive examples in the computer language C
on how to use the logic gates given on the subject line? I would also
like information and code on integators with variable gain.
Do you have a good book that would help me on these gates and other
similar ones? I have books (10 years old) from my circuits courses, but
I do not know how to bridge the gap between discrete components that
use voltage and software.
|
For individual elements and small collections, truth tables are a good
description. http://www.google.com/search?q=truth+table For larger
collections, Karnaugh maps are sometimes helpful. (I've even used them
to simplify spaghetti code.) http://www.google.com/search?q=karnaugh+map
Jerry
--
Engineering is the art of making what you want from things you can get.
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ |
|
| Back to top |
|
 |
clusardi2k@aol.com science forum beginner
Joined: 20 Oct 2005
Posts: 16
|
Posted: Fri Jul 07, 2006 3:36 pm Post subject:
Re: S/W Eng Asks For Intuitive Explanation Of Logic Diagrams Using C Code (And, Or, Min/Max Limiter, One Frame Delay, etc.)
|
|
|
Jerry Avins wrote:
But, what is the truth table for a Min/Max Limiter, One Frame Delay,
and integators with variable gain?
Thanks for the memories,
Christopher Lusardi |
|
| Back to top |
|
 |
Jerry Avins science forum Guru
Joined: 03 May 2005
Posts: 534
|
Posted: Fri Jul 07, 2006 4:39 pm Post subject:
Re: S/W Eng Asks For Intuitive Explanation Of Logic Diagrams Using C Code (And, Or, Min/Max Limiter, One Frame Delay, etc.)
|
|
|
Chris L wrote:
| Quote: | Jerry Avins wrote:
For individual elements and small collections, truth tables are a good
description. http://www.google.com/search?q=truth+table For larger
collections, Karnaugh maps are sometimes helpful. (I've even used them
to simplify spaghetti code.) http://www.google.com/search?q=karnaugh+map
But, what is the truth table for a Min/Max Limiter, One Frame Delay,
and integators with variable gain?
Thanks for the memories,
Christopher Lusardi
|
Limiters and integrators are analog devices, not generally referred to
as gates and not amenable to digital design techniques. Digital delay
elements are usually flip-flops, and incorporated into analyses in a
variety of ways.
jerry
--
Engineering is the art of making what you want from things you can get.
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ |
|
| Back to top |
|
 |
Scott Seidman science forum addict
Joined: 05 May 2005
Posts: 62
|
Posted: Fri Jul 07, 2006 11:01 pm Post subject:
Re: S/W Eng Asks For Intuitive Explanation Of Logic Diagrams Using C Code (And, Or, Min/Max Limiter, One Frame Delay, etc.)
|
|
|
"Chris L" <clusardi2k@aol.com> wrote in news:1152286574.554227.216880
@p79g2000cwp.googlegroups.com:
| Quote: |
Jerry Avins wrote:
For individual elements and small collections, truth tables are a good
description. http://www.google.com/search?q=truth+table For larger
collections, Karnaugh maps are sometimes helpful. (I've even used them
to simplify spaghetti code.) http://www.google.com/search?q=karnaugh+map
But, what is the truth table for a Min/Max Limiter, One Frame Delay,
and integators with variable gain?
Thanks for the memories,
Christopher Lusardi
|
Those are funny terms. For one-frame delay, try looking up D-flip flop.
The limiter and the variable gain integrators really aren't within the
purview of Digital Logic. An integrator can be simply approximated by a
running sum scaled by the sample period. You can also use a Simpson's
Trapezoidal Approximation for the integral, but often the sum is good
enough. As to the variable gain part, try using a simple multiplication.
The Min/max limiter should be easy to implement with a couple of if
statements.
--
Scott
Reverse name to reply |
|
| Back to top |
|
 |
Google
|
|
| Back to top |
|
 |
|
|
The time now is Sun Nov 23, 2008 6:40 pm | All times are GMT
|
|
Mortgage Calculator | CreditCards | Books | Online Advertising | Pisos Denia
|
|
Copyright © 2004-2005 DeniX Solutions SRL
|
|
Other DeniX Solutions sites:
Electronics forum |
Medicine forum |
Unix/Linux blog |
Unix/Linux documentation |
Unix/Linux forums
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|