Author Topic: ATMEGA 644P AVR Programming Help Needed  (Read 3525 times)

0 Members and 1 Guest are viewing this topic.

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 4286
  • Country: nl
Re: ATMEGA 644P AVR Programming Help Needed
« Reply #50 on: June 05, 2024, 08:18:26 am »
Whew....and I thought repairing old synths was difficult! ;-)

Wait until you decide to look into the software to see if the flickering is indeed due to poor programming.  :-DD

Offline VinzC

  • Frequent Contributor
  • **
  • Posts: 274
  • Country: be
  • See you later, oscillator.
Re: ATMEGA 644P AVR Programming Help Needed
« Reply #51 on: August 30, 2024, 05:33:20 pm »
I am trying to install a boot loader on an ATMEGA644P and I'm afraid I'm totally way in over my head. This is for a desktop synthesizer, and unfortunately the instructions provided are fairly cryptic to me, including what app I'm supposed to use exactly or how to go about it. I got me an AVRISP mkII programmer connected to my computer, and I was wondering if someone might be able to give me an idea of how to go about what these instructions instruct me to do?

https://pichenettes.github.io/mutable-instruments-diy-archive/shruthi/firmware/

I appreciate all the help any of you can provide.

Many thanks!

I am coming in late to the show and haven't read 100% of the convo and it is still not quite clear to me why you want to burn a bootloader to the ATmega644. In general a bootloader is used to flash a microcontroller in-place, i.e. using a serial communication channel *while the microcontroller resides on its PCB*. From what I understood you had to extract the MCU from its socket and burn the bootloader using an external programming gear (e.g. AVRISPmkII and a 6-pin header), is that correct?

If that's true and unless I missed something, then you do not need a bootloader to program your microcontroller. I have read on https://github.com/Lauszus/Sanguino
Quote
Since the ATmega1284 is not supported by Avrdude.
That information is outdated and incorrect. Recent versions of avrdude *do* support that microcontroller (along with the 644, which the same unit with smaller memory footprints).

Consequently the operations you had to run through to burn the bootloader are the same whether you want to flash a bootloader or flash a program. So it is possible you don't need a bootloader at all. In fact it is not necessary if you can program it on a dedicated socket or via the 6-pin header, in which case the protocol used is "serial downloading", as per the datasheet, see page 299: https://ww1.microchip.com/downloads/en/DeviceDoc/doc2593.pdf.

I don't know if that helps as I am not 100% sure about how you flashed your microcontroller. Anyway congrats for getting through :-+

EDIT: By the way you can have avrdude list all supported microcontroller units:
Code: [Select]
avrdude -p '?'On my machine the list is pretty impressive (~350 items). The only thing you might need to change to add a new microcontroller is avrdude.conf as that file holds the description for all supported units.
« Last Edit: August 30, 2024, 05:42:58 pm by VinzC »
 

Offline pqass

  • Frequent Contributor
  • **
  • Posts: 897
  • Country: ca
Re: ATMEGA 644P AVR Programming Help Needed
« Reply #52 on: August 30, 2024, 09:59:21 pm »
Quote
I am coming in late to the show and haven't read 100% of the convo and it is still not quite clear to me why you want to burn a bootloader to the ATmega644. In general a bootloader is used to flash a microcontroller in-place, i.e. using a serial communication channel *while the microcontroller resides on its PCB*. From what I understood you had to extract the MCU from its socket and burn the bootloader using an external programming gear (e.g. AVRISPmkII and a 6-pin header), is that correct?

Why he wanted to burn a bootloader was never disclosed.  But usually, why is so the same rx/tx serial pins (which are available externally) can do double-duty of app stuff normally + mimic a programmer on boot-up.

However, it was discovered that although there was an ICSP header on his board, he couldn't use it because of a design flaw (MISO was always being driven by a non-tristate pin from a '165).  Hence the need to extract the MCU to burn the bootloader using a different board + AVRISPmkII programmer.

Quote
If that's true and unless I missed something, then you do not need a bootloader to program your microcontroller.

No, it wouldn't be needed as the ICSP header is on the board but it wasn't functional and you'd have to open the product to get to it anyway.
 
The following users thanked this post: VinzC


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf