my understanding is that if the mode selector is set to XPNDR mode S is off and ATC is on but ATC does not transmit because the aircraft is on the ground. If TA or TA/RA is selected mode S is enabled and will transmit on the ground. Aircraft in flight will not generate TAs for aircraft between estimated ground level and estimated ground level plus 180 feet. These are declared 'on ground' by TCAS. The estimated ground level is determined from the difference between radio altitude and barometric altitude.