I have conducted several experiments with
AVRPascal, in two sessions. The first session took place on 07-10-2024, and the second one today (i.e. 06-11-2024). During the first session I used
AVRPascal version 2.5, but today I updated
AVRPascal and used version 2.7. For the experiments I used:
- hardware: Arduino Uno R3, Waveshare clone (https://www.waveshare.com/uno-plus.htm),
- operating system: Windows 10 64-bit,
- software 1: AVRPascal - 2.5 (session I), 2.7 (session II),
- software 2: Arduino IDE 2.3.3.
The Arduino board is powered by a USB cable. It is visible in Windows on the virtual
COM5 port. It is recognized by
AVRPascal as
Arduino Nano. The probable cause is that it uses the
FT232RL chip for communication (VID assigned to FTDI, PID assigned to the mentioned IC).
I performed the tests on 2 simple programs with a blinking LED:
- TestBlink.pas,
- TestDigital.pas.
Compilation runs quickly and without problems. In the
AVRPascal program options, on the
Compiler tab, I selected
Arduino Uno as the device type every time. During upload, I set:
- Interface: Arduino,
- Port: COM5,
- Device: ATmega328P,
- option: Upload Flash memory.
After confirming the upload (
OK button in the
Upload dialog),
AVRPascal reports subsequent (unsuccessful) attempts to communicate with the board:
„avrdude error: programmer is not responding
avrdude warning: attempt 1 of 10: not in sync: resp=0x00
avrdude error: programmer is not responding
avrdude warning: attempt 2 of 10: not in sync: resp=0x00
avrdude error: programmer is not responding
avrdude warning: attempt 3 of 10: not in sync: resp=0x00
avrdude error: programmer is not responding
avrdude warning: attempt 4 of 10: not in sync: resp=0x00
avrdude error: programmer is not responding
avrdude warning: attempt 5 of 10: not in sync: resp=0x00
avrdude error: programmer is not responding
avrdude warning: attempt 6 of 10: not in sync: resp=0x00
avrdude error: programmer is not responding
avrdude warning: attempt 7 of 10: not in sync: resp=0x00
avrdude error: programmer is not responding
avrdude warning: attempt 8 of 10: not in sync: resp=0x00
avrdude error: programmer is not responding
avrdude warning: attempt 9 of 10: not in sync: resp=0x00
avrdude error: programmer is not responding
avrdude warning: attempt 10 of 10: not in sync: resp=0x00
avrdude error: unable to open programmer arduino on port com5
avrdude done. Thank you.”
Attempting to program the board fails. I decided to check if the
Arduino IDE would also have trouble programming the microcontroller. The Arduino board had been used many times before with the
Arduino IDE, both in the 1.8 series and the newer 2.0 series. To be sure that the hardware was not the cause of the programming failure, I did not disconnect the USB cable (or make any hardware changes).
I closed the
AVRPascal program. I launched the
Arduino IDE program and checked if it reads the board information. I received the information:
VID: 0x0403,
PID: 0x6001 (the same as reported by
AVRPascal). I loaded a similar (equivalent) code in C++, i.e. LED blinking. Compilation is fast and without problems. Programming is also fast and efficient, and the microcontroller is programmed the first time. The program uploaded to the microcontroller works as expected.
Both IDEs use the program
avrdude to write the input to the microcontroller.
AVR Pascal 2.7 uses
avrdude in version 7.2, while
Arduino IDE 2.3.3 uses
avrdude in version 6.3.
So: what causes problems with uploading the batch to the Arduino microcontroller using
AVRPascal?