8 years, 5 months ago.

Comparator on FRDM-KL25z

So I just got a FRDM-KL25z board. I read in the user-manual that there is a high-speed analog comparator on board. How might I go about using this? I can't find anything on this anywhere.

2 Answers

8 years, 3 months ago.

I just finished creating a KL25Z comparator library (initial release - probably needs improvement - comments are welcome):
Library : http://mbed.org/users/frankvnk/code/ComparatorIn/
Demo : http://mbed.org/users/frankvnk/code/ComparatorIn_demo/

Accepted Answer

Hi, can u pls provide the pinmap.h file for FRDM-KL25z

posted by Sachin John 16 Oct 2014

cool, thanks

posted by Vladimir Akopyan 15 Feb 2016
8 years, 5 months ago.

The standard mbed library doesn't support it, and unless someone else already made a library for it, you will have to do it yourself. The reference manual helps with that: http://cache.freescale.com/files/32bit/doc/ref_manual/KL25P80M48SF0RM.pdf (chapter 29), and possibly with some googling you might find example programs using it.

Hey Guys,

Micro controller chips have had analog comparators for years. Even my 8 bit Atmel chips had them and they are quite useful. It really should be part of the standard library. It looks like Frank has a good start now it just needs to be generalized so it can support all the chips that have the hardware built in.

posted by Joseph Ellsworth 23 Mar 2016