Problem with simulation using ATMEGA

hello guys if someone would help me i would really appreciate it
my problem is : as i was running the simulation for A blink Led Test in proteus using ATMEGA 2650 and there’s no error in the code whis the following :
int led = 7;
void setup() {
pinMode(led, OUTPUT);
}

void loop() {
digitalWrite(led, HIGH);
delay(1000);
digitalWrite(led, LOW);
delay(1000);
}
now when i simulate in proteus using the ATMEGA it doesnt work despite there’s no error regarding the here’s a picture of the msg that i see please help me

Simulations are buggy. Why not just run the program on a real Arduino?

i don’t have an arduino card yet i’ll buy one next week but for now i really wanted that to work and im trying to figure what’s the problem for 2 hours now :confused:

Do you need to start on a Mega2560?

You can spend many hours learning on an Uno and if you get the one with the chip in socket, you can buy more chips and bootload them (through a step by step process) to replace the one in there if a pin gets burned ($2.50 chip vs $25.00 board) or the project is finished and you pry the chip off the Uno and stick it in an end-product to stay. The Uno is a development board, you keep the board for the next project with a new chip. Last summer I paid $2.15 each for 6 ATmega328P-PU's and $5.50 ea for 2 ATmega1284P's. :slight_smile:

The ATmega2560 is surface-mount. You can't simply stick it in a breadboard like you can with a DIP chip.

The 40-pin wide DIP chip ATmega1284P is nicknamed "The Mighty 1284". It has 36 IO pins, 2 USARTs, 16K RAM, 4K EEPROM and 128K flash plus ADC, PWM, SPI and I2C for less than 3x the cost of a 328P.

An AVR can run at 8MHz with as little as 3V-5V power, ground, a resistor between reset and 5V and a bypass capacitor or two. And then it needs the leds and buttons, etc, connected but so does a board except for led13. If you add a board and some header pins it will still be pretty cheap to build a duino. IMO for real simple things a socket could be wired up to and the programmed chip popped in, look up O'Baka Arduino to see an Arduino soldered to the chip pins that can stick in a breadboard and be used, the O'Baka failed in not being totally useless. Motto is that you can make a non-USB duino for less than $3.

If you're interested, this blog covers programming the 328P and 1284P but also extends to a wide range of AVR's.
https://www.gammon.com.au/breadboard

1284P only has 32 IO, not 36. 4 8-bit ports.

You would know better. I misremembered.
Right, the 8 other pins include pins that keep Uno IO ports down to 6 free pins. 1284 has 4 full 8 bit ports open to use.

Did you ever do the 1284 boards with SD or don't worry about it?

the thing is the simulation does work with arduino Uno in proteus but Not the ATmega why ???

Hi,
Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

What controller did you compile the code for?
UNO or 2650?

Do you need to provide virtual powersupply and gnd to the atmega.

If you are going to post proteus images, I think you can export the image as jpg from Proteus rather then post a low res screen capture.

Thanks.. Tom.. :slight_smile:

AllenWInchester:
hello guys if someone would help me i would really appreciate it
my problem is : as i was running the simulation for A blink Led Test in proteus using ATMEGA 2650 and there’s no error in the code whis the following :

If there is no error in the code, then this suggests a problem with Proteus.

I dont think many people use Proteus around here, so you might bebetter off asking in a forum that supports Proteus.

AllenWInchester:
the thing is the simulation does work with arduino Uno in proteus but Not the ATmega why ???

One is a board with circuits and a chip and the other is a chip, or at least that’s all you’ve given me to guess with.

I never even wanted to try a chip sim. I’d rather spend the time on real or studying the basics of C; variable types and arrays, addressing, logic structures and functions, the command set, even just knowing what’s there and what the terms mean is a big task for a beginner. But learning the basics ahead can save you the embarrassment of writing hugely unnecessary code before learning about arrays, indexes and loops.

Time spent just getting familiar with the example sketches on the Arduino site will pay off when you do get your board.

I’m also a fan of the Nano and Micro because they are small with pins that can plug into breadboards or be solidly jumpered or cabled onto, The Micro can do USB-HID tricks too.