Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
You are viewing an older revision! See the latest version
BusOut Programm
Das folgende Programm stammt aus der Mbed-OS Docs; Lade das Programm Blinky with BusOut im Mbed-Simulator:
BusOut.cpp
#include "mbed.h" BusOut myleds(LED1, LED2, LED3, LED4); int main() { while(1) { for(int i=0; i<16; i++) { myleds = i; wait(0.25); } } }
Es kann jeder der nummerierten Arm-Mbed-Pins als DigitalOut im BusOut verwenden.
Tipps:
Es können bis zu 16 Pins in einem Bus verwendet werden. Die Reihenfolge der Pins im Konstruktor ist die umgekehrte Reihenfolge der Pins in der Bytereihenfolge. Wenn Sie also BusOut (a, b, c, d, e, f, g, h) haben, dann wäre die Reihenfolge der Bits im Byte hgfedcba, wobei a Bit 0 ist, b Bit 1 ist, c Bit 2 ist und bald.