
robotmaker
Started this post on how to add more digital and analog ports to your EZB without losing speed or spending over $70 for another EZB
EDIT 3-31 ITS $69 FOR EZB and to usa its $25.56 CHEAPEST rate without tracking to other countries its a lot more. BOARD COST for circuit is under $3
BUT in my post there is disadvantage and advantages of both ideas ,EZB and multiplexer circuit
PART ONE ANALOG MULTIPLEXING
Analog multiplexing is using only one ADC port and have more then 16 analog inputs and depending on analog ports needed will depend on how many digital ports are used to switch it
VERY simple circuit only one chip under $1 will post a schematic up in a day or 2 and part # of the chip
Its analog switch so it very fast ,not much coding is needed ,not like using 2 EZB and have to pass info back and forth using bluetooth or USB or wifi
Analog ports the EZB only has a few,and needed for analog sensors or other boards like battery monitor ,or current on digital there is more then twice as much
PART 2 will be digital multiplexing PART 3 will be using I2C bus
SORRY RICH but this chip can be used ,it was done by another person using a different micro.you are right about in decimal it is 0-15 ,i made a so mistake.
THIS CHIP IS USED ALOT IN MULTIPLEXING DIGITAL OUTPUTS
THE EzB has 20 ports so using 4 or 5 still have many left over ,plus gives you 16 more,may be some functions is may not work,
CD4067 is bi-directional chip,and will take any digital siginal,pwm ,pulse,h/l and serial
CANT put up the links on sonars that uses it or servos because it not using a EZB
BUT processor is the same,all processors are mostly built the same
As soon as i get home will make the DESIGN and will hook up a few sonars to show that is works perfect.
ITS a very common chip used for multiplexing ANALOG and DIGITAL I/O,multiplexing is done in micro seconds.
WISH i could put up the links but DJ will be very upset
NOBODY ON THIS FORUM chould say it doesnt work unless they tried it
I guess email a person who knows about using this chip and is on this forum and will send him much data to show it WILL WORK perfect for EZB
BESIDES me building it and showing that it does work with proof,like VIDEO AND PHOTOS
Before carrying out anything one can perform a feasibility study based on the theory and principles behind a design, that is what I briefly carried out and found a handful of limitations. Unless ARC can access multiple ports of the chip at the same time the limitations will stand. It is not necessary to carry out a practical test when the logic behind it proves otherwise.
I appreciate it is you building the circuit and you are free to disregard the information I posted however cannot dispute it with the reply that was posted.
One simple question, a yes or no answer is required, nothing more. Can ARC read/write to more than one port of the chip at the same time?
I know the answer is no as it requires 4 digital inputs to select the port. It is unable to select more than one port at one time as it is an impossibility to apply 2 different digital high or low values to the same port, doing so would select a different port.
For instance;
ARC selects port 6 by giving D0 to D3 high and low digital, resulting in 0110 or port 6.
If you wanted to choose port 8, it would set D0 to D3 high and low digital, resulting in 0001 or port 8.
Selecting both is impossible. Combined would result in the digital high and low of 0111 or port 14.
Without that function the limitations which I expressed (plus others which I did not) will apply. The circuit does not require building to figure that out.
Your argument is weak. I could say to use the ATTiny2313 chip, how do you know it wouldn't work without trying it? Because the information available is enough to make such a judgement. Or to push it to an extreme, you could use a fried chicken to build the circuit, without trying you can't say that it doesn't work. Do you see my point and where I am coming from?
Before getting defensive and claiming that nobody can know until they try please just answer the yes or no question posted, can ARC select 2 different ports of the chip at the same time?
I guess RICH you no very little about multiplexing,and ezb processor HAS IT INSIDE THE CHIP
CANT SELECT both ports at the exact same time,mostly dont need too
ONE is made and then a few micro second or more or less select the next one
SAME is done on the I2C chip is has multiplexing design and then CONVERTS THE INFO to I2C buss info
SAME IS DONE in a microprocessor like EZB the data is multiplex,same with A-D with 8 ports in the EZB first you have 8 inputs and each one is de-multiplexed by address to get one info out and done very fast microseconds or seconds depending on the design.
SO your question is about selecting 2 different ports at the same time,there is a yes and no can select at exact same time,you need a few micro seconds or less between each port
JUST like how the EZB processor is made.its also done in microseconds or less when it gets the script code and sends it to each output or input,
in the design of a microprocessor i tried to explain it uses a form of multiplexing,since memory only has one I/O most of then and has addresses to select it.
and memory also uses a form of multiplexing since it has I/O and address
On sonars it works much better because you need about 40us (microseconds) before you send the next pulse ,plus the output on the CD4067 is bi-directional like a on off switch or like same as a DIGITAL I/O port on EZB IS
RICH i can get you some books on about processors and how they work and using multiplexing to help you understand how multiplexing works.
MIGHT make you understand it better,plus if you want many links to others using chips like CD4067 in robots to get more outputs from any microprocessor,all ezb is a common pic processor
Or if anyone else wants this info can send it too.
I think there is a misunderstanding here (what a surprise!
).
I think the question Rich is asking is: is EZ-BUILDER, the great and easy EZ application, can access multiple ports of the chip at the same time... It is not question of the EZB processor capabilities...
Clearly, if it is not usable directly in ARC (at least by relatively simple scripting) and need complex programming to access processors capabilities... I prefer buy another EZB
I am fully aware of how multiplexing works and do not require assistance with it. Please refrain from such condescending assumptions it makes it impossible to have a rational conversation with you.
That's a no then, therefore the limitations may still apply.
Script a does not know what Script b is doing therefore there may be clashes, therefore limitations. The GetPing command does not know when to change the port therefore may not be able to use trig and echo as required, therefore limitations.
Limitations and possible limitations must be made clear to avoid users becoming frustrated with a design that claims to add extra ports but in reality may not be compatible with their set up or may return incorrect sensor readings etc.
I cannot explain any clearer. I have not said it will not work. I have not said it will not give more ports. I have said there will be limitations. Please understand what people post prior to becoming defensive, irrational, and condescending.
Continue with your design if you see fit, I shall not be partaking in this subject again. Should anyone require my assistance on this please feel free to email me [email protected] since my aid is often overshadowed in certain topics - unfortunately this will deny others of the help but I feel it is for the best.
Edit: @fredebec understands (almost) correctly. Some limitations may be able to be overcome with scripting, if loops and an empty port which is selected when not in use for checking to avoid incorrect servo positions or incorrect readings. However it is far from simple, would require a lot of scripting for it to be free of errors and to be honest I suspect the majority of users would not know how to tackle such a script even with examples.
great hope you dont,
back to my design will post the info and how to make it and find someone if i need help on the code
getping command will test it ,its like any other codes used for microprocessors,but there is a sonar that will. work one wire parallax ping sonar
SEcond i am making the SRF04 work like the parallax ping
ALSO can easy use 2 8 digital I/O MUlTIPLEX CHIPS one for ping and other for echo,so it can work.
FIRST TEST is i will do is manual select the sonars,i see that arduino board usesc the same idea to select different sonars and DJ said it fairly easy to convert the code So that might help me with the coding
very bad for others to say it does not work unless they tried it
BUT also this chip can be used for other digital I/O ,DOESNT HAVE TO BE ONLY FOR SONARS ITS ONLY ONE EXAMPLE.
BUT testing is the best proof,i havent tried it with EZB yet so i cant say it works or doesnt work only can say it DOES work with arduino and other pic processors
THEN THERE IS always EZB-SDK since there is a code for Csharp in another site that uses 16 sonars with only one digital ouput using a multiplex chip like this one,and can easy convert to EZB-SDK using the C sharp