Input pin enable/disable in software!!

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

cross mob
ErNo_1148106
Level 4
Level 4
First solution authored 50 replies posted 25 replies posted

All,

How can I enable/disable an input pin in software? I am using a scb configured as a UART component with the TX pin connected through a 1K resistor to the RX pin and then connected to a bidirectional one wire device. The problem I have is I want to disable the RX pin while transmitting data. How can I do this in software? The device I am using is CY8C4025LQI-S411. Any help would be greatly appreciated!!!

Thanks,

Eric

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
Aashita_R
Moderator
Moderator
Moderator
50 likes received 100 solutions authored 250 replies posted

Hi ErNo_1148106

I have attached my project in which, I have configured the direction as TX+RX for the UART configuration of SCB component. I have attached a digital input pin RX to the rx_in of UART component and with the help of the code(image attached), I am disabling the input buffer for the corresponding UART_Rx pin of the device which is P3[0] in my case. Please have a look at the project for more details.

I have used the device CY8C4248BZI-L489 to run the project.

Also, I have shared PSoC 4000S PSoC(R) 4 Register Technical Reference Manual for your convenience. 

You can refer it for your device (CY8C4025LQI-S411) to see which register bit needs to be disabled for the corresponding UART_Rx pin of the device.

Thanks and Regards,

Aashita

View solution in original post

2 Replies
lock attach
Attachments are accessible only for community members.
Aashita_R
Moderator
Moderator
Moderator
50 likes received 100 solutions authored 250 replies posted

Hi ErNo_1148106

I have attached my project in which, I have configured the direction as TX+RX for the UART configuration of SCB component. I have attached a digital input pin RX to the rx_in of UART component and with the help of the code(image attached), I am disabling the input buffer for the corresponding UART_Rx pin of the device which is P3[0] in my case. Please have a look at the project for more details.

I have used the device CY8C4248BZI-L489 to run the project.

Also, I have shared PSoC 4000S PSoC(R) 4 Register Technical Reference Manual for your convenience. 

You can refer it for your device (CY8C4025LQI-S411) to see which register bit needs to be disabled for the corresponding UART_Rx pin of the device.

Thanks and Regards,

Aashita

Hi Aashita,

I managed to try your example and it works perfect... Thank you VERY much!!!  Do you have code to control the output enable through software? I don't want to waste precious control registers to enable disable the outputs.

Will an input pin disable/enable feature/API be added to PSoC Creator and the datasheet in the future? I don't know how many times I looked for this in the past and couldn't find a solution to this problem until now. I was getting close and found the register PC2 but did not find any api on how to set the change. I think the biggest issue I have with psoc is trying to find ways to fix particular issues but have to really dig to get a solution or ask the community. Asking does take longer but in the end it seems to work well if I am not in a hurry.

Will there be a scb uart half duplex mode / one wire addition in the future? Also is there a way I can customize an scb like a udb and if so is there any documentation to do this?

Lastly i pondered the thought of using the SmartIO component but did not see a way to send software commands to it during run time like Write commands etc. to a register or gpio . I seen in the documentation that I can control reconfiguration through software but not individual bits/bytes of data unless im missing something. Is there a way to do this?

Oh one more thing when will the PSOC 6 come out in QFN or TQFP packages? I like the PSOC 6 especially the dual processor and speed but don't like BGA or WLCSP chips due to costly pcbs and its a pain to place them by hand and there is no way to verify shorts without XRAY.

Sorry for the rambling but had to ask the questions... You guys do a great job and appreciate all the work put into the PSOC series... Please let me know when yoou have some time.

Thanks,

Eric

0 Likes