alex burton
/
BinaryCounter
Simple Binary Counter on PortA, will toggle bits at it counts.
main.cpp
- Committer:
- afbc0m
- Date:
- 2014-12-19
- Revision:
- 1:cb458d5f9927
- Parent:
- 0:bd7ff9bb0542
File content as of revision 1:cb458d5f9927:
#include "mbed.h" PortOut LEDS(PortA, 0xFFFF); #define loopDelay 0 //Loop Execution time #define tickPerFrame 1 #define frameTime 33333 #define tick frameTime/tickPerFrame #define tickrate (tick-loopDelay) //uS unsigned short Count = 0; int main() { while(1) { Count++; LEDS = Count; wait_us(tickrate); } }