Ok I am sending an on/off signal from a 16f876 Port C.2 to a 16f877 Port B.2 and my master program does not see it. The slave pic boards have been tested and work. Here is program I am using in MASTER Pic. What is to happen is Master signals Slave to run and Slave then signals Master when its done. Then Master goes to next section of code to run next Slave but not before last slave signals done. This program will cycle through everypart turning everything on and off but never waits for slave pics to signal its done. It just continues and runs all six sections. So for some reason it looks like the Master is not seeing the slave saying when its done. Where did I go wrong? Could something in my Epic programmer be set wrong? My wiring is like so. 16f877(Master) <------------------------[ 220 ohm ]----< 16f876(Slave) resistor is for zap protection line is only 14inches long. Here is program: ==================================================== ==================================================== @ DEVICE pic16F877, hs_osc, wdt_off, pwrt_off, bod_off, lvp_off,cpd_off,wrt_off, protect_off DEFINE OSC 20 '20 MHz crystal ' - - - -SETUP PORTA for OUTPUT- - - - - - - ADCON1 = 7 ' Set PORTA and PORTE to digital TRISA = %00000000 ' set PortA for all output PortA = %00000000 ' turn all lines on PortA OFF ' - - - -SETUP PORTB for INPUT- - - - TRISB = %01111111 ' sparein, trig, emer on PORTB to input Main_done var PORTB.0 ' Main Air Supply done line Clamp_done var PORTB.1 ' Clamp done line Index_done var PORTB.2 ' Index done line Tilt_done var PORTB.3 ' Tilt done line TV1_done var PORTB.4 ' Transverse1 done line TV2_done var PORTB.5 ' Transverse2 done line Counter_done var PORTB.6 ' Counter done line ' var PORTB.7 ' not used ' - - - -SETUP PORTC for OUTPUT- - - - TRISC = %00000000 ' set PortC for all output PortC = %00000000 ' turn off all portC Main var PORTC.0 ' Main Air Supply Valve Clamp var PORTC.1 ' Clamp Valve Index var PORTC.2 ' Index Valve Tilt var PORTC.3 ' Tilt Valve TV1 var PORTC.4 ' Transverse1 Valve TV2 var PORTC.5 ' Transverse2 Valve Counter var PORTC.6 ' Subract from Mechanical Counter ' var PORTC.7 ' not used ' - - - -SETUP PORTD for OUTPUT - - - - TRISD = %11110000 ' set PortD for 4 output & 4 input PortD = %00000000 ' turn off all portD ' - - - -SETUP PORTE for OUTPUT- - - - TRISE = %00000111 ' set PortE for all input PortE = %00000000 ' turn off all portE '-------------------------------------------------------- ' = = = = = = = = = = ' = TEST Program = ' = = = = = = = = = = test: Main = 1 'Master signals Slave to turn ON While Main_done = 0 'Wait till Slave signals that its done Wend Clamp = 1 'Master signals Slave to turn ON While Clamp_done = 0 'Wait till Slave signals that its done Wend Index = 1 'Master signals Slave to turn ON While Index_done = 0 'Wait till Slave signals that its done Wend Main = 0 'Master signals Slave to turn OFF While Main_done = 0 'Wait till Slave signals that its done Wend Clamp = 0 'Master signals Slave to turn OFF While Clamp_done = 0 'Wait till Slave signals that its done Wend Index = 0 'Master signals Slave to turn OFF While Index_done = 0 'Wait till Slave signals that its done Wend goto test = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Thanks Wrong Way Ray (Ray Choat) rc@kenai.net -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu