  This paper is devoted to the problem of ergodicity of $p$-adic dynamical
systems. Our aim is to present criteria of ergodicity in terms of coordinate
functions corresponding to digits in the canonical expansion of $p$-adic
numbers. The coordinate representation can be useful, e.g., for applications to
cryptography. Moreover, by using this representation we can consider non-smooth
$p$-adic transformations. The basic technical toolsare van der Put series and
usage of algebraic structure (permutations) induced by coordinate functions
with partially frozen variables. We illustrate the basic theorems by presenting
concrete classes of ergodic functions.
