This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to use a GPIO pin to do Rx's job

Hi,

Are there any examples or any information about how to use a GPIO pin to achieve Rx function? The baud rate is at 4800, 8 N 1, and no flow control. I plan to do the following but I have a problem now.

1. A timer (ISR) is used to sample the GPIO state.
2. A falling edge detector is added. This detector will trigger the sampler.

The problems is: Where should I put the edge detector? In main(), of course, but main() has some thing else to do. Do I have to place the detector "everywhere" in main()? Can I place it in the ISR? Any better ways to accomplish the job and considerations on how to do this job are extremely welcome. Thank you for helping me. By the way, no dual UART 51 and no extra 16550 because of money.

chao.

0