In this paper, two infinite families of ternary cyclic codes with length \( 3^m-1 \) are constructed, where m is odd and m is sufficiently large. The minimum distance of one family of codes satisfies \( d\ge 6(3^{\frac{m-1}{2}}-1)+1 \) , and the minimum distance of the other family of codes satisfies \( d\ge 3^{\frac{m-1}{2}}-1 \) . The dimensions of these codes are close to half their length when m is sufficiently large. We also give an infinite family of binary cyclic codes with parameters \( [2^m-1,2^{m-1},d\ge 7\times 2^{(m-3)/2}+1]_2 \) , where \( m\equiv 1\pmod {4} \) and \( m\ge 23 \) . This family of binary cyclic codes has a better lower bound on the minimum distance than that given in Sun (2023).