Yes, with the resistor and LED disconnected, I still read 2V out of the portb.7
I'm using the pic like this to provide a TTL pulse, (replacing a Schmitt trigger osc.). I had it hooked up in place of the Schmitt trigger and it works the way I expected, however I don't know why I only read 2V from my multi meter.Code:'DEFINITIONS' DEFINE OSC 20 DEFINE ADC_BITS 10 ' Set number of bits in result DEFINE ADC_CLOCK 3 DEFINE ADC_SAMPLEUS 15 'PORT SETUP' TRISA = %11111111 'set up all pins on portA as input pins ADCON1 = %10000010 'Set PORTA analog conversion and right justify result timeVar var word pauseTime var byte main: adcin 0, timeVar pauseTime = timeVar / 12 high portb.7 pause pauseTime low portb.7 pause pauseTime goto main
The Schmitt trigger's pulse read close to 5V.





Bookmarks