A nonlinear Fokker-Planck equation is obtained in the continuous limit of a one-dimensional lattice with an energy landscape of wells and barriers. Interaction is possible among particles in the same energy well. A parameter $\gamma$, related to the barrier's heights, is introduced. Its value is determinant for the functional dependence of the mobility and diffusion coefficient on particle concentration, but has no influence on the equilibrium solution. A relation between the mean field potential and the microscopic interaction energy is derived. The results are illustrated with classical particles with interactions that reproduce fermion and boson statistics.