AMUX control problems

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
user_3938561
Level 2
Level 2

HI everyone, I have some questions on using AMUX,

My design is a bidirectional controllable current source, so I use two IDAC in design, and one for source and one for sink(bidirectional), then using a AMUX to connect this two IDAC to one analog output pin. and also I need the PWM signal to control the AMUX, for forming the relaative waveform.

My initial concept is using the AMUXHW, cuz the AMUXHW has the hardware connection, it is easy to directly connect the PWM signals to its control pins, like the following design, but i know that AMUXHW can only be used to connect GPIOs, so this design has errors.

pastedImage_0.png

So i want to know is there any solutions instead, cuz in PSoC BLE only has this type of AMUXHW which can be controlled using HW connections.

Appreciation for help:)

HAN

0 Likes
1 Solution
Vasanth
Moderator
Moderator
Moderator
250 sign-ins 500 solutions authored First question asked

Hello Han,

I checked your project and could see the error. I was working with a different device before you have attached the code. I am confirming whether " build completed" is an error from our side in that case. As AmuxHw is expected to work with only GPIOs, so this error expected. One solution for this is to use additional GPIOs, which might not be elegant or efficient. But this will surely enable hardware control with additional GPIOs.

pastedImage_2.png

Or next option is to use normal mux, but then hardware control might not be possible.

Best Regards,
VRS

View solution in original post

0 Likes
13 Replies
Vasanth
Moderator
Moderator
Moderator
250 sign-ins 500 solutions authored First question asked

Hello Han,

I could recreate and build the design you have added at my end.

pastedImage_0.png

Could you please check after unlocking the pins used in the design. Also could you please let me know the part number you are using ?

Best Regards,
VRS

0 Likes
lock attach
Attachments are accessible only for community members.

Hello vrs,

thanks for your help,

my error is shown here,

pastedImage_0.png

is it means that my GPIO settings is wrong?

And hope that you could help me fix this, and BTW your board is same as mine(4200BLE)?

Thank you

best rgds,

HAN

0 Likes
Vasanth
Moderator
Moderator
Moderator
250 sign-ins 500 solutions authored First question asked

Hello Han,

I have problems opening the file you have attached. Could you please attach the file after following the steps. In PSoC Creator ,  go to File -> Create Workspace Bundle -> Select minimal. Please attach the generated file.

Best Regards,
VRS

0 Likes
lock attach
Attachments are accessible only for community members.

Hi VRS:

here's the file generated

thx for ur kindly help

Best rgds,

HAN

0 Likes

Hi vrs:

have you already checked my project file?

and i'm eager to know what's the difference,

thank u

best rgds,

HAN

0 Likes
Vasanth
Moderator
Moderator
Moderator
250 sign-ins 500 solutions authored First question asked

Hello Han,

I checked your project and could see the error. I was working with a different device before you have attached the code. I am confirming whether " build completed" is an error from our side in that case. As AmuxHw is expected to work with only GPIOs, so this error expected. One solution for this is to use additional GPIOs, which might not be elegant or efficient. But this will surely enable hardware control with additional GPIOs.

pastedImage_2.png

Or next option is to use normal mux, but then hardware control might not be possible.

Best Regards,
VRS

0 Likes

Hi Vrs:

I'm now trying using additional GPIOs to solve the problems, the compile is successful but also remains some problems when I test the output with oscilloscope. So may I see your configuration of the GPIOs, I mean the selection of the drive mode and initial state. Thank you.

HAN

0 Likes
Vasanth
Moderator
Moderator
Moderator
250 sign-ins 500 solutions authored First question asked

Hello Wan,

Make sure that you are externally shorting these pins. As directly connecting the IDAC to AMUX was throwing the error, I added these GPIOs. I have kept these pins as analog pins. What is the response you are seeing ?,

Best Regards

VRS

0 Likes

Hi, vrs:

I short the two sets of GPIO pins  correctly and the output is same as you, and I use a 1000 ohms resistance, I use oscilloscope to see the results, the source current I set is 600 uA (For example), the output voltage between the resistance (which is the output current) is about 2.62V, which is not matching with what I set in the PSoC creator, but I didn't know why. So are you successfully see the waveform output of your design?

pastedImage_0.png

pastedImage_1.png

Best rgds,

HAN

0 Likes
Vasanth
Moderator
Moderator
Moderator
250 sign-ins 500 solutions authored First question asked

Hello Han,

There is additional routing and switch resistance involved in the case of analog routing. At what point did you probe the signal ? Is it at the mux output or the additional GPIO pins added. Additionally if you want to get an idea about routing resistance, you can use ohm meter option by right clicking on a pin in CYDWR-> Analog tab. Now this additional resistance will affect your output swing, as there is a drop across this.

Best Regards,
VRS

0 Likes

Also can you send me your file

I will compare it with my original one

thanks

0 Likes
Vasanth
Moderator
Moderator
Moderator
250 sign-ins 500 solutions authored First question asked

Hi,

Could you also tell your exact requirement (inputs, output swing requirement etc)? I will try to find whether a different solution is possible to this  problem.

Best Regards,
VRS

0 Likes

Hi vrs:

thanks for your help

I double check my design and configuration. And change the output port (P1-4) to P1-7, and it works, i will find out the reason later,

thank you so much

Best rgds,

HAN

0 Likes