Difference between revisions of "STM32F107VC/Using ADC"
From Teknologisk videncenter
m (→Software example) |
m (→Software example) |
||
Line 6: | Line 6: | ||
*[http://www.cypax.com/pdf/PGM5526x.pdf LDR Datasheet] (Loads PDF) | *[http://www.cypax.com/pdf/PGM5526x.pdf LDR Datasheet] (Loads PDF) | ||
The LDR is connected between [[STM32F107VC/GPIO|GPIO]] port C bit 0 and GND. A 10K pull-up resistor to 3.3V also connected to [[STM32F107VC/GPIO|GPIO]] port C bit 0 | The LDR is connected between [[STM32F107VC/GPIO|GPIO]] port C bit 0 and GND. A 10K pull-up resistor to 3.3V also connected to [[STM32F107VC/GPIO|GPIO]] port C bit 0 | ||
+ | ==Sample output from COM port== | ||
+ | Baudrate: 9600 | ||
+ | <source lang=cli> | ||
+ | POT = 3.292V| LDR = 0.80V | DEG = 26.7C| Vrefint = 1.2075V | ||
+ | POT = 3.292V| LDR = 0.80V | DEG = 26.6C| Vrefint = 1.2076V | ||
+ | POT = 3.292V| LDR = 0.80V | DEG = 26.8C| Vrefint = 1.2071V | ||
+ | POT = 3.294V| LDR = 0.80V | DEG = 26.6C| Vrefint = 1.2075V | ||
+ | POT = 3.293V| LDR = 0.80V | DEG = 26.6C| Vrefint = 1.2074V | ||
+ | </source> | ||
+ | {{Source cli}} | ||
[[Category:STM32F107VC]][[Category:ARM]] | [[Category:STM32F107VC]][[Category:ARM]] |
Revision as of 13:44, 6 October 2011
Contents
Literature
- Analog-digitalkonvertering (e-books.dk)
Software example
LDR - Light Dependent Resistor
- LDR Datasheet (Loads PDF)
The LDR is connected between GPIO port C bit 0 and GND. A 10K pull-up resistor to 3.3V also connected to GPIO port C bit 0
Sample output from COM port
Baudrate: 9600
POT = 3.292V| LDR = 0.80V | DEG = 26.7C| Vrefint = 1.2075V
POT = 3.292V| LDR = 0.80V | DEG = 26.6C| Vrefint = 1.2076V
POT = 3.292V| LDR = 0.80V | DEG = 26.8C| Vrefint = 1.2071V
POT = 3.294V| LDR = 0.80V | DEG = 26.6C| Vrefint = 1.2075V
POT = 3.293V| LDR = 0.80V | DEG = 26.6C| Vrefint = 1.2074V