truth table Implimentation using C
ajit.nayak87
Posts: 76
Dear all,
I need some idea on implementing above truth table on arduino platform or in C. In above truth table s0,s1,s2,s3, En are my input Depend on State of input my Output changes.
SO entry condition for my program will be time and another is Input from table . So can some one suggest me Hw can do this.
I need some idea on implementing above truth table on arduino platform or in C. In above truth table s0,s1,s2,s3, En are my input Depend on State of input my Output changes.
SO entry condition for my program will be time and another is Input from table . So can some one suggest me Hw can do this.
Comments
So plain C code is also fine?
Could you clarify the truth table al little bit more?
Does the 0 - 1000 mean, from 0 until 1000 (including 1000) or from 0 till 1000 (excluding 1000)?
You say that the EN, S0-S3 are inputs but I don't see how the time influences the output.
Also this is not the Arduino forum.
Maybe this? http://tronixstuff.com/2013/08/05/part-review-74hc4067-16-channel-analog-multiplexerdemultiplexer/
What are you trying to do exactly?
You mentioned a time frame. Do you want to record the samples periodically?
Considering that the last line in the table is >= 15000, I'd be willing to say the upper limits are excluded.
@Ajit,
The math should be pretty straightforward. If you take the time value divided by 1000 that should give you 0-15 (IIRC, integer division is truncated, isn't it?) to use in your array
The code you posted looks to loop through all 16 channels and read the analod value on each. Given the truth table, I'm not certain that is what you are wanting to do.