folks,
i can check ports are grounded etc but can i check their actual voltage?
i want to read a voltage from 0 up to 5v on a 10f200
whats the command?
Doesn't have an onboard adc unit iirc, and with a pin count that low I can't imagine it'd really be practical to try and rig up an alternative solution.
Whats the project? is it not something a 12f683 could do? (99p on ebay, crammed with features ...and an analogue/digital converter module).
I happen to have plenty of these chips, I simply want to read the input voltage and activate a switch at a certain point, thought it would be a simple thing to do!
You can read the voltage with a cap and a resistor you charge the cap Then you open the drain and start the timer
and count how long it take to go low with timer0 you can do it with one pin it's in the tip's and trick appnote
I happen to have plenty of these chips, I simply want to read the input voltage and activate a switch at a certain point, thought it would be a simple thing to do!
As was stated earlier, if the chip had an on chip comparator you could very easily do it. The chip wouldn't have to know what the exact input voltage was. You would simply set one of the two inputs on the comparator to a fixed reference voltage that is equal to the threshold voltage at which you wish for the comparator output pin to go high, then feed the voltage you wish to monitor to the 2nd input of the comparator. Once the monitored voltage exceeds that of the fixed reference voltage, the comparator output would go high. Conversely, once the monitored voltage falls below the fixed reference voltage the comparator output would go low.
Now if you're wanting a way to "program" the fixed reference voltage in software so that you can make the reference voltage dynamic and software programmable, some sort of D/A converter would be needed to convert the on/off state switching of the port output pins into a variable voltage. A D/A converter is nothing more than a switched multi-tap voltage divider essentially, hence the common discrete component "R/2R resistor ladder D/A converter". Many D/A converter ICs still operate on this principle.
Assuming you're wishing to have this threshold switching on/off device control your uC, with your particular uC you would need an external comparator IC to drive one of the port I/O pins on the uC that you would set as an input in software. You would then need to map the state of this input pin to one or more of the port output pins in software depending on the functionality you're trying to implement with your concept.
It's dead simple Set a pin to output 5 volts it will charge the cap to 5 volts
change pin to input and poll till it gos low using the timer0 to count till the pin gos low
Me personally I could care less where "ground" is so long as I know that ground is the primary reference. Anything that indicates "ground" qualifies as "ground" regardless of the symbology.
the issue is there are programs that use a arrow as VDD/VCC and not VSS/GND so you can see where i would hate when its used for ground. At least a GND Label would be nice heh
the issue is there are programs that use a arrow as VDD/VCC and not VSS/GND so you can see where i would hate when its used for ground. At least a GND Label would be nice heh
Simply adjust a voltage divider to produce a HIGH when the particular voltage you are trying to detect, is present. The chip detects a HIGH at about 1.2v. You need to be more specific with the voltage you are trying to detect.
Simply adjust a voltage divider to produce a HIGH when the particular voltage you are trying to detect, is present. The chip detects a HIGH at about 1.2v. You need to be more specific with the voltage you are trying to detect.
Collins55 I just posted a sample to show vdd and gnd that's it and if you did use it with the right resistor it will scale 12 to be read by a 18f25k20 chip but i didn't post the whole thing.
Didn't what it to end up on your site with your name on it like some of my you tube video
Just joking Collins OK
Oh Atom I didn't draw that with like paint I use ExpressSCH that how it does it big arrow down is gnd