3.3V AVR Arduinos for SPI Displays

You just connect your ArduinoISP to the target board via its 3x2. The Target is powered via 3x2. The V4 switch should be set to 5V

Select programmer.: Arduino as ISP

Upload the ArduinoISP sketch in the normal way.
Select Board : Uno
Select "Burn Bootloader"

You should see RX, TX activity on the ArduinoISP Uno.
You should see SCK light activity on the Target board.

When done, remove 6-way cable from 3x2.
Plug the V4 into USB. Select V4 COM port. Upload sketch, ... like a normal Uno.

I have always used USBASP, STK500, ATMEL-ICE, ... as programmer
But using ArduinoISP is much the same. (except that ATMEL-ICE can't supply power)

If you have a problem, I will go through the whole process step by step.

Incidentally, if you add the heartbeat LED to your ArduinoISP Uno, you will get a warm feeling that everything is alive and well.

David.

david_prentice:
You just connect your ArduinoISP to the target board via its 3x2. The Target is powered via 3x2. The V4 switch should be set to 5V

Select programmer.: Arduino as ISP

Upload the ArduinoISP sketch in the normal way.
Select Board : Uno
Select "Burn Bootloader"

You should see RX, TX activity on the ArduinoISP Uno.
You should see SCK light activity on the Target board.

When done, remove 6-way cable from 3x2.
Plug the V4 into USB. Select V4 COM port. Upload sketch, ... like a normal Uno.

I have always used USBASP, STK500, ATMEL-ICE, ... as programmer
But using ArduinoISP is much the same. (except that ATMEL-ICE can't supply power)

If you have a problem, I will go through the whole process step by step.

Incidentally, if you add the heartbeat LED to your ArduinoISP Uno, you will get a warm feeling that everything is alive and well.

David.

I did all that, also with the 3 LEDs. It worked fine, until I then tried to download a program to the V4.

When done, remove 6-way cable from 3x2.
Plug the V4 into USB. Select V4 COM port. Upload sketch, ... like a normal Uno.

This is the point where it does not work.

I had also asked, if I can download full programs through the Arduino UNO as ISP to the V4.

But if the V4 decides to not start the boot loader, It might as well decide to not start the program.

I repeated the whole boot loader burning process once more.

This is what I got:

Arduino: 1.8.3 (Windows 10), Board: "Arduino/Genuino Uno"

Sketch uses 928 bytes (2%) of program storage space. Maximum is 32256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.
C:\Users\ZinggJ\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9/bin/avrdude -CC:\Users\ZinggJ\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9/etc/avrdude.conf -v -patmega328p -carduino -PCOM16 -b115200 -D -Uflash:w:C:\Users\ZinggJ\AppData\Local\Temp\arduino_build_991538/Blink.ino.hex:i 

avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Users\ZinggJ\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9/etc/avrdude.conf"

         Using Port                    : COM16
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x5d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x5d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x5d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x5d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x5d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x5d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x5d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x5d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x5d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x5d

avrdude done.  Thank you.

Problem uploading to board.  See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Yes, your photo looks correct.

I did a similar experiment. I used a yellow CH340 clone to program the bootloader on a Blue 16u2 Uno clone.

The first observation was that avrdude whinged about the external fuse being 0x05 and not 0xFD.

I suggest that you edit your boards.txt to say

uno.bootloader.extended_fuses=0xFD

this cures the whingeing and makes you feel better.

I programmed the Target with the Duemilanove bootloader. Test the new "Duemilanove" and it appeared as a Duemilanove.
I then re-connected the target to the yellow Uno and programmed the Uno bootloader. Test as a "Uno". It appeared as a Uno.

I also tested the ArduinoISP with a regular avrdude command line.
It could read Signature, fuses, Flash, EEPROM, ... just like any regular ISP programmer

I really can't see how there could be a problem with your V4.
You have a USB-UART bridge working in the m16u2.
You should have an Optiboot bootloader in the m328p

Of course, I don't know whether you programmed the m16u2 correctly.
You can use ArduinoISP to read the fuse, flash etc of the m16u2

Or you can simply use the ArduinoISP to Upload a comms sketch to your Red board. e.g. ASCIITable.ino
Connect the Red board to USB. Start th Serial Terminal. Press the Reset. The loaded sketch should run.
Just open and close the Serial Terminal should reset your Red board. No need to press the reset button.

Then see if anything appears on your Serial Terminal.

David.

Ok, I know you are an expert, so you know how to do all this.

I rarely use AVR Arduinos, don't know avrdude commands, etc.
So I have a vague idea of what you are suggesting, but don't know how.

If I could load a program to the V4, in any way, I could check if serial output works.
If it doesn't, then normal upload would not work and cause these timeouts.

I copied the avrdude command of a normal upload, tried to change it to use arduinoisp, but failed so far.

The last command I tried was:

C:\Users\ZinggJ\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9/bin/avrdude -CC:\Users\ZinggJ\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9/etc/avrdude.conf -v -patmega328p -carduinoisp -Pusb:bus:COM3 -b115200 -D -Uflash:w:C:\Users\ZinggJ\AppData\Local\Temp\arduino_build_991538/Blink.ino.hex:i

For completeness, I add the full report of the boot loader programming:

C:\Users\ZinggJ\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9/bin/avrdude -CC:\Users\ZinggJ\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9/etc/avrdude.conf -v -patmega328p -cstk500v1 -PCOM3 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0xFD:m -Uhfuse:w:0xDE:m -Ulfuse:w:0xFF:m 

avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Users\ZinggJ\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9/etc/avrdude.conf"

         Using Port                    : COM3
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
         AVR Part                      : ATmega328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : STK500
         Description     : Atmel STK500 Version 1.x firmware
         Hardware Version: 2
         Firmware Version: 1.18
         Topcard         : Unknown
         Vtarget         : 0.0 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: erasing chip
avrdude: reading input file "0x3F"
avrdude: writing lock (1 bytes):

C:\Users\ZinggJ\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9/bin/avrdude -CC:\Users\ZinggJ\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9/etc/avrdude.conf -v -patmega328p -cstk500v1 -PCOM3 -b19200 -Uflash:w:C:\Users\ZinggJ\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20/bootloaders/optiboot/optiboot_atmega328.hex:i -Ulock:w:0x0F:m 
Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of lock written
avrdude: verifying lock memory against 0x3F:
avrdude: load data lock data from input file 0x3F:
avrdude: input file 0x3F contains 1 bytes
avrdude: reading on-chip lock data:

Reading | ################################################## | 100% 0.01s

avrdude: verifying ...
avrdude: 1 bytes of lock verified
avrdude: reading input file "0xFD"
avrdude: writing efuse (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of efuse written
avrdude: verifying efuse memory against 0xFD:
avrdude: load data efuse data from input file 0xFD:
avrdude: input file 0xFD contains 1 bytes
avrdude: reading on-chip efuse data:

Reading | ################################################## | 100% 0.01s

avrdude: verifying ...
avrdude: 1 bytes of efuse verified
avrdude: reading input file "0xDE"
avrdude: writing hfuse (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of hfuse written
avrdude: verifying hfuse memory against 0xDE:
avrdude: load data hfuse data from input file 0xDE:
avrdude: input file 0xDE contains 1 bytes
avrdude: reading on-chip hfuse data:

Reading | ################################################## | 100% 0.01s

avrdude: verifying ...
avrdude: 1 bytes of hfuse verified
avrdude: reading input file "0xFF"
avrdude: writing lfuse (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0xFF:
avrdude: load data lfuse data from input file 0xFF:
avrdude: input file 0xFF contains 1 bytes
avrdude: reading on-chip lfuse data:

Reading | ################################################## | 100% 0.01s

avrdude: verifying ...
avrdude: 1 bytes of lfuse verified

avrdude done.  Thank you.

I had to shorten it.

The bootloader programming log looks fine.

Disconnect the ArduinoISP.
Plug red board into USB.
Select the Red board's COM port.

You should be able to run your Red V4 just like a regular Uno. i.e. Upload sketches with bootloader, print to Serial Terminal etc.

Does the Red 16u2 appear as a COM port in Device Manager? Or in IDE?

I am not sure what -c arduinoisp does.
-c arduino is bootloader
-c stk500v1 is ISP

David.

Disconnect the ArduinoISP.
Plug red board into USB.
Select the Red board's COM port.

done, once again.

You should be able to run your Red V4 just like a regular Uno. i.e. Upload sketches with bootloader, print to Serial Terminal etc.

this is where it fails with timeouts on all retries, as reported before.

Does the Red 16u2 appear as a COM port in Device Manager? Or in IDE?

Yes, "COM16 (Arduino/Genuino Uno)"

I am not sure what -c arduinoisp does.
-c arduino is bootloader
-c stk500v1 is ISP

neither am I, this was the closest to "Arduino as ISP".
Next try with -cstk500v1

Thank you.

C:\Users\ZinggJ>C:\Users\ZinggJ\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9/bin/avrdu
sers\ZinggJ\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9/etc/avrdude.conf -v -patmega3
500v1 -PCOM3 -b115200 -D -Uflash:w:C:\Users\ZinggJ\AppData\Local\Temp\arduino_build_991538/Blink.ino.hex:i

avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Users\ZinggJ\AppData\Local\Arduino15\packages\arduino\tools\avrd
-arduino9/etc/avrdude.conf"

         Using Port                    : COM3
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 115200
         AVR Part                      : ATmega328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : STK500
         Description     : Atmel STK500 Version 1.x firmware
         Hardware Version: 3
         Firmware Version: 4.4
         Vtarget         : 0.3 V
         Varef           : 0.3 V
         Oscillator      : 28.800 kHz
         SCK period      : 3.3 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x000000 (retrying)

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x000000 (retrying)

Reading | ################################################## | 100% 0.04s

avrdude: Device signature = 0x000000
avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check.


avrdude done.  Thank you.


C:\Users\ZinggJ>

next try:

C:\Users\ZinggJ>C:\Users\ZinggJ\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9/bin/avrdude -CC:\
sers\ZinggJ\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9/etc/avrdude.conf -v -patmega328p -cst
500v1 -PCOM3 -b115200 -D -Uflash:w:C:\Users\ZinggJ\AppData\Local\Temp\arduino_build_991538/Blink.ino.hex:i -F

avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Users\ZinggJ\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.
-arduino9/etc/avrdude.conf"

         Using Port                    : COM3
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 115200
         AVR Part                      : ATmega328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : STK500
         Description     : Atmel STK500 Version 1.x firmware
         Hardware Version: 3
         Firmware Version: 4.4
         Vtarget         : 0.3 V
         Varef           : 0.3 V
         Oscillator      : 28.800 kHz
         SCK period      : 3.3 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.03s

avrdude: Device signature = 0x000000 (retrying)

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x000000 (retrying)

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x000000
avrdude: Yikes!  Invalid device signature.
avrdude: Expected signature for ATmega328P is 1E 95 0F
avrdude: safemode: hfuse reads as 0
avrdude: safemode: efuse reads as 0
avrdude: reading input file "C:\Users\ZinggJ\AppData\Local\Temp\arduino_build_991538/Blink.ino.hex"
avrdude: writing flash (928 bytes):

Writing | ################################################## | 100% 0.19s

avrdude: 928 bytes of flash written
avrdude: verifying flash memory against C:\Users\ZinggJ\AppData\Local\Temp\arduino_build_991538/Blink.ino.hex:
avrdude: load data flash data from input file C:\Users\ZinggJ\AppData\Local\Temp\arduino_build_991538/Blink.ino.hex:
avrdude: input file C:\Users\ZinggJ\AppData\Local\Temp\arduino_build_991538/Blink.ino.hex contains 928 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.15s

avrdude: verifying ...
avrdude: 928 bytes of flash verified

avrdude: safemode: hfuse reads as 0
avrdude: safemode: efuse reads as 0
avrdude: safemode: Fuses OK (E:00, H:00, L:00)

avrdude done.  Thank you.


C:\Users\ZinggJ>

Now it blinks! Hooray! Stupid: it blinks because LED is 13 = SCK = connected to master, master blinks, somehow upload was to master

Thank you!

Don't use guesswork. Follow a proper plan. i.e. burn bootloader, use bootloader.

Whenever you fiddle about with ISP programmers you destroy existing bootloaders.

Since you know that you can install a bootloader ok with ArduinoISP, you could Upload sketches with ISP if you really want.

Note that you have to restore the Bootloader before you can use the V4 as Nature intended.

If you don't trust yourself to follow a proper plan, dig the deep hole before you start.
Then you can disconnect the ArduinoISP and bury it as soon as "Burn Bootloader" has completed.

Seeed generally supply schematics. I can't believe that they would make a mistake with schematic or pcb. The "Seeeduino" board has been available for many years. If you do find a routeing error, I would have a full and frank discussion with them. They are a hardware company and not a Lingerie shop.

David.

It is now fairly clear: it blinked after upload with ISP trough second UNO running ArduinoISP.

But after disconnect and power up, same situation as before: ~4 fast blinks and then silence.

Neither the boot loader nor the loaded program get started up.

Is this a problem with fuse values? or the wrong identification avrdude complained about?

avrdude: Device signature = 0x000000

This could mean the processor chip did not pass quality check and thus got no signature?

Can the device signature be programmed with avrdude, can you tell me the command to use?

Please follow the steps that I have outlined.
Write each step down on paper.
Number it.

Then post exactly what you have done. i.e. the full list of numbered steps.

And report what you expected and what you got.

I suspect that you own more than one yellow clone.
You can do experiments with two proven hardware boards.

e.g. burn a fresh bootloader
e.g. Upload sketch with programmer
e.g. observe how bootloader is destroyed.

It is quite possible that Seeed have been selling a load of V4.2 quality control failures.
Seeed is a company with a good reputation. This is very unlikely.
Google would soon reveal unhappy punters from across the world.

After you have gained experience with the proven hardware, you can try again with the V4.2.
I can assure you that the "Burn Bootloader" procedure is very straightforward.

All debugWIRE users will do it regularly at the end of a development cycle.
Ok, they probably use an ATMEL-ICE rather than ArduinoISP.ino

The vast majority of Arduino owners never touch ISP. The boards work straight out of the box.

David.

I would really appreciate if you just answer my questions, instead of repeating what I already know.

Anyway, I started asking for replacement from Seeed-Studio, as there are multiple issues with these V4.2.
Obviously no quality control has been done, as both processors came un-programmed.

I wasted much time with this; some of it was worth it for learning.

I still would like to learn if the Device Signature can be programmed. <- this is my question.

No.

The V4.2 seems to have been on the market for over a year.
Google does not produce reports from unhappy customers.

I bet that there are several V4.2 owners on this Forum.
Perhaps we will hear from other owners.

As I said earlier, it is unlikely that Seeed would sell their own products if damaged. If you have reported a genuine problem, I am sure that they would refund or replace.

Sh*t happens. Even for a respected company. We will have to wait and see.
I would expect an experienced user to follow a logical strategy.

David.

There is simply no chance to upload programs over serial or USB, if the clock speed of the ATmega328p is wrong!

I finally was able to upload over second Arduino through ArduinoISP. I uploaded program ASCIITable.

I got output to Serial Monitor, but this output is in none of the selectable bitrates.

PS: I had a plan: the plan was to find out why upload over USB does not work, why this serial communication fails (as reported by avrdude). Now I know. And I learned a lot the hard way.

Measurements:

Quartz frequencies are 16MHz, as marked on the quartz.

ATmega16u2: bitrate selected 19200 -> resulting tx bitrate 1200

ATmega328p: bitrate selected 19200 -> resulting tx bitrate 9600

The bitrate for ATmega16u2 was set in the Serial Monitor.
The bitrate for ATmega328p was set by Serial.begin(19200) in ASCIITable.ino.

You concluded that your yellow Unos were wrong.
To join the red V4.2 which is wrong.

Obviously Arduinos will work 100% for the rest of the world but fail in Zentralschweiz.

Have you considered moving?

David.

david_prentice:
You concluded that your yellow Unos were wrong.
To join the red V4.2 which is wrong.

Obviously Arduinos will work 100% for the rest of the world but fail in Zentralschweiz.

Have you considered moving?

David.

How do you come to this conclusion? The measurements and findings are for the Seeeduino V4.2.

I understand the misunderstanding: the second Arduino is the yellow one. There was a small difference in the avrdude command, to upload to the final target.

We already have 555 reads, so this will be noticed. I have 2 defective Seeeduino V4.2. I believe there will be more, with this reduced price.

You should just install the standard 16u2 COM firmware. It will provide a regular USB CDC device. i.e. anything written to the 328p USART will go to your PC via USB.
The 16u2 will have a crystal. The USB will only work if the 16u2 has the correct crystal.

I suggested that you experimented with ISP on your yellow clones.
You will gain familiarity and experience.

When you are comfortable with Uploading a sketch with ISP on a yellow Uno, you can try it with the red V4.2

An AVR clock speed is determined by fuses (and crystal). The Burn Bootloader process sets the fuses and lock bits correctly.

An Arduino sketch is compiled and built according to the parameters in boards.txt
i.e. F_CPU and target processor chip.

The easiest way to verify the clock speed etc is to run a Blink sketch.
You should get a 1Hz blink on yellow Uno or red V4.2

#35 makes little sense. You never "set" 16u2 baudrate. You use Serial.begin(9600) in your sketch.

The ASCIITable.ino example sets baudrate to 9600
If your PC terminal only displays ASCIITable output text when it is set to 4800 baud, say so.

David.

Added explanation how bitrates were set.
David should know what the baud dropdown list in Serial Monitor is for.

ZinggJM:
Quartz frequencies are 16MHz, as marked on the quartz.

ATmega16u2: bitrate selected 19200 -> resulting tx bitrate 1200

ATmega328p: bitrate selected 19200 -> resulting tx bitrate 9600

The bitrate for ATmega16u2 was set in the Serial Monitor.
The bitrate for ATmega328p was set by Serial.begin(19200) in ASCIITable.ino.

I understand that you have selected 19200 in Serial Terminal dropdown menu (at bottom right of pane)
And you have set Serial.begin(19200) in the ASCIITable.ino sketch.

How can bitrate for ATmega16u2 result in 1200 baud?
If you selected 19200 baud, it will use 19200 baud. It is a PC program that has nothing to do with your AVR.

How can bitrate for ATmega328p result in 9600 baud?
If your yellow Uno or red V4 has incorrect fuses it could run on 8MHz RC instead of 16MHz crystal.

Likewise, if your boards.txt does not match the hardware. But in that case you might have selected an "8MHz board" but are using 16MHz hardware. (in which case it would run at 38400 baud)

I would be a lot happier if you used the ASCIITable.ino example as God had originally written it.
And if you followed a proper procedure when burning the Bootloader.

If you want to use ISP, you should observe the fuse values that are reported at the end of the ISP session.

Seriously. Practice with two yellow Unos. Obtain familiarity and experience before you repeat with the red V4.

David.