Arduino Serial receiving issue from Atmel 32U2 - Page 1
Forum section: electronics / general

author: zitt
author_rank: Regular Contributor
timestamp: February 25, 2022, 06:31:32 am
content: I'm stumped; hoping someone can or offer a path to success.Back in 2019 I nearly finished a microcontroller design using the ATmega32U2. I had written the code using the Arduino IDE and had a rather rich instruction set communicated over the Serial interface. I ran into some "life getting in the way" things along with some "keep it simple, stupid" ideas which forced me to take the design back to the drawing board in an effort to reduce component count and thereby cost.I created Fab D and got the PCB design back from OSHpark and I re-factored the code I already had and attempted to use it. Welp, sometime between 2019 and now I rebuilt my computer and had to re-install windows 10 clean. I still have the code; but now I can't get the Arduino code to work. Specifically the Serial calls work in that I'm able to send data from the device back to the serial port.But I'm not able to receive anything from the computer into the device.I have the HEX files from the original code; and they do indeed receive/transmit. But newly compiled code doesn't work to receive.I've even went so far as to install one of the "SerialEvent" demos which also doesn't work.I'm convinced that something isn't setup correctly on the clean install of windows; but can't figure out where the problem is if even the simple demo doesn't work.Thoughts?

author: zitt
author_rank: Regular Contributor
timestamp: February 27, 2022, 08:12:27 pm
content: Last night; I did a clean install of Arduino software and a clean install of thehttps://www.mattairtech.com/software/arduino/package_MattairTech_index.jsonfile in board manager.Sample issue of not being able to receive data from host computer.

author: Ian.M
author_rank: Super Contributor
timestamp: February 27, 2022, 10:38:42 pm
content: Did you try an older version of the Arduino IDE that was current when your original project was started +rolling back any 3rd party libraries to the appropriate version? IDE Release dates are here:https://www.arduino.cc/en/software/ReleaseNotesAlso, if messing around with older Arduino IDE versions and old libraries, I recommend doing a portable install of the IDE so it doesn't conflict with any current version you have installed, and any projects that need that. Portable 1.x.x instructions here:https://docs.arduino.cc/software/ide-v1/tutorials/PortableIDE

author: sleemanj
author_rank: Super Contributor
timestamp: February 27, 2022, 10:56:30 pm
content: Did you flash the official Arduino bootloader?Do you have an actual Pro Micro handy to test with?Are you expecting a newline and not sending a newline?Use some bare minimum test-case arduino codeCode:void loop(){while(! Serial.available() );Serial.print("Got Input: ");Serial.println(Serial.read());}

author: zitt
author_rank: Regular Contributor
timestamp: March 01, 2022, 07:22:12 am
content: I went back to the same "ballpark" on the 1.6 release frame.IE I have 1.6.9 on my reimaged box and put 1.6.15 on the test system.I can't used the official Arduino bootloader because this is a 32u2not a u4.Besides; the boot loader doesn't control the Serial port after the code hands off the user program. Right?I can try the minimum suggested test code but I'm fairly sure that won't make a difference.