Electrical – Clarification on using software serial with AVR’s

atmegaavrcserial

Arduino appears to be able to use software serial on any pins you choose. I am trying to test the same scenario on an atMega128 however, all of the examples and notes I find require using the RX pin on External Interrupt 0 which is PIND0. I have successfully implemented TX on any pin I choose. My question is very specific. Can a RX pin for software serial be implemented on any GPIO pin I choose? If so, is there an example of how to test this. I Have not been able to get the RX working in my environment. Thanks

Best Answer

AVR305 explains how to implement a software UART on any two pins. Note that not using an interrupt means that the CPU busy-waits on the start bit instead of being notified when reception should begin.