hi,how can i use the internal comparator in pic16f877a.can someone help me with the coding please.my Vin is 3.40 and my Vref is 4.00.please help me...
hi,how can i use the internal comparator in pic16f877a.can someone help me with the coding please.my Vin is 3.40 and my Vref is 4.00.please help me...
See Melanie's excellent post here
http://list.picbasic.com/forum/messages/3064/3607.html?
it is for a different processor but converting to the 877a should be straight forward. Reply if you need more
Paul Borgmeier
Salt Lake City, UT
USA
__________________
Hi, Mel
I'm Aaaaabsolutely suuuuuure it's not you but your Elder sista ...
regards
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
thanx.i will work it out.if something goes wrong...i'll tell u guys...
' Device Programming Options
' --------------------------
@ DEVICE pic16F628, INTRC_OSC_NOCLKOUT
' System Clock Options
@ DEVICE pic16F628, WDT_ON
' Watchdog Timer
@ DEVICE pic16F628, PWRT_ON
' Power-On Timer
@ DEVICE pic16F628, MCLR_OFF
' Master Clear Options (Internal)
@ DEVICE pic16F628, BOD_ON
' Brown-Out Detect
@ DEVICE pic16F628, LVP_OFF
' Low-Voltage Programming
@ DEVICE pic16F628, CPD_OFF
' Data Memory Code Protect
@ DEVICE pic16F628, PROTECT_OFF
' Program Code Protection
i can't compile if those code are exist.i use pic16f877a.
@ DEVICE pic16F877a, INTRC_OSC_NOCLKOUT
' System Clock Options
@ DEVICE pic16F877a, WDT_ON
' Watchdog Timer
@ DEVICE pic16F877a, PWRT_ON
' Power-On Timer
@ DEVICE pic16F877a, MCLR_OFF
' Master Clear Options (Internal)
@ DEVICE pic16F877a, BOD_ON
' Brown-Out Detect
@ DEVICE pic16F877a, LVP_OFF
' Low-Voltage Programming
@ DEVICE pic16F877a, CPD_OFF
' Data Memory Code Protect
@ DEVICE pic16F877a, PROTECT_OFF
' Program Code Protection
BatVal var CMCON.7
BatLoLED var PORTB.7
CMCON=%00100101
VRCON=%11101100
Pauseus 10
TRISA=%11111111
TRISB=%00000000
BatLoLoop:
BatLoLED=BatVal
Goto BatLoLoop
End
my vref=4v, vin=3.6 and my vout=9v.can someone help me which part of the coding need to be edit.please...
Vref = 4v - what is Vref connected to?my vref=4v, vin=3.6 and my vout=9v.can someone help me which part of the coding need to be edit.please...
Vin = 3.6v - what is Vin connected to?
Vout = 9v - what is Vout connected to?
Read the datasheet for the 16F877A!
Can MCLR be turned off?
How many oscillator modes does the 16F877A have? What are they?
Last edited by skimask; - 17th September 2008 at 18:58.
I Love the way you think Melanie . . .
I wish more engineers thought as you do.In a battery operated piece of equipment we need to detect when the
batteries are getting low, so in turn we can switch on a 'Battery Low' LED
to help flatten whats left of the battery even quicker... seems sensible to
me....
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
thanx everyone.it's work.but i have another problem that i can't solve.feel free to check my new thread...
Bookmarks