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