11 years, 1 month ago.

SIM error TSIsensor library

Hi,

I would like to use this library, but when I compile my program, it keeps giving the errors:

errors in TSIsensor.cpp

Error: Identifier "SIM" is undefined in "TSI/TSISensor.cpp", Line: 81, Col: 4
Error: Identifier "SIM_SCGC5_PORTB_MASK" is undefined in "TSI/TSISensor.cpp", Line: 81, Col: 18
Error: Identifier "SIM_SCGC5_TSI_MASK" is undefined in "TSI/TSISensor.cpp", Line: 82, Col: 18
Error: Identifier "TSI0" is undefined in "TSI/TSISensor.cpp", Line: 84, Col: 4
Error: Identifier "TSI_GENCS_ESOR_MASK" is undefined in "TSI/TSISensor.cpp", Line: 84, Col: 20
Error: Identifier "TSI_GENCS_MODE" is undefined in "TSI/TSISensor.cpp", Line: 85, Col: 21
Error: Identifier "TSI_GENCS_REFCHRG" is undefined in "TSI/TSISensor.cpp", Line: 86, Col: 21
Error: Identifier "TSI_GENCS_DVOLT" is undefined in "TSI/TSISensor.cpp", Line: 87, Col: 21
Error: Identifier "TSI_GENCS_EXTCHRG" is undefined in "TSI/TSISensor.cpp", Line: 88, Col: 21
Error: Identifier "TSI_GENCS_PS" is undefined in "TSI/TSISensor.cpp", Line: 89, Col: 21
Error: Identifier "TSI_GENCS_NSCN" is undefined in "TSI/TSISensor.cpp", Line: 90, Col: 21
Error: Identifier "TSI_GENCS_TSIIEN_MASK" is undefined in "TSI/TSISensor.cpp", Line: 91, Col: 21
Error: Identifier "TSI_GENCS_STPE_MASK" is undefined in "TSI/TSISensor.cpp", Line: 92, Col: 21
Error: Identifier "TSI_GENCS_TSIEN_MASK" is undefined in "TSI/TSISensor.cpp", Line: 95, Col: 19
Error: Identifier "TSI0_IRQn" is undefined in "TSI/TSISensor.cpp", Line: 97, Col: 19
Error: Identifier "TSI0" is undefined in "TSI/TSISensor.cpp", Line: 109, Col: 4
Error: Identifier "TSI_GENCS_EOSF_MASK" is undefined in "TSI/TSISensor.cpp", Line: 109, Col: 19
Error: Identifier "TSI_GENCS_TSIEN_MASK" is undefined in "TSI/TSISensor.cpp", Line: 110, Col: 20
Error: Identifier "TSI_GENCS_STM_MASK" is undefined in "TSI/TSISensor.cpp", Line: 112, Col: 21
Error: Identifier "TSI_GENCS_TSIIEN_MASK" is undefined in "TSI/TSISensor.cpp", Line: 118, Col: 20
Error: Identifier "TSI_DATA_TSICH_SHIFT" is undefined in "TSI/TSISensor.cpp", Line: 124, Col: 42
Error: Identifier "TSI_DATA_SWTS_MASK" is undefined in "TSI/TSISensor.cpp", Line: 125, Col: 22
Error: Identifier "TSI_DATA_TSICNT_MASK" is undefined in "TSI/TSISensor.cpp", Line: 128, Col: 42
Error: Identifier "TSI_DATA_TSICH_SHIFT" is undefined in "TSI/TSISensor.cpp", Line: 140, Col: 34
Error: Identifier "TSI_DATA_SWTS_MASK" is undefined in "TSI/TSISensor.cpp", Line: 141, Col: 18
Error: Identifier "TSI0" is undefined in "TSI/TSISensor.cpp", Line: 181, Col: 34
Error: Identifier "TSI_DATA_TSICNT_MASK" is undefined in "TSI/TSISensor.cpp", Line: 181, Col: 47
Error: Identifier "TSI_DATA_TSICH_SHIFT" is undefined in "TSI/TSISensor.cpp", Line: 196, Col: 49
Error: Identifier "TSI_DATA_SWTS_MASK" is undefined in "TSI/TSISensor.cpp", Line: 197, Col: 22
Error: Identifier "TSI0" is undefined in "TSI/TSISensor.cpp", Line: 205, Col: 4

I don't know what I did wrong, I just imported the library to my project en used a program example, but it gives me these errors.

This is a link to the library itself: http://mbed.org/users/vsluiter/code/TSI/

Thanks for any help in advance!

Greetings,

Jonas Lannoo

2 Answers

11 years, 1 month ago.

That library is only for the KL25Z, it won't work on other devices.

Accepted Answer
11 years, 1 month ago.

Ok thanks for your fast answer!

Is there any possibility to communicate with the sensor with the LPC1768? Or is this impossible? I need this to communicate with an LCD+touchscreen... (ezLCD/arLCD)

The TSI is a peripheral of the KL25 specifically made to interface with capacitive touch sensors, other microcontrollers generally don't have them.

However pretty much every LCD + touchscreen combination has either a simple analog output for the touch location, or a digital output via its communication bus. It does not need to be connected to a specialised touch peripheral.

What you have to do depends on your specific LCD device. I just quickly googled them, and since they can be interfaced with arduinos, they can be interfaced with mbeds too. Sadly however unless I am looking in the wrong place their documentation seems to be lacking. There is an mbed lib related to these things: http://mbed.org/users/codeman/code/ezLCDLib/docs/tip/, although I dont directly see the touch input in it. If you can find where they have hidden their arduino code you can probably use that to figure out how to get the required values.

posted by Erik - 18 Nov 2013