|
Namazu for hns による簡易全文検索 詳しくは 詳細指定/ヘルプを参照して下さい |
||||||||||||||||||||||||||||||||||||||||||||||
2012年02月08日(水) 旧暦 [n年日記] [更新:"2012/02/08 09:42:31"]#1 [AVR] ATmega168P で LED を点滅
思い直して、簡単なものをやり直したら、点滅した。
(AVR Studio 4.0 で build と書込)
#include <avr/io.h>
#include <util/delay.h>
int main(void) {
DDRB = ~0b11111110; //portB-0 output
for(;;) {
PORTB = 0b00000001; //portB-0 を出力
_delay_ms(500); //0.5sec 待
PORTB = 0b00000000; //portB-0 を出力
_delay_ms(500); //0.5sec 待
}
}
後から見つけた関連記事AVRの導入とLEDチカチカ ( つっこみ )
|
最近の日記 2012年05月22日 ・amd64 と ehci 2012年05月19日 ・anoncvs.jp.netbsd.org での cvs update 2012年05月11日 ・NetBSD/sandpoint real time clock 2012年05月08日 ・無改造で altboot.bin を起動 2012年05月07日 ・sched_curcpu_runnable_p+0x2c で待機している問題 | ||