[En-Nut-Discussion] minimum hardware requirement?

조현식 hscho at peacesoft.anyang.ac.kr
Mon Dec 26 16:06:40 CET 2005


Hi.

I have two of mini avr128 board

One is avr128(with 16Mhz) + extern ram(32k) + max232 + 74hc573 + 32.768

Other is avr128L(with 8Mhz)

And nut/os runs only avr128 board.

Source is.

#include <stdio.h>
#include <io.h>
#include <sys/timer.h>


void port_init(void)
{
	outp(0xff,DDRB);
}


void system_init(void)
{
	cli();
	port_init();
	outp(0x00, MCUCR);
	sei();
}


int main(void)
{
	system_init();

	while(1)
	{
		outp(1,PORTB); NutSleep(500);
		outp(2,PORTB); NutSleep(500);
		outp(3,PORTB); NutSleep(500);
		outp(4,PORTB); NutSleep(500);
		outp(5,PORTB); NutSleep(500);
		outp(6,PORTB); NutSleep(500);
		outp(7,PORTB); NutSleep(500);
	}	
}





More information about the En-Nut-Discussion mailing list