how do i read an input voltage 10f200?

Status
Not open for further replies.

netmgr

Member
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?
 
Are you sure you want to use this chip?

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!
 
As Dakta mentioned, the 10F200 doesn't have an ADC modual. In fact, it doesn't have any peripherals. Only I/O ports and a Timer.

The barely more expensive 10F220 has an ADC.

If you insist on using this chip, you'd have to have an external comparator to react to.
 
Last edited:
hey hey. You can get a external comparator and have it toggle a Input pin and do what you want...


Just noticed this was suggested lol ok sorry
 
Last edited:
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
 

Attachments

  • 10f.PNG
    6.7 KB · Views: 250
Last edited:
Burt not to change subject but i hate schematics that show the GND symbol as a arrow heh. Im used to the 3-4 lines that get smaller as it goes
 
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.
 
Last edited:
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


Just for Atom Oh I always mark VDD /VCC and most of the time the ground But I forgot that time
 

Attachments

  • just for atom.PNG
    1.5 KB · Views: 186
  • divder.JPG
    14.1 KB · Views: 213
Last edited:
Heh sorry for being a pain in the butt Burt just confusing sometimes especially for a NooB who might be reading this.
 
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.
 
Last edited:
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

Little arrow up is vdd and it labels the VDD only
 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…