RX130 Capacitive Multiple Touch

Hello,

i create simple touch projects by  means of RX130 capacitive touch lab document(https://www.renesas.com/sg/en/doc/products/mpumcu/apn/rx/002/r01an4516eu0100-rx.pdf).

 

When i touch single button, everything is fine, however when i touch multiple button, nothing is work.Assume that when i touch 2 of them at same time, nothing is work then if i stop touching one of them, nothing is work ,then if i stop touching other one, it works.

 

 

What i missing? How multiple touch is work?

 

Also, i used these cards close to induction cooker. When induction cooker start run, fake button touch happened. Any advice?

  • The Renesas homepage has another example for RX130 touch.
    www.renesas.com/.../D4000844.html

    Are you sure the sample should support multi-touch? I don't see a mentioning of this.
  • In reply to FrankL:

    You are right,sample should not mention multi-touch. But i can not find any sample about multi-touch and i think sample cover both single-touch and multi-touch?

    Can anybody support multi-touch document and sample code?

     

    One more think, some button work on press and some of them work on release.

    So; when i press button X(on-release type button), then i press button Y(on-realese type button). After when i release both of them sequentely, last release button work only.

    Advice?

  • In reply to irfan:

    Irfan,

    The solution easily supports multi-touch. At the API layer, the function call:

    R_TOUCH_GetAllBtnStates(QE_METHOD_CONFIG01, &btn_states)

    returns a binary representation of the button(s) touched thru the global btn_states, where the variable is a uint_64 binary representation of the enabled channels.

    In this case, since the buttons are configured as TS0 and TS1:

    TSx          btn_states (binary value)

    TS0                1

    TS1                2

    TS0+TS1        3

     

    I've attached below a working main() that demonstrates this capability on the RX130 Capacitive Touch kit after the buttons are tuned properly using the CMT as the trigger for touch scans.

     

    void main(void)
    {
        qe_err_t    err;
        bool        success;
        uint32_t    cmt_ch;
     
        /* Setup pins */
        R_CTSU_PinSetInit();
     
        /* Open Touch driver */
        err = R_TOUCH_Open(gp_ctsu_cfgs, gp_touch_cfgs, QE_NUM_METHODS, QE_TRIG_SOFTWARE);
        if (err != QE_SUCCESS)
        {
            while(1) ;
        }
     
        /* Setup scan timer for 20ms (50Hz) */
        success = R_CMT_CreatePeriodic(50, qetouch_timer_callback, &cmt_ch);
        if (success == false)
        {
            while(1) ;
        }
     
        /* Main loop */
        while (1U)
        {
            if (g_qetouch_timer_flg == true)
            {
                g_qetouch_timer_flg = false;
                R_TOUCH_UpdateDataAndStartScan();
                R_TOUCH_GetAllBtnStates(QE_METHOD_CONFIG01, &btn_states);
            }
        }
    }

     

     

     

  • In reply to twelvexs:

    i did same thing. and when i watched threshold values from Renesas QE.
    When i press button X, threshold value of button X is change(single touch)
    when i press button Y threshold value of button Y is change(single touch)
    However when i press Button X, threshold value of button X change, the i press button Y without on-relase button X. value of button Y does not change.
    i do not figure out.