refined code with better ADC read port declaration