For higher frequency digital signals - what is better - multiplexers or shift registers?
Basically which ones are suited better for digital transmissions?
Or there are other dedicated ICs ?
I can't say which is better because they serve a different task. With a multiplexer only one pin is connected (to an common) at the same time, the rest is floating. Aka, you also need to provide the signal you want to send and the rest get's nothing. With a shift register all pins are driven (or read) together. But at the cost of needing to send (or read) the data to (/from) all.
So really, this is an XY-problem. What do you want to do?
I want to drive TFT 16bit or 24bit parallel with 15-30Mhz clock signal
Just have not enough pins.
Nexperia's 74HC164 can be driven at 71+ Mhz.
Which Arduino are you using?
Deous:
Just have not enough pins.
Analogue pins can also be used as digital pins.
Leo..
Unsigned_Arduino:
Which Arduino are you using?
I use ESP-IDF FreeRTOS on ESP32.
dougp:
Nexperia's 74HC164 can be driven at 71+ Mhz.
Great - that will do
What about CD74HC4067 ? Can't find the speeds....
Deous:
What about CD74HC4067 ? Can't find the speeds....
Try putting the part number followed by 'datasheet' in your search engine.
Deous:
What about CD74HC4067 ?
It is useless for a parallel output. It only funnels data to the output one bit at a time. There is no latch function on a multiplexer.
I want to drive TFT 16bit or 24bit parallel with 15-30Mhz clock signal
I use ESP-IDF FreeRTOS on ESP32.
Oh dear I have a feeling that an RTOS is going to screw up writing that fast.
Grumpy_Mike:
It is useless for a parallel output. It only funnels data to the output one bit at a time. There is no latch function on a multiplexer.
But it all depends how fast you go to next bit - that is done by code and it can be quite fast.
Shift registers do it internally but still latching is done by code
Oh dear I have a feeling that an RTOS is going to screw up writing that fast.
What? So far RTOS has been much faster than Arduino and Arduino on esp runs on RTOS anyway
Also RTOS offers hardware capabilities of ESP that Arduino cannot supply. f.ex hardware rotary encoder control or 40MHz+ PWM control
But it all depends how fast you go to next bit
Not for a parallel input it dosn't. You can go as fast as you like, once the strobe line is fired all the inputs will be latched into your TFT, that means there will only be one valid one and all the rest the floating values.
So far RTOS has been much faster than Arduino and Arduino on esp runs on RTOS anyway
See you back here when you hit that one then.
Also RTOS offers hardware capabilities of ESP that Arduino cannot supply.
Rubbish.
If an RTOS can offer something then it stands to reason that the very same function can be written on an Arduino, because after all it is the Arduino that is running the RTOS. The only difference is that you are in charge of what happens and when.
Grumpy_Mike:
Not for a parallel input it dosn't. You can go as fast as you like, once the strobe line is fired all the inputs will be latched into your TFT, that means there will only be one valid one and all the rest the floating values.
I am not sure if you are familiar with clocking concepts. What exactly you mean by 'firing'??
Nothing is floating once bits are set what are you talking about?
See you back here when you hit that one then.
Rubbish.
If an RTOS can offer something then it stands to reason that the very same function can be written on an Arduino, because after all it is the Arduino that is running the RTOS. The only difference is that you are in charge of what happens and when.
Hmmm... you better look at Arduino framework yourself and I mean deep in the code.
This is a 'Framework' - hope you will understand.
90% of stuff I can easily do on rtos cannot be done with 'Arduino'. If you pertain to Arduino as Atmel (Mega)boards then I guess they run from bootloader with no OS and must do complex stuff through the firmware functions.
Heyy Deous, it's you who has NO CLUE about RTOS nor multiplexers... As you might have guessed from the stats, Grumpy_Mike has perfect knowledge about micro controllers and (digital) electronics.
All you can do in RTOS can be done in Arduino. Only Arduino is more bare metal. You are in charge when you do what. Has it's advantages and disadvantages. Disadvantage is you have to manage everything (which a RTOS does for you), advantage it's as fast as it gets (where with a RTOS you have more overhead).
And about multiplexers, only ONE pin is connected at a time. (And you still need to provide input for that pin as well.) So no matter how fast you go over the pins, if you freeze time (aka, latch your display data) only ONE pin has a valid state. ALL other pins of the mux just float.
Aka, if you ask if you should use a mux or a shift register the only thing that will work is a shift register.
Mike is one of the most knowledgeable and experienced members on this forum. He says it won't work, but you seem to be saying you can somehow drive the 16 or 24 bit parallel interface of a display by using a multiplexer.
What I suggest is that you continue to develop your idea of using the multiplexer without worrying about the speed for the moment. When you have figured that out, we will all be very interested to find out how you achieved it. Please post a schematic and an explanation of how it will operate.
Deous:
I am not sure if you are familiar with clocking concepts. What exactly you mean by 'firing'??
An oxymoron of a sentence.
Any parallel interface needs a signal to say the data on all the inputs are now, or should now be, valid. Firing means setting that signal or seeing that the signal has been set.
Nothing is floating once bits are set
Yes it is, any input not currently being addressed by a multiplexer is, in effect, floating.
And while we are at it:-
Nexperia's 74HC164 can be driven at 71+ Mhz.
Great - that will do
Will it?
What do you think that means?
It means that is the maximum frequency of the clock. You need n clocks and one latch to output n bits. So at 71MHz, your maximum rate for a 16 bit interface, 71/17 = 4.1MHz or for a 24 bit interface is 71/25 = 2.84MHz.
Finally I hope you don't think you can knock this up on solderless bread board, you can't.
@Deous, why aren't you looking for a display with a native SPI interface? That's what most smaller displays sold for use with Rasp Pi have, for example. You can't update the screen as fast as with hdmi, so not great for video, but at least it's achievable for a hobbyist.
septillion:
Heyy Deous, it's you who has NO CLUE about RTOS nor multiplexers...As you might have guessed from the stats, Grumpy_Mike has perfect knowledge about micro controllers and (digital) electronics.
All you can do in RTOS can be done in Arduino. Only Arduino is more bare metal. You are in charge when you do what. Has it's advantages and disadvantages. Disadvantage is you have to manage everything (which a RTOS does for you), advantage it's as fast as it gets (where with a RTOS you have more overhead).
And about multiplexers, only ONE pin is connected at a time. (And you still need to provide input for that pin as well.) So no matter how fast you go over the pins, if you freeze time (aka, latch your display data) only ONE pin has a valid state. ALL other pins of the mux just float.
Aka, if you ask if you should use a mux or a shift register the only thing that will work is a shift register.
https://www.arduino.cc/en/guide/introduction
Arduino is a 'platform' based on Wiring and Processing
There is no point for you being arrogant - you apparently assume a lot of stuff and base everything on your narrow opinions.
I know what's fRTOS and idea is simple - Arduino - no multitasking and RTOS multitasking,better interfacing with services.
Multiplexer will work as well but must be controlled a bit different I just never knew switching speeds of multiplexers
PaulRB:
Mike is one of the most knowledgeable and experienced members on this forum. He says it won't work, but you seem to be saying you can somehow drive the 16 or 24 bit parallel interface of a display by using a multiplexer.What I suggest is that you continue to develop your idea of using the multiplexer without worrying about the speed for the moment. When you have figured that out, we will all be very interested to find out how you achieved it. Please post a schematic and an explanation of how it will operate.
Lets say we want 4 bits and parallel multiplex - this is how you do it:
open connection/request
mux-select pin 0>write
mux-select pin 1>write
mux-select pin 2>write
mux-select pin 3>write
close connection/request
Not a lot to add.
Strange how some people ask for help and then think they know it all.
Grumpy_Mike:
Not a lot to add.
Strange how some people ask for help and then think they know it all.
Do you know it all? Why are you whining? What's your problem?
I asked simple question and everyone is in attack mode