Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > PSoC® 3 > UART - how to read 0 (zero)

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



UART - how to read 0 (zero)
Moderator:
RKRM

Post Reply
Follow this topic



UART - how to read 0 (zero)

rajasekhar posted on 16 Jan 2013 12:13 AM PST

1 Forum Post
hi...
I want to read ZERO '0' on the UART receive pin.
But it giving a ststus of error or no data in the buffer, when I use the functions --  UART_GetChar() and UART_Read _Tx_Data().
So please help how to read the value '0' on the UART...
 
 
thankyou.



Re: UART - how to read 0 (zero)

Bob Marlowe posted on 16 Jan 2013 06:31 AM PST
Top Contributor
1768 Forum Posts

Use UART_GetRxStatus() and test for a byte already received and read it with UART_ReadRxData().

 

Bob



Re: UART - how to read 0 (zero)

danaaknight posted on 17 Jan 2013 05:06 AM PST
Top Contributor
1773 Forum Posts

Are you trying to test for the logic state of the pin itself ? Independent

of UART framing ?

 

If this is the case you could poll the pin using - CyPins_ReadPin(pinPC)

 

 

Regards, Dana.



Re: UART - how to read 0 (zero)

PSoC Rocks posted on 19 Jan 2013 09:46 PM PST
Top Contributor
128 Forum Posts

Use the existing UART example project and try to send 0x00 from hyperterminal or vice versa. It would definitely work.



Re: UART - how to read 0 (zero)

danaaknight posted on 20 Jan 2013 12:32 PM PST
Top Contributor
1773 Forum Posts

His stated problem is "I want to read ZERO '0' on the UART receive pin.",

not how do I send and receive "0" as a character into the UART buffer.

 

Regards, Dana.






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Spec No: None; Sunset Owner: GRAA; Secondary Owner: RAIK; Sunset Date: 01/01/20