Author Topic: Arduino Serial receiving issue from Atmel 32U2  (Read 913 times)

0 Members and 1 Guest are viewing this topic.

Offline zittTopic starter

  • Regular Contributor
  • *
  • Posts: 113
  • Country: us
    • Pinball-Mods.com
Arduino Serial receiving issue from Atmel 32U2
« on: February 25, 2022, 06:31:32 am »
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?
 

Offline zittTopic starter

  • Regular Contributor
  • *
  • Posts: 113
  • Country: us
    • Pinball-Mods.com
Re: Arduino Serial receiving issue from Atmel 32U2
« Reply #1 on: February 27, 2022, 08:12:27 pm »
Last night; I did a clean install of Arduino software and a clean install of the https://www.mattairtech.com/software/arduino/package_MattairTech_index.json
file in board manager.

Sample issue of not being able to receive data from host computer.
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12864
Re: Arduino Serial receiving issue from Atmel 32U2
« Reply #2 on: February 27, 2022, 10:38:42 pm »
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/ReleaseNotes

Also, 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
« Last Edit: February 27, 2022, 11:25:25 pm by Ian.M »
 

Offline sleemanj

  • Super Contributor
  • ***
  • Posts: 3025
  • Country: nz
  • Professional tightwad.
    • The electronics hobby components I sell.
Re: Arduino Serial receiving issue from Atmel 32U2
« Reply #3 on: February 27, 2022, 10:56:30 pm »
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 code

Code: [Select]
void loop()
{
  while(! Serial.available() );
  Serial.print("Got Input: ");
  Serial.println(Serial.read());
}

~~~
EEVBlog Members - get yourself 10% discount off all my electronic components for sale just use the Buy Direct links and use Coupon Code "eevblog" during checkout.  Shipping from New Zealand, international orders welcome :-)
 

Offline zittTopic starter

  • Regular Contributor
  • *
  • Posts: 113
  • Country: us
    • Pinball-Mods.com
Re: Arduino Serial receiving issue from Atmel 32U2
« Reply #4 on: March 01, 2022, 07:22:12 am »
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 32u2 not 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.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf