├── .gitignore ├── README.md ├── Send_Hello_World ├── main.c ├── Send_Hello_World.componentinfo.xml └── Send_Hello_World.cproj ├── Send_Formatted_Strings_Using_Printf ├── main.c ├── Send_Formatted_Strings_Using_Printf.componentinfo.xml └── Send_Formatted_Strings_Using_Printf.cproj ├── ATmega4809_USART_Examples.atsln ├── Synchronous_Mode ├── main.c ├── Synchronous_Mode.componentinfo.xml └── Synchronous_Mode.cproj ├── One_Wire_Mode ├── main.c ├── One_Wire_Mode.componentinfo.xml └── One_Wire_Mode.cproj └── Receive_Control_Commands ├── main.c ├── Receive_Control_Commands.componentinfo.xml └── Receive_Control_Commands.cproj /.gitignore: -------------------------------------------------------------------------------- 1 | */Debug 2 | .vs 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | (TB3216) ATmega4809 USART Examples 2 | === 3 | 4 | 5 | **The content of this repository has been moved to [Getting Started with Universal Synchronous and Asynchronous Receiver and Transmitter (USART) Examples (Microchip Studio)](https://github.com/microchip-pic-avr-examples/atmega4809-getting-started-with-usart-studio). Additionally, a repository containing MCC generated code examples for AVR128DA48 with the same functionality can be found at [Getting Started with Universal Synchronous/Asynchronous Receiver/Transmitter (USART) Examples (MPLAB X)](https://github.com/microchip-pic-avr-examples/avr128da48-getting-started-with-usart-mplab-mcc). This repository is obsolete and it will not be maintained.** 6 | 7 | 8 | This repository contains examples of bare metal source code for USART as described in [Getting Started with USART](http://ww1.microchip.com/downloads/en/Appnotes/TB3216-Getting-Started-with-USART-90003216B.pdf) document from Microchip. 9 | The repository contains an Atmel Studio Solution with multiple projects inside. Make sure you have the necessary tools: 10 | 1. ATmega4809 device (recommended is evaluation board ATmega4809 X-plained PRO) 11 | 2. Atmel Studio 12 | 3. ATmega4809 Device Packs 13 | 4. Serial terminal emulator (eg. Data Visualizer, Tera Term) 14 | 5. UART to USB module (eg. MCP2200) 15 | 16 | The following examples are inside this repository: 17 | 1. Send “Hello World” to a Terminal 18 | 2. Send Formatted Strings/Send String Templates Using Printf 19 | 3. Receive Control Commands 20 | 4. Asynchronous USART 21 | 5. One Wire USART 22 | 23 | This source code is compatible with the following devices: ATtiny402, ATtiny202, ATtiny1604, ATtiny804, ATtiny404, ATtiny204, ATtiny1606, ATtiny806, ATtiny406, ATtiny1607, ATtiny807, ATtiny412, ATtiny212, ATtiny1614, ATtiny814, ATtiny414, ATtiny214, ATtiny3216, ATtiny1616, ATtiny816, ATtiny416, ATtiny3217, ATtiny1617, ATtiny817, ATtiny417, ATmega4808, ATmega3208, ATmega1608, ATmega808, ATmega4809, ATmega3209, ATmega1609, ATmega809. 24 | -------------------------------------------------------------------------------- /Send_Hello_World/main.c: -------------------------------------------------------------------------------- 1 | /* 2 | \file main.c 3 | 4 | \brief Main file of the project. 5 | 6 | (c) 2018 Microchip Technology Inc. and its subsidiaries. 7 | 8 | Subject to your compliance with these terms, you may use Microchip software and any 9 | derivatives exclusively with Microchip products. It is your responsibility to comply with third party 10 | license terms applicable to your use of third party software (including open source software) that 11 | may accompany Microchip software. 12 | 13 | THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER 14 | EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY 15 | IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS 16 | FOR A PARTICULAR PURPOSE. 17 | 18 | IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, 19 | INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND 20 | WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP 21 | HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO 22 | THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL 23 | CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT 24 | OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS 25 | SOFTWARE. 26 | */ 27 | 28 | #define F_CPU 3333333 29 | #define USART0_BAUD_RATE(BAUD_RATE) ((float)(F_CPU * 64 / (16 * (float)BAUD_RATE)) + 0.5) 30 | 31 | #include 32 | #include 33 | #include 34 | 35 | void USART0_init(void); 36 | void USART0_sendChar(char c); 37 | void USART0_sendString(char *str); 38 | 39 | void USART0_init(void) 40 | { 41 | PORTA.DIR &= ~PIN1_bm; 42 | PORTA.DIR |= PIN0_bm; 43 | 44 | USART0.BAUD = (uint16_t)USART0_BAUD_RATE(9600); 45 | 46 | USART0.CTRLB |= USART_TXEN_bm; 47 | } 48 | 49 | void USART0_sendChar(char c) 50 | { 51 | while (!(USART0.STATUS & USART_DREIF_bm)) 52 | { 53 | ; 54 | } 55 | USART0.TXDATAL = c; 56 | } 57 | 58 | void USART0_sendString(char *str) 59 | { 60 | for(size_t i = 0; i < strlen(str); i++) 61 | { 62 | USART0_sendChar(str[i]); 63 | } 64 | } 65 | 66 | int main(void) 67 | { 68 | USART0_init(); 69 | 70 | while (1) 71 | { 72 | USART0_sendString("Hello World!\r\n"); 73 | _delay_ms(500); 74 | } 75 | } -------------------------------------------------------------------------------- /Send_Formatted_Strings_Using_Printf/main.c: -------------------------------------------------------------------------------- 1 | /* 2 | \file main.c 3 | 4 | \brief Main file of the project. 5 | 6 | (c) 2018 Microchip Technology Inc. and its subsidiaries. 7 | 8 | Subject to your compliance with these terms, you may use Microchip software and any 9 | derivatives exclusively with Microchip products. It is your responsibility to comply with third party 10 | license terms applicable to your use of third party software (including open source software) that 11 | may accompany Microchip software. 12 | 13 | THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER 14 | EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY 15 | IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS 16 | FOR A PARTICULAR PURPOSE. 17 | 18 | IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, 19 | INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND 20 | WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP 21 | HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO 22 | THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL 23 | CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT 24 | OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS 25 | SOFTWARE. 26 | */ 27 | 28 | #define F_CPU 3333333 29 | #define USART0_BAUD_RATE(BAUD_RATE) ((float)(F_CPU * 64 / (16 * (float)BAUD_RATE)) + 0.5) 30 | 31 | #include 32 | #include 33 | #include 34 | 35 | static void USART0_sendChar(char c) 36 | { 37 | while (!(USART0.STATUS & USART_DREIF_bm)) 38 | { 39 | ; 40 | } 41 | USART0.TXDATAL = c; 42 | } 43 | 44 | static int USART0_printChar(char c, FILE *stream) 45 | { 46 | USART0_sendChar(c); 47 | return 0; 48 | } 49 | 50 | static FILE USART_stream = FDEV_SETUP_STREAM(USART0_printChar, NULL, _FDEV_SETUP_WRITE); 51 | 52 | static void USART0_init(void) 53 | { 54 | PORTA.DIR |= PIN0_bm; 55 | 56 | USART0.BAUD = (uint16_t)USART0_BAUD_RATE(9600); 57 | 58 | USART0.CTRLB |= USART_TXEN_bm; 59 | 60 | stdout = &USART_stream; 61 | } 62 | 63 | int main(void) 64 | { 65 | uint8_t count = 0; 66 | 67 | USART0_init(); 68 | 69 | while (1) 70 | { 71 | printf("Counter value is: %d\n\r", count++); 72 | _delay_ms(500); 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /ATmega4809_USART_Examples.atsln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Atmel Studio Solution File, Format Version 11.00 4 | VisualStudioVersion = 14.0.23107.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{54F91283-7BC4-4236-8FF9-10F437C3AD48}") = "Synchronous_Mode", "Synchronous_Mode\Synchronous_Mode.cproj", "{AB3CEBFB-A87D-453B-8DF9-3B23B5F03214}" 7 | EndProject 8 | Project("{54F91283-7BC4-4236-8FF9-10F437C3AD48}") = "One_Wire_Mode", "One_Wire_Mode\One_Wire_Mode.cproj", "{DCE6C7E3-EE26-4D79-826B-08594B9AD897}" 9 | EndProject 10 | Project("{54F91283-7BC4-4236-8FF9-10F437C3AD48}") = "Receive_Control_Commands", "Receive_Control_Commands\Receive_Control_Commands.cproj", "{AD6688C0-D033-40B2-9AC4-66BB1E804696}" 11 | EndProject 12 | Project("{54F91283-7BC4-4236-8FF9-10F437C3AD48}") = "Send_Formatted_Strings_Using_Printf", "Send_Formatted_Strings_Using_Printf\Send_Formatted_Strings_Using_Printf.cproj", "{B3AE75E4-1ABF-45D0-8850-FA4599DA224E}" 13 | EndProject 14 | Project("{54F91283-7BC4-4236-8FF9-10F437C3AD48}") = "Send_Hello_World", "Send_Hello_World\Send_Hello_World.cproj", "{0EF71319-42A1-4133-82F3-1710E84CFEE2}" 15 | EndProject 16 | Global 17 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 18 | Debug|AVR = Debug|AVR 19 | Release|AVR = Release|AVR 20 | EndGlobalSection 21 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 22 | {AB3CEBFB-A87D-453B-8DF9-3B23B5F03214}.Debug|AVR.ActiveCfg = Debug|AVR 23 | {AB3CEBFB-A87D-453B-8DF9-3B23B5F03214}.Debug|AVR.Build.0 = Debug|AVR 24 | {AB3CEBFB-A87D-453B-8DF9-3B23B5F03214}.Release|AVR.ActiveCfg = Release|AVR 25 | {AB3CEBFB-A87D-453B-8DF9-3B23B5F03214}.Release|AVR.Build.0 = Release|AVR 26 | {DCE6C7E3-EE26-4D79-826B-08594B9AD897}.Debug|AVR.ActiveCfg = Debug|AVR 27 | {DCE6C7E3-EE26-4D79-826B-08594B9AD897}.Debug|AVR.Build.0 = Debug|AVR 28 | {DCE6C7E3-EE26-4D79-826B-08594B9AD897}.Release|AVR.ActiveCfg = Release|AVR 29 | {DCE6C7E3-EE26-4D79-826B-08594B9AD897}.Release|AVR.Build.0 = Release|AVR 30 | {AD6688C0-D033-40B2-9AC4-66BB1E804696}.Debug|AVR.ActiveCfg = Debug|AVR 31 | {AD6688C0-D033-40B2-9AC4-66BB1E804696}.Debug|AVR.Build.0 = Debug|AVR 32 | {AD6688C0-D033-40B2-9AC4-66BB1E804696}.Release|AVR.ActiveCfg = Release|AVR 33 | {AD6688C0-D033-40B2-9AC4-66BB1E804696}.Release|AVR.Build.0 = Release|AVR 34 | {B3AE75E4-1ABF-45D0-8850-FA4599DA224E}.Debug|AVR.ActiveCfg = Debug|AVR 35 | {B3AE75E4-1ABF-45D0-8850-FA4599DA224E}.Debug|AVR.Build.0 = Debug|AVR 36 | {B3AE75E4-1ABF-45D0-8850-FA4599DA224E}.Release|AVR.ActiveCfg = Release|AVR 37 | {B3AE75E4-1ABF-45D0-8850-FA4599DA224E}.Release|AVR.Build.0 = Release|AVR 38 | {0EF71319-42A1-4133-82F3-1710E84CFEE2}.Debug|AVR.ActiveCfg = Debug|AVR 39 | {0EF71319-42A1-4133-82F3-1710E84CFEE2}.Debug|AVR.Build.0 = Debug|AVR 40 | {0EF71319-42A1-4133-82F3-1710E84CFEE2}.Release|AVR.ActiveCfg = Release|AVR 41 | {0EF71319-42A1-4133-82F3-1710E84CFEE2}.Release|AVR.Build.0 = Release|AVR 42 | EndGlobalSection 43 | GlobalSection(SolutionProperties) = preSolution 44 | HideSolutionNode = FALSE 45 | EndGlobalSection 46 | EndGlobal 47 | -------------------------------------------------------------------------------- /Synchronous_Mode/main.c: -------------------------------------------------------------------------------- 1 | /* 2 | \file main.c 3 | 4 | \brief Main file of the project. 5 | 6 | (c) 2018 Microchip Technology Inc. and its subsidiaries. 7 | 8 | Subject to your compliance with these terms, you may use Microchip software and any 9 | derivatives exclusively with Microchip products. It is your responsibility to comply with third party 10 | license terms applicable to your use of third party software (including open source software) that 11 | may accompany Microchip software. 12 | 13 | THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER 14 | EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY 15 | IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS 16 | FOR A PARTICULAR PURPOSE. 17 | 18 | IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, 19 | INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND 20 | WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP 21 | HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO 22 | THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL 23 | CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT 24 | OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS 25 | SOFTWARE. 26 | */ 27 | 28 | #define F_CPU 3333333 29 | #define USART0_BAUD_RATE(BAUD_RATE) ((float)(F_CPU / (2 * (float)BAUD_RATE)) + 0.5) 30 | #define USART1_BAUD_RATE(BAUD_RATE) ((float)(F_CPU / (2 * (float)BAUD_RATE)) + 0.5) 31 | 32 | #include 33 | #include 34 | 35 | volatile char x; 36 | 37 | void USART0_syncInit(void); 38 | void USART1_syncInit(void); 39 | void USART0_syncWrite(char data); 40 | void USART0_syncWrite(char data); 41 | 42 | ISR(USART0_RXC_vect) 43 | { 44 | x = USART0.RXDATAL; 45 | /* Set a breakpoint on the NOP below to check the value of x in the debugger */ 46 | asm("NOP"); 47 | } 48 | 49 | ISR(USART1_RXC_vect) 50 | { 51 | x = USART1.RXDATAL; 52 | /* Set a breakpoint on the NOP below to check the value of x in the debugger */ 53 | asm("NOP"); 54 | } 55 | 56 | void USART0_syncInit(void) 57 | { 58 | PORTA.DIR &= ~PIN1_bm; 59 | PORTA.DIR |= PIN0_bm; 60 | PORTA.DIR |= PIN2_bm; 61 | 62 | USART0.CTRLA |= USART_RXCIE_bm; 63 | USART0.CTRLB |= USART_RXEN_bm | USART_TXEN_bm; 64 | USART0.CTRLC |= USART_CMODE_SYNCHRONOUS_gc; 65 | } 66 | 67 | void USART1_syncInit(void) 68 | { 69 | PORTC.DIR &= ~PIN1_bm; 70 | PORTC.DIR |= PIN0_bm; 71 | PORTC.DIR &= ~PIN2_bm; 72 | 73 | USART1.CTRLA |= USART_RXCIE_bm; 74 | USART1.CTRLB |= USART_RXEN_bm | USART_TXEN_bm; 75 | USART1.CTRLC |= USART_CMODE_SYNCHRONOUS_gc; 76 | } 77 | 78 | void USART0_syncWrite(char data) 79 | { 80 | while (!(USART0.STATUS & USART_DREIF_bm)) 81 | { 82 | ; 83 | } 84 | USART0.TXDATAL = data; 85 | } 86 | 87 | void USART1_syncWrite(char data) 88 | { 89 | while (!(USART1.STATUS & USART_DREIF_bm)) 90 | { 91 | ; 92 | } 93 | USART1.TXDATAL = data; 94 | } 95 | 96 | int main(void) 97 | { 98 | USART0_syncInit(); 99 | USART1_syncInit(); 100 | 101 | /* Enable global interrupts */ 102 | sei(); 103 | 104 | while (1) 105 | { 106 | USART0_syncWrite('A'); 107 | USART1_syncWrite('B'); 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /One_Wire_Mode/main.c: -------------------------------------------------------------------------------- 1 | /* 2 | \file main.c 3 | 4 | \brief Main file of the project. 5 | 6 | (c) 2018 Microchip Technology Inc. and its subsidiaries. 7 | 8 | Subject to your compliance with these terms, you may use Microchip software and any 9 | derivatives exclusively with Microchip products. It is your responsibility to comply with third party 10 | license terms applicable to your use of third party software (including open source software) that 11 | may accompany Microchip software. 12 | 13 | THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER 14 | EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY 15 | IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS 16 | FOR A PARTICULAR PURPOSE. 17 | 18 | IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, 19 | INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND 20 | WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP 21 | HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO 22 | THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL 23 | CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT 24 | OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS 25 | SOFTWARE. 26 | */ 27 | 28 | #define F_CPU 3333333 29 | #define USART0_BAUD_RATE(BAUD_RATE) ((float)(F_CPU * 64 / (16 * (float)BAUD_RATE)) + 0.5) 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | 36 | typedef enum { 37 | SENDING = 0, 38 | OK, 39 | CONFLICT, 40 | } status_t; 41 | 42 | volatile char charToSend; 43 | volatile status_t sendingStatus; 44 | 45 | void waitTxReady(void); 46 | status_t waitSendConfirmation(void); 47 | void USART0_oneWireSend(char* str); 48 | char USART0_oneWireReceive(void); 49 | void USART0_oneWireInit(void); 50 | 51 | ISR(USART0_RXC_vect) 52 | { 53 | if (USART0.RXDATAL == charToSend) 54 | { 55 | sendingStatus = OK; 56 | } 57 | else 58 | { 59 | sendingStatus = CONFLICT; 60 | } 61 | } 62 | 63 | void waitTxReady(void) 64 | { 65 | while (!(USART0.STATUS & USART_DREIF_bm)) 66 | { 67 | ; 68 | } 69 | } 70 | 71 | status_t waitSendConfirmation(void) 72 | { 73 | sendingStatus = SENDING; 74 | /* Will change inside RXC interrupt handler */ 75 | while(sendingStatus == SENDING) 76 | { 77 | ; 78 | } 79 | return sendingStatus; 80 | } 81 | 82 | void USART0_oneWireSend(char* str) 83 | { 84 | PORTA.DIR |= PIN0_bm; /* A0 pin must be output to transmit */ 85 | USART0.CTRLA |= USART_RXCIE_bm; /* Receive Complete Interrupt must be enabled */ 86 | 87 | for(size_t i = 0; i < strlen(str); i++) 88 | { 89 | charToSend = str[i]; 90 | waitTxReady(); 91 | 92 | USART0.TXDATAL = charToSend; 93 | 94 | if(waitSendConfirmation() != OK) 95 | { 96 | break; 97 | } 98 | } 99 | 100 | USART0.CTRLA &= ~(USART_RXCIE_bm); 101 | PORTA.DIR &= ~PIN0_bm; 102 | } 103 | 104 | char USART0_oneWireReceive(void) 105 | { 106 | while (!(USART0.STATUS & USART_RXCIF_bm)) 107 | { 108 | ; 109 | } 110 | return USART0.RXDATAL; 111 | } 112 | 113 | void USART0_oneWireInit(void) 114 | { 115 | PORTA.DIR &= ~PIN0_bm; 116 | 117 | USART0.BAUD = (uint16_t)USART0_BAUD_RATE(9600); 118 | 119 | USART0.CTRLA |= USART_LBME_bm; 120 | USART0.CTRLB |= USART_RXEN_bm | USART_TXEN_bm; 121 | } 122 | 123 | int main(void) 124 | { 125 | USART0_oneWireInit(); 126 | 127 | /* Enable global interrupts */ 128 | sei(); 129 | 130 | while (1) 131 | { 132 | USART0_oneWireSend("Microchip.\r\n"); 133 | _delay_ms(500); 134 | } 135 | } 136 | -------------------------------------------------------------------------------- /Receive_Control_Commands/main.c: -------------------------------------------------------------------------------- 1 | /* 2 | \file main.c 3 | 4 | \brief Main file of the project. 5 | 6 | (c) 2018 Microchip Technology Inc. and its subsidiaries. 7 | 8 | Subject to your compliance with these terms, you may use Microchip software and any 9 | derivatives exclusively with Microchip products. It is your responsibility to comply with third party 10 | license terms applicable to your use of third party software (including open source software) that 11 | may accompany Microchip software. 12 | 13 | THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER 14 | EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY 15 | IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS 16 | FOR A PARTICULAR PURPOSE. 17 | 18 | IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, 19 | INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND 20 | WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP 21 | HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO 22 | THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL 23 | CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT 24 | OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS 25 | SOFTWARE. 26 | */ 27 | 28 | #define F_CPU 3333333 29 | #define USART0_BAUD_RATE(BAUD_RATE) ((float)(F_CPU * 64 / (16 * (float)BAUD_RATE)) + 0.5) 30 | #define MAX_COMMAND_LEN 8 31 | 32 | #include 33 | #include 34 | #include 35 | 36 | void USART0_init(void); 37 | void USART0_sendChar(char c); 38 | void USART0_sendString(char *str); 39 | char USART0_readChar(void); 40 | void LED_on(void); 41 | void LED_off(void); 42 | void LED_init(void); 43 | void executeCommand(char *command); 44 | 45 | void USART0_init(void) 46 | { 47 | PORTA.DIR &= ~PIN1_bm; 48 | PORTA.DIR |= PIN0_bm; 49 | 50 | USART0.BAUD = (uint16_t)USART0_BAUD_RATE(9600); 51 | 52 | USART0.CTRLB |= USART_RXEN_bm | USART_TXEN_bm; 53 | } 54 | 55 | void USART0_sendChar(char c) 56 | { 57 | while (!(USART0.STATUS & USART_DREIF_bm)) 58 | { 59 | ; 60 | } 61 | USART0.TXDATAL = c; 62 | } 63 | 64 | void USART0_sendString(char *str) 65 | { 66 | for(size_t i = 0; i < strlen(str); i++) 67 | { 68 | USART0_sendChar(str[i]); 69 | } 70 | } 71 | 72 | char USART0_readChar(void) 73 | { 74 | while (!(USART0.STATUS & USART_RXCIF_bm)) 75 | { 76 | ; 77 | } 78 | return USART0.RXDATAL; 79 | } 80 | 81 | void LED_on(void) 82 | { 83 | PORTB.OUT &= ~PIN5_bm; 84 | } 85 | 86 | void LED_off(void) 87 | { 88 | PORTB.OUT |= PIN5_bm; 89 | } 90 | 91 | void LED_init(void) 92 | { 93 | PORTB.DIR |= PIN5_bm; 94 | } 95 | 96 | void executeCommand(char *command) 97 | { 98 | if(strcmp(command, "ON") == 0) 99 | { 100 | LED_on(); 101 | USART0_sendString("OK, LED ON.\r\n"); 102 | } 103 | else if (strcmp(command, "OFF") == 0) 104 | { 105 | LED_off(); 106 | USART0_sendString("OK, LED OFF.\r\n"); 107 | } 108 | else 109 | { 110 | USART0_sendString("Incorrect command.\r\n"); 111 | } 112 | } 113 | 114 | int main(void) 115 | { 116 | char command[MAX_COMMAND_LEN]; 117 | uint8_t index = 0; 118 | char c; 119 | 120 | LED_init(); 121 | USART0_init(); 122 | 123 | while (1) 124 | { 125 | c = USART0_readChar(); 126 | if(c != '\n' && c != '\r') 127 | { 128 | command[index++] = c; 129 | if(index > MAX_COMMAND_LEN) 130 | { 131 | index = 0; 132 | } 133 | } 134 | 135 | if(c == '\n') 136 | { 137 | command[index] = '\0'; 138 | index = 0; 139 | executeCommand(command); 140 | } 141 | } 142 | } 143 | -------------------------------------------------------------------------------- /One_Wire_Mode/One_Wire_Mode.componentinfo.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Device 8 | Startup 9 | 10 | 11 | Atmel 12 | 1.2.0 13 | C:/Program Files (x86)\Atmel\Studio\7.0\Packs 14 | 15 | 16 | 17 | 18 | C:/Program Files (x86)\Atmel\Studio\7.0\Packs\Atmel\ATmega_DFP\1.2.272\include 19 | 20 | include 21 | C 22 | 23 | 24 | include 25 | 26 | 27 | 28 | 29 | C:/Program Files (x86)\Atmel\Studio\7.0\Packs\Atmel\ATmega_DFP\1.2.272\include\avr\iom4809.h 30 | 31 | header 32 | C 33 | fQaG1DJ4X5qUUwRvErAbNQ== 34 | 35 | include/avr/iom4809.h 36 | 37 | 38 | 39 | 40 | C:/Program Files (x86)\Atmel\Studio\7.0\Packs\Atmel\ATmega_DFP\1.2.272\templates\main.c 41 | template 42 | source 43 | C Exe 44 | ehzhXloZVH0Kwe3JA8JSnA== 45 | 46 | templates/main.c 47 | Main file (.c) 48 | 49 | 50 | 51 | C:/Program Files (x86)\Atmel\Studio\7.0\Packs\Atmel\ATmega_DFP\1.2.272\templates\main.cpp 52 | template 53 | source 54 | C Exe 55 | YXFphlh0CtZJU+ebktABgQ== 56 | 57 | templates/main.cpp 58 | Main file (.cpp) 59 | 60 | 61 | 62 | C:/Program Files (x86)\Atmel\Studio\7.0\Packs\Atmel\ATmega_DFP\1.2.272\gcc\dev\atmega4809 63 | 64 | libraryPrefix 65 | GCC 66 | 67 | 68 | gcc/dev/atmega4809 69 | 70 | 71 | 72 | 73 | ATmega_DFP 74 | C:/Program Files (x86)/Atmel/Studio/7.0/Packs/Atmel/ATmega_DFP/1.2.272/Atmel.ATmega_DFP.pdsc 75 | 1.2.272 76 | true 77 | ATmega4809 78 | 79 | 80 | 81 | Resolved 82 | Fixed 83 | true 84 | 85 | 86 | -------------------------------------------------------------------------------- /Send_Hello_World/Send_Hello_World.componentinfo.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Device 8 | Startup 9 | 10 | 11 | Atmel 12 | 1.2.0 13 | C:/Program Files (x86)\Atmel\Studio\7.0\Packs 14 | 15 | 16 | 17 | 18 | C:/Program Files (x86)\Atmel\Studio\7.0\Packs\Atmel\ATmega_DFP\1.2.272\include 19 | 20 | include 21 | C 22 | 23 | 24 | include 25 | 26 | 27 | 28 | 29 | C:/Program Files (x86)\Atmel\Studio\7.0\Packs\Atmel\ATmega_DFP\1.2.272\include\avr\iom4809.h 30 | 31 | header 32 | C 33 | fQaG1DJ4X5qUUwRvErAbNQ== 34 | 35 | include/avr/iom4809.h 36 | 37 | 38 | 39 | 40 | C:/Program Files (x86)\Atmel\Studio\7.0\Packs\Atmel\ATmega_DFP\1.2.272\templates\main.c 41 | template 42 | source 43 | C Exe 44 | lQghh6U3Qzwv46tYBXgkdw== 45 | 46 | templates/main.c 47 | Main file (.c) 48 | 49 | 50 | 51 | C:/Program Files (x86)\Atmel\Studio\7.0\Packs\Atmel\ATmega_DFP\1.2.272\templates\main.cpp 52 | template 53 | source 54 | C Exe 55 | YXFphlh0CtZJU+ebktABgQ== 56 | 57 | templates/main.cpp 58 | Main file (.cpp) 59 | 60 | 61 | 62 | C:/Program Files (x86)\Atmel\Studio\7.0\Packs\Atmel\ATmega_DFP\1.2.272\gcc\dev\atmega4809 63 | 64 | libraryPrefix 65 | GCC 66 | 67 | 68 | gcc/dev/atmega4809 69 | 70 | 71 | 72 | 73 | ATmega_DFP 74 | C:/Program Files (x86)/Atmel/Studio/7.0/Packs/Atmel/ATmega_DFP/1.2.272/Atmel.ATmega_DFP.pdsc 75 | 1.2.272 76 | true 77 | ATmega4809 78 | 79 | 80 | 81 | Resolved 82 | Fixed 83 | true 84 | 85 | 86 | -------------------------------------------------------------------------------- /Synchronous_Mode/Synchronous_Mode.componentinfo.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Device 8 | Startup 9 | 10 | 11 | Atmel 12 | 1.2.0 13 | C:/Program Files (x86)\Atmel\Studio\7.0\Packs 14 | 15 | 16 | 17 | 18 | C:/Program Files (x86)\Atmel\Studio\7.0\Packs\Atmel\ATmega_DFP\1.2.272\include 19 | 20 | include 21 | C 22 | 23 | 24 | include 25 | 26 | 27 | 28 | 29 | C:/Program Files (x86)\Atmel\Studio\7.0\Packs\Atmel\ATmega_DFP\1.2.272\include\avr\iom4809.h 30 | 31 | header 32 | C 33 | fQaG1DJ4X5qUUwRvErAbNQ== 34 | 35 | include/avr/iom4809.h 36 | 37 | 38 | 39 | 40 | C:/Program Files (x86)\Atmel\Studio\7.0\Packs\Atmel\ATmega_DFP\1.2.272\templates\main.c 41 | template 42 | source 43 | C Exe 44 | pzjhIRticm4jJgrhMOarHA== 45 | 46 | templates/main.c 47 | Main file (.c) 48 | 49 | 50 | 51 | C:/Program Files (x86)\Atmel\Studio\7.0\Packs\Atmel\ATmega_DFP\1.2.272\templates\main.cpp 52 | template 53 | source 54 | C Exe 55 | YXFphlh0CtZJU+ebktABgQ== 56 | 57 | templates/main.cpp 58 | Main file (.cpp) 59 | 60 | 61 | 62 | C:/Program Files (x86)\Atmel\Studio\7.0\Packs\Atmel\ATmega_DFP\1.2.272\gcc\dev\atmega4809 63 | 64 | libraryPrefix 65 | GCC 66 | 67 | 68 | gcc/dev/atmega4809 69 | 70 | 71 | 72 | 73 | ATmega_DFP 74 | C:/Program Files (x86)/Atmel/Studio/7.0/Packs/Atmel/ATmega_DFP/1.2.272/Atmel.ATmega_DFP.pdsc 75 | 1.2.272 76 | true 77 | ATmega4809 78 | 79 | 80 | 81 | Resolved 82 | Fixed 83 | true 84 | 85 | 86 | -------------------------------------------------------------------------------- /Receive_Control_Commands/Receive_Control_Commands.componentinfo.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Device 8 | Startup 9 | 10 | 11 | Atmel 12 | 1.2.0 13 | C:/Program Files (x86)\Atmel\Studio\7.0\Packs 14 | 15 | 16 | 17 | 18 | C:/Program Files (x86)\Atmel\Studio\7.0\Packs\Atmel\ATmega_DFP\1.2.272\include 19 | 20 | include 21 | C 22 | 23 | 24 | include 25 | 26 | 27 | 28 | 29 | C:/Program Files (x86)\Atmel\Studio\7.0\Packs\Atmel\ATmega_DFP\1.2.272\include\avr\iom4809.h 30 | 31 | header 32 | C 33 | fQaG1DJ4X5qUUwRvErAbNQ== 34 | 35 | include/avr/iom4809.h 36 | 37 | 38 | 39 | 40 | C:/Program Files (x86)\Atmel\Studio\7.0\Packs\Atmel\ATmega_DFP\1.2.272\templates\main.c 41 | template 42 | source 43 | C Exe 44 | sJ72nJNqI09gpOxF8dyIwQ== 45 | 46 | templates/main.c 47 | Main file (.c) 48 | 49 | 50 | 51 | C:/Program Files (x86)\Atmel\Studio\7.0\Packs\Atmel\ATmega_DFP\1.2.272\templates\main.cpp 52 | template 53 | source 54 | C Exe 55 | YXFphlh0CtZJU+ebktABgQ== 56 | 57 | templates/main.cpp 58 | Main file (.cpp) 59 | 60 | 61 | 62 | C:/Program Files (x86)\Atmel\Studio\7.0\Packs\Atmel\ATmega_DFP\1.2.272\gcc\dev\atmega4809 63 | 64 | libraryPrefix 65 | GCC 66 | 67 | 68 | gcc/dev/atmega4809 69 | 70 | 71 | 72 | 73 | ATmega_DFP 74 | C:/Program Files (x86)/Atmel/Studio/7.0/Packs/Atmel/ATmega_DFP/1.2.272/Atmel.ATmega_DFP.pdsc 75 | 1.2.272 76 | true 77 | ATmega4809 78 | 79 | 80 | 81 | Resolved 82 | Fixed 83 | true 84 | 85 | 86 | -------------------------------------------------------------------------------- /Send_Formatted_Strings_Using_Printf/Send_Formatted_Strings_Using_Printf.componentinfo.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Device 8 | Startup 9 | 10 | 11 | Atmel 12 | 1.2.0 13 | C:/Program Files (x86)\Atmel\Studio\7.0\Packs 14 | 15 | 16 | 17 | 18 | C:/Program Files (x86)\Atmel\Studio\7.0\Packs\Atmel\ATmega_DFP\1.2.272\include 19 | 20 | include 21 | C 22 | 23 | 24 | include 25 | 26 | 27 | 28 | 29 | C:/Program Files (x86)\Atmel\Studio\7.0\Packs\Atmel\ATmega_DFP\1.2.272\include\avr\iom4809.h 30 | 31 | header 32 | C 33 | fQaG1DJ4X5qUUwRvErAbNQ== 34 | 35 | include/avr/iom4809.h 36 | 37 | 38 | 39 | 40 | C:/Program Files (x86)\Atmel\Studio\7.0\Packs\Atmel\ATmega_DFP\1.2.272\templates\main.c 41 | template 42 | source 43 | C Exe 44 | apZ18s/rfG1w/AtkDTvtbA== 45 | 46 | templates/main.c 47 | Main file (.c) 48 | 49 | 50 | 51 | C:/Program Files (x86)\Atmel\Studio\7.0\Packs\Atmel\ATmega_DFP\1.2.272\templates\main.cpp 52 | template 53 | source 54 | C Exe 55 | YXFphlh0CtZJU+ebktABgQ== 56 | 57 | templates/main.cpp 58 | Main file (.cpp) 59 | 60 | 61 | 62 | C:/Program Files (x86)\Atmel\Studio\7.0\Packs\Atmel\ATmega_DFP\1.2.272\gcc\dev\atmega4809 63 | 64 | libraryPrefix 65 | GCC 66 | 67 | 68 | gcc/dev/atmega4809 69 | 70 | 71 | 72 | 73 | ATmega_DFP 74 | C:/Program Files (x86)/Atmel/Studio/7.0/Packs/Atmel/ATmega_DFP/1.2.272/Atmel.ATmega_DFP.pdsc 75 | 1.2.272 76 | true 77 | ATmega4809 78 | 79 | 80 | 81 | Resolved 82 | Fixed 83 | true 84 | 85 | 86 | -------------------------------------------------------------------------------- /Receive_Control_Commands/Receive_Control_Commands.cproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 2.0 5 | 7.0 6 | com.Atmel.AVRGCC8.C 7 | {ad6688c0-d033-40b2-9ac4-66bb1e804696} 8 | ATmega4809 9 | none 10 | Executable 11 | C 12 | $(MSBuildProjectName) 13 | .elf 14 | $(MSBuildProjectDirectory)\$(Configuration) 15 | Commands_Receiver 16 | Receive_Control_Commands 17 | Commands_Receiver 18 | Native 19 | true 20 | false 21 | true 22 | true 23 | 24 | 25 | true 26 | 27 | 2 28 | 0 29 | 0 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -mmcu=atmega4809 -B "%24(PackRepoDir)\Atmel\ATmega_DFP\1.2.272\gcc\dev\atmega4809" 48 | True 49 | True 50 | True 51 | True 52 | False 53 | True 54 | True 55 | 56 | 57 | NDEBUG 58 | 59 | 60 | 61 | 62 | %24(PackRepoDir)\Atmel\ATmega_DFP\1.2.272\include 63 | 64 | 65 | Optimize for size (-Os) 66 | True 67 | True 68 | True 69 | 70 | 71 | libm 72 | 73 | 74 | 75 | 76 | %24(PackRepoDir)\Atmel\ATmega_DFP\1.2.272\include 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | -mmcu=atmega4809 -B "%24(PackRepoDir)\Atmel\ATmega_DFP\1.2.272\gcc\dev\atmega4809" 86 | True 87 | True 88 | True 89 | True 90 | False 91 | True 92 | True 93 | 94 | 95 | DEBUG 96 | 97 | 98 | 99 | 100 | %24(PackRepoDir)\Atmel\ATmega_DFP\1.2.272\include 101 | 102 | 103 | True 104 | True 105 | Default (-g2) 106 | True 107 | 108 | 109 | libm 110 | 111 | 112 | 113 | 114 | %24(PackRepoDir)\Atmel\ATmega_DFP\1.2.272\include 115 | 116 | 117 | Default (-Wa,-g) 118 | 119 | 120 | 121 | 122 | 123 | compile 124 | 125 | 126 | 127 | -------------------------------------------------------------------------------- /One_Wire_Mode/One_Wire_Mode.cproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 2.0 5 | 7.0 6 | com.Atmel.AVRGCC8.C 7 | dce6c7e3-ee26-4d79-826b-08594b9ad897 8 | ATmega4809 9 | none 10 | Executable 11 | C 12 | $(MSBuildProjectName) 13 | .elf 14 | $(MSBuildProjectDirectory)\$(Configuration) 15 | One_Wire 16 | One_Wire_Mode 17 | One_Wire 18 | Native 19 | true 20 | false 21 | true 22 | true 23 | 24 | 25 | true 26 | 27 | 2 28 | 0 29 | 0 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -mmcu=atmega4809 -B "%24(PackRepoDir)\Atmel\ATmega_DFP\1.2.272\gcc\dev\atmega4809" 48 | True 49 | True 50 | True 51 | True 52 | False 53 | True 54 | True 55 | 56 | 57 | NDEBUG 58 | 59 | 60 | 61 | 62 | %24(PackRepoDir)\Atmel\ATmega_DFP\1.2.272\include 63 | 64 | 65 | Optimize for size (-Os) 66 | True 67 | True 68 | True 69 | 70 | 71 | libm 72 | 73 | 74 | 75 | 76 | %24(PackRepoDir)\Atmel\ATmega_DFP\1.2.272\include 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | -mmcu=atmega4809 -B "%24(PackRepoDir)\Atmel\ATmega_DFP\1.2.272\gcc\dev\atmega4809" 86 | True 87 | True 88 | True 89 | True 90 | False 91 | True 92 | True 93 | 94 | 95 | DEBUG 96 | 97 | 98 | 99 | 100 | %24(PackRepoDir)\Atmel\ATmega_DFP\1.2.272\include 101 | 102 | 103 | Optimize (-O1) 104 | True 105 | True 106 | Default (-g2) 107 | True 108 | 109 | 110 | libm 111 | 112 | 113 | 114 | 115 | %24(PackRepoDir)\Atmel\ATmega_DFP\1.2.272\include 116 | 117 | 118 | Default (-Wa,-g) 119 | 120 | 121 | 122 | 123 | 124 | compile 125 | 126 | 127 | 128 | -------------------------------------------------------------------------------- /Send_Hello_World/Send_Hello_World.cproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 2.0 5 | 7.0 6 | com.Atmel.AVRGCC8.C 7 | {0ef71319-42a1-4133-82f3-1710e84cfee2} 8 | ATmega4809 9 | none 10 | Executable 11 | C 12 | $(MSBuildProjectName) 13 | .elf 14 | $(MSBuildProjectDirectory)\$(Configuration) 15 | Asynchronous 16 | Send_Hello_World 17 | Asynchronous 18 | Native 19 | true 20 | false 21 | true 22 | true 23 | 0x20000000 24 | 25 | true 26 | exception_table 27 | 2 28 | 0 29 | 0 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -mmcu=atmega4809 -B "%24(PackRepoDir)\Atmel\ATmega_DFP\1.2.272\gcc\dev\atmega4809" 48 | True 49 | True 50 | True 51 | True 52 | False 53 | True 54 | True 55 | 56 | 57 | NDEBUG 58 | 59 | 60 | 61 | 62 | %24(PackRepoDir)\Atmel\ATmega_DFP\1.2.272\include 63 | 64 | 65 | Optimize for size (-Os) 66 | True 67 | True 68 | True 69 | 70 | 71 | libm 72 | 73 | 74 | 75 | 76 | %24(PackRepoDir)\Atmel\ATmega_DFP\1.2.272\include 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | -mmcu=atmega4809 -B "%24(PackRepoDir)\Atmel\ATmega_DFP\1.2.272\gcc\dev\atmega4809" 86 | True 87 | True 88 | True 89 | True 90 | False 91 | True 92 | True 93 | 94 | 95 | DEBUG 96 | 97 | 98 | 99 | 100 | %24(PackRepoDir)\Atmel\ATmega_DFP\1.2.272\include 101 | 102 | 103 | Optimize (-O1) 104 | True 105 | True 106 | Default (-g2) 107 | True 108 | 109 | 110 | libm 111 | 112 | 113 | 114 | 115 | %24(PackRepoDir)\Atmel\ATmega_DFP\1.2.272\include 116 | 117 | 118 | Default (-Wa,-g) 119 | 120 | 121 | 122 | 123 | 124 | compile 125 | 126 | 127 | 128 | -------------------------------------------------------------------------------- /Synchronous_Mode/Synchronous_Mode.cproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 2.0 5 | 7.0 6 | com.Atmel.AVRGCC8.C 7 | {ab3cebfb-a87d-453b-8df9-3b23b5f03214} 8 | ATmega4809 9 | none 10 | Executable 11 | C 12 | $(MSBuildProjectName) 13 | .elf 14 | $(MSBuildProjectDirectory)\$(Configuration) 15 | Synchronous 16 | Synchronous_Mode 17 | Synchronous 18 | Native 19 | true 20 | false 21 | true 22 | true 23 | 0x20000000 24 | 25 | true 26 | exception_table 27 | 2 28 | 0 29 | 0 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | com.atmel.avrdbg.tool.edbg 44 | ATML3074031800000053 45 | 0x1E9651 46 | UPDI 47 | 48 | 49 | 50 | 500000 51 | 52 | UPDI 53 | 54 | com.atmel.avrdbg.tool.edbg 55 | ATML3074031800000053 56 | EDBG 57 | 58 | 500000 59 | 60 | 61 | 62 | 63 | -mmcu=atmega4809 -B "%24(PackRepoDir)\Atmel\ATmega_DFP\1.2.272\gcc\dev\atmega4809" 64 | True 65 | True 66 | True 67 | True 68 | False 69 | True 70 | True 71 | 72 | 73 | NDEBUG 74 | 75 | 76 | 77 | 78 | %24(PackRepoDir)\Atmel\ATmega_DFP\1.2.272\include 79 | 80 | 81 | Optimize for size (-Os) 82 | True 83 | True 84 | True 85 | 86 | 87 | libm 88 | 89 | 90 | 91 | 92 | %24(PackRepoDir)\Atmel\ATmega_DFP\1.2.272\include 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | -mmcu=atmega4809 -B "%24(PackRepoDir)\Atmel\ATmega_DFP\1.2.272\gcc\dev\atmega4809" 102 | True 103 | True 104 | True 105 | True 106 | False 107 | True 108 | True 109 | 110 | 111 | DEBUG 112 | 113 | 114 | 115 | 116 | %24(PackRepoDir)\Atmel\ATmega_DFP\1.2.272\include 117 | 118 | 119 | Optimize (-O1) 120 | True 121 | True 122 | Default (-g2) 123 | True 124 | 125 | 126 | libm 127 | 128 | 129 | 130 | 131 | %24(PackRepoDir)\Atmel\ATmega_DFP\1.2.272\include 132 | 133 | 134 | Default (-Wa,-g) 135 | 136 | 137 | 138 | 139 | 140 | compile 141 | 142 | 143 | 144 | -------------------------------------------------------------------------------- /Send_Formatted_Strings_Using_Printf/Send_Formatted_Strings_Using_Printf.cproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 2.0 5 | 7.0 6 | com.Atmel.AVRGCC8.C 7 | {b3ae75e4-1abf-45d0-8850-fa4599da224e} 8 | ATmega4809 9 | none 10 | Executable 11 | C 12 | $(MSBuildProjectName) 13 | .elf 14 | $(MSBuildProjectDirectory)\$(Configuration) 15 | Asynchronous_Printf 16 | Send_Formatted_Strings_Using_Printf 17 | Asynchronous_Printf 18 | Native 19 | true 20 | false 21 | true 22 | true 23 | 0x20000000 24 | 25 | true 26 | exception_table 27 | 2 28 | 0 29 | 0 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | com.atmel.avrdbg.tool.edbg 44 | ATML3074031800000053 45 | 0x1E9651 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | custom 54 | 55 | 56 | Custom Programming Tool 57 | 58 | UPDI 59 | 60 | 61 | 62 | 500000 63 | 64 | UPDI 65 | 66 | com.atmel.avrdbg.tool.edbg 67 | ATML3074031800000053 68 | EDBG 69 | 70 | 500000 71 | 72 | 73 | 74 | 75 | -mmcu=atmega4809 -B "%24(PackRepoDir)\Atmel\ATmega_DFP\1.2.272\gcc\dev\atmega4809" 76 | True 77 | True 78 | True 79 | True 80 | False 81 | True 82 | True 83 | 84 | 85 | NDEBUG 86 | 87 | 88 | 89 | 90 | %24(PackRepoDir)\Atmel\ATmega_DFP\1.2.272\include 91 | 92 | 93 | Optimize for size (-Os) 94 | True 95 | True 96 | True 97 | 98 | 99 | libm 100 | 101 | 102 | 103 | 104 | %24(PackRepoDir)\Atmel\ATmega_DFP\1.2.272\include 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | -mmcu=atmega4809 -B "%24(PackRepoDir)\Atmel\ATmega_DFP\1.2.272\gcc\dev\atmega4809" 114 | True 115 | True 116 | True 117 | True 118 | False 119 | True 120 | True 121 | 122 | 123 | DEBUG 124 | 125 | 126 | 127 | 128 | %24(PackRepoDir)\Atmel\ATmega_DFP\1.2.272\include 129 | 130 | 131 | Optimize (-O1) 132 | True 133 | True 134 | Default (-g2) 135 | True 136 | 137 | 138 | libm 139 | 140 | 141 | 142 | 143 | %24(PackRepoDir)\Atmel\ATmega_DFP\1.2.272\include 144 | 145 | 146 | Default (-Wa,-g) 147 | 148 | 149 | 150 | 151 | 152 | compile 153 | 154 | 155 | 156 | --------------------------------------------------------------------------------