We've just had the transponder in our group SEP upgraded to provide Mode C.
How does that transponder get the altitude info? Is there some sort of connection to the altimeter that converts barometric pressure into a electronic signal

Or is the altitude measured by ground-based means?