Hey guys, im stuck with an issue. I took over my colleague's (more like my boss) project as he passed away last month. He designed a sensor which uses the ATMega328pb processor to measure %rh, temperature and atmposheric pressure. The thing is I was able to upload the bootloader (a hex file compatible with stk500v2) onto the sensor's PCB which has the atmega using JTAGICEmkII ISP programmer and Microchip studio. But when it comes to uploading the firmware using command prompt using the command avrdude -C:... but when I hit enter I get the message avrdude: ser_rec<>: programmer is not responding followed by avrdude:stk500v2_receivemessage<>:timeout. Any idea this can be solved?
I tried checking the Tx and Rx, they are connected correctly, changed the cable just in case, verified the baudrate and also the COM port. I dont know how to take this forward. Any help would definitely be appreicated.
I am definitely not an expert, until now I just played with microcontrollers like Uno and Raspberry Pi and I am pretty new at my job and the only one from my department.
Can you post the complete command line with all parameters you are using please?
Since you said that you programmed it using a programmer, that will have wiped the boot-loader. You first need to re-install it using the programmer. After that you will be able to re-attempt to upload the program over serial with avrdude.
As @lastchancename mentions in his 3rd point, if you are using some type of UART breakout board as opposed to a built in USB port, then RESET also needs to be toggled. This can be done manually, but connecting a capacitor (4.7uF, 10uF - its not that critical) between DTR on the breakout board and and the RESET pin on the 328PB will pulse it automatically and makes things a bit easier.
the 328 doesnt have the bootloader installed when it got shipped, I flashed the bootloader using the JTAG ISP programmer by connecting the GND, MOSI, MISO, SCK and RESET pins on my 328P. COM port has been selected using the applied baudrate and I cross checked it using RealTerm Serial Capture program. The third one, I havent tried yet, will do and get back to you.
Yes, that's true. Uno and Nano classic boards have the bootloader pre-installed, but the chip itself doesn't. We had no way of knowing whether something might have already been installed on it (perhaps by your late boss/colleague) previously, so thank you for clarifying.