This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
wiki:ostatni:picaxe:start [2014/12/26 18:31] 127.0.0.1 upraveno mimo DokuWiki |
— (current) | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | {{ : | ||
| - | ====== PICAXE ====== | ||
| - | |||
| - | Napájení | ||
| - | * 4.5 - 5.5 V | ||
| - | {{: | ||
| - | |||
| - | * pinsB - the portB input pins | ||
| - | * outpinsB - the portB output pins | ||
| - | * dirsB - the portB data direction register | ||
| - | * pinsC - the portC input pins | ||
| - | * outpinsC - the portC output pins | ||
| - | * dirsC - the portC data direction register | ||
| - | |||
| - | Nastaveni pinu 7,6=1, 5, | ||
| - | > **let outpinsB = %11000000** | ||
| - | |||
| - | Nacteni stavu vstupnich pinu do promene: | ||
| - | > **let b1 = pinsB** | ||
| - | |||
| - | Promenne vstupnich pinu: | ||
| - | > pinsB = pinB.7 : pinB.6 : pinB.5 : pinB.4 : pinB.3 : pinB.2 : pinB.1 : pinB.0 | ||
| - | |||
| - | Promenne vystupnich pinu: | ||
| - | > outpinsB = outpinB.7 : outpinB.6 : outpinB.5 : outpinB.4 : outpinB.3 : outpinB.2 : outpinB.1 : outpinB.0 | ||
| - | |||
| - | < | ||
| - | symbol counter = b1 ; define the variable b1 as “counter” | ||
| - | symbol LED = B.4 ; define pin 4 with the name “LED” | ||
| - | |||
| - | main: | ||
| - | for counter = 1 to 15 ;start a for...next loop | ||
| - | high LED ; | ||
| - | pause 500 ;wait for 0.5 second | ||
| - | low LED ;switch pin 4 low | ||
| - | pause 500 ;wait for 0.5 second | ||
| - | next counter | ||
| - | |||
| - | end ;end program | ||
| - | |||
| - | </ | ||