View previous topic :: View next topic |
Author |
Message |
Ttelmah
Joined: 11 Mar 2010 Posts: 19831
|
|
Posted: Sat Nov 27, 2010 9:42 am |
|
|
He is using the 18F252, which doesn't have this. However the 2520, which is 'pin compatible', lower power, and cheaper, does, and on RA5!...
Definately a good idea.
Best Wishes |
|
 |
hayee
Joined: 05 Sep 2007 Posts: 252
|
|
Posted: Sun Nov 28, 2010 10:45 pm |
|
|
PIC18f252 have "LVDIN" pin at PIN RA5
Is has a same feature as described by bkamen "HLVD".
Can i use that pin for my required purpose?
what datasheet says if i select the value of LVDL3:LVDL0 (1111) then External analog pin is used
So what will be the reference/comparing voltage
like if i select the LVDL3:LVDL0 value (1110) then when voltage below 4.5v-4.77v it generates an interrupt
what will the case for LVDL3:LVDL0 value (1111)
I have searched the forum, I only got codes for internal LVD interrupt caused by the Vdd,
Can anyone show me sample program for external LVD interrupts. |
|
 |
Ttelmah
Joined: 11 Mar 2010 Posts: 19831
|
|
Posted: Mon Nov 29, 2010 5:11 am |
|
|
Yes.
The LVDIN input, is basically a comparator, which triggers an interrupt, if the pin drops below a particular voltage. You would have to setup a pair of resistors, to give the right switch 'point' for what you want. The trip point is 1.2v at the pin.
_Read the data sheet_. Every bit of what you have asked is in this
Best Wishes |
|
 |
|