'determine number of pins n=28 'default to 28 - it will get over-written if the below is successful On Error Skip 2 Setpin 44,DIN 'this... n=44 '...and this are skipped if we bump into an error (pin 44 doesn't exist) 'so the pins stay at 28 'here n=number of pins on device Print n