You can only read 0-5V... If you need to read 9V then you need to scale it down with a potential divider 5k1 and 3k9 is quite close..
Since the range of the analogRead() function ranges from 0 to 1023, if I were to supply the Arduino with +9V, would 1023 represent 9V input or would it be 5V? I'm assuming it would be 9V but I want to be sure.
Thanks.
"Black holes are where God divided by zero."
You can only read 0-5V... If you need to read 9V then you need to scale it down with a potential divider 5k1 and 3k9 is quite close..
I'd give my left arm to be ambidextrous
Nigel's tutorials in asm... http://www.winpicprog.co.uk/
Nigel's tutorials.. re-written in C. http://www.electro-tech-online.com/c...torials-c.html
If you were to supply the pin with 9volts directly without proper current limiting the protection diodes will fail and you'll likely fry the I/O port.
Sorry for the late response but thanks everyone. I just changed the functionality of the circuit I was using from analog to digital so there was no frying of the I/O port![]()
"Black holes are where God divided by zero."
| Tags |
| Similar Threads | ||||
| Thread | Starter | Forum | Replies | Last Post |
| Variable Analog Delay Lines | AndyWhittle | Electronic Projects Design/Ideas/Reviews | 5 | 15th October 2012, 02:41 PM |
| Dspic30f4011 ADC 4 analog sensor data read | scn33 | Microcontrollers | 2 | 10th May 2009, 10:31 PM |
| PIC 16F877 read 2 analog signal | chilly85 | Microcontrollers | 3 | 24th September 2008, 03:48 PM |
| how to read analog frquency | swh | Microcontrollers | 2 | 11th May 2004, 03:15 AM |
| How to read Capacitors | SeanHatch | General Electronics Chat | 4 | 2nd January 2003, 05:22 AM |