Something wrong with atmega4809

Go To Last Post
9 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It’s not something wrong with the 4809 really it’s that it’s not working when I have to disconnected from the nano programmer. I am using a nano with jtag to program my atmega4809 boards. However, SD works perfectly fine when I use it while still connected to the programmer, but when I run the board on it’s own the SD doesn’t work at all. What’s up with that? Why would that make any difference? Shouldn’t the atmega4809 being running exactly the same way either way? The nano shouldn’t have any influence on anything aside from programming. What gives? Please help. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Bad ground connection perhaps, which the programmer provides when connected!

can you post a clear picture of your setup, please.

 

jim

 

FF = PI > S.E.T

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I tested the pins. They are getting the voltage both ways. You won’t be able to see any traces these are on a PCB with headers for programming 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What's the failure mode? MCU reset, garbage data, magic smoke?

 

What's your power source? SD cards are notoriously power hungry, 100mA+ peak current draw. Do you have sufficient decoupling caps on the MCU and card slot?

 

Is brown-out detection enabled? At what threshold voltage?

 

Is the RESET pin enabled? Controlled via programmer and floating when disconnected?

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

When the board is turned on it searches for a file. If file found it updates an eeprom. This is before the main loop but I also tried it via function with button press.  It works fine when the arduino is plugged into the pin headers. Without the pinnheaders, power is from a mini-usb. Then it basically just functions as if the file wasn’t found, it just operates as normal. 

voltage is the same on SD module and I tried to power it through the headers without the updi being connected and it didn’t work.

no brownout 

 

reset pin is unused, floating 

Last Edited: Sun. Jun 26, 2022 - 10:45 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

DLXXV wrote:
It’s not something wrong with the 4809

 

Could you change your headline? 

That is definitely wrong...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It’s wrong but I’m not sure if it’s how to say it. I figured out how to fix it though. Turning on Serial does the trick. I wasn’t planning on using serial though and one of my LED is inadvertently using the pin. So, I am turning SD and Serial on and off as needed only. Anyone help me out with why this happens? Is SD module tied to Serial? I mean this is happening to all the boards so it’s obviously something along those lines. I just didn’t expect it and don’t know why it’s the case. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I only said it that way because all the program works as it should otherwise. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

DLXXV wrote:
I figured out how to fix it though. Turning on Serial does the trick.

Once you post the schematic, we'll have this fixed in a trice.