MikroElektronika PIC Microcontrollers PIC16 Fiche technique Page 169

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 194
  • Table des matières
  • DEPANNAGE
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 168
Programming PIC Microcontrollers in BASIC - mikroElektronika
The following example toggles LEDs of PORTB every second.
program LED_Blinking
main:
TRISB = 0 ' PORTB is output
PORTB = %11111111 ' Turn ON diodes on PORTB
Delay_ms(1000) ' Wait for 1 second
PORTB = %00000000 ' Turn OFF diodes on PORTB
Delay_ms(1000) ' Wait for 1 second
goto main ' Endless loop
end.
7.2 Seven-Segment Displays
Seven-segment digits represent more advanced form of visual communication. The name comes from the seven diodes
(there is an eighth diode for a dot) arranged to form decimal digits from 0 to 9. Appearance of a seven-segment digit is
given on a picture below.
http://www.mikroelektronika.co.yu/english/product/books/picbasicbook/07.htm (3 sur 16)05/11/2004 02:27:45
Vue de la page 168
1 2 ... 164 165 166 167 168 169 170 171 172 173 174 ... 193 194

Commentaires sur ces manuels

Pas de commentaire