File tree Expand file tree Collapse file tree 7 files changed +105
-0
lines changed
CFD-on-main-clock-with-NMI.X
TCD-with-XOSCHF-and-PLL.X
XOSCHF-with-external-clock.X
XOSCHF-with-external-crystal.X Expand file tree Collapse file tree 7 files changed +105
-0
lines changed Original file line number Diff line number Diff line change 28
28
#include <avr/cpufunc.h>
29
29
#include <avr/interrupt.h>
30
30
31
+ // To compile the fuse configuration, the FUSES macro is used. The fuse settings are set to the device production values.
32
+ FUSES = {
33
+ .WDTCFG = FUSE_WDTCFG_DEFAULT ,
34
+ .BODCFG = FUSE_BODCFG_DEFAULT ,
35
+ .OSCCFG = FUSE_OSCCFG_DEFAULT ,
36
+ .SYSCFG0 = FUSE_SYSCFG0_DEFAULT ,
37
+ .SYSCFG1 = FUSE_SYSCFG1_DEFAULT ,
38
+ .CODESIZE = FUSE_CODESIZE_DEFAULT ,
39
+ .BOOTSIZE = FUSE_BOOTSIZE_DEFAULT ,
40
+ };
41
+ // To compile the lockbits configuration, the LOCKBITS macro is used. The lockbits are set to unlocked.
42
+ LOCKBITS = {
43
+ LOCKBITS_DEFAULT ,
44
+ };
45
+
31
46
void CLOCK_XOSCHF_crystal_init (void );
32
47
void CLOCK_CFD_XOSCHF_init (void );
33
48
Original file line number Diff line number Diff line change 29
29
#include <avr/interrupt.h>
30
30
#include <util/delay.h>
31
31
32
+ // To compile the fuse configuration, the FUSES macro is used. The fuse settings are set to the device production values.
33
+ FUSES = {
34
+ .WDTCFG = FUSE_WDTCFG_DEFAULT ,
35
+ .BODCFG = FUSE_BODCFG_DEFAULT ,
36
+ .OSCCFG = FUSE_OSCCFG_DEFAULT ,
37
+ .SYSCFG0 = FUSE_SYSCFG0_DEFAULT ,
38
+ .SYSCFG1 = FUSE_SYSCFG1_DEFAULT ,
39
+ .CODESIZE = FUSE_CODESIZE_DEFAULT ,
40
+ .BOOTSIZE = FUSE_BOOTSIZE_DEFAULT ,
41
+ };
42
+ // To compile the lockbits configuration, the LOCKBITS macro is used. The lockbits are set to unlocked.
43
+ LOCKBITS = {
44
+ LOCKBITS_DEFAULT ,
45
+ };
46
+
32
47
void CLOCK_XOSCHF_crystal_init (void );
33
48
void CLOCK_CFD_CLKMAIN_init (void );
34
49
Original file line number Diff line number Diff line change 26
26
#include <avr/cpufunc.h>
27
27
#include <avr/interrupt.h>
28
28
29
+ // To compile the fuse configuration, the FUSES macro is used. The fuse settings are set to the device production values.
30
+ FUSES = {
31
+ .WDTCFG = FUSE_WDTCFG_DEFAULT ,
32
+ .BODCFG = FUSE_BODCFG_DEFAULT ,
33
+ .OSCCFG = FUSE_OSCCFG_DEFAULT ,
34
+ .SYSCFG0 = FUSE_SYSCFG0_DEFAULT ,
35
+ .SYSCFG1 = FUSE_SYSCFG1_DEFAULT ,
36
+ .CODESIZE = FUSE_CODESIZE_DEFAULT ,
37
+ .BOOTSIZE = FUSE_BOOTSIZE_DEFAULT ,
38
+ };
39
+ // To compile the lockbits configuration, the LOCKBITS macro is used. The lockbits are set to unlocked.
40
+ LOCKBITS = {
41
+ LOCKBITS_DEFAULT ,
42
+ };
43
+
29
44
void CLOCK_XOSCHF_crystal_init (void );
30
45
void TIMER_RTC_init (void );
31
46
Original file line number Diff line number Diff line change 28
28
void CLOCK_XOSCHF_crystal_PLL_init (void );
29
29
void TIMER_TCD0_init (void );
30
30
31
+ // To compile the fuse configuration, the FUSES macro is used. The fuse settings are set to the device production values.
32
+ FUSES = {
33
+ .WDTCFG = FUSE_WDTCFG_DEFAULT ,
34
+ .BODCFG = FUSE_BODCFG_DEFAULT ,
35
+ .OSCCFG = FUSE_OSCCFG_DEFAULT ,
36
+ .SYSCFG0 = FUSE_SYSCFG0_DEFAULT ,
37
+ .SYSCFG1 = FUSE_SYSCFG1_DEFAULT ,
38
+ .CODESIZE = FUSE_CODESIZE_DEFAULT ,
39
+ .BOOTSIZE = FUSE_BOOTSIZE_DEFAULT ,
40
+ };
41
+ // To compile the lockbits configuration, the LOCKBITS macro is used. The lockbits are set to unlocked.
42
+ LOCKBITS = {
43
+ LOCKBITS_DEFAULT ,
44
+ };
45
+
31
46
int main (void )
32
47
{
33
48
CLOCK_XOSCHF_crystal_PLL_init ();
Original file line number Diff line number Diff line change 28
28
void CLOCK_XOSCHF_crystal_init (void );
29
29
void TIMER_TCD0_init (void );
30
30
31
+ // To compile the fuse configuration, the FUSES macro is used. The fuse settings are set to the device production values.
32
+ FUSES = {
33
+ .WDTCFG = FUSE_WDTCFG_DEFAULT ,
34
+ .BODCFG = FUSE_BODCFG_DEFAULT ,
35
+ .OSCCFG = FUSE_OSCCFG_DEFAULT ,
36
+ .SYSCFG0 = FUSE_SYSCFG0_DEFAULT ,
37
+ .SYSCFG1 = FUSE_SYSCFG1_DEFAULT ,
38
+ .CODESIZE = FUSE_CODESIZE_DEFAULT ,
39
+ .BOOTSIZE = FUSE_BOOTSIZE_DEFAULT ,
40
+ };
41
+ // To compile the lockbits configuration, the LOCKBITS macro is used. The lockbits are set to unlocked.
42
+ LOCKBITS = {
43
+ LOCKBITS_DEFAULT ,
44
+ };
45
+
31
46
int main (void )
32
47
{
33
48
CLOCK_XOSCHF_crystal_init ();
Original file line number Diff line number Diff line change 27
27
#include <avr/io.h>
28
28
#include <avr/cpufunc.h>
29
29
30
+ // To compile the fuse configuration, the FUSES macro is used. The fuse settings are set to the device production values.
31
+ FUSES = {
32
+ .WDTCFG = FUSE_WDTCFG_DEFAULT ,
33
+ .BODCFG = FUSE_BODCFG_DEFAULT ,
34
+ .OSCCFG = FUSE_OSCCFG_DEFAULT ,
35
+ .SYSCFG0 = FUSE_SYSCFG0_DEFAULT ,
36
+ .SYSCFG1 = FUSE_SYSCFG1_DEFAULT ,
37
+ .CODESIZE = FUSE_CODESIZE_DEFAULT ,
38
+ .BOOTSIZE = FUSE_BOOTSIZE_DEFAULT ,
39
+ };
40
+ // To compile the lockbits configuration, the LOCKBITS macro is used. The lockbits are set to unlocked.
41
+ LOCKBITS = {
42
+ LOCKBITS_DEFAULT ,
43
+ };
44
+
30
45
void CLOCK_XOSCHF_clock_init (void );
31
46
32
47
static inline void LED0_init (void )
Original file line number Diff line number Diff line change 27
27
#include <avr/io.h>
28
28
#include <avr/cpufunc.h>
29
29
30
+ // To compile the fuse configuration, the FUSES macro is used. The fuse settings are set to the device production values.
31
+ FUSES = {
32
+ .WDTCFG = FUSE_WDTCFG_DEFAULT ,
33
+ .BODCFG = FUSE_BODCFG_DEFAULT ,
34
+ .OSCCFG = FUSE_OSCCFG_DEFAULT ,
35
+ .SYSCFG0 = FUSE_SYSCFG0_DEFAULT ,
36
+ .SYSCFG1 = FUSE_SYSCFG1_DEFAULT ,
37
+ .CODESIZE = FUSE_CODESIZE_DEFAULT ,
38
+ .BOOTSIZE = FUSE_BOOTSIZE_DEFAULT ,
39
+ };
40
+ // To compile the lockbits configuration, the LOCKBITS macro is used. The lockbits are set to unlocked.
41
+ LOCKBITS = {
42
+ LOCKBITS_DEFAULT ,
43
+ };
44
+
30
45
void CLOCK_XOSCHF_crystal_init (void );
31
46
32
47
static inline void LED0_init (void )
You can’t perform that action at this time.
0 commit comments