MikroElektronika PIC Microcontrollers PIC16 Ficha de datos Pagina 56

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 194
  • Tabla de contenidos
  • SOLUCIÓN DE PROBLEMAS
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 55
Programming PIC Microcontrollers in BASIC - mikroElektronika
5.2.1.8 Bcd2Dec – Converts 16-bit BCD value to decimal
Prototype
sub procedure Dec2Bcd16(dim dec_num as word) as word
Description Function converts 16-bit decimal numeral to BCD and returns the result as word.
Example
dim a as word
dim b as word
...
a = 4660
b = Dec2Bcd16(a) ' b equals 1234 now
5.2.2 ADC Library
ADC (Analog to Digital Converter) module is available with a number of PIC MCU models. Library function ADC_Read is
included to provide you comfortable work with the module. The function is currently unsupported by the following PIC MCU
models: P18F2331, P18F2431, P18F4331, and P18F4431.
5.2.2.1 ADC_Read – Get the results of AD conversion
Prototype
sub function ADC_Read(dim Channel as byte) as word
http://www.mikroelektronika.co.yu/english/product/books/picbasicbook/05.htm (14 sur 112)05/11/2004 02:20:52
Vista de pagina 55
1 2 ... 51 52 53 54 55 56 57 58 59 60 61 ... 193 194

Comentarios a estos manuales

Sin comentarios