At 12:03 PM -0600 12-17-03, Dale Botkin wrote: >What's between the PIC and the transistor bases? And which output pins, >exactly? And can you post a code snippet, showing how you are setting the >bits high and low? There is a 1K resistor between RB.0, RB.1, RB.2, and RB.3 and the base of a 2N2222 NPN transistor. But RB.4 behaves the same way, and it's connected to nothing. Here is the relevant code. At "wait1a" RA.0 goes from a low state to a floating input-like state, then goes low again at "low". include '16F627.inc' fuses _INTRC_OSC_CLKOUT ;oscillator fuses _WDT_OFF ;Watchdog timer fuses _CP_OFF ;Code protect fuses _BODEN_OFF ;Brownout detect fuses _PWRTE_ON ;Powerup timer fuses _LVP_OFF ;low voltage programming fuses _MCLRE_ON ;MCLR is pulled high internally, RA.5 is available flash1 equ RB.0 ;flash output 1 flash2 equ RB.1 ;flash output 2 flash3 equ RB.2 ;flash output 3 flash4 equ RB.3 ;flash output 4 inbit equ RB.7 ;input org 0 init clr RB ;set to zero clr RA ;set to zero setb RP0 mov TRISB,#10000000b mov TRISA,#11111111b clrb RP0 mov CMCON,#7 ;comparators off, digital I/O on port A clr maskB ;port B mask mov portB,maskB main jb inbit,main ;stay here until input pulls low do1 setb maskB.0 ;set this flash on setb maskB.4 ;debug wait1a mov portB, maskB ;turn on flash jnb inbit,wait1a ;keep flash on for duration ;end of phase 1 clr maskB low mov portB, maskB ;turn off output call ResetTimeout ;reset timeout counter wait1b jnb inbit,do2 ;if input pulled low, do next phase call CheckTimeout ;see if I've timed out jz wait1b ;jump if not yet jmp main ;timed out, wait for next input -- Bryan Mumford Santa Barbara, California http://www.bmumford.com -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu