** çҹ繤Դ繢ͧ¹ͧ 觼ҹ繵ͧ繴令Ѻ
ҡ բʹ ;ͤ ԡ سѧ¹¤Ѻ ӡ䢢
١ͧ Ѻ
Ѻ˹ѡ
 

PIC mikro C ÷ͧ LED

㹺͹鷴ͧ¹ Ǥ mikro C ѹѺ ¼鷴ͧеͧͧѺ㹡÷ͧ Ҩҧͧ ҡäѺ ͧͷ㹡÷ͧմѧѺ

ѺѴ

öҫѷԵͧͷͧҧҹä͹令Ѻ շẺ USB (ѹҡ) ẺѺ port ҹѧͧ PC ( ҤҶ١ ¹Ѻ 絺ؤ )


ͧѴ


촷ͧ

öҫѷԵͧͷͧҧҹä͹令Ѻ ͡ Ẻ ͧҹ硷͹ԡ Ẻ 40 16F877 16F887 Ѻ


촷ͧͧҹ硷͹ԡ


ػó㹡÷ͧǡ¡ѹ¤Ѻ 㹵͹áзӡõǧä͹зӧҹ͹ 㹺촷ͧͧءѷաõǧǴѧ (¡鹵 X-TAL Ҩᵡҧѹ) ҡպ촷ͧöǧѧٻ


ǧ ä͹ӧҹ


÷ͧ LED Դ

㹡÷ͧ PORT RB0 㹡õҹ ѧٻ


õǧ㹡÷ͧ


ٻ㹡÷ͧ¹Ẻ( ͧء) 繴ѧѺ


ٻǧẺ


Code 㹡¹


code


¹ӡ 价 Build -> Build


ä


¹ԴͤǨԴ error Ҵѧٻ


Դ error



ͤҹ


ͤҹǨʡ .HEX ͷйѧѴŧ㹵 IC


ʡ .HEX


ٻõǧ㹡÷ͧ LED еԴ


õǧ㹡÷ͧ


͸Ժ code
void main() <- - ѧ main ͧշء
{
TRISB = 0X00; < - - ˹ port B ء bit ˹ҷ output
while(1) <- - ǹٻ
{
PORTB=0X01; < - - ˹觢͡ҡ PORT B0 ( LED Դ)
}
}

ͧͧѡá¹Ƕ֧㹵͹令Ѻ


¹ 1 .. 2554