Maker Pro
Maker Pro

Strange ATmega16 operation

N

nogoodinel

Jan 1, 1970
0
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...
 
N

nogoodinel

Jan 1, 1970
0
....
7805 regurator with condensator both sides. On AVR programming board
everything goes good and leds on the board go *blink*, *blink* ...
NoGoodInEl...


condensator means capacitor naturally.
NoGoodInEl...
 
J

John Smith

Jan 1, 1970
0
nogoodinel said:
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...

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
http://www.atmel.com/dyn/resources/prod_documents/doc2466.pdf

Regards,
GM
 
J

Jamie

Jan 1, 1970
0
nogoodinel said:
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...
make sure all of your un-used inputs are tied to something.
 
N

nogoodinel

Jan 1, 1970
0
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
 
N

nogoodinel

Jan 1, 1970
0
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.
 
Top