Browsing this Thread:
1 Anonymous Users
|
Re: 16F877 的#org的問題
|
|
初級會員
Joined
: 2008/3/17 16:27 最後登入時間
: 2021/8/6 14:50
Group:
註冊會員
Level : 3 HP : 0 / 70 MP : 8 / 3422 EXP : 83
|
org 前面#不用加
發表於: 2009/9/8 8:51
|
|
|
16F877 的#org的問題
|
|
新會員
Joined
: 2009/9/5 13:56 最後登入時間
: 2009/9/5 13:57
Group:
註冊會員
Level : 1 HP : 0 / 0 MP : 0 / 0 EXP : 0
|
小弟在做rs232 傳送資料到 16f877的程式
程式如下 #include <16F877.H> #fuses HS, NOWDT, NOBROWNOUT, NOPROTECT #use delay(clock=20000000) #use rs232(baud=9600, rcv=PIN_C7) #include <stdlib.h>
char vb_cmd[2]; int i; int8 aaa;
#org 0x0800 main() { set_tris_b(0x00); output_higt(Pin_B7);
while(TRUE) { for (i=0;i<2;i++) { vb_cmd[i] =0; while{ { vb_cmd[i] = getc{} } == 0}; } aaa = atoi(vb_cmd); if (aaa==0) output_b=(0b00000000); else if(aaa=1) output_b=(0b00000001); else if(aaa=2) output_b=(0b00000010); else if(aaa=3) output_b=(0b00000011); else output_higt(Pin_B7); } }
在compiler後 會出現#org錯誤的訊息
@@我哪邊有錯?
發表於: 2009/9/5 13:59
|
|
You can view topic.
你 不可以 發起新主題
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create PDF files.
You cannot get print page.