ATmega1284 does not receive uploaded code from Atmel Studio

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

When I upload a simple program like turning on LED lights on PORTB nothing happens. The voltage read is between 2V-5V and I am uploading the hex file. I have also tried using another microcontroller and it still nothing happened so my first assumption is that the error must be with the IDE, but I cannot figure out why. I have the ATmega1284 selected when I start a new project and all the wiring correct on terms of GND and VCC. I am also using the source file within the project and not uploading an ambient source file by mistake.

Last Edited: Thu. May 23, 2019 - 12:17 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The voltage read is between 2V-5V

?? Which is it? How can it change so much? Do you have the JTAG or ISP header correctly wired? (ahich one are you using?) 

 

All GND and VCC including AVCC pins correctly wired and bypassed?

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

GND, VCC, and AVCC pins are correctly wired and the voltage is not alternating either. JTAG clock is unchecked and I did not change anything with the ISP header. I was able to have the microcontroller working properly until only recently it would not even turn all LED lights on even on the most basic program. I have attached an example of how the board is wired and it shows that VCC and GND are conected to positive and negative terminals respectively while on the other side AVCC is connected in the reverse order. The LED is not burnt out either and with or without the resistor it won't light up!

Attachment(s): 

Last Edited: Thu. May 23, 2019 - 12:59 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 2

Sorry, someone else will need to help you. I get angry when I see things like that, I'm an old, grumpy senior citizen. indecision

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

Can you show us your program?

 

The largest known prime number: 282589933-1

It's easy to stop breaking the 10th commandment! Break the 8th instead. 

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

Where are the power supply bypass caps?

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

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

There should be a resistor between the LED and the uC.

 

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

Your picture shows the connections "off by 1", I think.

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

Apart from the above mentioned thing he seems to have half a chip running from 5V and the other half from 3.3V. Look at the VCC links.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

I have used several microcontrollers although I understand in the example I showed there is a misplacement of one row, but however that did not seem to solve it as the LED still did not output anything. I am also using other LED components neither of them will light. I am programming very basic code and I have alternated the bits from low to high on PORTB and still nothing happens. I have tried uploading the program to other people's boards and the same situation occurred so I initially assumed it might have something to do with Atmel Studio.

 

#include <avr/io.h>

int main(void)
{
    DDRB = 0xFF;
    PORTB = 0xFF;
   
    while (1) 
    {
    }
}
 

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

esou did you read my reply above? You had most likely destroyed your chip if what I see is correct.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly