CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

PIC18F05Q40 HLVD interrupt?

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
acel



Joined: 09 Aug 2018
Posts: 8

View user's profile Send private message

PIC18F05Q40 HLVD interrupt?
PostPosted: Wed Jul 10, 2024 9:15 am     Reply with quote

PIC18f05Q40 için HLVD ABOVE ve BELOW kesme için örnek verir misiniz.
Ttelmah



Joined: 11 Mar 2010
Posts: 19495

View user's profile Send private message

PostPosted: Wed Jul 10, 2024 10:16 am     Reply with quote

Start by giving a correct part number PIC18F05Q40 does not exist....
Since this sort of peripheral differs chip to chip, we need to know
what chip you are using.

The forum really works normally in English. If you don't, get somebody or
a translation program to translate for you.
temtronic



Joined: 01 Jul 2010
Posts: 9221
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Wed Jul 10, 2024 11:41 am     Reply with quote

Google says....

Can you give an example for cutting?

which makes sense, he wants a code example.
acel



Joined: 09 Aug 2018
Posts: 8

View user's profile Send private message

PostPosted: Thu Jul 11, 2024 12:44 am     Reply with quote

I am using the PIC18F05Q40 MCU and I need an example for HLVD (High/Low-Voltage Detection) interrupt.
Ttelmah



Joined: 11 Mar 2010
Posts: 19495

View user's profile Send private message

PostPosted: Thu Jul 11, 2024 2:13 am     Reply with quote

An example for LVD detect is here:
[url]
http://www.ccsinfo.com/forum/viewtopic.php?t=46389&highlight=hlvd
[/url]

HVD uses the same interrupt, and you just use LVD_TRIGGER_ABOVE
instead of the TRIGGER_BELOW.
Critical thing is you will always have to clear the interrupt before you
can enable it (clear_interrupts(INT_LVD);). You don't have to do it
manually as this code does. Reason is that this interrupt always gets
set on a power_on reset, unless you have an external reset circuit
that holds the chip in reset till the power is stable. The data sheet
warns that you have to do this.
Obviously you can only have high voltage detect or low voltage detect,
since there is only one set point.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group