Strange ATmega16 operation

Can you help me guys

I made a circuit witch should control leds. Software on Atmega16 is keeping led on on the bin 1 (PB0 (XCK/T0)) and blinking led on the bin

22 (PC0 (SCL)). Resistors before leds are 1k and Vcc is taken throw 7805 regurator with condensator both sides. On AVR programming board everything goes good and leds on the board go *blink*, *blink* ...

The problem: System does really strange things on my own made circuit. After turning power on or after reset both leds illuminates for something like second and after that "all the time on led" shuts down and "*blink* ,*blink* led" keeps on blinking but the frequency is much smaller than it should be.

I have no idea about what is wrong. It would be nice if somebody could give me some guidance.

NoGoodInEl...

Reply to
nogoodinel
Loading thread data ...

...

condensator means capacitor naturally. NoGoodInEl...

Reply to
nogoodinel

I am copying from the ATMEGA16 datasheet:

**The device is shipped with CKSEL = "0001" and SUT = "10". The default clock source setting is therefore the 1 MHz Internal RC Oscillator with longest startup time. This default setting ensures that all users can make their desired clock source setting using an In-System or Parallel Programmer.**

You have to program the CKSEL fuse bits to set the clock options (external, internal clock etc) For more, see the "Clock Sources" section in the ATMEGA16 manual

formatting link

Regards, GM

Reply to
John Smith

make sure all of your un-used inputs are tied to something.

--
"I\'m never wrong, once i thought i was, but was mistaken"
Real Programmers Do things like this.
http://webpages.charter.net/jamie_5
Reply to
Jamie

Thank you for your good advice. It seems that the problem is with this clock because I got it work (...for a while, but now I messed it up again). Must do that 1/0 tying with internal resistor also and hopefully all my concerns are far away. YEAH right. NoGoodInEl

Reply to
nogoodinel

FOUND IT! The problem why I messed it up again was that any of the serial port bins on chip is not connected to anything. When interups where enabled in the chip the result in the function of my circuit was: OK for 1-2 sec and then leds blinked at smaller frequency than they supposed to. It seems that the problem goes away after pluging the serial cabel to RX, DX and GND bins --->PC.

Reply to
nogoodinel

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.