Page 1 of 1

DELETE THIS POST

Posted: Wed Aug 03, 2011 4:41 am
by CRAIG CHAMBERLAIN
a 74HC4067 multiplexor?
Kind of like the switches, LEDS Etc, provided by FC for the on screen component board.

Or even a way via straight FC, maybe creating a macro?

Thanks in advance.
Craig
1

Re: Is there a way to simulate....

Posted: Wed Aug 03, 2011 10:01 am
by Benj
Hello Craig,

You can simulate the four microcontroller outputs that will go to the device but you cannot replicate the device's functionality in the simulation without using the microcontroller to do the processing. eg reading in 4 inputs and then multiplexing through to 16 outputs.

Re: Is there a way to simulate....

Posted: Wed Aug 03, 2011 12:02 pm
by fotios
Hi Craig
If you mean that you want to use a micro instead the HC4067, yes you can do that but ONLY FOR digital signal process (HC4067 has possibility of managing and analog signals). From a first view, i think that you will need 1 to 2 macros. You have to select a PIC with enough I/O ports, say P16F877. The rest stuff could be:
1) Two momentary switches connected at 2 inputs of micro for scrolling up - down the address, instead the 4 address inputs of HC4067.
2) One latching switch to strobe the device instead the "EN" input of HC4067.
3) One latching switch to provide a data bit instead the "Z" input of HC4067.
4) 16 leds connected at 16 outputs of micro, representing the "Y0 - Y15" outputs of HC4067.
And of course, an appropriate code for the micro to mimic the function of HC4067. This will be the 1 of 16 demultiplexing function. You can do and the inverse, 16 to 1 multiplexing, by connecting 16 latching switches representing the "Y0 - Y15" - like inputs this time - and one Led representing the "Z" like an output.
Fotios

Re: Is there a way to simulate....

Posted: Thu Aug 04, 2011 5:20 am
by CRAIG CHAMBERLAIN
Let me try to make my question a bit clearer.
i am using a 16f877a. I will be multiplexing 14 analog signals to a a/d input on the Micro.
There are also switches as part of the input controls as well.
I then plan on comparing the sensor numbers, and have the program change the outputs in response.
So I would like to be able to simulate the changing of analogue inputs, to assure the outputs are changing properly.
I know I can just use LEDs for logic states on my outputs, as they are all just on or off. Then just label them accordingly.
I guess I just program knowing how the multiplexor works, then build the hardware to test?

Re: Is there a way to simulate....

Posted: Thu Aug 04, 2011 7:49 am
by fotios
Hi Craig
Just an idea: Why you don't use a PIC with big number of A/D inputs JUST for simulation? For example PIC18F8520 has 16 A/D inputs and is included in FlowCode. Using it you can solve temporarily the problem of multiplexing, you can replicate your 14 analog signals using 14 ADC components of FlowCode connected directly to the A/D inputs of P18F8520. I am sure that you would be able to simulate your project, and later you can modify the *fcf to suit in the P16F877A that you have.
Fotios