![](/img/trans.png)
[英]PIC18F2455 MPLab compile undefined identifier ANSEL and ANSELH
[英]LED not glowing on off by push button with PIC18f2455 in Proteus
在Proteus上按PUSH按鈕時,我四處搜尋以使LED發光。 但是LED會亮起,而按Proteus中的“按鈕”並不會熄滅。 我正在使用PIC18F2455進行仿真,這是MicroC代碼。
void main() {
TRISB.B0=1; //input button
TRISB.B7=0; //output
while (1)
{
if( PORTB.B0 == 0 )
{
PORTB.B7=1;
}
else
{
PORTB.B7=0;
}
}
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.