In the scope of the study of low-frequency electrostatic microinstabilities in tokamak plasmas, attention has been focused on the effect of trapped ions. The ballooning transform has been applied to the gyrokinetic equation, for the case of a large aspect ratio plasma with circular magnetic surfaces. A new eigenvalue code has been developed to solve the resulting integral equation, for the case of adiabatic electrons and full ion dynamics, thus taking into account both circulating and trapped ions. The goal has been to assess the validity of the ballooning transform for trapped ion modes. A scan over the parameter k(theta)rho(L) has been carried out to determine a lower threshold for applicability of the ballooning representation. Illustrative results of trapped ion modes (TIM) are presented, together with the comparison with the ones obtained using a global gyrokinetic code, for low toroidal wave numbers, and a local kinetic dispersion relation. (C) 2000 American Institute of Physics. [S1070-664X(00)01204-0].