diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/ccp.h b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/ccp.h index 0b77535a2eebd25d01c81ba22d7261907eb3bd4a..70051fc90256dbca39f2f00638256dd3006e9921 100644 --- a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/ccp.h +++ b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/ccp.h @@ -1,3 +1,76 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2308f6d0188b94e63cd63151e8d85721bf39ff1d6d6f7eec6781b6f5fcfc71c3 -size 2447 +/** + * \file + * + * \brief Configuration Change Protection write functions + * + (c) 2018 Microchip Technology Inc. and its subsidiaries. + + Subject to your compliance with these terms,you may use this software and + any derivatives exclusively with Microchip products.It is your responsibility + to comply with third party license terms applicable to your use of third party + software (including open source software) that may accompany Microchip software. + + THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER + EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED + WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A + PARTICULAR PURPOSE. + + IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, + INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND + WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS + BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE + FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN + ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, + THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. + * + */ + +#ifndef CPU_CCP_H +#define CPU_CCP_H + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * \brief Write to a CCP-protected 8-bit I/O register + * + * \param addr Address of the I/O register + * \param value Value to be written + * + * \note Using IAR Embedded workbench, the choice of memory model has an impact + * on calling convention. The memory model is not visible to the + * preprocessor, so it must be defined in the Assembler preprocessor directives. + */ +static inline void ccp_write_io(void *addr, uint8_t value) +{ + protected_write_io(addr, CCP_IOREG_gc, value); +} + +/** @} */ + +/** + * \brief Write to CCP-protected 8-bit SPM register + * + * \param addr Address of the SPM register + * \param value Value to be written + * + * \note Using IAR Embedded workbench, the choice of memory model has an impact + * on calling convention. The memory model is not visible to the + * preprocessor, so it must be defined in the Assembler preprocessor directives. + */ +static inline void ccp_write_spm(void *addr, uint8_t value) +{ + protected_write_io(addr, CCP_SPM_gc, value); +} + + /** @} */ + +#ifdef __cplusplus +} +#endif + +#endif /* CPU_CCP_H */ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/clkctrl.h b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/clkctrl.h index 44ad2b8b75f54e2582448d06c632200bd1b23703..fcaf4c31b54f7b29619b86a75bd4839190ae863e 100644 --- a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/clkctrl.h +++ b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/clkctrl.h @@ -1,3 +1,43 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c563fcd9f86878f5d826e378c5019e202a09e841ad23c6e72ae7cc93a5f4dded -size 1453 +/** + * \file + * + * \brief CLKCTRL related functionality declaration. + * + (c) 2018 Microchip Technology Inc. and its subsidiaries. + + Subject to your compliance with these terms,you may use this software and + any derivatives exclusively with Microchip products.It is your responsibility + to comply with third party license terms applicable to your use of third party + software (including open source software) that may accompany Microchip software. + + THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER + EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED + WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A + PARTICULAR PURPOSE. + + IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, + INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND + WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS + BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE + FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN + ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, + THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. + * + */ + +#ifndef CLKCTRL_H_INCLUDED +#define CLKCTRL_H_INCLUDED + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +int8_t CLKCTRL_init(); + +#ifdef __cplusplus +} +#endif + +#endif /* CLKCTRL_H_INCLUDED */ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/cpuint.h b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/cpuint.h index cdd21f93dbd3f4d6d663b0385f31f2c4ce142dc4..1f828b9004cdf92cbf8b003f1ade10359ee78299 100644 --- a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/cpuint.h +++ b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/cpuint.h @@ -1,3 +1,43 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d2374c2edca20a8476e1d05daa5a98473ec7f2ab1979f03900658756da2a2b76 -size 1451 +/** + * \file + * + * \brief CPUINT related functionality implementation. + * + (c) 2018 Microchip Technology Inc. and its subsidiaries. + + Subject to your compliance with these terms,you may use this software and + any derivatives exclusively with Microchip products.It is your responsibility + to comply with third party license terms applicable to your use of third party + software (including open source software) that may accompany Microchip software. + + THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER + EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED + WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A + PARTICULAR PURPOSE. + + IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, + INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND + WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS + BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE + FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN + ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, + THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. + * + */ + +#ifndef CPUINT_H_INCLUDED +#define CPUINT_H_INCLUDED + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +int8_t CPUINT_init(); + +#ifdef __cplusplus +} +#endif + +#endif /* CPUINT_H_INCLUDED */ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/driver_init.h b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/driver_init.h index 4b2adbd574ccde96c9218e320bbdc5e0c307b6dc..b8f4bef0e7709d4a5511ad1a546d809cc648cfc4 100644 --- a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/driver_init.h +++ b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/driver_init.h @@ -1,3 +1,62 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:18a4fd1366d34c3cdb68839b92aae497773eebe8ffb6dafe3389ddf42ddd68ea -size 1846 +/** + * \file + * + * \brief Driver initialization. + * + (c) 2018 Microchip Technology Inc. and its subsidiaries. + + Subject to your compliance with these terms,you may use this software and + any derivatives exclusively with Microchip products.It is your responsibility + to comply with third party license terms applicable to your use of third party + software (including open source software) that may accompany Microchip software. + + THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER + EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED + WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A + PARTICULAR PURPOSE. + + IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, + INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND + WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS + BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE + FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN + ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, + THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. + * + */ + +/* + * Code generated by START. + * + * This file will be overwritten when reconfiguring your START project. + * Please copy examples or other code you want to keep to a separate file + * to avoid losing it when reconfiguring. + */ + +#ifndef DRIVER_INIT_H_INCLUDED +#define DRIVER_INIT_H_INCLUDED + +#include +#include +#include +#include + +#include + +#include + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +void system_init(void); + +#ifdef __cplusplus +} +#endif + +#endif /* DRIVER_INIT_H_INCLUDED */ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/port.h b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/port.h index 1b99b525bfff2522ddb5cd57bd6bef5e1f665868..634e14d6916c89bc8bb60cce9e1939cb1d5d8507 100644 --- a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/port.h +++ b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/port.h @@ -1,3 +1,718 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0798f1f0e546367f32c5dc9bc8a5dcd07fa62a4ab5a4cba51db6d7cec66e7f90 -size 18463 +/** + * \file + * + * \brief Port related support + * + (c) 2018 Microchip Technology Inc. and its subsidiaries. + + Subject to your compliance with these terms,you may use this software and + any derivatives exclusively with Microchip products.It is your responsibility + to comply with third party license terms applicable to your use of third party + software (including open source software) that may accompany Microchip software. + + THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER + EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED + WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A + PARTICULAR PURPOSE. + + IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, + INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND + WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS + BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE + FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN + ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, + THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. + * + */ + +#ifndef PORT_INCLUDED +#define PORT_INCLUDED + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +enum port_pull_mode { + PORT_PULL_OFF, + PORT_PULL_UP, +}; + +enum port_dir { + PORT_DIR_IN, + PORT_DIR_OUT, + PORT_DIR_OFF, +}; + +/** + * \brief Set port pin pull mode + * + * Configure pin to pull up, down or disable pull mode, supported pull modes are defined by device used + * + * \param[in] pin The pin number within port + * \param[in] pull_mode Pin pull mode + */ +static inline void PORTA_set_pin_pull_mode(const uint8_t pin, const enum port_pull_mode pull_mode) +{ + volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTA + 0x10 + pin); + + if (pull_mode == PORT_PULL_UP) { + *port_pin_ctrl |= PORT_PULLUPEN_bm; + } else if (pull_mode == PORT_PULL_OFF) { + *port_pin_ctrl &= ~PORT_PULLUPEN_bm; + } +} + +/** + * \brief Set port pin inverted mode + * + * Configure pin invert I/O or not + * + * \param[in] pin The pin number within port + * \param[in] inverted Pin inverted mode + */ +static inline void PORTA_pin_set_inverted(const uint8_t pin, const bool inverted) +{ + volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTA + 0x10 + pin); + + if (inverted) { + *port_pin_ctrl |= PORT_INVEN_bm; + } else { + *port_pin_ctrl &= ~PORT_INVEN_bm; + } +} + +/** + * \brief Set port pin input/sense configuration + * + * Enable/disable digital input buffer and pin change interrupt, + * select pin interrupt edge/level sensing mode + * + * \param[in] pin pin number within port + * \param[in] isc PORT_ISC_INTDISABLE_gc = Interrupt disabled but input buffer enabled + * PORT_ISC_BOTHEDGES_gc = Sense Both Edges + * PORT_ISC_RISING_gc = Sense Rising Edge + * PORT_ISC_FALLING_gc = Sense Falling Edge + * PORT_ISC_INPUT_DISABLE_gc = Digital Input Buffer disabled + * PORT_ISC_LEVEL_gc = Sense low Level + * + */ +static inline void PORTA_pin_set_isc(const uint8_t pin, const PORT_ISC_t isc) +{ + volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTA + 0x10 + pin); + + *port_pin_ctrl = (*port_pin_ctrl & ~PORT_ISC_gm) | isc; +} + +/** + * \brief Set port data direction + * + * Select if the pin data direction is input, output or disabled. + * If disabled state is not possible, this function throws an assert. + * + * \param[in] mask Bit mask where 1 means apply direction setting to the + * corresponding pin + * \param[in] dir PORT_DIR_IN = Data direction in + * PORT_DIR_OUT = Data direction out + * PORT_DIR_OFF = Disables the pin + * (low power state) + */ +static inline void PORTA_set_port_dir(const uint8_t mask, const enum port_dir dir) +{ + switch (dir) { + case PORT_DIR_IN: + VPORTA.DIR &= ~mask; + break; + case PORT_DIR_OUT: + VPORTA.DIR |= mask; + break; + case PORT_DIR_OFF: + /*/ should activate the pullup for power saving + but a bit costly to do it here */ + { + for (uint8_t i = 0; i < 8; i++) { + if (mask & 1 << i) { + *((uint8_t *)&PORTA + 0x10 + i) |= 1 << PORT_PULLUPEN_bp; + } + } + } + break; + default: + break; + } +} + +/** + * \brief Set port pin data direction + * + * Select if the pin data direction is input, output or disabled. + * If disabled state is not possible, this function throws an assert. + * + * \param[in] pin The pin number within port + * \param[in] dir PORT_DIR_IN = Data direction in + * PORT_DIR_OUT = Data direction out + * PORT_DIR_OFF = Disables the pin + * (low power state) + */ +static inline void PORTA_set_pin_dir(const uint8_t pin, const enum port_dir dir) +{ + switch (dir) { + case PORT_DIR_IN: + VPORTA.DIR &= ~(1 << pin); + break; + case PORT_DIR_OUT: + VPORTA.DIR |= (1 << pin); + break; + case PORT_DIR_OFF: + *((uint8_t *)&PORTA + 0x10 + pin) |= 1 << PORT_PULLUPEN_bp; + break; + default: + break; + } +} + +/** + * \brief Set port level + * + * Sets output level on the pins defined by the bit mask + * + * \param[in] mask Bit mask where 1 means apply port level to the corresponding + * pin + * \param[in] level true = Pin levels set to "high" state + * false = Pin levels set to "low" state + */ +static inline void PORTA_set_port_level(const uint8_t mask, const bool level) +{ + if (level == true) { + VPORTA.OUT |= mask; + } else { + VPORTA.OUT &= ~mask; + } +} + +/** + * \brief Set port level + * + * Sets output level on a pin + * + * \param[in] pin The pin number within port + * \param[in] level true = Pin level set to "high" state + * false = Pin level set to "low" state + */ +static inline void PORTA_set_pin_level(const uint8_t pin, const bool level) +{ + if (level == true) { + VPORTA.OUT |= (1 << pin); + } else { + VPORTA.OUT &= ~(1 << pin); + } +} + +/** + * \brief Toggle out level on pins + * + * Toggle the pin levels on pins defined by bit mask + * + * \param[in] mask Bit mask where 1 means toggle pin level to the corresponding + * pin + */ +static inline void PORTA_toggle_port_level(const uint8_t mask) +{ + PORTA.OUTTGL = mask; +} + +/** + * \brief Toggle output level on pin + * + * Toggle the pin levels on pins defined by bit mask + * + * \param[in] pin The pin number within port + */ +static inline void PORTA_toggle_pin_level(const uint8_t pin) +{ + VPORTA.IN |= 1 << pin; +} + +/** + * \brief Get input level on pins + * + * Read the input level on pins connected to a port + * + */ +static inline uint8_t PORTA_get_port_level() +{ + return VPORTA.IN; +} + +/** + * \brief Get level on pin + * + * Reads the level on pins connected to a port + */ +static inline bool PORTA_get_pin_level(const uint8_t pin) +{ + return VPORTA.IN & (1 << pin); +} + +/** + * \brief Write value to Port + * + * Write directly to the port OUT register + * + * \param[in] value Value to write to the port register + */ +static inline void PORTA_write_port(const uint8_t value) +{ + VPORTA.OUT = value; +} + +/** + * \brief Set port pin pull mode + * + * Configure pin to pull up, down or disable pull mode, supported pull modes are defined by device used + * + * \param[in] pin The pin number within port + * \param[in] pull_mode Pin pull mode + */ +static inline void PORTB_set_pin_pull_mode(const uint8_t pin, const enum port_pull_mode pull_mode) +{ + volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTB + 0x10 + pin); + + if (pull_mode == PORT_PULL_UP) { + *port_pin_ctrl |= PORT_PULLUPEN_bm; + } else if (pull_mode == PORT_PULL_OFF) { + *port_pin_ctrl &= ~PORT_PULLUPEN_bm; + } +} + +/** + * \brief Set port pin inverted mode + * + * Configure pin invert I/O or not + * + * \param[in] pin The pin number within port + * \param[in] inverted Pin inverted mode + */ +static inline void PORTB_pin_set_inverted(const uint8_t pin, const bool inverted) +{ + volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTB + 0x10 + pin); + + if (inverted) { + *port_pin_ctrl |= PORT_INVEN_bm; + } else { + *port_pin_ctrl &= ~PORT_INVEN_bm; + } +} + +/** + * \brief Set port pin input/sense configuration + * + * Enable/disable digital input buffer and pin change interrupt, + * select pin interrupt edge/level sensing mode + * + * \param[in] pin pin number within port + * \param[in] isc PORT_ISC_INTDISABLE_gc = Interrupt disabled but input buffer enabled + * PORT_ISC_BOTHEDGES_gc = Sense Both Edges + * PORT_ISC_RISING_gc = Sense Rising Edge + * PORT_ISC_FALLING_gc = Sense Falling Edge + * PORT_ISC_INPUT_DISABLE_gc = Digital Input Buffer disabled + * PORT_ISC_LEVEL_gc = Sense low Level + * + */ +static inline void PORTB_pin_set_isc(const uint8_t pin, const PORT_ISC_t isc) +{ + volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTB + 0x10 + pin); + + *port_pin_ctrl = (*port_pin_ctrl & ~PORT_ISC_gm) | isc; +} + +/** + * \brief Set port data direction + * + * Select if the pin data direction is input, output or disabled. + * If disabled state is not possible, this function throws an assert. + * + * \param[in] mask Bit mask where 1 means apply direction setting to the + * corresponding pin + * \param[in] dir PORT_DIR_IN = Data direction in + * PORT_DIR_OUT = Data direction out + * PORT_DIR_OFF = Disables the pin + * (low power state) + */ +static inline void PORTB_set_port_dir(const uint8_t mask, const enum port_dir dir) +{ + switch (dir) { + case PORT_DIR_IN: + VPORTB.DIR &= ~mask; + break; + case PORT_DIR_OUT: + VPORTB.DIR |= mask; + break; + case PORT_DIR_OFF: + /*/ should activate the pullup for power saving + but a bit costly to do it here */ + { + for (uint8_t i = 0; i < 8; i++) { + if (mask & 1 << i) { + *((uint8_t *)&PORTB + 0x10 + i) |= 1 << PORT_PULLUPEN_bp; + } + } + } + break; + default: + break; + } +} + +/** + * \brief Set port pin data direction + * + * Select if the pin data direction is input, output or disabled. + * If disabled state is not possible, this function throws an assert. + * + * \param[in] pin The pin number within port + * \param[in] dir PORT_DIR_IN = Data direction in + * PORT_DIR_OUT = Data direction out + * PORT_DIR_OFF = Disables the pin + * (low power state) + */ +static inline void PORTB_set_pin_dir(const uint8_t pin, const enum port_dir dir) +{ + switch (dir) { + case PORT_DIR_IN: + VPORTB.DIR &= ~(1 << pin); + break; + case PORT_DIR_OUT: + VPORTB.DIR |= (1 << pin); + break; + case PORT_DIR_OFF: + *((uint8_t *)&PORTB + 0x10 + pin) |= 1 << PORT_PULLUPEN_bp; + break; + default: + break; + } +} + +/** + * \brief Set port level + * + * Sets output level on the pins defined by the bit mask + * + * \param[in] mask Bit mask where 1 means apply port level to the corresponding + * pin + * \param[in] level true = Pin levels set to "high" state + * false = Pin levels set to "low" state + */ +static inline void PORTB_set_port_level(const uint8_t mask, const bool level) +{ + if (level == true) { + VPORTB.OUT |= mask; + } else { + VPORTB.OUT &= ~mask; + } +} + +/** + * \brief Set port level + * + * Sets output level on a pin + * + * \param[in] pin The pin number within port + * \param[in] level true = Pin level set to "high" state + * false = Pin level set to "low" state + */ +static inline void PORTB_set_pin_level(const uint8_t pin, const bool level) +{ + if (level == true) { + VPORTB.OUT |= (1 << pin); + } else { + VPORTB.OUT &= ~(1 << pin); + } +} + +/** + * \brief Toggle out level on pins + * + * Toggle the pin levels on pins defined by bit mask + * + * \param[in] mask Bit mask where 1 means toggle pin level to the corresponding + * pin + */ +static inline void PORTB_toggle_port_level(const uint8_t mask) +{ + PORTB.OUTTGL = mask; +} + +/** + * \brief Toggle output level on pin + * + * Toggle the pin levels on pins defined by bit mask + * + * \param[in] pin The pin number within port + */ +static inline void PORTB_toggle_pin_level(const uint8_t pin) +{ + VPORTB.IN |= 1 << pin; +} + +/** + * \brief Get input level on pins + * + * Read the input level on pins connected to a port + * + */ +static inline uint8_t PORTB_get_port_level() +{ + return VPORTB.IN; +} + +/** + * \brief Get level on pin + * + * Reads the level on pins connected to a port + */ +static inline bool PORTB_get_pin_level(const uint8_t pin) +{ + return VPORTB.IN & (1 << pin); +} + +/** + * \brief Write value to Port + * + * Write directly to the port OUT register + * + * \param[in] value Value to write to the port register + */ +static inline void PORTB_write_port(const uint8_t value) +{ + VPORTB.OUT = value; +} + +/** + * \brief Set port pin pull mode + * + * Configure pin to pull up, down or disable pull mode, supported pull modes are defined by device used + * + * \param[in] pin The pin number within port + * \param[in] pull_mode Pin pull mode + */ +static inline void PORTC_set_pin_pull_mode(const uint8_t pin, const enum port_pull_mode pull_mode) +{ + volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTC + 0x10 + pin); + + if (pull_mode == PORT_PULL_UP) { + *port_pin_ctrl |= PORT_PULLUPEN_bm; + } else if (pull_mode == PORT_PULL_OFF) { + *port_pin_ctrl &= ~PORT_PULLUPEN_bm; + } +} + +/** + * \brief Set port pin inverted mode + * + * Configure pin invert I/O or not + * + * \param[in] pin The pin number within port + * \param[in] inverted Pin inverted mode + */ +static inline void PORTC_pin_set_inverted(const uint8_t pin, const bool inverted) +{ + volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTC + 0x10 + pin); + + if (inverted) { + *port_pin_ctrl |= PORT_INVEN_bm; + } else { + *port_pin_ctrl &= ~PORT_INVEN_bm; + } +} + +/** + * \brief Set port pin input/sense configuration + * + * Enable/disable digital input buffer and pin change interrupt, + * select pin interrupt edge/level sensing mode + * + * \param[in] pin pin number within port + * \param[in] isc PORT_ISC_INTDISABLE_gc = Interrupt disabled but input buffer enabled + * PORT_ISC_BOTHEDGES_gc = Sense Both Edges + * PORT_ISC_RISING_gc = Sense Rising Edge + * PORT_ISC_FALLING_gc = Sense Falling Edge + * PORT_ISC_INPUT_DISABLE_gc = Digital Input Buffer disabled + * PORT_ISC_LEVEL_gc = Sense low Level + * + */ +static inline void PORTC_pin_set_isc(const uint8_t pin, const PORT_ISC_t isc) +{ + volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTC + 0x10 + pin); + + *port_pin_ctrl = (*port_pin_ctrl & ~PORT_ISC_gm) | isc; +} + +/** + * \brief Set port data direction + * + * Select if the pin data direction is input, output or disabled. + * If disabled state is not possible, this function throws an assert. + * + * \param[in] mask Bit mask where 1 means apply direction setting to the + * corresponding pin + * \param[in] dir PORT_DIR_IN = Data direction in + * PORT_DIR_OUT = Data direction out + * PORT_DIR_OFF = Disables the pin + * (low power state) + */ +static inline void PORTC_set_port_dir(const uint8_t mask, const enum port_dir dir) +{ + switch (dir) { + case PORT_DIR_IN: + VPORTC.DIR &= ~mask; + break; + case PORT_DIR_OUT: + VPORTC.DIR |= mask; + break; + case PORT_DIR_OFF: + /*/ should activate the pullup for power saving + but a bit costly to do it here */ + { + for (uint8_t i = 0; i < 8; i++) { + if (mask & 1 << i) { + *((uint8_t *)&PORTC + 0x10 + i) |= 1 << PORT_PULLUPEN_bp; + } + } + } + break; + default: + break; + } +} + +/** + * \brief Set port pin data direction + * + * Select if the pin data direction is input, output or disabled. + * If disabled state is not possible, this function throws an assert. + * + * \param[in] pin The pin number within port + * \param[in] dir PORT_DIR_IN = Data direction in + * PORT_DIR_OUT = Data direction out + * PORT_DIR_OFF = Disables the pin + * (low power state) + */ +static inline void PORTC_set_pin_dir(const uint8_t pin, const enum port_dir dir) +{ + switch (dir) { + case PORT_DIR_IN: + VPORTC.DIR &= ~(1 << pin); + break; + case PORT_DIR_OUT: + VPORTC.DIR |= (1 << pin); + break; + case PORT_DIR_OFF: + *((uint8_t *)&PORTC + 0x10 + pin) |= 1 << PORT_PULLUPEN_bp; + break; + default: + break; + } +} + +/** + * \brief Set port level + * + * Sets output level on the pins defined by the bit mask + * + * \param[in] mask Bit mask where 1 means apply port level to the corresponding + * pin + * \param[in] level true = Pin levels set to "high" state + * false = Pin levels set to "low" state + */ +static inline void PORTC_set_port_level(const uint8_t mask, const bool level) +{ + if (level == true) { + VPORTC.OUT |= mask; + } else { + VPORTC.OUT &= ~mask; + } +} + +/** + * \brief Set port level + * + * Sets output level on a pin + * + * \param[in] pin The pin number within port + * \param[in] level true = Pin level set to "high" state + * false = Pin level set to "low" state + */ +static inline void PORTC_set_pin_level(const uint8_t pin, const bool level) +{ + if (level == true) { + VPORTC.OUT |= (1 << pin); + } else { + VPORTC.OUT &= ~(1 << pin); + } +} + +/** + * \brief Toggle out level on pins + * + * Toggle the pin levels on pins defined by bit mask + * + * \param[in] mask Bit mask where 1 means toggle pin level to the corresponding + * pin + */ +static inline void PORTC_toggle_port_level(const uint8_t mask) +{ + PORTC.OUTTGL = mask; +} + +/** + * \brief Toggle output level on pin + * + * Toggle the pin levels on pins defined by bit mask + * + * \param[in] pin The pin number within port + */ +static inline void PORTC_toggle_pin_level(const uint8_t pin) +{ + VPORTC.IN |= 1 << pin; +} + +/** + * \brief Get input level on pins + * + * Read the input level on pins connected to a port + * + */ +static inline uint8_t PORTC_get_port_level() +{ + return VPORTC.IN; +} + +/** + * \brief Get level on pin + * + * Reads the level on pins connected to a port + */ +static inline bool PORTC_get_pin_level(const uint8_t pin) +{ + return VPORTC.IN & (1 << pin); +} + +/** + * \brief Write value to Port + * + * Write directly to the port OUT register + * + * \param[in] value Value to write to the port register + */ +static inline void PORTC_write_port(const uint8_t value) +{ + VPORTC.OUT = value; +} + +#ifdef __cplusplus +} +#endif + +#endif /* PORT_INCLUDED */ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/protected_io.h b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/protected_io.h index 9d8a88d5f0bf5135a2a4e6d5c314876cf7057078..cd08d0e765aa86bf998024ffb08b258bc79ffa16 100644 --- a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/protected_io.h +++ b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/protected_io.h @@ -1,3 +1,83 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7c2ac61bdf1f416d2be839bf6ade1eafb031e0db470f5264afa0aee361cd1bff -size 2502 +/** + * \file + * + * \brief Configuration Change Protection write functions + * + (c) 2018 Microchip Technology Inc. and its subsidiaries. + + Subject to your compliance with these terms,you may use this software and + any derivatives exclusively with Microchip products.It is your responsibility + to comply with third party license terms applicable to your use of third party + software (including open source software) that may accompany Microchip software. + + THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER + EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED + WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A + PARTICULAR PURPOSE. + + IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, + INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND + WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS + BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE + FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN + ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, + THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. + * + */ + +#ifndef PROTECTED_IO_H +#define PROTECTED_IO_H + +#ifdef __cplusplus +extern "C" { +#endif + +#if defined(__DOXYGEN__) +//! \name IAR Memory Model defines. +//@{ + +/** + * \def CONFIG_MEMORY_MODEL_TINY + * \brief Configuration symbol to enable 8 bit pointers. + * + */ +#define CONFIG_MEMORY_MODEL_TINY + +/** + * \def CONFIG_MEMORY_MODEL_SMALL + * \brief Configuration symbol to enable 16 bit pointers. + * \note If no memory model is defined, SMALL is default. + * + */ +#define CONFIG_MEMORY_MODEL_SMALL + +/** + * \def CONFIG_MEMORY_MODEL_LARGE + * \brief Configuration symbol to enable 24 bit pointers. + * + */ +#define CONFIG_MEMORY_MODEL_LARGE + +//@} +#endif + +/** + * \brief Write to am 8-bit I/O register protected by CCP or a protection bit + * + * \param addr Address of the I/O register + * \param magic CCP magic value or Mask for protection bit + * \param value Value to be written + * + * \note Using IAR Embedded workbench, the choice of memory model has an impact + * on calling convention. The memory model is not visible to the + * preprocessor, so it must be defined in the Assembler preprocessor directives. + */ +extern void protected_write_io(void *addr, uint8_t magic, uint8_t value); + +/** @} */ + +#ifdef __cplusplus +} +#endif + +#endif /* PROTECTED_IO_H */ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/rstctrl.h b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/rstctrl.h index 6d1f08de2793032aadd23c205437678cc2502230..42bbb17b6662944a6fc7c572de36a4400d28a2c3 100644 --- a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/rstctrl.h +++ b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/rstctrl.h @@ -1,3 +1,68 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:95683bb021c3f910f00644b12b4255df459652969ac5142b71b21f427de58150 -size 1959 +/** + * \file + * + * \brief RSTCTRL + * + (c) 2018 Microchip Technology Inc. and its subsidiaries. + + Subject to your compliance with these terms,you may use this software and + any derivatives exclusively with Microchip products.It is your responsibility + to comply with third party license terms applicable to your use of third party + software (including open source software) that may accompany Microchip software. + + THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER + EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED + WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A + PARTICULAR PURPOSE. + + IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, + INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND + WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS + BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE + FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN + ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, + THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. + * + */ + +/** + * \defgroup doc_driver_system_rstctrl Reset Controller + * \ingroup doc_driver_system + * + * \section doc_driver_rstctrl_rev Revision History + * - v0.0.0.1 Initial Commit + * + *@{ + */ + +#ifndef RSTCTRL_INCLUDED +#define RSTCTRL_INCLUDED + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +static inline void RSTCTRL_reset(void) +{ + /* SWRR is protected with CCP */ + ccp_write_io((void *)&RSTCTRL.SWRR, 0x1); +} + +static inline uint8_t RSTCTRL_get_reset_cause(void) +{ + return RSTCTRL.RSTFR; +} + +static inline void RSTCTRL_clear_reset_cause(void) +{ + RSTCTRL.RSTFR + = RSTCTRL_UPDIRF_bm | RSTCTRL_SWRF_bm | RSTCTRL_WDRF_bm | RSTCTRL_EXTRF_bm | RSTCTRL_BORF_bm | RSTCTRL_PORF_bm; +} + +#ifdef __cplusplus +} +#endif + +#endif /* RSTCTRL_INCLUDED */ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/rtc.h b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/rtc.h index 7dca298ff1a002e1f3dd659ec36fcf79e850288f..c2920953d55ac97ea682fd592fb9e2d8382251e1 100644 --- a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/rtc.h +++ b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/rtc.h @@ -1,3 +1,44 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:41c5acd56d1af75f097c4656edca461f992a118e883394b19f448ef8b4a29f83 -size 1461 +/** + * \file + * + * \brief RTC related functionality declaration. + * + (c) 2018 Microchip Technology Inc. and its subsidiaries. + + Subject to your compliance with these terms,you may use this software and + any derivatives exclusively with Microchip products.It is your responsibility + to comply with third party license terms applicable to your use of third party + software (including open source software) that may accompany Microchip software. + + THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER + EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED + WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A + PARTICULAR PURPOSE. + + IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, + INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND + WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS + BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE + FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN + ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, + THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. + * + */ + +#ifndef RTC_H_INCLUDED +#define RTC_H_INCLUDED + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +int8_t RTC_0_init(); + +#ifdef __cplusplus +} +#endif + +#endif /* RTC_H_INCLUDED */ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/slpctrl.h b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/slpctrl.h index 606457db4734ca5284d9f09f84c26d958a11da13..23a468e93ab3a1f4ca7014bd1fa7be3dad30563c 100644 --- a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/slpctrl.h +++ b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/slpctrl.h @@ -1,3 +1,45 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9f2b43784c7e4acf5ae13aef4d58ecbcc664672766dc7cd3ac1e279befffc7ae -size 1467 +/** + * \file + * + * \brief SLPCTRL + * + (c) 2018 Microchip Technology Inc. and its subsidiaries. + + Subject to your compliance with these terms,you may use this software and + any derivatives exclusively with Microchip products.It is your responsibility + to comply with third party license terms applicable to your use of third party + software (including open source software) that may accompany Microchip software. + + THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER + EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED + WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A + PARTICULAR PURPOSE. + + IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, + INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND + WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS + BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE + FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN + ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, + THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. + * + */ + +#ifndef SLPCTRL_INCLUDED +#define SLPCTRL_INCLUDED + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +int8_t SLPCTRL_init(); + +void SLPCTRL_set_sleep_mode(SLPCTRL_SMODE_t setmode); + +#ifdef __cplusplus +} +#endif + +#endif /* SLPCTRL_INCLUDED */ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/system.h b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/system.h index 4a6c01bb6735fa207fb33ab355c25ba6b2007ffa..78c5ea6b3e8e7565b43fb429790d6dc8386fd08c 100644 --- a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/system.h +++ b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/include/system.h @@ -1,3 +1,72 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9737656628a5b4132ead2b2d9254b7c4a26635ade0144da866ff3d2cfce7d335 -size 2117 +/** + * \file + * + * \brief Tiny System Related Support + * + (c) 2018 Microchip Technology Inc. and its subsidiaries. + + Subject to your compliance with these terms,you may use this software and + any derivatives exclusively with Microchip products.It is your responsibility + to comply with third party license terms applicable to your use of third party + software (including open source software) that may accompany Microchip software. + + THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER + EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED + WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A + PARTICULAR PURPOSE. + + IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, + INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND + WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS + BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE + FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN + ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, + THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. + * + */ + +/** + * \defgroup doc_driver_utils_mcu_init MCU Init + * \ingroup doc_driver_utils + * + * \section doc_driver_system_rev Revision History + * - v0.0.0.1 Initial Commit + * + *@{ + */ + +#ifndef SYSTEM_INCLUDED +#define SYSTEM_INCLUDED + +#include "ccp.h" +#include "port.h" + +#ifdef __cplusplus +extern "C" { +#endif + +void mcu_init(void) +{ + /* On AVR devices all peripherals are enable from power on reset, this + * disables all peripherals to save power. Driver shall enable + * peripheral if used */ + + /* Set all pins to low power mode */ + + for (uint8_t i = 0; i < 8; i++) { + *((uint8_t *)&PORTA + 0x10 + i) |= 1 << PORT_PULLUPEN_bp; + } + + for (uint8_t i = 0; i < 8; i++) { + *((uint8_t *)&PORTB + 0x10 + i) |= 1 << PORT_PULLUPEN_bp; + } + + for (uint8_t i = 0; i < 8; i++) { + *((uint8_t *)&PORTC + 0x10 + i) |= 1 << PORT_PULLUPEN_bp; + } +} +#ifdef __cplusplus +} +#endif + +#endif /* SYSTEM_INCLUDED */ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/main.c b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/main.c index b5a2af3067bf201d3b6a973e7c8befb308a11437..c31bc167a8306216e8a3b48590788e03f4da8b5d 100644 --- a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/main.c +++ b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/main.c @@ -1,3 +1,258 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4bee52ede89e6e19828b325bd450a81205ebc9aaa3fd4391aea1935e173012ec -size 5552 +/* + \file main.c + + \brief Advanced Keypad Application + + (c) 2020 Microchip Technology Inc. and its subsidiaries. + + Subject to your compliance with these terms, you may use Microchip software and any + derivatives exclusively with Microchip products. It is your responsibility to comply with third party + license terms applicable to your use of third party software (including open source software) that + may accompany Microchip software. + + THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER + EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY + IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS + FOR A PARTICULAR PURPOSE. + + IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, + INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND + WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP + HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO + THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL + CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT + OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS + SOFTWARE. +*/ + +#include +#include +#include +#include +#include + +#define PRESS_VALID 0x01 +#define COLUMN_gm (PIN0_bm | PIN1_bm | PIN2_bm | PIN3_bm) +#define COLUMN_PORT PORTC + +volatile uint8_t key_pressed; +char input_pass[20]; +uint8_t cursor = 0; +char passcode[20] = "123ABC"; + +/* Macro for buttons in the grid */ +char btn_value[16] = "123A456B789C*0#D"; + +/* Function prototypes */ +void row_output_column_input(void); +void row_input_column_output(void); +void scan_keys(void); +void btn_debounce(void); +void lp_delay_ms(uint16_t delay); +void check_passcode(void); + + +int main(void) +{ + /* Initializes MCU, drivers and middleware */ + atmel_start_init(); + + while(1) + { + /* Sleep until key press wakes up the CPU */ + sleep_mode(); + /* PRESS_VALID flag in GPIOR0 is high if a valid press is detected */ + btn_debounce(); + + /* If the key press was valid */ + if((GPIOR0 & PRESS_VALID) == PRESS_VALID) + { + scan_keys(); + check_passcode(); + /* Wait for all buttons to be released */ + while((COLUMN_PORT.IN & COLUMN_gm) != COLUMN_gm) + { + /* Sleep until key release wakes up the CPU */ + sleep_mode(); + } + } + } +} + +void row_output_column_input() +{ + ROW0_set_dir(PORT_DIR_OUT); + ROW1_set_dir(PORT_DIR_OUT); + ROW2_set_dir(PORT_DIR_OUT); + ROW3_set_dir(PORT_DIR_OUT); + + COLUMN0_set_dir(PORT_DIR_IN); + COLUMN1_set_dir(PORT_DIR_IN); + COLUMN2_set_dir(PORT_DIR_IN); + COLUMN3_set_dir(PORT_DIR_IN); +} + +void row_input_column_output() +{ + ROW0_set_dir(PORT_DIR_IN); + ROW1_set_dir(PORT_DIR_IN); + ROW2_set_dir(PORT_DIR_IN); + ROW3_set_dir(PORT_DIR_IN); + + COLUMN0_set_dir(PORT_DIR_OUT); + COLUMN1_set_dir(PORT_DIR_OUT); + COLUMN2_set_dir(PORT_DIR_OUT); + COLUMN3_set_dir(PORT_DIR_OUT); +} + +void scan_keys() +{ + key_pressed = 0; + + if(!COLUMN0_get_level()) + { + key_pressed = 0; + } + else if(!COLUMN1_get_level()) + { + key_pressed = 1; + } + else if(!COLUMN2_get_level()) + { + key_pressed = 2; + } + else if(!COLUMN3_get_level()) + { + key_pressed = 3; + } + + row_input_column_output(); + + if(!ROW0_get_level()) + { + key_pressed += 0; + } + else if(!ROW1_get_level()) + { + key_pressed += 4; + } + else if(!ROW2_get_level()) + { + key_pressed += 8; + } + else if(!ROW3_get_level()) + { + key_pressed += 12; + } + + row_output_column_input(); +} + +void btn_debounce() +{ + /* GPIOR0 bit 0 (PRESS_VALID) is press validation flag */ + GPIOR0 |= PRESS_VALID; + for(uint8_t i = 0; i < 10; i++) + { + /* If no button is pressed */ + if((COLUMN_PORT.IN & COLUMN_gm) == COLUMN_gm) + { + GPIOR0 &= ~PRESS_VALID; + break; + } + lp_delay_ms(2); + } +} + +void lp_delay_ms(uint16_t delay) +{ + volatile uint16_t pit_cnt = 0; + /* Enable PIT interrupt */ + RTC.PITINTCTRL = RTC_PI_bm; + /* Going to sleep until number of ms has been reached */ + while(pit_cnt != delay) + { + sleep_mode(); + pit_cnt += 1; + } + /* Disable PIT interrupt */ + RTC.PITINTCTRL &= ~RTC_PI_bm; +} + +int streq(const char* s1, const char* s2) +{ + while(*s1 == *s2) + { + if (*s1 == '\0') return 0; + s1++; + s2++; + } + return 1; +} + +void check_passcode() +{ + /* If star is pressed */ + if(btn_value[key_pressed] == '*') + { + /* Reset input_pass */ + memset(input_pass, 0, sizeof(input_pass)); + cursor = 0; + } + /* If pound is pressed */ + else if(btn_value[key_pressed] == '#') + { + /* If input passcode is the same as the set passcode */ + if(!(streq(passcode, input_pass))) + { + LED_GREEN_set_level(0); + lp_delay_ms(500); + LED_GREEN_set_level(1); + } + else + { + LED_RED_set_level(0); + lp_delay_ms(500); + LED_RED_set_level(1); + } + /* Reset input_pass */ + memset(input_pass, 0, sizeof(input_pass)); + cursor = 0; + } + /* If no special character (star or pound) is pressed */ + else + { + /* If length is not surpassed (20 characters) */ + if(cursor < 20) + { + /* Record press */ + input_pass[cursor] = btn_value[key_pressed]; + cursor++; + } + else + { + cursor = 0; + LED_RED_set_level(0); + lp_delay_ms(250); + LED_RED_set_level(1); + lp_delay_ms(250); + LED_RED_set_level(0); + lp_delay_ms(250); + LED_RED_set_level(1); + /* Reset input_pass */ + memset(input_pass, 0, sizeof(input_pass)); + } + } +} + +ISR(PORTC_PORT_vect) +{ + /* Clear interrupt flag */ + COLUMN_PORT.INTFLAGS = COLUMN_gm; +} + +ISR(RTC_PIT_vect) +{ + /* Clear interrupt flag */ + RTC.PITINTFLAGS = RTC_PI_bm; +} \ No newline at end of file diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/project.elf.asm b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/project.elf.asm index bdf47d18f151dc3a93908a3435f3d75abf387664..cf8d017f539f26a5a955aaa58e78753fa2473c51 100644 --- a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/project.elf.asm +++ b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/project.elf.asm @@ -1,3 +1 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cd0e828c83787d4281556bff410c9bf2c7dd3c891e895c4e0131cdd57d903a16 -size 21 +; Disassembled code diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/src/bod.c b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/src/bod.c index 541b2c71e36878b7347b8d884ab3b5dfe8e73456..88440ea695f83bbfa91748e6a3e0307ebd5e120f 100644 --- a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/src/bod.c +++ b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/src/bod.c @@ -1,3 +1,56 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:093e6935df6ec02563a5c40309aa64d313cc6b8fef26cc150cf01f4e8d9ceb7d -size 1912 +/** + * \file + * + * \brief BOD related functionality implementation. + * + (c) 2018 Microchip Technology Inc. and its subsidiaries. + + Subject to your compliance with these terms,you may use this software and + any derivatives exclusively with Microchip products.It is your responsibility + to comply with third party license terms applicable to your use of third party + software (including open source software) that may accompany Microchip software. + + THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER + EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED + WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A + PARTICULAR PURPOSE. + + IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, + INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND + WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS + BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE + FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN + ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, + THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. + * + */ + +/** + * \defgroup doc_driver_system_bod Brown-Out Detector (BOD) + * \ingroup doc_driver_system + * + * \section doc_driver_bod_rev Revision History + * - v0.0.0.1 Initial Commit + * + *@{ + */ +#include +#include + +/** + * \brief Initialize Brownout Detector + * + * \return Initialization status. + */ +int8_t BOD_init() +{ + + // ccp_write_io((void*)&(BOD.CTRLA),BOD_SLEEP_DIS_gc /* Disabled */); + + // BOD.INTCTRL = 0 << BOD_VLMIE_bp /* voltage level monitor interrrupt enable: disabled */ + // | BOD_VLMCFG_BELOW_gc; /* Interrupt when supply goes below VLM level */ + + // BOD.VLMCTRLA = BOD_VLMLVL_5ABOVE_gc; /* VLM threshold 5% above BOD level */ + + return 0; +} diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/src/clkctrl.c b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/src/clkctrl.c index c6f785b98fcd18ff29ef5822a1416fa35281bdcc..b1127b74ed6684fbc545d166097cf3d286b2305b 100644 --- a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/src/clkctrl.c +++ b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/src/clkctrl.c @@ -1,3 +1,65 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:788642b4cae916d8a2b58e76d85fd43072b12a013c0d91c7dfb94cd2623d0c72 -size 2470 +/** + * \file + * + * \brief CLKCTRL related functionality implementation. + * + (c) 2018 Microchip Technology Inc. and its subsidiaries. + + Subject to your compliance with these terms,you may use this software and + any derivatives exclusively with Microchip products.It is your responsibility + to comply with third party license terms applicable to your use of third party + software (including open source software) that may accompany Microchip software. + + THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER + EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED + WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A + PARTICULAR PURPOSE. + + IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, + INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND + WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS + BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE + FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN + ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, + THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. + * + */ + +/** + * \defgroup doc_driver_system_clkctrl Clock Controller + * \ingroup doc_driver_system + * + * \section doc_driver_clockctrl_rev Revision History + * - v0.0.0.1 Initial Commit + * + *@{ + */ +#include +#include +/** + * \brief Initialize clkctrl interface + * + * \return Initialization status. + */ +int8_t CLKCTRL_init() +{ + + // ccp_write_io((void*)&(CLKCTRL.OSC32KCTRLA),0 << CLKCTRL_RUNSTDBY_bp /* Run standby: disabled */); + + // ccp_write_io((void*)&(CLKCTRL.XOSC32KCTRLA),CLKCTRL_CSUT_1K_gc /* 1k cycles */ + // | 0 << CLKCTRL_ENABLE_bp /* Enable: disabled */ + // | 0 << CLKCTRL_RUNSTDBY_bp /* Run standby: disabled */ + // | 0 << CLKCTRL_SEL_bp /* Select: disabled */); + + // ccp_write_io((void*)&(CLKCTRL.OSC20MCTRLA),0 << CLKCTRL_RUNSTDBY_bp /* Run standby: disabled */); + + // ccp_write_io((void*)&(CLKCTRL.MCLKCTRLB),CLKCTRL_PDIV_6X_gc /* 6 */ + // | 1 << CLKCTRL_PEN_bp /* Prescaler enable: enabled */); + + // ccp_write_io((void*)&(CLKCTRL.MCLKCTRLA),CLKCTRL_CLKSEL_OSC20M_gc /* 20MHz Internal Oscillator (OSC20M) */ + // | 0 << CLKCTRL_CLKOUT_bp /* System clock out: disabled */); + + // ccp_write_io((void*)&(CLKCTRL.MCLKLOCK),0 << CLKCTRL_LOCKEN_bp /* lock enable: disabled */); + + return 0; +} diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/src/cpuint.c b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/src/cpuint.c index 7887b1fea0ffc44282c0c0fcfe8996912a451b11..8526c8cee2b5f8246c1d328f57d4332e98bff5a5 100644 --- a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/src/cpuint.c +++ b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/src/cpuint.c @@ -1,3 +1,62 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:96e7f77f0a2d75d960360943670c79e6e2a2e0827af651af8711316d3dbcd24b -size 2145 +/** + * \file + * + * \brief CPUINT related functionality implementation. + * + (c) 2018 Microchip Technology Inc. and its subsidiaries. + + Subject to your compliance with these terms,you may use this software and + any derivatives exclusively with Microchip products.It is your responsibility + to comply with third party license terms applicable to your use of third party + software (including open source software) that may accompany Microchip software. + + THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER + EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED + WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A + PARTICULAR PURPOSE. + + IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, + INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND + WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS + BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE + FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN + ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, + THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. + * + */ + +/** + * \defgroup doc_driver_system_cpuint CPU Interrupt Controller + * \ingroup doc_driver_system + * + * \section doc_driver_cpuint_rev Revision History + * - v0.0.0.1 Initial Commit + * + *@{ + */ +#include +#include +#include +#include +/** + * \brief Initialize cpuint interface + * + * \return Initialization status + */ +int8_t CPUINT_init() +{ + + /* IVSEL and CVT are Configuration Change Protected */ + + // ccp_write_io((void*)&(CPUINT.CTRLA),0 << CPUINT_CVT_bp /* Compact Vector Table: disabled */ + // | 0 << CPUINT_IVSEL_bp /* Interrupt Vector Select: disabled */ + // | 0 << CPUINT_LVL0RR_bp /* Round-robin Scheduling Enable: disabled */); + + // CPUINT.LVL0PRI = 0x0 << CPUINT_LVL0PRI_gp; /* Interrupt Level Priority: 0x0 */ + + // CPUINT.LVL1VEC = 0x0 << CPUINT_LVL1VEC_gp; /* Interrupt Vector with High Priority: 0x0 */ + + ENABLE_INTERRUPTS(); + + return 0; +} diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/src/driver_init.c b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/src/driver_init.c index 397fa52e2e6c3a1af6907d5c07a0ea1e83c5ecab..6cd0db9ed0b8c3f862ae1b487b92d6a49a6ef93e 100644 --- a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/src/driver_init.c +++ b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/src/driver_init.c @@ -1,3 +1,415 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b9e3876666dc5367c1c075ed6d723d34a133def17765202e8f348ecce90b9c10 -size 10784 +/** + * \file + * + * \brief Driver initialization. + * + (c) 2018 Microchip Technology Inc. and its subsidiaries. + + Subject to your compliance with these terms,you may use this software and + any derivatives exclusively with Microchip products.It is your responsibility + to comply with third party license terms applicable to your use of third party + software (including open source software) that may accompany Microchip software. + + THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER + EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED + WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A + PARTICULAR PURPOSE. + + IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, + INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND + WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS + BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE + FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN + ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, + THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. + * + */ + +/* + * Code generated by START. + * + * This file will be overwritten when reconfiguring your START project. + * Please copy examples or other code you want to keep to a separate file + * to avoid losing it when reconfiguring. + */ + +#include "driver_init.h" +#include + +/** + * \brief System initialization + */ +void system_init() +{ + mcu_init(); + + /* PORT setting on PA1 */ + + ROW3_set_dir( + // Pin direction + // pad_dir + // Off + // In + // Out + PORT_DIR_OUT); + + ROW3_set_level( + // Initial level + // pad_initial_level + // Low + // High + false); + + ROW3_set_pull_mode( + // Pull configuration + // pad_pull_config + // Off + // Pull-up + PORT_PULL_UP); + + ROW3_set_inverted( + // Invert I/O on pin + // pad_invert + // Not inverted + // Inverted + false); + + ROW3_set_isc( + // Pin Input/Sense Configuration + // pad_isc + // Interrupt disabled but input buffer enabled + // Sense Both Edges + // Sense Rising Edge + // Sense Falling Edge + // Digital Input Buffer disabled + // Sense low Level + PORT_ISC_INTDISABLE_gc); + + /* PORT setting on PA2 */ + + ROW2_set_dir( + // Pin direction + // pad_dir + // Off + // In + // Out + PORT_DIR_OUT); + + ROW2_set_level( + // Initial level + // pad_initial_level + // Low + // High + false); + + ROW2_set_pull_mode( + // Pull configuration + // pad_pull_config + // Off + // Pull-up + PORT_PULL_UP); + + ROW2_set_inverted( + // Invert I/O on pin + // pad_invert + // Not inverted + // Inverted + false); + + ROW2_set_isc( + // Pin Input/Sense Configuration + // pad_isc + // Interrupt disabled but input buffer enabled + // Sense Both Edges + // Sense Rising Edge + // Sense Falling Edge + // Digital Input Buffer disabled + // Sense low Level + PORT_ISC_INTDISABLE_gc); + + /* PORT setting on PB2 */ + + // Set pin direction to output + LED_GREEN_set_dir(PORT_DIR_OUT); + + LED_GREEN_set_level( + // Initial level + // pad_initial_level + // Low + // High + true); + + /* PORT setting on PB3 */ + + // Set pin direction to output + LED_RED_set_dir(PORT_DIR_OUT); + + LED_RED_set_level( + // Initial level + // pad_initial_level + // Low + // High + true); + + /* PORT setting on PB0_TWI */ + + ROW0_set_dir( + // Pin direction + // pad_dir + // Off + // In + // Out + PORT_DIR_OUT); + + ROW0_set_level( + // Initial level + // pad_initial_level + // Low + // High + false); + + ROW0_set_pull_mode( + // Pull configuration + // pad_pull_config + // Off + // Pull-up + PORT_PULL_UP); + + ROW0_set_inverted( + // Invert I/O on pin + // pad_invert + // Not inverted + // Inverted + false); + + ROW0_set_isc( + // Pin Input/Sense Configuration + // pad_isc + // Interrupt disabled but input buffer enabled + // Sense Both Edges + // Sense Rising Edge + // Sense Falling Edge + // Digital Input Buffer disabled + // Sense low Level + PORT_ISC_INTDISABLE_gc); + + /* PORT setting on PB1_TWI */ + + ROW1_set_dir( + // Pin direction + // pad_dir + // Off + // In + // Out + PORT_DIR_OUT); + + ROW1_set_level( + // Initial level + // pad_initial_level + // Low + // High + false); + + ROW1_set_pull_mode( + // Pull configuration + // pad_pull_config + // Off + // Pull-up + PORT_PULL_UP); + + ROW1_set_inverted( + // Invert I/O on pin + // pad_invert + // Not inverted + // Inverted + false); + + ROW1_set_isc( + // Pin Input/Sense Configuration + // pad_isc + // Interrupt disabled but input buffer enabled + // Sense Both Edges + // Sense Rising Edge + // Sense Falling Edge + // Digital Input Buffer disabled + // Sense low Level + PORT_ISC_INTDISABLE_gc); + + /* PORT setting on PC0 */ + + COLUMN1_set_dir( + // Pin direction + // pad_dir + // Off + // In + // Out + PORT_DIR_IN); + + COLUMN1_set_level( + // Initial level + // pad_initial_level + // Low + // High + false); + + COLUMN1_set_pull_mode( + // Pull configuration + // pad_pull_config + // Off + // Pull-up + PORT_PULL_UP); + + COLUMN1_set_inverted( + // Invert I/O on pin + // pad_invert + // Not inverted + // Inverted + false); + + COLUMN1_set_isc( + // Pin Input/Sense Configuration + // pad_isc + // Interrupt disabled but input buffer enabled + // Sense Both Edges + // Sense Rising Edge + // Sense Falling Edge + // Digital Input Buffer disabled + // Sense low Level + PORT_ISC_BOTHEDGES_gc); + + /* PORT setting on PC1 */ + + COLUMN2_set_dir( + // Pin direction + // pad_dir + // Off + // In + // Out + PORT_DIR_IN); + + COLUMN2_set_level( + // Initial level + // pad_initial_level + // Low + // High + false); + + COLUMN2_set_pull_mode( + // Pull configuration + // pad_pull_config + // Off + // Pull-up + PORT_PULL_UP); + + COLUMN2_set_inverted( + // Invert I/O on pin + // pad_invert + // Not inverted + // Inverted + false); + + COLUMN2_set_isc( + // Pin Input/Sense Configuration + // pad_isc + // Interrupt disabled but input buffer enabled + // Sense Both Edges + // Sense Rising Edge + // Sense Falling Edge + // Digital Input Buffer disabled + // Sense low Level + PORT_ISC_BOTHEDGES_gc); + + /* PORT setting on PC2 */ + + COLUMN3_set_dir( + // Pin direction + // pad_dir + // Off + // In + // Out + PORT_DIR_IN); + + COLUMN3_set_level( + // Initial level + // pad_initial_level + // Low + // High + false); + + COLUMN3_set_pull_mode( + // Pull configuration + // pad_pull_config + // Off + // Pull-up + PORT_PULL_UP); + + COLUMN3_set_inverted( + // Invert I/O on pin + // pad_invert + // Not inverted + // Inverted + false); + + COLUMN3_set_isc( + // Pin Input/Sense Configuration + // pad_isc + // Interrupt disabled but input buffer enabled + // Sense Both Edges + // Sense Rising Edge + // Sense Falling Edge + // Digital Input Buffer disabled + // Sense low Level + PORT_ISC_BOTHEDGES_gc); + + /* PORT setting on PC3 */ + + COLUMN0_set_dir( + // Pin direction + // pad_dir + // Off + // In + // Out + PORT_DIR_IN); + + COLUMN0_set_level( + // Initial level + // pad_initial_level + // Low + // High + false); + + COLUMN0_set_pull_mode( + // Pull configuration + // pad_pull_config + // Off + // Pull-up + PORT_PULL_UP); + + COLUMN0_set_inverted( + // Invert I/O on pin + // pad_invert + // Not inverted + // Inverted + false); + + COLUMN0_set_isc( + // Pin Input/Sense Configuration + // pad_isc + // Interrupt disabled but input buffer enabled + // Sense Both Edges + // Sense Rising Edge + // Sense Falling Edge + // Digital Input Buffer disabled + // Sense low Level + PORT_ISC_BOTHEDGES_gc); + + CLKCTRL_init(); + + RTC_0_init(); + + CPUINT_init(); + + SLPCTRL_init(); + + BOD_init(); +} diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/src/protected_io.S b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/src/protected_io.S index bc3fa801920b4261352655dea659189a52f3a924..26594fccad88b9b8b48c6c5f8dbf9ab88c6dbe1e 100644 --- a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/src/protected_io.S +++ b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/src/protected_io.S @@ -1,3 +1,95 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:77fd5a2a6b6444f8e01b9b27b7acd1b877b6a558f67c7cb9228dc655975d3588 -size 3344 +/** + * \file + * + * \brief Configuration Change Protection + * + (c) 2018 Microchip Technology Inc. and its subsidiaries. + + Subject to your compliance with these terms,you may use this software and + any derivatives exclusively with Microchip products.It is your responsibility + to comply with third party license terms applicable to your use of third party + software (including open source software) that may accompany Microchip software. + + THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER + EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED + WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A + PARTICULAR PURPOSE. + + IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, + INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND + WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS + BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE + FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN + ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, + THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. + * + */ + + +/** + * \defgroup doc_driver_system_protected_io Protected IO + * \ingroup doc_driver_system + * + * \section doc_driver_protected_io_rev Revision History + * - v0.0.0.1 Initial Commit + * + *@{ + */ + +#include + +/* + * GNU and IAR use different calling conventions. Since this is + * a very small and simple function to begin with, it's easier + * to implement it twice than to deal with the differences + * within a single implementation. + */ + + PUBLIC_FUNCTION(protected_write_io) + +#if defined(__GNUC__) + +#ifdef RAMPZ + out _SFR_IO_ADDR(RAMPZ), r1 // Clear bits 23:16 of Z +#endif + movw r30, r24 // Load addr into Z + out CCP, r22 // Start CCP handshake + st Z, r20 // Write value to I/O register + ret // Return to caller + +#elif defined(__IAR_SYSTEMS_ASM__) + +# if !defined(CONFIG_MEMORY_MODEL_TINY) && !defined(CONFIG_MEMORY_MODEL_SMALL) \ + && !defined(CONFIG_MEMORY_MODEL_LARGE) +# define CONFIG_MEMORY_MODEL_SMALL +# endif +# if defined(CONFIG_MEMORY_MODEL_LARGE) + ldi r20, 0 + out RAMPZ, r20 // Reset bits 23:16 of Z + movw r30, r16 // Load addr into Z +# elif defined(CONFIG_MEMORY_MODEL_TINY) + ldi r31, 0 // Reset bits 8:15 of Z + mov r30, r16 // Load addr into Z +# else + movw r30, r16 // Load addr into Z +# endif +# if defined(CONFIG_MEMORY_MODEL_TINY) + out CCP, r17 // Start CCP handshake + st Z, r18 // Write value to I/O register +# elif defined(CONFIG_MEMORY_MODEL_SMALL) + out CCP, r18 // Start CCP handshake + st Z, r19 // Write value to I/O register +# elif defined(CONFIG_MEMORY_MODEL_LARGE) + out CCP, r19 // Start CCP handshake + st Z, r20 // Write value to I/O register +# else +# error Unknown memory model in use, no idea how registers should be accessed +# endif + ret +#else +# error Unknown assembler +#endif + + END_FUNC(protected_write_io) + END_FILE() + diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/src/rtc.c b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/src/rtc.c index d115743ec1d1b8b5c045bcea22146a87a3b37c40..200466344f568e754ec6b5c73f0c93277d69e8fe 100644 --- a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/src/rtc.c +++ b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/src/rtc.c @@ -1,3 +1,77 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8558232ce56de18983c13d7bb958856a1952a969d125d3b2c7fa970c2407f26d -size 2588 +/** + * \file + * + * \brief RTC related functionality implementation. + * + (c) 2018 Microchip Technology Inc. and its subsidiaries. + + Subject to your compliance with these terms,you may use this software and + any derivatives exclusively with Microchip products.It is your responsibility + to comply with third party license terms applicable to your use of third party + software (including open source software) that may accompany Microchip software. + + THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER + EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED + WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A + PARTICULAR PURPOSE. + + IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, + INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND + WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS + BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE + FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN + ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, + THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. + * + */ + +/** + * \defgroup doc_driver_rtc_init RTC Init Driver + * \ingroup doc_driver_rtc + * + * \section doc_driver_rtc_rev Revision History + * - v0.0.0.1 Initial Commit + * + *@{ + */ +#include + +/** + * \brief Initialize rtc interface + * \return Initialization status. + */ +int8_t RTC_0_init() +{ + + while (RTC.STATUS > 0) { /* Wait for all register to be synchronized */ + } + + // RTC.CMP = 0x0; /* Compare: 0x0 */ + + // RTC.CNT = 0x0; /* Counter: 0x0 */ + + RTC.CTRLA = RTC_PRESCALER_DIV1_gc /* 1 */ + | 1 << RTC_RTCEN_bp /* Enable: enabled */ + | 0 << RTC_RUNSTDBY_bp; /* Run In Standby: disabled */ + + // RTC.PER = 0xffff; /* Period: 0xffff */ + + // RTC.CLKSEL = RTC_CLKSEL_INT32K_gc; /* 32KHz Internal Ultra Low Power Oscillator (OSCULP32K) */ + + // RTC.DBGCTRL = 0 << RTC_DBGRUN_bp; /* Run in debug: disabled */ + + // RTC.INTCTRL = 0 << RTC_CMP_bp /* Compare Match Interrupt enable: disabled */ + // | 0 << RTC_OVF_bp; /* Overflow Interrupt enable: disabled */ + + while (RTC.PITSTATUS > 0) { /* Wait for all register to be synchronized */ + } + + RTC.PITCTRLA = RTC_PERIOD_CYC32_gc /* RTC Clock Cycles 32 */ + | 1 << RTC_PITEN_bp; /* Enable: enabled */ + + // RTC.PITDBGCTRL = 0 << RTC_DBGRUN_bp; /* Run in debug: disabled */ + + // RTC.PITINTCTRL = 0 << RTC_PI_bp; /* Periodic Interrupt: disabled */ + + return 0; +} diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/src/slpctrl.c b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/src/slpctrl.c index dcf60dbe7d5139d0abfb921b1d5621364d12f2d3..5190a7fe1f68d4998ace979d251ec005999c683b 100644 --- a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/src/slpctrl.c +++ b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/src/slpctrl.c @@ -1,3 +1,56 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:857fccb0b7864496e75bac5163a27e5d0e644f0aab1043d90f48d4546fb6fd16 -size 1863 +/** + * \file + * + * \brief SLPCTRL related functionality implementation. + * + (c) 2018 Microchip Technology Inc. and its subsidiaries. + + Subject to your compliance with these terms,you may use this software and + any derivatives exclusively with Microchip products.It is your responsibility + to comply with third party license terms applicable to your use of third party + software (including open source software) that may accompany Microchip software. + + THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER + EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED + WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A + PARTICULAR PURPOSE. + + IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, + INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND + WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS + BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE + FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN + ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, + THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. + * + */ + +/** + * \defgroup doc_driver_system_slpctrl Sleep Controller + * \ingroup doc_driver_system + * + * \section doc_driver_slpctrl_rev Revision History + * - v0.0.0.1 Initial Commit + * + *@{ + */ +#include + +/** + * \brief Initialize Sleep Controller + * + * \return Initialization status. + */ +int8_t SLPCTRL_init() +{ + + SLPCTRL.CTRLA = 0 << SLPCTRL_SEN_bp /* Sleep enable: disabled */ + | SLPCTRL_SMODE_PDOWN_gc; /* Power-down Mode */ + + return 0; +} + +void SLPCTRL_set_sleep_mode(SLPCTRL_SMODE_t setmode) +{ + SLPCTRL.CTRLA = (SLPCTRL.CTRLA & ~SLPCTRL_SMODE_gm) | (setmode & SLPCTRL_SMODE_gm); +} diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/utils/assembler.h b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/utils/assembler.h index 94aa0619b5302fbec30f8a3e977c5903535300a2..4b0c4d847dec50af5ced474bad8fc0538797f54c 100644 --- a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/utils/assembler.h +++ b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/utils/assembler.h @@ -1,3 +1,61 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:80fc8866c630ebe0b1249eaa221f7348903a9dfe6771fe1be728a7b698b7a01c -size 2192 +/** + * \file assembler.h + * + * \brief Assembler abstraction layer and utilities + * + * + * Copyright (C) 2016 Atmel Corporation. All rights reserved. + * + * \asf_license_start + * + * \page License + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. The name of Atmel may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * 4. This software may only be redistributed and used in connection with an + * Atmel microcontroller product. + * + * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE + * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * \asf_license_stop + * + * + */ + +#ifndef ASSEMBLER_H_INCLUDED +#define ASSEMBLER_H_INCLUDED + +#if !defined(__ASSEMBLER__) && !defined(__IAR_SYSTEMS_ASM__) && !defined(__DOXYGEN__) +#error This file may only be included from assembly files +#endif + +#if defined(__ASSEMBLER__) +#include "assembler/gas.h" +#include +#elif defined(__IAR_SYSTEMS_ASM__) +#include "assembler/iar.h" +#include +#endif + +#endif /* ASSEMBLER_H_INCLUDED */ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/utils/assembler/gas.h b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/utils/assembler/gas.h index fd7fb3738710b2ecba63d7eb8a22b9e545b10ffd..21b3dd6529bb4dc04c973b6572d617c45b7e1f5f 100644 --- a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/utils/assembler/gas.h +++ b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/utils/assembler/gas.h @@ -1,3 +1,127 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:aa44b0f9bf65b51a78589c41506205c2dec595d0e591a7a0464868e1b937d500 -size 4391 +/** + * \file gas.h + * + * \brief Assembler abstraction layer: GNU Assembler specifics + * + * + * Copyright (C) 2016 Atmel Corporation. All rights reserved. + * + * \asf_license_start + * + * \page License + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. The name of Atmel may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * 4. This software may only be redistributed and used in connection with an + * Atmel microcontroller product. + * + * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE + * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * \asf_license_stop + * + * + */ +#ifndef ASSEMBLER_GAS_H_INCLUDED +#define ASSEMBLER_GAS_H_INCLUDED + +#ifndef __DOXYGEN__ + +/* clang-format off */ + + /* IAR doesn't accept dots in macro names */ + .macro ld_addr, reg, sym + lda.w \reg, \sym + .endm + + /* Define a function \a name that is either globally visible or only + * file-local. + */ + .macro gas_begin_func name, is_public + .if \is_public + .global \name + .endif + .section .text.\name, "ax", @progbits + .type \name, @function + \name : + .endm + + /* Define a function \a name that is either globally visible or only + * file-local in a given segment. + */ + .macro gas_begin_func_segm name, is_public, segment + .if \is_public + .global \name + .endif + .section .\segment, "ax", @progbits + .type \name, @function + \name : + .endm + + /* Define \a name as a weak alias for the function \a strong_name */ + .macro gas_weak_function_alias name, strong_name + .global \name + .weak \name + .type \name, @function + .set \name, \strong_name + .endm + + /* Define a weak function called \a name */ + .macro gas_weak_function name + .weak \name + gas_begin_func \name 1 + .endm + +#define REPEAT(count) .rept count +#define END_REPEAT() .endr +#define FILL_BYTES(count) .fill count +#define SET_LOC(offset) .org offset +#define L(name) .L##name +#define EXTERN_SYMBOL(name) + +#define TEXT_SECTION(name) \ + .section name, "ax", @progbits +#define RODATA_SECTION(name) \ + .section name, "a", @progbits +#define DATA_SECTION(name) \ + .section name, "aw", @progbits +#define BSS_SECTION(name) \ + .section name, "aw", @nobits + +#define FUNCTION(name) gas_begin_func name 0 +#define PUBLIC_FUNCTION(name) gas_begin_func name 1 +#define PUBLIC_FUNCTION_SEGMENT(name, segment) \ + gas_begin_func_segm name 1 segment +#define WEAK_FUNCTION(name) gas_weak_function name +#define WEAK_FUNCTION_ALIAS(name, strong_name) \ + gas_weak_function_alias name strong_name +#define END_FUNC(name) \ + .size name, . - name + +#define END_FILE() + +/* clang-format on */ + +#endif /* __DOXYGEN__ */ + +#endif /* ASSEMBLER_GAS_H_INCLUDED */ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/utils/assembler/iar.h b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/utils/assembler/iar.h index 7ab55ddd3dfeabccebe3758b0f53631b98a0c2d9..39735d14c6401999789bc83314fc28398540ddb4 100644 --- a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/utils/assembler/iar.h +++ b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/utils/assembler/iar.h @@ -1,3 +1,116 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e22cb5d7f1738d07a75a0502f97e7ba3818ff51a19453d6db67e396dbfc273a8 -size 3581 +/** + * \file iar.h + * + * \brief Assembler abstraction layer: IAR Assembler specifics + * + * + * Copyright (C) 2016 Atmel Corporation. All rights reserved. + * + * \asf_license_start + * + * \page License + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. The name of Atmel may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * 4. This software may only be redistributed and used in connection with an + * Atmel microcontroller product. + * + * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE + * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * \asf_license_stop + * + * + */ + +#ifndef ASSEMBLER_IAR_H_INCLUDED +#define ASSEMBLER_IAR_H_INCLUDED + +/* clang-format off */ + +ld_addr MACRO reg, sym + mov reg, LWRD sym + orh reg, HWRD sym + ENDM + +call MACRO sym + rcall sym + ENDM + +iar_begin_func MACRO name, sect, is_public, is_weak + MODULE name + RSEG CODE:CODE:NOROOT(1) + IF is_weak == 1 + PUBWEAK name + ELSEIF is_public + PUBLIC name + ENDIF +name: + ENDM + +iar_begin_func_segm MACRO name, sect, is_public, is_weak, segment + MODULE name + RSEG segment:CODE:NOROOT(1) + IF is_weak == 1 + PUBWEAK name + ELSEIF is_public + PUBLIC name + ENDIF +name: + ENDM + +iar_weak_alias MACRO name, strong_name + PUBWEAK name +name: + rjmp strong_name + ENDM + +#define lo(x) LWRD x +#define hi(x) HWRD x + +#define REPEAT(count) REPT count +#define END_REPEAT() ENDR +#define SET_LOC(offset) ORG offset +#define END_FILE() END + +#define FILL_BYTES(count) DS8 count + +#define L(name) name +#define EXTERN_SYMBOL(name) EXTERN name +#define FUNCTION(name) iar_begin_func name, text_##name, 0, 0 +#define PUBLIC_FUNCTION(name) iar_begin_func name, text_##name, 1, 0 +#define PUBLIC_FUNCTION_SEGMENT(name, segment) \ + iar_begin_func_segm name, text_##name, 1, 0, segment +#define WEAK_FUNCTION(name) iar_begin_func name, text_##name, 1, 1 +#define WEAK_FUNCTION_ALIAS(name, strong_name) \ + iar_weak_alias name, strong_name +#define END_FUNC(name) ENDMOD + +#define TEXT_SECTION(name) RSEG name:CODE:NOROOT +#define RODATA_SECTION(name) RSEG name:CONST:NOROOT +#define DATA_SECTION(name) RSEG name:DATA:NOROOT +#define BSS_SECTION(name) RSEG name:DATA:NOROOT + +/* clang-format on */ + +#endif /* ASSEMBLER_IAR_H_INCLUDED */ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/utils/atomic.h b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/utils/atomic.h index 2fed124268827e0afe0f5eed559327de90e61de7..f6002f1beb32d02a7182ba95860a23108f84908e 100644 --- a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/utils/atomic.h +++ b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/utils/atomic.h @@ -1,3 +1,125 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:eddf10c57aba1402783484b51c3aa476484c61707495878f3e879b4323d9629d -size 4456 +/** + * \file atomic.h + * + * \brief Macros used for atomic memory access. + * + * + * Copyright (C) 2016 Atmel Corporation. All rights reserved. + * + * \asf_license_start + * + * \page License + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. The name of Atmel may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * 4. This software may only be redistributed and used in connection with an + * Atmel microcontroller product. + * + * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE + * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * \asf_license_stop + * + * + */ + +#ifndef ATOMIC_H +#define ATOMIC_H + +/** + * \defgroup doc_driver_utils_atomic Atomic memory access and critical sections + * \ingroup doc_driver_utils + * + * Atomic memory access and critical sections + * + * \{ + */ + +/* clang-format off */ + +#if defined(__GNUC__) || defined (__DOXYGEN__) + +/** + * \brief Enter a critical region + * + * Saves the contents of the status register, including the Global + * Interrupt Enable bit, so that it can be restored upon leaving the + * critical region. Thereafter, clears the Global Interrupt Enable Bit. + * This macro takes a parameter P that is unused for the GCC compiler, + * but necessary for code compatibility with the IAR compiler. The IAR + * compiler declares a variable with the name of the parameter for + * holding the SREG value. Since a variable is declared in the macro, + * this variable must have a name that is unique within the scope + * that the critical region is declared within, otherwise compilation + * will fail. + * + * \param[in] UNUSED(GCC)/P(IAR) Name of variable storing SREG + * + */ + +#define ENTER_CRITICAL(UNUSED) __asm__ __volatile__ ( \ + "in __tmp_reg__, __SREG__" "\n\t" \ + "cli" "\n\t" \ + "push __tmp_reg__" "\n\t" \ + ::: "memory" \ + ) + +/** + * \brief Exit a critical region + * + * Restores the contents of the status register, including the Global + * Interrupt Enable bit, as it was when entering the critical region. + * This macro takes a parameter P that is unused for the GCC compiler, + * but necessary for code compatibility with the IAR compiler. The IAR + * compiler uses this parameter as the name of a variable that holds + * the SREG value. The parameter must be identical to the parameter + * used in the corresponding ENTER_CRITICAL(). + * + * \param[in] UNUSED(GCC)/P(IAR) Name of variable storing SREG + * + */ + +#define EXIT_CRITICAL(UNUSED) __asm__ __volatile__ ( \ + "pop __tmp_reg__" "\n\t" \ + "out __SREG__, __tmp_reg__" "\n\t" \ + ::: "memory" \ + ) + +#define DISABLE_INTERRUPTS() __asm__ __volatile__ ( "cli" ::: "memory") +#define ENABLE_INTERRUPTS() __asm__ __volatile__ ( "sei" ::: "memory") + +#elif defined(__ICCAVR__) + +#define ENTER_CRITICAL(P) unsigned char P = __save_interrupt();__disable_interrupt(); +#define EXIT_CRITICAL(P) __restore_interrupt(P); + +#define DISABLE_INTERRUPTS() __disable_interrupt(); +#define ENABLE_INTERRUPTS() __enable_interrupt(); + +#else +# error Unsupported compiler. +#endif + +/* clang-format on */ + +#endif /* ATOMIC_H */ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/utils/compiler.h b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/utils/compiler.h index 5b10975908487a81160bb79a24c507a30c074443..30bdbd75bc61741f86d8bc11577d82029f9ce7a3 100644 --- a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/utils/compiler.h +++ b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/utils/compiler.h @@ -1,3 +1,92 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e0f4d171160c6a6a3e5cc746365e2151cee5500d2b8ae666bd983fffa32003f3 -size 2740 +/** + * \file compiler.h + * + * \brief Commonly used includes, types and macros. + * + * + * Copyright (C) 2016 Atmel Corporation. All rights reserved. + * + * \asf_license_start + * + * \page License + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. The name of Atmel may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * 4. This software may only be redistributed and used in connection with an + * Atmel microcontroller product. + * + * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE + * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * \asf_license_stop + * + * + */ + +#ifndef UTILS_COMPILER_H +#define UTILS_COMPILER_H + +/** + * \defgroup doc_driver_utils_compiler Compiler abstraction + * \ingroup doc_driver_utils + * + * Compiler abstraction layer and code utilities for 8-bit AVR. + * This module provides various abstraction layers and utilities + * to make code compatible between different compilers. + * + * \{ + */ + +#if defined(__GNUC__) +#include +#include +#elif defined(__ICCAVR__) +#define ENABLE_BIT_DEFINITIONS 1 +#include +#include + +#ifndef CCP_IOREG_gc +#define CCP_IOREG_gc 0xD8 /* CPU_CCP_IOREG_gc */ +#endif +#ifndef CCP_SPM_gc +#define CCP_SPM_gc 0x9D /* CPU_CCP_SPM_gc */ +#endif + +#else +#error Unsupported compiler. +#endif + +#include +#include +#include +#include + +#include + +/** + * \def UNUSED + * \brief Marking \a v as a unused parameter or value. + */ +#define UNUSED(v) (void)(v) + +#endif /* UTILS_COMPILER_H */ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/utils/interrupt_avr8.h b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/utils/interrupt_avr8.h index 4a07fff3c6c594697427f5a6d9facb8c30e9522a..38b35bbecc51b68a7457165f892246642847e821 100644 --- a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/utils/interrupt_avr8.h +++ b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/utils/interrupt_avr8.h @@ -1,3 +1,111 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c0e8a2cf54e6250736cd562e5d0640b95f239c0aeb6dad2bec264c97e6f13609 -size 3064 +/** + * \file interrupt_avr8.h + * + * \brief Global interrupt management for 8-bit AVR + * + * + * Copyright (C) 2016 Atmel Corporation. All rights reserved. + * + * \asf_license_start + * + * \page License + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. The name of Atmel may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * 4. This software may only be redistributed and used in connection with an + * Atmel microcontroller product. + * + * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE + * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * \asf_license_stop + * + */ + +/** + * \defgroup doc_driver_utils_interrupts ISR abstraction + * \ingroup doc_driver_utils + * + * Interrupt-related functionality. + * + * \{ + */ + +#ifndef UTILS_INTERRUPT_AVR8_H +#define UTILS_INTERRUPT_AVR8_H + +/** + * \weakgroup interrupt_group + * + * @{ + */ + +#ifdef ISR_CUSTOM_H +#include ISR_CUSTOM_H +#else + +/** + * \def ISR + * \brief Define service routine for specified interrupt vector + * + * Usage: + * \code + ISR(FOO_vect) + { + ... + } +\endcode + * + * \param vect Interrupt vector name as found in the device header files. + */ +#if defined(__DOXYGEN__) +#define ISR(vect) +#elif defined(__GNUC__) +#include +#elif defined(__ICCAVR__) +#define __ISR(x) _Pragma(#x) +#define ISR(vect) __ISR(vector = vect) __interrupt void handler_##vect(void) +#endif +#endif // ISR_CUSTOM_H + +#ifdef __GNUC__ +#define cpu_irq_enable() sei() +#define cpu_irq_disable() cli() +#else +#define cpu_irq_enable() __enable_interrupt() +#define cpu_irq_disable() __disable_interrupt() +#endif + +//! @} + +/** + * \weakgroup interrupt_deprecated_group + * @{ + */ +// Deprecated definitions. +#define Enable_global_interrupt() cpu_irq_enable() +#define Disable_global_interrupt() cpu_irq_disable() +#define Is_global_interrupt_enabled() cpu_irq_is_enabled() +//! @} + +#endif /* UTILS_INTERRUPT_AVR8_H */ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/utils/utils.h b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/utils/utils.h index b9bce21a42a8a076e787e68810972b6c3b67567e..c6dd59ad747895af077f242e91ae28f8863b3b99 100644 --- a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/utils/utils.h +++ b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/utils/utils.h @@ -1,3 +1,73 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1db4b218199c008eef101c66264db5a8677d9df5ef0f68040d0ec430b56412d3 -size 2263 +/** + * \file utils.h + * + * \brief Different macros. + * + * + * Copyright (C) 2016 Atmel Corporation. All rights reserved. + * + * \asf_license_start + * + * \page License + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. The name of Atmel may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * 4. This software may only be redistributed and used in connection with an + * Atmel microcontroller product. + * + * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE + * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * \asf_license_stop + * + * + */ + +/** + * \defgroup doc_driver_utils AVR Code utility functions + * + * Compiler abstraction layer and code utilities for AVR. + * This module provides various abstraction layers and utilities + * to make code compatible between different compilers. + * + * \{ + */ + +#ifndef UTILS_H_INCLUDED +#define UTILS_H_INCLUDED + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * \brief Retrieve array size + */ +#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) + +/** @} */ + +#ifdef __cplusplus +} +#endif +#endif /* UTILS_H_INCLUDED */ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/utils/utils_assert.h b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/utils/utils_assert.h index 5a945b17d8b2a1d07835d078084c986bc2b4f808..b71b9c29ff380a9846e337a0eaaac6a1031e5b4c 100644 --- a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/utils/utils_assert.h +++ b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AN3407/src/utils/utils_assert.h @@ -1,3 +1,84 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d563d4f547cec126342f7c692d0ffd8a7de10b1b7d35d9ee6f4f60517eec54ab -size 2751 +/** + * \file utils_assert.h + * + * \brief Asserts related functionality. + * + * + * Copyright (C) 2016 Atmel Corporation. All rights reserved. + * + * \asf_license_start + * + * \page License + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. The name of Atmel may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * 4. This software may only be redistributed and used in connection with an + * Atmel microcontroller product. + * + * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE + * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * \asf_license_stop + * + * + */ + +/** + * \defgroup doc_driver_utils_assert Functionality for assert. + * \ingroup doc_driver_utils + * + * \{ + */ + +#ifndef _ASSERT_H_INCLUDED +#define _ASSERT_H_INCLUDED + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +/** + * \brief Assert macro + * + * This macro is used to throw asserts. It can be mapped to different function + * based on debug level. + * + * \param[in] condition A condition to be checked; + * assert is thrown if the given condition is false + */ + +#ifdef DEBUG +#define ASSERT(condition) \ + if (!(condition)) \ + while (true) \ + ; +#else +#define ASSERT(condition) ((void)0) +#endif + +#ifdef __cplusplus +} +#endif +#endif /* _ASSERT_H_INCLUDED */ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AVR182/AVR182.pdf b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AVR182/AVR182.pdf index df0b339b86268139ea70e6a99db04ecbf01c8a56..48102e75b7a740cce3ff2e94aa83c7cc56c9c960 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AVR182/AVR182.pdf and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AVR182/AVR182.pdf differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AVR182/Zero Cross Detector.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AVR182/Zero Cross Detector.pdsprj index c187fe139b434036447782a987695d8920626321..9e32f43fdaeafd6cd7979a0fb3a3d347bdf375b2 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AVR182/Zero Cross Detector.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AVR182/Zero Cross Detector.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AVR241/AVR241.pdf b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AVR241/AVR241.pdf index bba9e01d6368c6fd98655477fa1e37ba691721c2..86fd99ef5ff0985447475486041a3930922704eb 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AVR241/AVR241.pdf and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AVR241/AVR241.pdf differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AVR241/LCD Driver.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AVR241/LCD Driver.pdsprj index a9b0054fd734933922738e18c97657c5575f3ec6..7c19ef55aa6837d974a7031d262366fc54c49d97 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AVR241/LCD Driver.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/App Notes/AVR241/LCD Driver.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino & RGB Common Anode LED/Arduino & RGB Common Anode LED ShiftPWM.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino & RGB Common Anode LED/Arduino & RGB Common Anode LED ShiftPWM.pdsprj index 2061cda128cda677790cd587e19359e591145144..9235cbc4774a884625531d463f17601660304641 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino & RGB Common Anode LED/Arduino & RGB Common Anode LED ShiftPWM.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino & RGB Common Anode LED/Arduino & RGB Common Anode LED ShiftPWM.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino & RGB Common Cathode LED/Arduino & RGB Common Cathode LED Rainbow.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino & RGB Common Cathode LED/Arduino & RGB Common Cathode LED Rainbow.pdsprj index 4e25b3e4b6a62af0e2dfd9d64c10251f3ea4d7a2..4929bc0c62784831d4e888919e6378fb71b67f90 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino & RGB Common Cathode LED/Arduino & RGB Common Cathode LED Rainbow.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino & RGB Common Cathode LED/Arduino & RGB Common Cathode LED Rainbow.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino & RGB Common Cathode LED/Arduino & RGB Common Cathode LED.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino & RGB Common Cathode LED/Arduino & RGB Common Cathode LED.pdsprj index 6188072737b27c93e5183942b8d9e6f96c659386..f6701137182728e293e18a5b425f785d9811e3e3 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino & RGB Common Cathode LED/Arduino & RGB Common Cathode LED.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino & RGB Common Cathode LED/Arduino & RGB Common Cathode LED.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino 16 Channel Pwm Shield/Arduino 16 Channel Pwm Shield - PWM test.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino 16 Channel Pwm Shield/Arduino 16 Channel Pwm Shield - PWM test.pdsprj index 910e14b4be9368d6860c62dfb304bbec48a8d0a0..6c07590ccf137a91e83334755acbaa259552e7ac 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino 16 Channel Pwm Shield/Arduino 16 Channel Pwm Shield - PWM test.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino 16 Channel Pwm Shield/Arduino 16 Channel Pwm Shield - PWM test.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino 16 Channel Pwm Shield/Arduino 16 Channel Pwm Shield - Servo test.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino 16 Channel Pwm Shield/Arduino 16 Channel Pwm Shield - Servo test.pdsprj index c557e3010912cf7b029d8687b0344cb58186d7d1..5033eb473908316cc9c1cd653ad865f99de14a6b 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino 16 Channel Pwm Shield/Arduino 16 Channel Pwm Shield - Servo test.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino 16 Channel Pwm Shield/Arduino 16 Channel Pwm Shield - Servo test.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino 168 DDS generator/Arduino 168 DDS generator.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino 168 DDS generator/Arduino 168 DDS generator.pdsprj index d1147ae4b57657fb80bb45da90c1c4dfba11b860..94c4f3197e53ca0f34d6107615ffdbb99d7d8c4f 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino 168 DDS generator/Arduino 168 DDS generator.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino 168 DDS generator/Arduino 168 DDS generator.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino 4 channel Relay/Arduino 4 channel Relay.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino 4 channel Relay/Arduino 4 channel Relay.pdsprj index 90699aedd6752cf5f2263eb4bc85e54aa08507fd..eef12bcb2398d29b06237154b31563ac36a8f5dc 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino 4 channel Relay/Arduino 4 channel Relay.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino 4 channel Relay/Arduino 4 channel Relay.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino 7-segment using 74HC595 Shift Register/Arduino 7-segment & terminal using 74HC595 Shift Register.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino 7-segment using 74HC595 Shift Register/Arduino 7-segment & terminal using 74HC595 Shift Register.pdsprj index c37721b4f13a9e31c3bd9722a48f4054d15ec42e..e597070fd09e8fc000d7dff3b3bdbb71872f7056 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino 7-segment using 74HC595 Shift Register/Arduino 7-segment & terminal using 74HC595 Shift Register.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino 7-segment using 74HC595 Shift Register/Arduino 7-segment & terminal using 74HC595 Shift Register.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino 7-segment using 74HC595 Shift Register/Arduino 7-segment using 74HC595 Shift Register.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino 7-segment using 74HC595 Shift Register/Arduino 7-segment using 74HC595 Shift Register.pdsprj index 5870a2ad5c22ff0010ce4333436dfb68b6e8a700..d06db589d22d4e6ea97a8bf1c42dcfabfe5faadb 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino 7-segment using 74HC595 Shift Register/Arduino 7-segment using 74HC595 Shift Register.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino 7-segment using 74HC595 Shift Register/Arduino 7-segment using 74HC595 Shift Register.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino 74HC595 Shift Register/Arduino 74HC595 Shift Register.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino 74HC595 Shift Register/Arduino 74HC595 Shift Register.pdsprj index 6434ee553fb7b7630b54c4d409b8323440586cbb..c4009c0f860e774cd2cf9e65c3b5fd6d62e6df88 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino 74HC595 Shift Register/Arduino 74HC595 Shift Register.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino 74HC595 Shift Register/Arduino 74HC595 Shift Register.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino AD8495 K-Type Thermocouple Amplifier/Arduino AD8495 K-Type Thermocouple Amplfier.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino AD8495 K-Type Thermocouple Amplifier/Arduino AD8495 K-Type Thermocouple Amplfier.pdsprj index 64a532cad110de3a4c00be1a460320b05dd86497..a516d28e9750a5bb4cf1278bcd5a52cb19d6457f 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino AD8495 K-Type Thermocouple Amplifier/Arduino AD8495 K-Type Thermocouple Amplfier.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino AD8495 K-Type Thermocouple Amplifier/Arduino AD8495 K-Type Thermocouple Amplfier.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino BME280 Adafruit/Adafruit_BME280_SPI.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino BME280 Adafruit/Adafruit_BME280_SPI.pdsprj index a7be7709ecc5f544002fdebe9bdfaa3c9b8c1390..91a33b6397efa15e773ac824c0858cc4b9c84c38 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino BME280 Adafruit/Adafruit_BME280_SPI.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino BME280 Adafruit/Adafruit_BME280_SPI.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino BMP180 Adafruit/bmp180_test.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino BMP180 Adafruit/bmp180_test.pdsprj index 0ed2a158d769cbfc2c6ad4c615bbc91da8e2b7ae..2d3795cf03131daad97d5234996d232c020b9254 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino BMP180 Adafruit/bmp180_test.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino BMP180 Adafruit/bmp180_test.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino Cyrillic LCD/Arduino Cyrillic LCD.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino Cyrillic LCD/Arduino Cyrillic LCD.pdsprj index 79df67b2527bdf015a4647e8a140d90df354a945..8f08ca7af666755c0ddd0c6498f0ee2a679be944 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino Cyrillic LCD/Arduino Cyrillic LCD.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino Cyrillic LCD/Arduino Cyrillic LCD.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino Cyrillic LCD/cyrillic.bmp b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino Cyrillic LCD/cyrillic.bmp index 0f748c1a7864e912dddd6ed78652cd1ac23fd531..f94612611b2386164212b5b24db71701026e85eb 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino Cyrillic LCD/cyrillic.bmp and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino Cyrillic LCD/cyrillic.bmp differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino DHT22 Humidity & Temperature sensor/Arduino DHT22 Humidity & Temperature sensor.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino DHT22 Humidity & Temperature sensor/Arduino DHT22 Humidity & Temperature sensor.pdsprj index 8fabd41fb4218294c972d104560bec41b0079d41..fe4539c7b855f5855eb5e6d6f8383f5d227c5e17 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino DHT22 Humidity & Temperature sensor/Arduino DHT22 Humidity & Temperature sensor.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino DHT22 Humidity & Temperature sensor/Arduino DHT22 Humidity & Temperature sensor.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino DS1302 RTC/Arduino DS1302 RTC.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino DS1302 RTC/Arduino DS1302 RTC.pdsprj index de2b9131353ca16eb9f895790cbc0d9621810567..83032d8a5bd4e9bbae57a4a7e312bec0a2844b3f 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino DS1302 RTC/Arduino DS1302 RTC.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino DS1302 RTC/Arduino DS1302 RTC.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino DS18B20 OneWire/Arduino DS18B20 OneWire.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino DS18B20 OneWire/Arduino DS18B20 OneWire.pdsprj index 023936435a2036be654e0c9a72cdfbcb40ce6f02..4dd46214acf668775135bfd3e84b8e8c6782356a 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino DS18B20 OneWire/Arduino DS18B20 OneWire.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino DS18B20 OneWire/Arduino DS18B20 OneWire.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino DS2408 Port Expander Switch/Arduino DS2408 Port Expander Switch.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino DS2408 Port Expander Switch/Arduino DS2408 Port Expander Switch.pdsprj index c676c5f6ecc853bc3cac96eb25cbdfe07590a9aa..70333539c39999495946fcfc8ba7b037be72f26f 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino DS2408 Port Expander Switch/Arduino DS2408 Port Expander Switch.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino DS2408 Port Expander Switch/Arduino DS2408 Port Expander Switch.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino Digital Potentiometer/Arduino Digital Potentiometer.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino Digital Potentiometer/Arduino Digital Potentiometer.pdsprj index 15fb4b4fc232d6cf1cf616c9a0e2d034cb3af8b5..36c05f8f237670f0a73510a32e5c4614a27bcbf3 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino Digital Potentiometer/Arduino Digital Potentiometer.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino Digital Potentiometer/Arduino Digital Potentiometer.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino Dimming 230V AC/Arduino Dimming 230V AC.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino Dimming 230V AC/Arduino Dimming 230V AC.pdsprj index 85277e964745b4f4335b4b7255da01399cd23cd0..c086eef1a8bff611bae32b9a06b49fc653836450 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino Dimming 230V AC/Arduino Dimming 230V AC.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino Dimming 230V AC/Arduino Dimming 230V AC.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino FDC1004 Breakout Board/Arduino FDC1004 breakout board test.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino FDC1004 Breakout Board/Arduino FDC1004 breakout board test.pdsprj index 38806f79164c67f25ab1d86ac6cf2b0fb37f128e..e0ee6a5e3d77d15d5dd5a5c7e9ef6b8f3ea25ee2 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino FDC1004 Breakout Board/Arduino FDC1004 breakout board test.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino FDC1004 Breakout Board/Arduino FDC1004 breakout board test.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino HX711 SparkFun Breakout Board/Arduino HX711 SparkFun Breakout Board with 200kg Load Cell.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino HX711 SparkFun Breakout Board/Arduino HX711 SparkFun Breakout Board with 200kg Load Cell.pdsprj index 88ab047f9b238d0c6d9cee4c5f09b4cdd647e0d1..20a7e150595686dd926360eceb3c207a3ae35037 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino HX711 SparkFun Breakout Board/Arduino HX711 SparkFun Breakout Board with 200kg Load Cell.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino HX711 SparkFun Breakout Board/Arduino HX711 SparkFun Breakout Board with 200kg Load Cell.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino HYT271 Precision Humidity & Temperature sensor/Arduino HYT271 Precision Humidity & Temperature sensor.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino HYT271 Precision Humidity & Temperature sensor/Arduino HYT271 Precision Humidity & Temperature sensor.pdsprj index 7e35952e55826fa34da3641d2de3afd4a30800f9..03d6afbec26705d3319f279b12fdba162ec0288d 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino HYT271 Precision Humidity & Temperature sensor/Arduino HYT271 Precision Humidity & Temperature sensor.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino HYT271 Precision Humidity & Temperature sensor/Arduino HYT271 Precision Humidity & Temperature sensor.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino Hall-Effect Currrent Sensor/Hall-Effect Current Sensor Breakout Board AC measure.dsprj.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino Hall-Effect Currrent Sensor/Hall-Effect Current Sensor Breakout Board AC measure.dsprj.pdsprj index 15c8396e5bbc3303212b5fc5402fedb6035156a9..0fb1b897cd301474717aafa13df19087cc148e6d 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino Hall-Effect Currrent Sensor/Hall-Effect Current Sensor Breakout Board AC measure.dsprj.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino Hall-Effect Currrent Sensor/Hall-Effect Current Sensor Breakout Board AC measure.dsprj.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino Hall-Effect Currrent Sensor/Hall-Effect Current Sensor Breakout Board DC measure.dsprj.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino Hall-Effect Currrent Sensor/Hall-Effect Current Sensor Breakout Board DC measure.dsprj.pdsprj index 3eaf282cb968d4d999425721fd511a1cf1b7569e..ef944b4a23cee0e33f8952b7064ac300b68b7b23 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino Hall-Effect Currrent Sensor/Hall-Effect Current Sensor Breakout Board DC measure.dsprj.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino Hall-Effect Currrent Sensor/Hall-Effect Current Sensor Breakout Board DC measure.dsprj.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino ILI9341 TFT LCD/Adafruit ILI9342 Demo.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino ILI9341 TFT LCD/Adafruit ILI9342 Demo.pdsprj index d2bb84d8232f7c8d3861ec284d71e723c2b5ae12..d8946602cbf3ca6d7a5f2fc901f4f179555c250d 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino ILI9341 TFT LCD/Adafruit ILI9342 Demo.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino ILI9341 TFT LCD/Adafruit ILI9342 Demo.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino ILI9341 TFT LCD/ili9341_modeE.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino ILI9341 TFT LCD/ili9341_modeE.pdsprj index 5a3f87d3e071db5b52b0b9073c1a6991a6f92082..cfb75c521b84f6278da3c904d388111f463aa725 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino ILI9341 TFT LCD/ili9341_modeE.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino ILI9341 TFT LCD/ili9341_modeE.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino IOX-16 Expander with MCP23017/Arduino IOX-16 Expander with MCP23017 Input Demo .pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino IOX-16 Expander with MCP23017/Arduino IOX-16 Expander with MCP23017 Input Demo .pdsprj index 809bc589691bb4309f07b5c13e74576a3bbcee89..fd562d8891c7edc0e3de80ae3d803274dc3e3798 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino IOX-16 Expander with MCP23017/Arduino IOX-16 Expander with MCP23017 Input Demo .pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino IOX-16 Expander with MCP23017/Arduino IOX-16 Expander with MCP23017 Input Demo .pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino IOX-16 Expander with MCP23017/Arduino IOX-16 Expander with MCP23017 Output Demo .pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino IOX-16 Expander with MCP23017/Arduino IOX-16 Expander with MCP23017 Output Demo .pdsprj index 9f73c7a7eca00b0d06a41607166f76cc82e573f5..a31b0a9b89ad408f6e575b3e6592fb3701a70bc8 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino IOX-16 Expander with MCP23017/Arduino IOX-16 Expander with MCP23017 Output Demo .pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino IOX-16 Expander with MCP23017/Arduino IOX-16 Expander with MCP23017 Output Demo .pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino IR Decoder.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino IR Decoder.pdsprj index 3cf7185e15369d1748d4dbfa432624f6b16f5537..88971b8114b212990292a6217345fb6e732ebc0c 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino IR Decoder.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino IR Decoder.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino Infra Red Remote.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino Infra Red Remote.pdsprj index 1a011d511f49dd119270de9ab478c950ff0bd21c..a4f0c5cf96201fedca9ec2612ee23fb01e6a7e09 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino Infra Red Remote.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino Infra Red Remote.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino KS0108 Breakboard Display/Arduino using KS0108 192x64 Breakboard Display - BigNums.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino KS0108 Breakboard Display/Arduino using KS0108 192x64 Breakboard Display - BigNums.pdsprj index 3404ad95f2bdaedb78ec699d2068204548b04c95..d4d4a804cc8cabd437aa7623deef6a6cc1133c09 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino KS0108 Breakboard Display/Arduino using KS0108 192x64 Breakboard Display - BigNums.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino KS0108 Breakboard Display/Arduino using KS0108 192x64 Breakboard Display - BigNums.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino KS0108 Breakboard Display/Arduino using KS0108 Breakboard Display - BigNums.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino KS0108 Breakboard Display/Arduino using KS0108 Breakboard Display - BigNums.pdsprj index cc2aa334fddbf88ab4b27123f4c02e2d597bc7c2..9453ee0b6dc024f53d2c9c95dd7a3fb1ab89afe3 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino KS0108 Breakboard Display/Arduino using KS0108 Breakboard Display - BigNums.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino KS0108 Breakboard Display/Arduino using KS0108 Breakboard Display - BigNums.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino KS0108 Breakboard Display/Arduino using KS0108 Breakboard Display - Clock Face.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino KS0108 Breakboard Display/Arduino using KS0108 Breakboard Display - Clock Face.pdsprj index 65db75f88ff4dc17886baf90a5ff74a28d8eb59d..eac2112404878fbda4312ce11672900ef3d44521 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino KS0108 Breakboard Display/Arduino using KS0108 Breakboard Display - Clock Face.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino KS0108 Breakboard Display/Arduino using KS0108 Breakboard Display - Clock Face.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino KS0108 Breakboard Display/Arduino using KS0108 Breakboard Display - GLCDdiags.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino KS0108 Breakboard Display/Arduino using KS0108 Breakboard Display - GLCDdiags.pdsprj index c492751db9a5736f009daf35353cee598c0d6ffb..91cfb86d93be51c4dbcd1fd57db6c6e5828e58eb 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino KS0108 Breakboard Display/Arduino using KS0108 Breakboard Display - GLCDdiags.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino KS0108 Breakboard Display/Arduino using KS0108 Breakboard Display - GLCDdiags.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino KS0108 Breakboard Display/Arduino using KS0108 Breakboard Display - Rocket.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino KS0108 Breakboard Display/Arduino using KS0108 Breakboard Display - Rocket.pdsprj index b188f9fe98310e651a8ab63e7ae0ddd4c7e68a7b..9db0ab368c025643bf054300bd0322a62a6cbbfb 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino KS0108 Breakboard Display/Arduino using KS0108 Breakboard Display - Rocket.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino KS0108 Breakboard Display/Arduino using KS0108 Breakboard Display - Rocket.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino KS0108 Breakboard Display/Arduino using KS0108 Breakboard Display.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino KS0108 Breakboard Display/Arduino using KS0108 Breakboard Display.pdsprj index 8492a949793b916d0f94823a3bb0af308a01199d..c7add9aa8ed93f6d3e392113243893ee86cbb807 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino KS0108 Breakboard Display/Arduino using KS0108 Breakboard Display.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino KS0108 Breakboard Display/Arduino using KS0108 Breakboard Display.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino LED Matrix 8x8/Arduino LED Matrix 8x8.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino LED Matrix 8x8/Arduino LED Matrix 8x8.pdsprj index afb6e903bd1895255e6c5aec889136b5d8c95ed1..b5516c3711d32242e8733ec1c3a1752547c06574 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino LED Matrix 8x8/Arduino LED Matrix 8x8.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino LED Matrix 8x8/Arduino LED Matrix 8x8.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino MAX31850K Adafruit/MAX31850_temperature.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino MAX31850K Adafruit/MAX31850_temperature.pdsprj index 5d89d76ee1ee30b1b82eb3b5a76e4b6480c61b1c..60cfe5ed089a8127ad2fd83f506ca1aab58d1962 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino MAX31850K Adafruit/MAX31850_temperature.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino MAX31850K Adafruit/MAX31850_temperature.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino MAX31855/MAX31855_hardwareSPI.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino MAX31855/MAX31855_hardwareSPI.pdsprj index 7cc1c5920ef96d7987669299a702ad8e56f42952..a31350c7c6e6ccb4f2d0c2ded8f97747e312a210 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino MAX31855/MAX31855_hardwareSPI.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino MAX31855/MAX31855_hardwareSPI.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino MAX31855/MAX31855_lcd.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino MAX31855/MAX31855_lcd.pdsprj index e2d0d08ea7954497d9c6e810147050e39c91dd21..ba1358b9b58dff7220be68c3a0fbcf30f9820449 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino MAX31855/MAX31855_lcd.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino MAX31855/MAX31855_lcd.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino MAX31855/MAX31855_softwareSPI.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino MAX31855/MAX31855_softwareSPI.pdsprj index fa629fadb93351249b43d3687718f062e6d85e4a..16c23cb009fafcef3050d272288c6e8462562dcf 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino MAX31855/MAX31855_softwareSPI.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino MAX31855/MAX31855_softwareSPI.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino MAX31856 Adafruit/Adafruit with MAX31856 and Thermocouple K.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino MAX31856 Adafruit/Adafruit with MAX31856 and Thermocouple K.pdsprj index 93d8e8a3f76555fc9e48430c75724e6423a1a9ff..286b6cbb07ab8acd25bb0ef5e1a0eaf72372659d 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino MAX31856 Adafruit/Adafruit with MAX31856 and Thermocouple K.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino MAX31856 Adafruit/Adafruit with MAX31856 and Thermocouple K.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino MAX31865 Adafruit/Adafruit with MAX31865 and PT100 four wires.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino MAX31865 Adafruit/Adafruit with MAX31865 and PT100 four wires.pdsprj index 27a737e5c2c1ff53b8a957ccb23bd492ac15bb37..bd2591eae48c74402d3357dfd3bcb4b30b1fa4ab 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino MAX31865 Adafruit/Adafruit with MAX31865 and PT100 four wires.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino MAX31865 Adafruit/Adafruit with MAX31865 and PT100 four wires.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino MCP3208 12bit ADC/Arduino MCP3208 12bit ADC.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino MCP3208 12bit ADC/Arduino MCP3208 12bit ADC.pdsprj index 3e5d909b6dff0aba94d9a840cd219ebe751aec20..8250381c20ebbc23e5134eef9c23b2005d0e0246 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino MCP3208 12bit ADC/Arduino MCP3208 12bit ADC.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino MCP3208 12bit ADC/Arduino MCP3208 12bit ADC.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino MCP3304 13bit ADC/Arduino MCP3304 13bit ADC.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino MCP3304 13bit ADC/Arduino MCP3304 13bit ADC.pdsprj index 79b6a4a6e3d6ddfcd44980e937b39451a03e76a7..72b97a2255f9a6761eb0ed694d5423804a8d2d0b 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino MCP3304 13bit ADC/Arduino MCP3304 13bit ADC.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino MCP3304 13bit ADC/Arduino MCP3304 13bit ADC.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino MCP3421 18-bit ADC with I2C/Arduino MCP3421 18-bit ADC with I2C.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino MCP3421 18-bit ADC with I2C/Arduino MCP3421 18-bit ADC with I2C.pdsprj index 41df1932bb08512790ea5f4fed3d8003982fa44b..c59beb4dc297df6dcfe3093115a4eadd6d877f75 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino MCP3421 18-bit ADC with I2C/Arduino MCP3421 18-bit ADC with I2C.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino MCP3421 18-bit ADC with I2C/Arduino MCP3421 18-bit ADC with I2C.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino MCP4921 12bit DAC/Arduino MCP4921 12bit DAC.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino MCP4921 12bit DAC/Arduino MCP4921 12bit DAC.pdsprj index 3417434d249cfbcd860bc3d461a388bdb5625a5c..b2ce9f65544884153cbae96c87b50b207cc856f5 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino MCP4921 12bit DAC/Arduino MCP4921 12bit DAC.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino MCP4921 12bit DAC/Arduino MCP4921 12bit DAC.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino MPX4250AP Pressure gauge/Arduino MPX4250AP Pressure gauge.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino MPX4250AP Pressure gauge/Arduino MPX4250AP Pressure gauge.pdsprj index ec683744cb3082c9db335f023c4afc6db6dca8a4..d8835837f776c9e9743564068b662390391bbdc0 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino MPX4250AP Pressure gauge/Arduino MPX4250AP Pressure gauge.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino MPX4250AP Pressure gauge/Arduino MPX4250AP Pressure gauge.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino Motor Shield/Arduino Motor Shield.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino Motor Shield/Arduino Motor Shield.pdsprj index bfd36aa620cc83617dc4fd2e6c037245731ce378..392086510840ef4f39586dd0558090f0e830d7b7 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino Motor Shield/Arduino Motor Shield.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino Motor Shield/Arduino Motor Shield.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino PCD8544 Nokia 5110-3310 LCD/Arduino PCD8544 Nokia 5110-3310 LCD.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino PCD8544 Nokia 5110-3310 LCD/Arduino PCD8544 Nokia 5110-3310 LCD.pdsprj index f6577ad8ce96544ab73ffcaad831c6bc2d9db3d1..8e8caf6649134a72aa4b582ac8403eb588972732 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino PCD8544 Nokia 5110-3310 LCD/Arduino PCD8544 Nokia 5110-3310 LCD.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino PCD8544 Nokia 5110-3310 LCD/Arduino PCD8544 Nokia 5110-3310 LCD.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino Reading Temperature with Thermistor/Arduino Reading Temperature with Thermistor.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino Reading Temperature with Thermistor/Arduino Reading Temperature with Thermistor.pdsprj index 831468a2e8828c89438a98ee38f36d12e54081d2..fdf39a9a27aea6efd0108bdaec3d6a5991dacbeb 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino Reading Temperature with Thermistor/Arduino Reading Temperature with Thermistor.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino Reading Temperature with Thermistor/Arduino Reading Temperature with Thermistor.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino SD Read Write/Arduino SD Read Write.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino SD Read Write/Arduino SD Read Write.pdsprj index 718587b0caa45bf3687623a122c2bdc59fc1db74..9c9961460eaa25b537c2ad8e668a1c4b06bf7015 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino SD Read Write/Arduino SD Read Write.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino SD Read Write/Arduino SD Read Write.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino SRF04 Ultrasonic Ranger/Arduino SRF04 Ultrasonic Ranger with NewPing library.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino SRF04 Ultrasonic Ranger/Arduino SRF04 Ultrasonic Ranger with NewPing library.pdsprj index f4e0d4ba11d50d48a078c5945124345bc9e96d52..87c907de1486d67483e0e34d02c3ec705d08f649 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino SRF04 Ultrasonic Ranger/Arduino SRF04 Ultrasonic Ranger with NewPing library.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino SRF04 Ultrasonic Ranger/Arduino SRF04 Ultrasonic Ranger with NewPing library.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino SRF04 Ultrasonic Ranger/Arduino SRF04 Ultrasonic Ranger.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino SRF04 Ultrasonic Ranger/Arduino SRF04 Ultrasonic Ranger.pdsprj index 6a6dfecce5629a63e35e9efdbff66db92ab36dba..56883f106bbf8f6cf65e295abe47e541f46101b3 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino SRF04 Ultrasonic Ranger/Arduino SRF04 Ultrasonic Ranger.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino SRF04 Ultrasonic Ranger/Arduino SRF04 Ultrasonic Ranger.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino ST7735R TFT LCD/tft_lcd_demo.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino ST7735R TFT LCD/tft_lcd_demo.pdsprj index c26d8d10a2ef062c629ea6259bc3b4ef4ff1423a..9656c090ab92db8ec8ee23f2c06ecca66eb8c672 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino ST7735R TFT LCD/tft_lcd_demo.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino ST7735R TFT LCD/tft_lcd_demo.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino Servo/Arduino Servo.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino Servo/Arduino Servo.pdsprj index be4332e5df00162eeecf462ea702221809ed32fe..29426cd381d40e7e4bf965bbb369edd389d44122 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino Servo/Arduino Servo.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino Servo/Arduino Servo.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino Velleman VMA203 LCD & Keypad Shield/Velleman VMA203 LCD & Keypad Shield for Arduino.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino Velleman VMA203 LCD & Keypad Shield/Velleman VMA203 LCD & Keypad Shield for Arduino.pdsprj index 4995f4bbfbea2c5d17a689c2e49c67cdebb48c8b..3821749b774788119504f8f65f2b409b447dfc96 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino Velleman VMA203 LCD & Keypad Shield/Velleman VMA203 LCD & Keypad Shield for Arduino.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino Velleman VMA203 LCD & Keypad Shield/Velleman VMA203 LCD & Keypad Shield for Arduino.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino Web Server/Arduino Web Server.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino Web Server/Arduino Web Server.pdsprj index 7b38efaf9ac0e8e529e52307dfbb1214d87c8b7c..bd96012723f2ce36a8b1d95984b73be2974a5641 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino Web Server/Arduino Web Server.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino Web Server/Arduino Web Server.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino and Adafruit DotStar LEDs/Adafruit_DotStar.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino and Adafruit DotStar LEDs/Adafruit_DotStar.pdsprj index 2f839cad84df7ad88ba74843ca8477db7e92d39a..f21e5fe3db76be7b561f8d864305d1f171209f3a 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino and Adafruit DotStar LEDs/Adafruit_DotStar.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino and Adafruit DotStar LEDs/Adafruit_DotStar.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino and Adafruit INA219 Current Sensor Breakout/Adafruit INA219 Current Sensor Breakout.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino and Adafruit INA219 Current Sensor Breakout/Adafruit INA219 Current Sensor Breakout.pdsprj index 4583896fc28a4b94ef75c3d51051dea6f383a1b1..688e4a2b00b632aa08b9c073f32780e2a7295653 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino and Adafruit INA219 Current Sensor Breakout/Adafruit INA219 Current Sensor Breakout.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino and Adafruit INA219 Current Sensor Breakout/Adafruit INA219 Current Sensor Breakout.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino and Adafruit Trellis Shield/Adafruit Trellis Shield Latching Keyboard Test .pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino and Adafruit Trellis Shield/Adafruit Trellis Shield Latching Keyboard Test .pdsprj index 8ca6fef675471bd6c988281ff2ec493182a7f7b9..f6f566dda3e7d8596d672ad171f893a9447ff1d8 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino and Adafruit Trellis Shield/Adafruit Trellis Shield Latching Keyboard Test .pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino and Adafruit Trellis Shield/Adafruit Trellis Shield Latching Keyboard Test .pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino and Adafruit Trellis Shield/Adafruit Trellis Shield Momentary Keyboard Test .pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino and Adafruit Trellis Shield/Adafruit Trellis Shield Momentary Keyboard Test .pdsprj index a595f6cb7210a64bfd7605c94c57f554bf3235b1..700cbb5729bb3e2fd2c9a517a7c880c1a61875cb 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino and Adafruit Trellis Shield/Adafruit Trellis Shield Momentary Keyboard Test .pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino and Adafruit Trellis Shield/Adafruit Trellis Shield Momentary Keyboard Test .pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino and Data Logger Shield/Arduino Data Logger Shield & DS1307.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino and Data Logger Shield/Arduino Data Logger Shield & DS1307.pdsprj index c1e9b1fda127961bcc92624d14877ab8f9b1d908..2ccfe10245dd4e5006e5b0d8e2becff32d5cc751 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino and Data Logger Shield/Arduino Data Logger Shield & DS1307.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino and Data Logger Shield/Arduino Data Logger Shield & DS1307.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino and Data Logger Shield/Arduino Data Logger Shield & sensors test.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino and Data Logger Shield/Arduino Data Logger Shield & sensors test.pdsprj index 5bf5d5636d88c90fe032acaecb5cc2660001c27e..9fa7ed05df1837349515c25be1d40a804ec2bf23 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino and Data Logger Shield/Arduino Data Logger Shield & sensors test.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino and Data Logger Shield/Arduino Data Logger Shield & sensors test.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino and Data Logger Shield/sdcard.mmc b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino and Data Logger Shield/sdcard.mmc index ff09b2ac14c3781cc8a3a58d3042d81206013d79..bdf1aede54730eb5fdf1e00bb7a8fc4714712b61 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino and Data Logger Shield/sdcard.mmc and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino and Data Logger Shield/sdcard.mmc differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino using EA DOGS102 Graphics Display Breakout Board/Arduino EA DOGS102 Graphics Display.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino using EA DOGS102 Graphics Display Breakout Board/Arduino EA DOGS102 Graphics Display.pdsprj index 19470911c745c134916ae8c131b79eeb1eee74c6..424dfba411563fa9c02f28e9d773e75abe3517e6 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino using EA DOGS102 Graphics Display Breakout Board/Arduino EA DOGS102 Graphics Display.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino using EA DOGS102 Graphics Display Breakout Board/Arduino EA DOGS102 Graphics Display.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino using MCP23008 IO Expander and Adafruit library/Arduino using MCP23008 IO Expander and Adafruit library - Button.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino using MCP23008 IO Expander and Adafruit library/Arduino using MCP23008 IO Expander and Adafruit library - Button.pdsprj index ffe1943a32aab1ece0f87e98d241e88314230c5e..d3fa7ee0123b9c5df636d0e41cc1531175d7e400 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino using MCP23008 IO Expander and Adafruit library/Arduino using MCP23008 IO Expander and Adafruit library - Button.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino using MCP23008 IO Expander and Adafruit library/Arduino using MCP23008 IO Expander and Adafruit library - Button.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino using MCP23008 IO Expander and Adafruit library/Arduino using MCP23008 IO Expander and Adafruit library - Pin0 Toggle .pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino using MCP23008 IO Expander and Adafruit library/Arduino using MCP23008 IO Expander and Adafruit library - Pin0 Toggle .pdsprj index 92a5e9eb46ff30203cbee1ef99551c2d6bedeba3..c1d70da5eac1e5ba39eaea2dba4e45b77446de18 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino using MCP23008 IO Expander and Adafruit library/Arduino using MCP23008 IO Expander and Adafruit library - Pin0 Toggle .pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino using MCP23008 IO Expander and Adafruit library/Arduino using MCP23008 IO Expander and Adafruit library - Pin0 Toggle .pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino using PCA9555 I2C Expander Breakout Board/Arduino using PCA9555 I2C Expander Breakout Board.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino using PCA9555 I2C Expander Breakout Board/Arduino using PCA9555 I2C Expander Breakout Board.pdsprj index db474980e3ae5778f0499b8c17e984e7e467d710..5a3fe4c50b55b1d2e81e316cef2425ead3d17a68 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino using PCA9555 I2C Expander Breakout Board/Arduino using PCA9555 I2C Expander Breakout Board.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino using PCA9555 I2C Expander Breakout Board/Arduino using PCA9555 I2C Expander Breakout Board.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino using Weather Station Shield/Arduino using Weather Shield.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino using Weather Station Shield/Arduino using Weather Shield.pdsprj index 37dd7f69e24f5320e3a382cce9db3eb331e23c5f..fad2c38e1f3f622a7898797983432361ebb89a7e 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino using Weather Station Shield/Arduino using Weather Shield.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino using Weather Station Shield/Arduino using Weather Shield.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino with ADS1110 16-bit ADC/ads1110_usage.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino with ADS1110 16-bit ADC/ads1110_usage.pdsprj index d980c3a90bc0efca43469d6874347c575c10a5d7..38dd48ad8a18025ce9ea394b7e5a146a3e2a5e3d 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino with ADS1110 16-bit ADC/ads1110_usage.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino with ADS1110 16-bit ADC/ads1110_usage.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino with Adafruit Motor Shield V2/Arduino with Adafruit Motor Shield V2.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino with Adafruit Motor Shield V2/Arduino with Adafruit Motor Shield V2.pdsprj index ce4fa2ca47ff660e97ec399c3af1676f88917df9..4e5456c5d90ef25387190434c1acc86fea33ed8b 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino with Adafruit Motor Shield V2/Arduino with Adafruit Motor Shield V2.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino with Adafruit Motor Shield V2/Arduino with Adafruit Motor Shield V2.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino with NAU7802/Example1_BasicReadings.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino with NAU7802/Example1_BasicReadings.pdsprj index 3f7fe313a3d69fa83a5317afa97eea0b78ecab86..9c8a852feee96e4a7b2fa77d3c9be1e7e1dff620 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino with NAU7802/Example1_BasicReadings.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino with NAU7802/Example1_BasicReadings.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino with NAU7802/Example2_CompleteScale.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino with NAU7802/Example2_CompleteScale.pdsprj index 7de183b90a1ffad4c04f97880f60e534863b4d3c..af3b2f2bad291d8006499567034ff1c9220821bb 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino with NAU7802/Example2_CompleteScale.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino with NAU7802/Example2_CompleteScale.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino with NAU7802/Example3_Gain_SampleRate.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino with NAU7802/Example3_Gain_SampleRate.pdsprj index f4ee4cd52c8aac6a0bea96f479ccb9812675120f..6246aeea11ca004663b58b191e567fd0a9ba8f97 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino with NAU7802/Example3_Gain_SampleRate.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino with NAU7802/Example3_Gain_SampleRate.pdsprj differ diff --git a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino with adc128s102/Arduino with ADC128S102.pdsprj b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino with adc128s102/Arduino with ADC128S102.pdsprj index a63619c29e5b749acd007a69d659a6ad0a48620c..c2ca1113004c102019bbb8db682293b9992b9ad3 100644 Binary files a/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino with adc128s102/Arduino with ADC128S102.pdsprj and b/Proteus 8 Professional/DATA/SAMPLES/VSM for AVR/Arduino with adc128s102/Arduino with ADC128S102.pdsprj differ