Subversion Repositories Code-Repo

Rev

Rev 199 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 199 Rev 200
Line 8... Line 8...
8
#define MS_TO_CT_TICKS  (CPU_CLOCK_HZ/2000UL)
8
#define MS_TO_CT_TICKS  (CPU_CLOCK_HZ/2000UL)
9
#define US_TO_CT_TICKS  (CPU_CLOCK_HZ/2000000UL)
9
#define US_TO_CT_TICKS  (CPU_CLOCK_HZ/2000000UL)
10
 
10
 
11
#define ADDRESS_EEPROM 0x50
11
#define ADDRESS_EEPROM 0x50
12
 
12
 
13
// BTN1 = RG6, BTN2 = RG7, BTN3 = RD13
-
 
14
// Note: Write to PORTx is effectively the same as write to LATx
-
 
15
#define BTN1_TRIS TRISGbits.TRISG6
-
 
16
#define BTN1_PORT PORTGbits.RG6
-
 
17
#define BTN2_TRIS TRISGbits.TRISG7
-
 
18
#define BTN2_PORT PORTGbits.RG7
-
 
19
#define BTN3_TRIS TRISDbits.TRISD13
-
 
20
#define BTN3_PORT PORTDbits.RD13
-
 
21
 
-
 
22
// LED1 = G12, LED2 = G13, LED3 = G14, LED4 = G15
13
// LED1 = G12, LED2 = G13, LED3 = G14, LED4 = G15 (active high)
23
#define LED1_TRIS TRISGbits.TRISG12
14
#define LED1_TRIS TRISGbits.TRISG12
24
#define LED1_PORT PORTGbits.RG12
15
#define LED1_PORT PORTGbits.RG12
25
#define LED2_TRIS TRISGbits.TRISG13
16
#define LED2_TRIS TRISGbits.TRISG13
26
#define LED2_PORT PORTGbits.RG13
17
#define LED2_PORT PORTGbits.RG13
27
#define LED3_TRIS TRISGbits.TRISG14
18
#define LED3_TRIS TRISGbits.TRISG14
Line 30... Line 21...
30
#define LED4_PORT PORTGbits.RG15
21
#define LED4_PORT PORTGbits.RG15
31
 
22
 
32
void Delay_MS(unsigned int delay_ms);
23
void Delay_MS(unsigned int delay_ms);
33
void Delay_US(unsigned int delay_us);
24
void Delay_US(unsigned int delay_us);
34
 
25
 
35
// <editor-fold defaultstate="collapsed" desc="PMOD to MCU Pinouts">
26
// <editor-fold desc="PMOD to MCU Pinouts">
36
/*
27
/*
37
JA-01   AN2/C2IN-/CN4/RB2                               RB02
28
JA-01   AN2/C2IN-/CN4/RB2                               RB02
38
JA-02   AN3/C2IN+/CN5/RB3                               RB03
29
JA-02   AN3/C2IN+/CN5/RB3                               RB03
39
JA-03   AN4/C1IN-/CN6/RB4                               RB04
30
JA-03   AN4/C1IN-/CN6/RB4                               RB04
40
JA-04   PGEC2/AN6/OCFA/RB6                              RB06
31
JA-04   PGEC2/AN6/OCFA/RB6                              RB06