Sign in

username:

password:



Not a member?

Search avrclub



Search tips

Subscribe to avrclub



avrclub by Keywords

AT90S2313 | AT90S8515 | ATMega | ATmega128 | ECL | FETS | IAR | Keyboard | LCD | STK50 | TMOS | UART


Ads

Discussion Groups

See Also

DSPFPGAElectronics

Discussion Groups | AVRclub | [AVR club] hello


Advertise Here

Atmel AVR Microcontroller discussion group.

[AVR club] hello - sellitas - Sep 4 9:42:57 2008

hello i am new user and i need help on c programming code using
Timer/Counter to switch led on and off using avr and i'm using atmega
644 microcontroller
------------------------------------



(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )


Re: [AVR club] hello - Zack Widup - Sep 4 11:13:37 2008


Hi,

What have you done so far? What problems are you having?

Zack

On Thu, 4 Sep 2008, sellitas wrote:

> hello i am new user and i need help on c programming code using
> Timer/Counter to switch led on and off using avr and i'm using atmega
> 644 microcontroller

------------------------------------



(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )

Re: [AVR club] hello - selam tesfaye - Sep 5 9:08:10 2008

thanks for u'r response what i did so far is i use AVR microcontroller and =
atmega644 and i did the input output pin configuration i connect input to T=
OSC1 pin and output to PORTB, i choose the Timer that is Timer 1, i select=
=A0=A0PORTB=A0is led's & testing using DDRB =3D 0xFF;
=A0
1-select the timer -Timer 1
2-select PORTB is led's and testing - DDRB =3D 0xFF;
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0- PORTB =3D 0x00;
3- select clock source internal clock source(prescaler)- TCCR1B =3D=A00x02=
=A0timer1 uses=A0=A0=A0=A0 clock\8=A0
4- i want to initialize the Timer/Counter value TCNTn =3D 0xFFFF; and i wan=
t to make loop to turn led on when it reaches some value compair with OCRnx=
compair match register
so=A0 i came this far and my problem is how to initialize the Timer/Counter=
value and how to make a loop to switch led on and off .
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0 THANK YOU!!
=A0
--- On Thu, 9/4/08, Zack Widup wrote:

From: Zack Widup
Subject: Re: [AVR club] hello
To: a...@yahoogroups.com
Date: Thursday, September 4, 2008, 8:13 AM

Hi,

What have you done so far? What problems are you having?

Zack

On Thu, 4 Sep 2008, sellitas wrote:

> hello i am new user and i need help on c programming code using
> Timer/Counter to switch led on and off using avr and i'm using atmega
> 644 microcontroller
=20

=20=20=20=20=20=20

[Non-text portions of this message have been removed]
------------------------------------



(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )

Re: [AVR club] hello - selam tesfaye - Sep 8 7:57:56 2008

thanks for u'r response what i did so far is i use AVR microcontroller and =
atmega644 and i did the input output pin configuration i connect input to T=
OSC1 pin and output to PORTB
and the code is
=A0
# include
=A0
void main()
{
=A0=A0 DDBB =3D 0xFF;=A0 // make port B=A0output
=A0=A0 PORTB=3D 0XFF;
=A0
=A0=A0 TCCR1B =3D 0X00; // stop timer
=A0=A0 TCCR1B =3D 0X02; // start timer with clk/8
=A0
i want to initialize the Timer/Counter value TCNTn =3D 0xFFFF; and i want t=
o make loop to turn led on when it reaches some value compair with OCRnx co=
mpair match register

so=A0 i came this far and my problem is how to initialize the Timer/Counter=
value and how to make a loop to switch led on and off .

thank you!!!
=A0=20

--- On Thu, 9/4/08, Zack Widup wrote:

From: Zack Widup
Subject: Re: [AVR club] hello
To: a...@yahoogroups.com
Date: Thursday, September 4, 2008, 8:13 AM

Hi,

What have you done so far? What problems are you having?

Zack

On Thu, 4 Sep 2008, sellitas wrote:

> hello i am new user and i need help on c programming code using
> Timer/Counter to switch led on and off using avr and i'm using atmega
> 644 microcontroller
=20

=20=20=20=20=20=20

[Non-text portions of this message have been removed]
------------------------------------



(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )

[AVR club] Re: hello - sellitas - Sep 8 9:09:34 2008

thanks for u'r response what i did so far is i use AVR
microcontroller and atmega644 and i did the input output pin
configuration i connect input to TOSC1 pin and output to PORTB, i
choose the Timer that is Timer 1, i select PORTB is led's & testing
using DDRB = 0xFF;

1-select the timer -Timer 1

2-select PORTB is led's and testing - DDRB = 0xFF;
- PORTB = 0x00;
3- select clock source internal clock source(prescaler)-
TCCR1B = 0x02 \\timer1 uses clock\8

4- i want to initialize the Timer/Counter value TCNTn = 0xFFFF; and
i want to make loop to turn led on when it reaches some value
compair with OCRnx compair match register

so i came this far and my problem is how to initialize the
Timer/Counter value and how to make a loop to switch led on and off .

THANK YOU!!

--- In a...@yahoogroups.com, Zack Widup wrote:
> Hi,
>
> What have you done so far? What problems are you having?
>
> Zack
>
> On Thu, 4 Sep 2008, sellitas wrote:
>
> > hello i am new user and i need help on c programming code using
> > Timer/Counter to switch led on and off using avr and i'm using
atmega
> > 644 microcontroller
> >
>
------------------------------------



(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )