EPC9143 300 W 16th Brick DC/DC Module Reference Design
init_acmp.h
1
/* Microchip Technology Inc. and its subsidiaries. You may use this software
2
* and any derivatives exclusively with Microchip products.
3
*
4
* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
5
* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
6
* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
7
* PARTICULAR PURPOSE, OR ITS INTERACTION WITH MICROCHIP PRODUCTS, COMBINATION
8
* WITH ANY OTHER PRODUCTS, OR USE IN ANY APPLICATION.
9
*
10
* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
11
* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
12
* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
13
* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
14
* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS
15
* IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF
16
* ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
17
*
18
* MICROCHIP PROVIDES THIS SOFTWARE CONDITIONALLY UPON YOUR ACCEPTANCE OF THESE
19
* TERMS.
20
*/
21
22
/*
23
* File:
24
* Author:
25
* Comments:
26
* Revision history:
27
*/
28
29
// This is a guard condition so that contents of this file are not included
30
// more than once.
31
#ifndef INITIALIZE_ANALOG_COMPARATOR_H
32
#define INITIALIZE_ANALOG_COMPARATOR_H
33
34
#include <xc.h>
// include processor files - each processor file is guarded.
35
#include <stdint.h>
36
#include <stdbool.h>
37
38
#ifdef __cplusplus
39
extern
"C"
{
40
#endif
/* __cplusplus */
41
42
43
#define DAC_MINIMUM 50
44
#define DAC_MAXIMUM 4050
45
46
#define DACDATH 0 // DAC value for the buck the slope starts from
47
#define DACDATL 205 // Set this to minimum in Slope mode
48
49
#define LEB_PER_COMP 50 // Leading edge period for the comparator when slope re-settles to its initial value
50
51
#define TMOD_DURATION 75 // Transition Mode Duration
52
#define SS_DURATION 85 // Time from Start of Transition Mode until Steady-State Filter is Enabled
53
54
#define SLOPE_RATE 43 // Slope Ramp Rate Value
55
56
extern
volatile
uint16_t init_acmp_module(
void
);
57
extern
volatile
uint16_t init_buck_vmc(
void
);
58
extern
volatile
uint16_t launch_buck_acmp(
void
);
59
60
61
#ifdef __cplusplus
62
}
63
#endif
/* __cplusplus */
64
65
#endif
/* INITIALIZE_ANALOG_COMPARATOR_H */
66
epc9143-avmc.X
sources
config
init
init_acmp.h
© 2021, Microchip Technology Inc.