Re: Read VR1 with the analog voltage input and convert the voltage
|
||||
---|---|---|---|---|
版主
|
AD轉換後的結果有10個bit,分成 2bit + 4bit + 4bit的方式轉成 ASCII Code 方式來顯示,SWAPF 只是將兩個4-bit相互對換而已。
發表於: 2006/4/27 18:36
|
|||
|
Read VR1 with the analog voltage input and convert the voltage
|
||||
---|---|---|---|---|
初級會員
|
Conver A/D <b9:b8> to ASCII\\????
movf ADRESH,W andlw b'00000011' call Hex_ASCII call Tx_a_Byte Conver A/D <b7:b4> to ASCII????? swapf ADRESL,W.......為什麼用swapf 乘h'0F' andlw h'0F' call Hex_ASCII call Tx_a_Byte movf ADRESL,W .....Conver A/D <b3:b0> andlw h'0F' call Hex_ASCII call Tx_a_Byte 這是W400課程裡EX4範例.....看不明白所以想請問大家謝謝
發表於: 2006/4/27 2:36
|
|||
|