Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

generating 50Hz sine wave using atmega8

Status
Not open for further replies.

Mithun_K_Das

Advanced Member level 3
Advanced Member level 3
Joined
Apr 24, 2010
Messages
899
Helped
24
Reputation
48
Reaction score
26
Trophy points
1,318
Location
Dhaka, Bangladesh, Bangladesh
Activity points
8,254
void main()
// xtal = 20MHz
{
int cnt,i;
DDRD = 0b00001111;

while(1)
{


for(i=0;i<15;i++)
{



PORTD = (i);
Delay_us(32);
}

for(i=15;i>0;i--)
{


PORTD = (i);
Delay_us(32);
}

}
}



[url]https://obrazki.elektroda.pl/90_1297835551.png[/url]

[url]https://obrazki.elektroda.pl/22_1297835552.png[/url][COLOR="Silver"]

[SIZE=1]---------- Post added at 06:59 ---------- Previous post was at 06:53 ----------[/SIZE]

[/COLOR][url]https://obrazki.elektroda.pl/83_1297835929.png[/url]
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top