Teensy3.1 USB Serial and RTC test. Use this program to check the operation of the RTC after the 32KHz crystal has been fitted. If a back up cell has also been fitted the RTC will remain running after the main power has been removed. Reconnect the USB to the PC and the RTC time will be displayed when using a PC terminal program.
Dependencies: USBDevice mbed-src
Fork of USBSerial-RTC-HelloWorld by
main.cpp@6:aef06cd11ce4, 2011-11-30 (annotated)
- Committer:
- samux
- Date:
- Wed Nov 30 11:17:49 2011 +0000
- Revision:
- 6:aef06cd11ce4
- Parent:
- 5:ee94acbf45df
- Child:
- 7:5e693654d5b4
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
samux | 6:aef06cd11ce4 | 1 | #include "mbed.h" |
samux | 6:aef06cd11ce4 | 2 | #include "USBSerial.h" |
samux | 6:aef06cd11ce4 | 3 | |
samux | 6:aef06cd11ce4 | 4 | //Virtual serial port over USB |
samux | 6:aef06cd11ce4 | 5 | USBSerial serial; |
samux | 6:aef06cd11ce4 | 6 | |
samux | 6:aef06cd11ce4 | 7 | int main(void) { |
samux | 6:aef06cd11ce4 | 8 | |
samux | 6:aef06cd11ce4 | 9 | while(1) |
samux | 6:aef06cd11ce4 | 10 | { |
samux | 6:aef06cd11ce4 | 11 | serial.printf("I am a virtual serial port!\r\n"); |
samux | 6:aef06cd11ce4 | 12 | wait(0.5); |
samux | 6:aef06cd11ce4 | 13 | } |
samux | 6:aef06cd11ce4 | 14 | } |