FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Forum index » Science and Technology » Engineering » Control
S/W Eng Asks For Intuitive Explanation Of Logic Diagrams Using C Code (And, Or, Min/Max Limiter, One Frame Delay, etc.)
Post new topic   Reply to topic Page 1 of 1 [7 Posts] View previous topic :: View next topic
Author Message
clusardi2k@aol.com
science forum beginner


Joined: 20 Oct 2005
Posts: 16

PostPosted: 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.) Reply with 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
Back to top
Patricia Shanahan
science forum Guru Wannabe


Joined: 13 May 2005
Posts: 214

PostPosted: 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.) Reply with quote

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

PostPosted: 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.) Reply with quote

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

PostPosted: 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.) Reply with quote

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

PostPosted: 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.) Reply with quote

Jerry Avins wrote:
Quote:
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
Back to top
Jerry Avins
science forum Guru


Joined: 03 May 2005
Posts: 534

PostPosted: 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.) Reply with quote

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

PostPosted: 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.) Reply with quote

"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
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [7 Posts] View previous topic :: View next topic
The time now is Sun Jun 25, 2017 7:01 pm | All times are GMT
Forum index » Science and Technology » Engineering » Control
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts The CADO Reference Frame for an Accelerating Observer Mike Fontenot Relativity 0 Tue Nov 06, 2012 3:33 pm
No new posts ladder logic question bakerjw2000 Control 13 Sun Jul 16, 2006 12:59 am
No new posts Name of chapter dependency diagrams sought google03@sigfpe.com Math 2 Wed Jul 12, 2006 10:35 pm
No new posts geek code. rrs.matrix@gmail.com Math 2 Sun Jul 09, 2006 12:55 pm
No new posts Single photon emission - absorbtion time delay experiments ? Boo Research 5 Tue Jul 04, 2006 4:16 am

Copyright © 2004-2005 DeniX Solutions SRL
Other DeniX Solutions sites: Electronics forum |  Medicine forum |  Unix/Linux blog |  Unix/Linux documentation |  Unix/Linux forums  |  send newsletters
 


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0579s ][ Queries: 16 (0.0397s) ][ GZIP on - Debug on ]