This program can log data that is read from RTC(real time clock) which is embedded inside LPC1768. It saves the data to the LPC1768’s memory as “log.txt”.
Diff: main.cpp
- Revision:
- 2:e51a43447d68
- Parent:
- 0:a5ea226b5b26
- Child:
- 3:192d65ce0c19
--- a/main.cpp Wed Jul 08 11:28:47 2015 +0000 +++ b/main.cpp Wed Jul 08 17:13:03 2015 +0000 @@ -5,18 +5,23 @@ * @license: Use this code however you'd like * * @description of the program: - -* This program can log data that is read from RTC(real time clock) which is embedded inside LPC768. -* It saves the data to the LPC1768’s memory as “log.txt”. For this example program, the data is how many times the button is -* pressed and when it is pressed in terms of real time. It can also display the button count as 4-bit binary number using 4 leds -* on the LPC1768. There are two different time settings on the code. One can set the time from the terminal or manually by -* uncommenting the corresponding portion of code. Once the time is set, if there is a battery connected to real-time clock, -* RTC will continue to keep track of current time. In order not to reset the real-time to its initial value every time microcontroller -* is reset, it is neccessary to set the time once and delete the portion of code which sets the time and keep the rest. +* +* This program can log data that is read from RTC(real time clock) which +* is embedded inside LPC1768. It saves the data to the LPC1768’s memory as +* “log.txt”. For this example program, the data is how many times the button +* is pressed and when it is pressed in terms of real time. It can also +* display the button count as 4-bit binary number using 4 leds on the LPC1768. +* There are two different time settings on the code. One can set the time from +* the terminal or manually by uncommenting the corresponding portion of code. +* Once the time is set, if there is a battery connected to real-time clock, +* RTC will continue to keep track of current time. In order not to reset the +* real-time to its initial value every time microcontroller is reset, it is +* neccessary to set the time once and delete the portion of code which sets +* the time and keep the rest. * * @connections: *-------------------------------------------------------------- -* LPC1768 ________________Peripherals +* |LPC1768| |Peripherals| * Pin 13 --------> (TX) RX pin of the FTDI or Bluetooth etc. * Pin 14 --------> (RX) TX pin of the FTDI or Bluetooth etc. * Pin 20 --------> Pull-up connected button