A method of a touch controller for controlling a touch panel device, the touch panel device comprising multiple sensor electrodes, and the method comprises;
- providing a dual mode in which a capacitive touch sensing operation in a touch sensing mode is used to sense an object's touch position while an active pen detection in a stylus detection mode is used to detect an active pen's signal;
- using a driving circuit to output driving signals into sensor electrodes placed along a first axis in the touch sensing mode;
- using a sensing circuit to receive sensing signals from sensor electrodes placed along a second axis in the touch sensing mode;
- and
- in the stylus detection mode, dynamically determining and enabling a portion of sensor electrodes for sensing the active pen according to the object's touch position sensed by the capacitive touch sensing operation.