Kinetis K20D50M interface with Capacitance sensor

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Kinetis K20D50M interface with Capacitance sensor

1,016 Views
saulmukha
Contributor I

Hi,

I am trying to interface Kinetis K20D50M with Capacitance sensor(http://www.jyetech.com/Products/CapMeter/Capacitance%20Meter%20Manual.pdf)

I dont have experience with Kinetis and CodeWarrior. I was wandering if there are any sample projects that I can use to figure out how to interface the sensor and the microcontroller using CodeWarrior. I wrote below what should I do. It is pretty simple but I was just wandering if there are some good tutorials that teach how to do interface or if there are some similar projects that I can use

Thank you for your time,

Saul

The 060 capacitance meter can transfer measurement results to micro controller via serial port. There is a sample file showing what the meter sends out.  http://www.jyetech.com/Products/CapMeter/CapMeter_log.zip.

Each output line is ended with the character ‘CR' (0x0D) So I should basically look for 0x0D. Once it is found that means the next character is the start of a new line. Then count 15 characters. The 16th character is the start of capacitance reading which is 4 characters followed by 1 unit character.
Labels (1)
0 Kudos
3 Replies

658 Views
perlam_i_au
Senior Contributor I

You can use the KINETIS_50MHZ_SC sample code package, please review on path:

C:\(your download path)\kinetis_50MHz_sc\k20d50m_sc_baremetal\build\iar


Have a nice day :P,
Perla

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

658 Views
saulmukha
Contributor I

Hi Perla,

Thank you for a quick response. I am looking for an «input capture/output compare» sample project. Do you have any sample projects that I can use? I need to read data in from another source using 38400 Baudrate serial transmission.

Thank you

Saul

0 Kudos

658 Views
perlam_i_au
Senior Contributor I

This is an example code originally created for the TWR-K20D72M

using FlexTimer in output compare mode, with clear Output on match

(FTM0_CH3 - pin PTC4).

For this particular example the Channel 3 has been initialized in set and

when on match event occures CH3 value changes to 0.

This example is pretty simple but in main you will find basic configurations

for use the module.


Have a nic day :P,
Perla

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos