Atmega4808 using a ch340 to program? - Solved2

Hello I was wonder if it is possible to use the RX and TX to program the atmega4808 and use Serial monitoring? I have been using a UPDI programmer to program the processor. I would love to see Serial monitoring and programming and wonder if this is possible. Has anyone tried this? I'm 2 weeks left before I head home to test this. at the moment I'm to far. Any advice would be great Thank you.

Joseph

Hello Juraj, I did see that site But I got confused on How to use Serial programming to make it work.

Edit: Oh I see I have to select it in the board manger area. Sorry about that. It went way over my head and I didn't understand it. Thank you very much.

Joseph

Hello, Just a update I have busy, But now I wanted to pick back up this subject. I'm unsure For programming which to select for Serial RX TX programming. There are multiple uarts to seleect from. Which one Do I select so I can use the uart programming?

Joseph

the uart on which the bootloader should listen for upload

The problem is in the ide there is uart0, uart1, default and alternative. So I’m unsure which one?

Joseph

Which UART did you wire up to your CH340?

When you used UPDI to program the bootloader, which of the 6 bootloader options did you choose as that determines which UART and which pins you need to connect the CH340 up to.

If you already have a bootloader installed on the 4808, then you select the COM port associated with the CH340 in the PORT menu option

Hello mark. I didn’t wire up a ch340 yet. That is what I’m a little confused on. There are a few tax and rx pins. I’m guessing I might need to do the uart0. But on the pinout there are two of them?

Joseph

Yes, there are what are called alternate pins for quite a few functions. The 4808 is available as a 28-pin or 32-pin device. If yours has pins down 2 opposite sides, then you have the 28-pin device. If the device is square with pins on all 4 sides, then you have the 32-pin device.

If you go with the standard pinout, then for the 28-pin device, TxD0 & RxD0 are on pins 22 & 23, and for the 32-pin device, they are on pins 30 & 31. You would then select the bootloader as Optiboot (UART0 default pins) and program the bootloader using your UPDI tool.

Thank you mark for explaining how this works. I was confused. That helps me a lot. From what I’m reading and seeing once I start using the uart pins the updi pin for programming are no longer able to use correct and I can still be able to program through the rx and tx pins?

Joseph

Once you have a bootloader installed, then you can program the device using the serial link just like an Arduino UNO. You don't need the UPDI programming tool once the bootloader is programmed in.

Have a read of Minimal ATmega4809 on a Breadboard as it may help. It's for the 4809 but the basics are the same.

Mark, You are awesome, And everyone else in the community. Thank you very much.

Joseph

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.