caramoan tour package

caramoan tour package

Author Topic: [HELP]eclipse + winavr + atmega16  (Read 321 times)

Offline dobby

  • Size AAA Battery
  • ***
  • Posts: 50
  • Pogi/Ganda Points: 2
[HELP]eclipse + winavr + atmega16
« on: January 11, 2012, 01:16:58 PM »
Mga Masters, magandang hapon. ;D

may problema po ako sa pagbuild ng simple code na to using atmega 16.
Code: [Select]
#define F_CPU 10000000UL
#include <avr/io.h>
#include <util/delay.h>

int main(){
DDRA |= (1 << PA0);
DDRA |= (1 << PA1);
while(1){
PORTA |= (1 << PA0);
PORTA |= (1 << PA1);
_delay_ms(10000);
PORTA &= ~(1 << PA0);
PORTA &= ~(1 << PA1);
_delay_ms(10000);
}
}

nacocompile naman po siya ng maayos sa eclipse ide using winavr as plugin.
pero kapag nirurun ko na yung hex file sa proteus, naka-steady on lang po yung PA0 at PA1 instead of blinking.
may kulang pa po ba akong tweaking ng eclipse at win avr? pa- advise naman mga masters. thanks. :)

Philippine Electronics Forum

[HELP]eclipse + winavr + atmega16
« on: January 11, 2012, 01:16:58 PM »

Offline dobby

  • Size AAA Battery
  • ***
  • Posts: 50
  • Pogi/Ganda Points: 2
Re: [HELP]eclipse + winavr + atmega16
« Reply #1 on: January 11, 2012, 05:51:14 PM »
up ko lang po.

Philippine Electronics Forum

Re: [HELP]eclipse + winavr + atmega16
« Reply #1 on: January 11, 2012, 05:51:14 PM »

Offline RiDdLeR???

  • Hydroelectric
  • ***
  • Posts: 3033
  • Pogi/Ganda Points: 208
Re: [HELP]eclipse + winavr + atmega16
« Reply #2 on: January 11, 2012, 05:56:08 PM »
First glance wala naman problem sa code mo.  Have you ever ran an mcu simulation in proteus before?  Baka hindi mo pa na-specify yung operating frequency sa proteus or maling frequency yung na-specify mo.  Sometimes also, the simulation may not run in real time and sa sobrang bagal youd think na hindi gumagana.

Philippine Electronics Forum

Re: [HELP]eclipse + winavr + atmega16
« Reply #2 on: January 11, 2012, 05:56:08 PM »

 

Privacy Policy

Contact Us: elabph@yahoo.com