Announcements
IMPORTANT: Cypress Developer Community is transitioning on October 20th. To learn more and be prepared for this change, check out our latest announcement.
cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC Creator & Designer Software

WiWi_4702256
Contributor II

One Wire SCB UART

This all began from the above link, my wanting to implement a "one-wire" and I put that in quotes since it really is not a one-wire implementation, that is a specific protocol that allows you to communicate with one-wire devices.

It is a design to use one-pin, or you could call it a half_duplex even though you use a full duplex UART SCB.

Anyway... I figured out how to synthesize a bufoe logic component woot woot!!!

I provided it just in case there my be others that needed to use it or wanted to know how...

Turns out the project hardware engineer implemented a circuit that will provide the one-pin interface allowing me to use a full duplex UART SCB.

William

0 Likes
1 Solution
VenkataD_41
Moderator
Moderator

Hi William,

Thank you for uploading your project in Cypress web Forums.

Best Regards

Ganesh

View solution in original post

5 Replies
VenkataD_41
Moderator
Moderator

Hi William,

Thank you for uploading your project in Cypress web Forums.

Best Regards

Ganesh

View solution in original post

Len_CONSULTRON
Honored Contributor II

William,

I downloaded your project.  The TopDesign of this implementation provided no routing from the UART to the Buf_oe component.

If I understood your intent correctly, below is a TopDesign representation of what you were intending.

In this implementation it takes 7 pins on the PSoC6 to implement with 4 externally routed traces.

Sadly, on a PSoC5 it only takes 1 pin.  The rest are internally routed.

Len

Len
"Engineering is an Art. The Art of Compromise."
0 Likes
WiWi_4702256
Contributor II

Len,

Your absolutely correct. There is way to much pin usage, I did not realize that until I finally learned how to synthesize the bufoe component. Same with SmartIO, that was easy to get set up following the provided project but way to much pin usage. Both were disqualified. It appears Cypress has an aversion to one pin half duplex communications...

Second, no matter what I tried, if I connected the UART to the bufoe during synthesize, it would not synthesize.

I ended up running with your design because of that and it offered one pin usage...  I called it Len's Half Duplex...

LensHalfDuplex.gif

However, no matter what I did... take firmware control of pins and swapping them...

/* Connect SCB2 UART function to pins */

   

/* Configure pins for UART TX operation */
Cy_GPIO_SetHSIOM(GPIO_PRT10, P10_0_NUM, P6_1_GPIO);
Cy_GPIO_SetDrivemode(GPIO_PRT10, P10_0_NUM, CY_GPIO_DM_HIGHZ);
Cy_GPIO_SetHSIOM(GPIO_PRT10, P10_1_NUM, P6_1_GPIO);
Cy_GPIO_SetDrivemode(GPIO_PRT10, P10_1_NUM, CY_GPIO_DM_STRONG_IN_OFF);

            /* Configure pins for UART RX operation */
            Cy_GPIO_SetHSIOM(GPIO_PRT10, Pin10_1_NUM, P10_0_SCB1_UART_RX);
            Cy_GPIO_SetDrivemode(GPIO_PRT10, Pin10_1_NUM, CY_GPIO_DM_HIGHZ);

    /* Configure pins for UART TX operation */
    Cy_GPIO_SetHSIOM(GPIO_PRT10, Pin10_1_NUM, P10_1_SCB1_UART_TX);
    Cy_GPIO_SetDrivemode(GPIO_PRT10, Pin10_1_NUM, CY_GPIO_DM_STRONG_IN_OFF);

Of course the slave would reverse that using Pins 9.0 and 9.1...

I simply could not get it to work with one wire configuration as seen below jumper between 10.1 and 9.1

HookedTx2Tx.jpg

Of course with two-wire

HookTx2Rx.jpg

Worked like a champ...

ResultTx2Rx.png

So, the blue dotted lines on the display means they are NOT actually physically connected... I get that, but I still don't understand if I tell the HSIOM to send the UART_RX to pin 10.1(tx) and on the slave tell HSIOM to send UART_TX to pin 9.0(rx) then why doesn't it do just that? I will have to revisit that... I am @ two weeks behind now so I cant work it now. I am working on sending and receiving files to/from a S3 bucket on AWS IoT Core...

Anyway, the project hardware engineer used some maxim chips to design the one-pin so that I am able to use full duplex UART, however I am going to let them worry about the single pin devices... I was told originally that no hardware mods were going to be made to the devices...

Happy 4th Len!

William

0 Likes
WiWi_4702256
Contributor II

I meant "if I tell the HSIOM to send the UART_RX to pin 10.1(tx) and on the slave tell HSIOM to send UART_TX to pin 9.1(tx)"

0 Likes
WiWi_4702256
Contributor II

Ahhhhhhhh.... Once again... brillant!!! LOL I see what you did now to get it to synthesize!

pastedImage_0.png

You added pins to the rx_in, tx_out and tx_en_out of the UART component and then connected those pins to the pins you added to the bufoe... cool! I never even thought of that...

William

0 Likes