Abl-electronic PIC Microcontrollers PIC16 Bedienungsanleitung Seite 310

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 312
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 309
mikroC
- C Compiler for Microchip PIC microcontrollers
mikroC
making it simple...
302
MikroElektronika:
Development
tools
-
Books
-
Compilers
page
Prototype
unsigned Dec2Bcd(unsigned decnum);
Returns Returns converted BCD value.
Description Converts 16-bit decimal value decnum to BCD.
Example
unsigned a;
...
a = Dec2Bcd16(4660);
// equals 1234
Dec2Bcd16
Prototype
unsigned Bcd2Dec16(unsigned bcdnum);
Returns Returns converted decimal value.
Description Converts 16-bit BCD numeral bcdnum to its decimal equivalent.
Example
unsigned a;
...
a = Bcd2Dec16(1234);
// equals 4660
Bcd2Dec16
Prototype
unsigned short Dec2Bcd(unsigned short decnum);
Returns Returns converted BCD value.
Description Converts 8-bit decimal value decnum to BCD.
Example
unsigned short a;
...
a = Dec2Bcd(52);
// equals 0x52
Dec2Bcd
Seitenansicht 309
1 2 ... 305 306 307 308 309 310 311 312

Kommentare zu diesen Handbüchern

Keine Kommentare