Re: dsPIC3F4011程式裡的值要如何從16進位轉10進位?
|
||||
---|---|---|---|---|
新會員
|
我的問題已解決~
感謝大大的指點
發表於: 2007/5/24 22:38
|
|||
|
dsPIC3F4011程式裡的值要如何從16進位轉10進位?
|
||||
---|---|---|---|---|
新會員
|
我把下面這程式用終端機輸出x1~x3、y1~y3後,因為是16進位結果顯使亂碼要如何使它可以顯示出數字呢?
這東西蠻急的~如果有範例能參考的大大幫個忙吧~感激不進! while(1) // do for ever { unsigned int i; for (i =0 ; i < 10 ; i++) Delay_123( ); if (PORTBbits.RB1==0) // 1st test key pressed { while(BusyUART1()); ASCbuf=x1; WriteUART1(ASCbuf); while(BusyUART1()); ASCbuf=x2; WriteUART1(ASCbuf); while(BusyUART1()); ASCbuf=x3; WriteUART1(ASCbuf); while(BusyUART1()); ASCbuf=y1; WriteUART1(ASCbuf); while(BusyUART1()); ASCbuf=y2; WriteUART1(ASCbuf); while(BusyUART1()); ASCbuf=y3; WriteUART1(ASCbuf); while(BusyUART1()); ASCbuf=CR; WriteUART1(ASCbuf); while(BusyUART1()); ASCbuf=LF; WriteUART1(ASCbuf); while(BusyUART1()); while (PORTBbits.RB0==0)Delay_123( ); // wait for key released }
發表於: 2007/5/24 20:06
|
|||
|