greeeg 460 Posted April 15, 2016 Share Posted April 15, 2016 Just yesterday I was battling with a atmega328pb (more internal peripherals than standard atmega328p). Specifically I wanted to use the UART1 port to receive data from a GPS. My old setup uses a software serial implementation. After a whole day of debugging this second port not working. I'd concluded UART0 TX and RX worked fine. UART1 TX worked fine, but no RX. My scope was showing the serial stream from the GPS. All the pins were correct. Turns out the AVR wasn't registering the HIGH level from the GPS (3v) as HIGH because it's running from 5v. /facepalm Didn't even consider it a factor since the atmega328p worked with the 3v signal fine. Adding a level translator and everything just works. roadrunner84 1 Quote Link to post Share on other sites
cde 334 Posted April 15, 2016 Author Share Posted April 15, 2016 Just yesterday I was battling with a atmega328pb (more internal peripherals than standard atmega328p). Specifically I wanted to use the UART1 port to receive data from a GPS. My old setup uses a software serial implementation. After a whole day of debugging this second port not working. I'd concluded UART0 TX and RX worked fine. UART1 TX worked fine, but no RX. My scope was showing the serial stream from the GPS. All the pins were correct. Turns out the AVR wasn't registering the HIGH level from the GPS (3v) as HIGH because it's running from 5v. /facepalm Didn't even consider it a factor since the atmega328p worked with the 3v signal fine. Adding a level translator and everything just works. Yeah, VIH levels are tricky. The AVR Mega line is supposed to accept VCC * 0.6 as input high, but that's the minimum. So 3 at 5V. But if your at 5.1V and the input is at 2.9V... tripwire 1 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.