Atomic scale data obtained with atomic force microscopy (AFM) in the dynamic mode on graphite and a single-walled carbon nanotube (SWNT) are compared with simulations to relate the observed contrast to the real surface structure. The complete surface unit cell, and particularly the carbon site asymmetry on graphite, can be resolved in the attractive non-contact regime as well as in the weakly repulsive intermittent contact regime. On an SWNT, no carbon site asymmetry is present and the contrast above neighbouring carbon atoms in the attractive non-contact regime is symmetric. The experimental results can be qualitatively reproduced using a Lennard-Jones potential and a graphene layer with and without carbon site asymmetry to model the tip-sample interaction.