On Dec 26, 2007, at 4:38 PM, Youssef Kandeel wrote:
> Dear all,
>
> Iam a beginner learning AVR,
> Iam using ATmega8535 MCU
> I want simple delay program by decrementing a value in a register
> and loop .
> If any one can help me, please write the assembly and\or C code for
> CodeVision AVR C compiler and\or C++ for WinAVR compiler.
int
main(void)
{
volatile int i;
while(1) {
for( i = 0 ; i < 32000 ; i++ ) {
;
}
}
return(0);
}
The above exactly meets the specifications. Sadly if it teaches
anything about C or AVR then one has a *long* way to go.
--
David Kelly N4HHE, dkelly@HiWAAY.net
========================================================================
Whom computers would destroy, they must first drive mad.Message
Re: [AVR-Chat] Beginner, I want a simple prog
2007-12-27 by David Kelly
Attachments
- No local attachments were found for this message.