MikroElektronika PIC Microcontrollers PIC16 Datový list Strana 169

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 194
  • Tabulka s obsahem
  • ŘEŠENÍ PROBLÉMŮ
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 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
Zobrazit stránku 168
1 2 ... 164 165 166 167 168 169 170 171 172 173 174 ... 193 194

Komentáře k této Příručce

Žádné komentáře