I am using 18F452, and reading portb.7.
It lights an LED the way it should, but I only read 1-2V.
Thanks,
T
I am using 18F452, and reading portb.7.
It lights an LED the way it should, but I only read 1-2V.
Thanks,
T
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.
Last edited by TonyA; - 22nd April 2008 at 23:59.
I see no code saying "port b shall be used for output" .... do you ?
Ramon.
Bookmarks