I bought a low cost ATmega128 development card and connected a CP2102 bridge to the card's ISP port with the following connections:
CP2102N ------------>>>>ATmega128 Processor Pin
TXD (out)-------------->>>>ATmega pin 2 RXD0/PDI (input)
RXD (in)----------------->>>>ATmega pin 3 TXD0/PDO(out)
DTR (out)--------------->>>>ATmega pin20(not RESET)(in) through 100nF capacitor
In addition, +5V from the USB port is connected to ATmega128 Vcc along with ground.
I found the MegaCore board package from MCUdude. I used File > Preferences > Additional Board Manager URLs to point to:
https://mcudude.github.io/MegaCore/package_MCUdude_MegaCore_index.json
to get the MegaCore Board Manager installed in the Arduino IDE. That was successful I believe. I was then able to select the MegaCore board and the ATmega128 option.
Additionally, I installed the CP2102 driver from Silicon Labs and when connected to my PC USB port showed as COM3 and as a functioning device.
In the Arduino IDE, I made a simple blink program that compiled fine but even though the IDE recognized a board on COM3, it could not upload and the sketch and failed with the following errors shown below.
avrdude: Version 7.2-arduino.1
-
Copyright the AVRDUDE authors;* -
see https://github.com/avrdudes/avrdude/blob/main/AUTHORS* -
System wide configuration file is C:\Users\craig\AppData\Local\Arduino15\packages\MegaCore\hardware\avr\3.0.1\avrdude.conf* -
Using Port : COM3* -
Using Programmer : urclock* -
Overriding Baud Rate : 57600*
avrdude ser_open() error: cannot open port \.\COM3: The system cannot find the file specified.
avrdude main() error: unable to open programmer urclock on port COM3
avrdude done. Thank you.
Failed uploading: uploading error: exit status 1
Several things confuse me - The IDE shows me that COM3 is connected and the device manager in windows shows me the CP2102 device is working yet the IDE says it can't open COM3 and it can't open the urclock programmer on COM3 either. What file can it not find that the system specified?? Do I need to download something else?? Do I need to edit the avrdude.conf file??
I must be missing something fundamental??? I am assuming that I am connected to the PDI/PDO port of the ATmega and that this is a valid port for programming. Is this correct? Do I need to burn a bootloader first? If so, o I use the same port connections and the Arduino Burn Bootloader tool?
Any guidance would be greatly appreciated!!
