Timeline for UART sometimes missing first few characters on ATmega328P
Current License: CC BY-SA 4.0
19 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jan 26, 2019 at 15:44 | vote | accept | Bort | ||
| Jan 24, 2019 at 21:58 | answer | added | NMF | timeline score: 2 | |
| Jan 24, 2019 at 21:06 | history | edited | Bort | CC BY-SA 4.0 | Update on flash voltage levels |
| Jan 24, 2019 at 21:01 | comment | added | Bort | @hobbs - If I do that before Serial.begin(), it goes to 0V as expected. Once Serial.begin() occurs, I cannot manually write to the pin and the UART signals have a LOW of ~1.5V. | |
| Jan 24, 2019 at 17:01 | comment | added | hobbs | What if you do a single pinMode(0, OUTPUT); digitalWrite(0, LOW) at startup and then run your usual uart code? Does the behavior change any? | |
| Jan 24, 2019 at 16:53 | answer | added | ace8080 | timeline score: 2 | |
| Jan 24, 2019 at 15:08 | comment | added | Bort | @SpehroPefhany - Sorry, I have dozens of these and the one I was holding at the moment had a crystal: ae01.alicdn.com/kf/HTB1quUCOpXXXXcDXXXXq6xXFXXXR/… | |
| Jan 24, 2019 at 15:04 | comment | added | Spehro 'speff' Pefhany | @Marcelem That's not a crystal at all- it's a ceramic resonator (under the D5 marking on the PCB). Not nearly as accurate as a crystal, but should be okay enough for serial communications. | |
| Jan 24, 2019 at 14:52 | history | edited | Bort | CC BY-SA 4.0 | Added additional test results |
| Jan 24, 2019 at 13:12 | answer | added | Josh H. | timeline score: 1 | |
| Jan 24, 2019 at 4:04 | comment | added | Hot Licks | Another kinda stupid question is whether your program is enabling interrupts, polling, or whatever is needed at the appropriate time. If your program is off doing something else, or if it simply doesn't know the data has arrived, it will miss the data. (Do you check the UART's "overrun" flag?) | |
| Jan 24, 2019 at 3:59 | comment | added | Hot Licks | It sounds to me like the UART isn't synching up correctly. I'm not familiar with modern ones, but 40 years ago you could sometimes select the clock divider value -- 16 was normal but you could go to 4 if you knew your clock and the signal were in sync. The higher the divider (with the clock multiplied appropriately) the better, within reason. | |
| Jan 24, 2019 at 0:28 | history | edited | Bort | CC BY-SA 4.0 | Added update about signal voltage as duskwuff mentioned. |
| Jan 24, 2019 at 0:19 | comment | added | Bort | It's a 16MHz crystal. | |
| Jan 24, 2019 at 0:00 | history | tweeted | twitter.com/StackElectronix/status/1088224981669105664 | ||
| Jan 23, 2019 at 21:35 | comment | added | marcelm | What is your 328Ps clock source, and at what frequency? | |
| Jan 23, 2019 at 21:16 | answer | added | user39382 | timeline score: 10 | |
| Jan 23, 2019 at 20:57 | history | edited | Bort | CC BY-SA 4.0 | added 52 characters in body |
| Jan 23, 2019 at 20:51 | history | asked | Bort | CC BY-SA 4.0 |