MikroElektronika PIC Microcontrollers PIC16 Arkusz Danych Strona 54

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
Przeglądanie stron 53
Programming PIC Microcontrollers in BASIC - mikroElektronika
Description Parameter <input> represents numerical value of integer type that should be converted to string; parameter
<txt> is passed by the address and contains the result of conversion.
Parameter <txt> has to be of sufficient size to fit the converted string.
Example
IntToStr(Counter, Message)
' Copies value of integer Counter into string Message
5.2.1.5 Bcd2Dec – Converts 8-bit BCD value to decimal
Prototype
sub procedure Bcd2Dec(dim bcd_num as byte) as byte
Description Function converts 8-bit BCD numeral to its decimal equivalent and returns the result as byte.
Example
dim a as byte
dim b as byte
...
a = 140
b = Bcd2Dec(a) ' b equals 224 now
5.2.1.6 Bcd2Dec – Converts 8-bit decimal to BCD
http://www.mikroelektronika.co.yu/english/product/books/picbasicbook/05.htm (12 sur 112)05/11/2004 02:20:52
Przeglądanie stron 53
1 2 ... 49 50 51 52 53 54 55 56 57 58 59 ... 193 194

Komentarze do niniejszej Instrukcji

Brak uwag