Added C Code for ADC

Taken from lecture