sample code for a ADC (Analog To Digital Conversion) for SW Trigger design in embedded systems lecture