View previous topic :: View next topic |
Author |
Message |
will
Joined: 28 May 2012 Posts: 24 Location: france
|
adc comparator voltage |
Posted: Sun Apr 21, 2013 1:45 pm |
|
|
Hello
I'd put in one of my projects a reading of battery voltage 12v.
I use a 16F88, I'd light a LED has a certain voltage and another led to another voltage.
Can you give me an example? because I do not see how to do this.
thank you |
|
![](templates/subSilver/images/spacer.gif) |
Mike Walne
Joined: 19 Feb 2004 Posts: 1785 Location: Boston Spa UK
|
|
Posted: Sun Apr 21, 2013 2:26 pm |
|
|
Oh, come on.
1) CCS supplies example code for ADC.
2) Start by using their code.
3) CCS supplies code for driving LEDs.
4) Get LED code to work.
5) Merge LED and ADC codes
6) When you get stuck, show us what you've done and we'll help.
Mike
EDIT
There is example code for ADC and LED code on this forum.
Do a search. |
|
![](templates/subSilver/images/spacer.gif) |
senem
Joined: 29 May 2013 Posts: 1
|
|
Posted: Wed May 29, 2013 1:17 pm |
|
|
Hello will, have you taken CCS example code of ADC and LEDs. What is the result of merging this code, have you succeeded in this project? We will be glad to hear good results.
board assembly
Last edited by senem on Tue Jun 04, 2013 9:14 am; edited 2 times in total |
|
![](templates/subSilver/images/spacer.gif) |
temtronic
Joined: 01 Jul 2010 Posts: 9170 Location: Greensville,Ontario
|
|
Posted: Wed May 29, 2013 1:20 pm |
|
|
like MikeW says...
and...
be sure to design and install a voltage divider on the ADC input you've chosen...
otherwise PIC might go POOF !
hth
jay |
|
![](templates/subSilver/images/spacer.gif) |
|