Simple program to demonstrate the basic functions of the analog comparator of the FRDM-KL25Z board.
Dependencies: ComparatorIn mbed
Fork of ComparatorIn_demo by
ComparatorIn demo
Simple program to demonstrate the basic functions of the analog comparator of the FRDM-KL25Z board.
The blue LED flashes after 2 sec delay. The green LED is driven by the interrupts of the Analog Comparator (LED ON at rising edge, LED OFF at falling edge).
The output of the Analog Comparatir is also tested by polling, the result is printed out at the standard output (UART0). The default speed and format (9600 bps, 8,N,1) are used.
Credits
This program is based on the ComparatorIn library and the ComparatorIn_demo program written by Frank Vannieuwkerke
Used library:
- ComparatorIn written by Frank Vannieuwkerke
Hardware requirements:
- FRDM-KL25 board
- CdS photoresistor pulled up by 10 k
History
First version
2015-11-18, by icserny [Wed, 18 Nov 2015 15:29:18 +0000] rev 8
First version
First version
2015-11-11, by icserny [Wed, 11 Nov 2015 08:12:13 +0000] rev 7
First version
library : _fptr names were too generic. Added comparatorin_ to each name.
2013-08-25, by frankvnk [Sun, 25 Aug 2013 18:01:58 +0000] rev 6
library : _fptr names were too generic. Added comparatorin_ to each name.
Doxygen doc cleanup
2013-07-20, by frankvnk [Sat, 20 Jul 2013 18:57:10 +0000] rev 5
Doxygen doc cleanup
int_en removed
2013-07-20, by frankvnk [Sat, 20 Jul 2013 16:31:19 +0000] rev 4
int_en removed
; rising/falling changed
; improved function names
ComparatorIn library update
2013-06-16, by frankvnk [Sun, 16 Jun 2013 20:06:30 +0000] rev 3
ComparatorIn library update
added 12-bit DAC demo
2013-06-16, by frankvnk [Sun, 16 Jun 2013 15:17:56 +0000] rev 2
added 12-bit DAC demo
detection threshold adjusted
2013-06-05, by frankvnk [Wed, 05 Jun 2013 18:51:15 +0000] rev 1
detection threshold adjusted
Initial version
2013-06-05, by frankvnk [Wed, 05 Jun 2013 18:07:02 +0000] rev 0
Initial version