Atmel Studio 7.0 Quick Start Guide (based on ASF)

Just recently, Atmel has finally launched a new version of IDE-Atmel Studio 7.0, which uses Microsoft's latest Visual Studio 2015 platform, which is reflected in speed, performance and code visual style It's so detailed, it's very easy to use, the following will combine the examples to introduceAtmelHow to use Studio 7.0.  

Step 1: Open Atmel Studio 7.0


Step 2: New construction project





Step 3: Select the chip model




Step 4: AddASFDriver library
 


Step 5: View ASF driver instructions
 


Step 6: Write the code
 
 
Source code:

#include <asf.h> // Include Atmel MCU software library header file

#define LED PIN_PC27 // Define the IO port used by LED as PC27
#define KEY PIN_PC01 // Define the IO port used by KEY as PC01

void port_init (void); // Declare the function body


        /************************************************************************/
// * IO initialization Initialization
        /************************************************************************/
        void port_init(void)
        {
                struct port_config config_port_pin;
                port_get_config_defaults(&config_port_pin);
                
config_port_pin.direction = PORT_PIN_DIR_OUTPUT; // Configure IO port direction as output
port_pin_set_config (LED, & config_port_pin); // Initialize LED corresponding IO port
                
config_port_pin.direction = PORT_PIN_DIR_INPUT; // Configure IO port direction as input
config_port_pin.input_pull = PORT_PIN_PULL_UP; // Configure IO port pull-up
                
port_pin_set_config (KEY, & config_port_pin); // Initialize the KEY corresponding to the IO port
                
        }

        /************************************************************************/
// * Main program
        /************************************************************************/

        int main (void)
        {
System_init (); // System initialization
                
                /* Insert application code here, after the board has been initialized. */
port_init (); // IO initialization
                
                while(1)
                {
If (port_pin_get_input_level (KEY) == 0) // Press KEY, LED corresponds to IO level = 0
                        {
                                port_pin_set_output_level(LED, 0);
                        }
                        else
                        {
                                port_pin_set_output_level(LED, 1);
                        }
                }
                
        }
  

Step 7: Compile and produce the burned file



Step 8: Burn the file to the development board
 
 

Package download and installation instructions:http://atmel.eefocus.com/module/forum/thread-4617-1-1.html

 

For more Atmel and technology information, please pay attention to:
Atmel Chinese official website:http://www.atmel.com/zh/cn/
Atmel Technical Forum:http://atmel.eefocus.com/
Atmel Chinese blog:
Atmel Sina Weibo:

Intelligent Recommendation

Keras Quick Start Guide

Keras module structure       3. Use Keras to build a neural network   4. Main concepts 1) Symbol calculation Keras' underlying libraries use Theano or TensorFlow, which are also kn...

Docker Quick Start Guide

Original address:haifeiWu and his friends' blog blog address:www.hchstudio.cn Welcome to reprint, please indicate the author and source, please thank! Docker I have been listening to his name for a lo...

MobX Quick Start Guide [ ]

Derivations, Actions, and Reactions Computed properties (alson known as derivations) and their various options Actions, with special focus on async actions Reactions and the rules governing when MobX ...

MobX Quick Start Guide [on]

Introduction to State Management What is the client state? The side effect model A speed tour of MobX The client state In short, it is the data that takes on a pivotal role in describing the UI. Handl...

H5py quick start guide

H5py is a module used by the Python language to manipulate HDF5. The following article focuses on h5py's quick start guide, translated from the official documentation of h5py: http://docs.h5py.org/en/...

More Recommendation

Virtualenv Quick Start Guide

                       1. virtualenv overview   virtualenv Resolve dependencies, versions,...

NumPy Quick Start Guide

NumPy (Numerical Python) is an extension library for the Python language. Supports a large number of advanced dimensional arrays and matrix operations, and also provides a large library of mathematica...

Solrcloud quick start guide

Previously, elasticsearch was used for indexing, but in some cases solr has to be used in some cases. For example, use such a wildcard to retrieve information: *world to match helloworld. This is not ...

Macbook Quick Start Guide

Partially transferred from Weifeng Video tutorial:Soku network First, Apple OS X operating system introduction: The original Mac operating system is a graphical interface that appears earlier than Win...

"Spark Guide", a quick start

This article mainly translates tolinkAnd not limited to the content of the article, but also joined the author's practical content, the translation level is limited, please correct me, please indicate...

Copyright  DMCA © 2018-2026 - All Rights Reserved - www.programmersought.com  User Notice

Top