On Thu, 11 Sep 2003 01:19:48 +0100, Mike Harrison wrote: ::You'll need more than 8 pins to read the switches - (OK it may be ::possible on a '675 using the ADC ::but will be a bit of a pain) - an 18 pin device will be a lot ::easier! Couldn't he multiplex the BCD switches only 4 lines for the BCD and two control pins to differentiate between Hz and FRACT_Hz. Wire OR the BCD outputs to the PIC and either alternate between the two CONTROL pins or if necessary use an extra pin for an ENTER button and just press it after each wheel has been thumbed appropriately. Example snippet //Read 2 BCD switches multiplexed to same port clrf CONTROL_PORT ;Port that controls the C pin of switches bsf COMTROL_PORT, SwitchX1 ;Set bitX connected to Cx switch X becomes live delay ;wait for debounce end movf BCD_PORT,w ;Copy reading of BCD pins on BCD_PORT to w movwf BCDx1 ;Save it in that wheels file bcf CONTROL_PORT,SwitchX1 ; release that BCD wheel delay ;wait short while maybe a NOP here bsf CONTROL_PORT, SwitchX2 ;Do agian but for the second wheel. movf BCD_PORT,w movwf BCDx2 bcd CONTROL_PORT,SwitchX2 rest of program Colin -- cdb, bodgy1@optusnet.com.au on 11.09.2003 I have always been a few Dendrites short of an Axon and believe me it shows. Light travels faster than sound. That's why some people appear bright until they speak! -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics