Certainly it WILL work if you feed a Comparator...
MCLR pins are INPUTS only when set to off.PS I'm having a torrid time getting PIN 4 on a 12F683 to work as an digital output pin - this just so happens to be the MCLR pin - any top tips what might be my problem? if I use the same code but with a different pin in it's place it all works - so it's somethint unique to that pin 4 - I've tried the MCLRE_OFF in my config - it's driving me potty...
From the data sheet.
4.2.5.4 GP3/MCLR/VPP
Figure 4-4 shows the diagram for this pin. The GP3 pin
is configurable to function as one of the following:
• a general purpose input
• as Master Clear Reset with weak pull-up
Dave
Always wear safety glasses while programming.
Just keep the data sheets in the bathroom and read them there...
Somehow they are not so ... intimidating then.![]()
Dave
Always wear safety glasses while programming.
2V5 is in the analog world so if you have a spare comparator or ADC pin on your PIC then use it.
If you do not have a spare analog pin, then RCTIME and POT commands can be used.
Setup your PIC with a fixed resistor and capacitor for RCTIME or POT on an available digital I/O pin. Connect the 2V5 source to the same pin through, say, a 10K resistor. There will be large changes in the value returned by the RCTIME or POT command when the 2V5 source is present/not present.
HTH
BrianT
Bookmarks