3 1. Introduction This application note helps users to develop products using AVR2025 TAL component (Transceiver Abstraction Layer) and AVR2025 IEEE MAC component available in ASF (Atmel software package). ATmega256RFR2, XMEGA A3/A3U and SAM4L devices are used as platforms for achieving the same. Chapter 2 in this document explains on how to create an ASF project template for the user board. Chapter 3 in this document explains on how to add TAL Layer to the project and create an application on top of TAL layer. Chapter 4 explains on how to add IEEE MAC package to the project and configure it for the user board. Chapter 5 explains on how to add other peripheral drivers to the board and Chapter 6 explain on how to create an application using IEEE MAC package. As an example application a simple wireless sensor network using IEEE MAC package and display result on WSN Monitor available as part of our BitCloud SDK for download. 1.1 Icon Key Identifiers Delivers contextual information about a specific topic. Highlights useful tips and techniques. Highlights objectives to be completed. Highlights the expected result of an assignment step. Indicates important information. Highlights actions to be executed out of the target when necessary. 3

4 2. Creating the ASF User Board This chapter describes how to create a user board in Atmel Studio and configure the board. This helps the user to add the drivers and other module to the project using ASF wizard thereby saving the development time. The User Board is an empty board abstraction layer used to create user specific/custom board. 2.1 Creating User Board for ATmega256RFR2 Device In this section we will explain how to configure User Board ATmega256RFR2 where Port B pin 4 and 5 are connected to LED s, Port E pin 4 connected to push button and USART0 connected to PC. Create a new project from the User Board template. Open Atmel Studio On the Start Page, click on the New project icon or on File > New > Project Figure 2-1. Atmel Studio Click on User Boards and select User Board ATmega256RFR2 in the template list as shown in Figure 2-2 4

6 In ASF wizard page, select the project name from the project tab In Available Modules pane, select Extensions as Atmel ASF (3.11.0) or above. Now we will add IOPORT drier and clock driver in the project Type System Clock Control in the ASF Wizard Search box Select System Clock Control (service), add it to the selected component by clicking add button as shown in Figure 2-5 Type IOPORT - General purpose I/O service in the ASF Wizard Search box Select IOPORT - General purpose I/O service, add it to the selected component by clicking add button as shown in Figure 2-5 Figure 2-5. ASF Wizard Click on Apply button In Solution Explorer tab, open src ASF common boards user_board init.c as shown in Figure 2-6 6

7 Figure 2-6. Solution Explorer Tab The void board_init(void) function is used to add the board specific initialization. In this function we will initialize the I/O port pins In the demo board, Port B pin 4 and 5 are connected to LED s, so we will initialize the LED s as output pin as shown below Figure 2-7. Board Initialization void board_init(void) /* This function is meant to contain board specific initialization code * for, e.g., the I/O pins. The initialization can rely on application * specific board configuration, found in conf_board.h. /* On board LED initialization ioport_configure_pin(led0, IOPORT_DIR_OUTPUT IOPORT_INIT_HIGH); ioport_configure_pin(led1, IOPORT_DIR_OUTPUT IOPORT_INIT_HIGH); /* On board Switch initialization ioport_configure_pin(gpio_push_button_0,ioport_dir_input IOPORT_PULL_UP); In Solution Explorer tab, open src config conf_board.h and conf_clock.h file as shown in Figure 2-8 7

10 Figure New Project Tab Choose a Name for your Solution (for example: MAC_XMEGA ) and click on OK In Device selection tab, select device as ATxmega256A3, ATxmega256A3B or ATxmega256A3BU and click OK Click on the ASF Wizard icon or ASF ASF Wizard (Alt +W) Wait while ASF Wizard is being loaded In ASF wizard page, select the project name from the project tab In Available Modules pane, select Extensions as Atmel ASF (3.11.0) or above. Now we will add IOPORT driver and clock driver in the project Type System Clock Control in the ASF Wizard Search box Select System Clock Control (service), add it to the selected component by clicking add button as shown in Figure 2-5 Type IOPORT - General purpose I/O service in the ASF Wizard Search box Select IOPORT - General purpose I/O service, add it to the selected component by clicking add button as shown in Figure 2-5 Click on Apply button In Solution Explorer tab, open src ASF common boards user_board init.c as shown in Figure 2-6 The void board_init(void) function is used to add the board specific initialization. In this function we will initialize the IO port pins, UART and the AT86RF Transceiver pins In the demo board, Port D pin 4 and 5 are connected to LED s, so we will initialize the LED s as output pins as shown in Figure

14 Figure New Project Tab Choose a name for your solution (for example: MAC_SAM4L ) and click on OK Click on the ASF Wizard icon or ASF ASF Wizard (Alt +W) Wait while ASF Wizard is being loaded In ASF wizard page, select the project name from the project tab In Available Modules pane, select Extensions as Atmel ASF (3.11.0) or above. Now we will add IOPORT driver and clock driver in the project Type System Clock Control in the ASF Wizard Search box Select System Clock Control (service), add it to the selected component by clicking the Add button as shown in Figure 2-5 Type IOPORT - General purpose I/O service in the ASF Wizard Search box Select IOPORT - General purpose I/O service, add it to the selected component by clicking the Add button as shown in Figure 2-5 Click the Apply button In Solution Explorer tab, open src ASF common boards user_board init.c as shown in Figure 2-6 The void board_init(void) function is used to add the board specific initialization. In this function we will initialize the I/O port pins, UART and the AT86RF Transceiver pins In the demo board, PC10 is connected to LED, so we will initialize the LED s as output pins as shown in Figure 2-17 The pin PC03 is connected to push button, so will initialize the pin as input pin as shown in Figure

18 3. Creating a TAL Project The Transceiver Abstraction Layer (TAL) contains the transceiver specific functionality used for the MAC. The TAL layer provides an interface to MAC core layer which is independent of the underlying transceiver. The TAL API on top of the Platform Abstraction Layer (PAL) can be used to create a basic application without adding the MAC Core Layer (MCL). This chapter explains how to add the TAL component to the project, configuring the TAL and PAL layer and to create a simple application on top of TAL layer. 3.1 Create a New Project from the User Board Template Create a new project from the User Board template and configure the board. Create a new project from User Board template and configure the board as mentioned in Chapter 2 Creating the ASF User Board 3.2 Adding TAL Component to the Project Adding AVR2025 TAL (component) to the project. Click on the ASF Wizard icon or ASF ASF Wizard (Alt + W) Wait while ASF Wizard is being loaded In ASF wizard tab, select the project as shown in Figure 3-1 In Available Modules pane, select Extensions as Atmel ASF (3.11.0) or above. Now we will add AVR2025 TAL (component) in the project Type AVR2025 TAL (component) in the ASF Wizard Search box Select AVR2025 TAL (component), add it to the selected component by clicking add button as shown in Figure 3-1 For the device SOC device (e.g.: ATmega256RFR2), the TAL layer is automatically included as shown in Figure 3-1. For other devices the transceiver need to be selected in TAL Configuration driver tab as shown in Figure

19 Figure 3-1. ASF Wizard For MCU + AT86RFX transceiver configuration, expand AVR2025 TAL (component) and External Transceiver driver as shown in Figure 3-2 In TAL Configuration driver tab, select the transceiver device as shown in Figure 3-2 Figure 3-2. ASF Wizard Click the Apply button. Now the TAL layer is configured for selected transceiver Atmel Software Framework summary window may pop-up as shown in Figure 3-3, click ok to continue. To view the list of files added click on the summary. This pop-up can be disabled by checking the Do not show this dialogue again tab 19

20 Figure 3-3. ASF Summary of Options Accept the license agreements to continue 3.3 Configuring the PAL Layer Board, Clock, IOPORT and TAL layer has been added and configured in the project. Now the PAL Layer needs to be configured to work with TAL layer In Solution Explorer tab, open the conf_pal.h file by double clicking on it. This file is the configuration file for PAL layer Delete the warning message: #warning "Using default values. Edit this conf_pal.h file to modify define value according to the current board." The conf_pal.h file has build switch for the device family (e.g. SAM, XMEGA, etc). The PAL layer needs to be configured under the respective build switch For SOC devices, the TAL layer is already configured and there is no build switch for the same. Modify the SPI pin configuration as per the hardware In XMEGA demo board, SPIC is connected to AT86RFX transceiver with chip select connected to PORTC Pin 4, Sleep pin connected to PORTC Pin 3, IRQ pin connected to PORTC Pin 2 and Reset Pin connected to PORTC Pin 0. Modify the macros as shown in Figure 3-4 In SAM4L demo board, SPI peripheral in SAM4L is connected to AT86RFX transceiver with Chip select 0 (CS0) connected to pin PA02, Sleep pin connected to pin PA07, IRQ pin connected to pin PC02 and Reset Pin connected to pin PB00. Modify the macros as shown in Figure 3-4 under the respective device family build switch Figure 3-4. PAL Layer Configuration #ifndef CONF_PAL_H_INCLUDED #define CONF_PAL_H_INCLUDED #include <parts.h> #if (UC3) #include "gpio.h" /*! \name SPI Configuration for AT86RFX transceiver in UC3 #define AT86RFX_SPI (&AVR32_SPI0) #define AT86RFX_SPI_NPCS 0 #define AT86RFX_SPI_SCK_PIN AVR32_SPI0_SCK_0_0_PIN #define AT86RFX_SPI_SCK_FUNCTION AVR32_SPI0_SCK_0_0_FUNCTION #define AT86RFX_SPI_MISO_PIN AVR32_SPI0_MISO_0_0_PIN 20

23 #define ENTER_TRX_REGION() NVIC_DisableIRQ(GPIO_8_IRQn) /* * This macro restores the transceiver interrupt status #define LEAVE_TRX_REGION() NVIC_EnableIRQ(GPIO_8_IRQn) #define AT86RFX_SPI_BAUDRATE ( ) #endif /* SAM #endif /* CONF_PAL_H_INCLUDED SAM4L device has four (0, 1, 2, and 3) Chip Select (CS) lines for SPI peripheral. In the file init.c, the line ioport_set_pin_peripheral_mode (PIN_PA02B_SPI_NPCS0, MUX_PA02B_SPI_NPCS0); will enable pin PA02 as Chip Select 0 for the SPI. In the macro AT86RFX_SPI_CS, we will define it as 0 to inform the stack that Chip Select 0 is used. In Solution Explorer tab, open the conf_common_sw_timer.h. This file is the configuration file for the software timer The macro TOTAL_NUMBER_OF_TIMERS is defined in the header file app_config.h. So in conf_common_sw_timer.h file replace the macro TOTAL_NUMBER_OF_TIMERS as shown in Figure 3-5. Include the header file "app_config.h" Note that the total number of software timers used in the application is defined in the macro TOTAL_NUMBER_OF_SW_TIMERS Figure 3-5. Configuration for Common Software Timer #ifndef CONF_COMMON_SW_TIMER_H_INCLUDED #define CONF_COMMON_SW_TIMER_H_INCLUDED #include "app_config.h" /*! \name Configuration #define TOTAL_NUMBER_OF_SW_TIMERS TOTAL_NUMBER_OF_TIMERS #endif /* CONF_COMMON_SW_TIMER_H_INCLUDED In Solution Explorer tab, open the header file app_config.h Set the macro NUMBER_OF_APP_TIMERS to the number of software timers that is used in the application. For example if the number software application timer used is 2, then define the NUMBER_OF_APP_TIMERS to 2 There is a known issue in AT86RF233 Tal Layer implementation of ASF v3.12. AT86RF233 TAL Layer uses a software timer internally but TOTAL_NUMBER_OF_TIMERS will be zero if NUMBER_OF_APP_TIMERS is set to 0 and will result in compilation error. As a workaround, NUMBER_OF_APP_TIMERS should have a minimum value of 1 even though the application uses no software timers. 23

24 Figure 3-6. Application Configuration #ifndef APP_CONFIG_H #define APP_CONFIG_H /* === Includes ============================================================= #include "stack_config.h" /* === Macros =============================================================== /** Defines the number of timers used by the application. #define NUMBER_OF_APP_TIMERS (0) #if (!defined TOTAL_NUMBER_OF_TIMERS) /** Defines the total number of timers used by the application and the layers below. #define TOTAL_NUMBER_OF_TIMERS (NUMBER_OF_APP_TIMERS + NUMBER_OF_TOTAL_STACK_TIMERS) #endif //(!define TOTAL_NUMBER_OF_TIMERS) At this point all the peripheral interfaces that were necessary are configured. Make sure to save all the files that has been edited (you can press Ctrl + shift + s) Now all the config files are configured. The stack need to be informed that the highest stack layer used is TAL layer, this can be done by setting the build switch HIGHEST_STACK_LAYER to TAL as follows Open Project Properties page by right clicking the Project in solution explorer tab and select properties as shown in the Figure 3-7 Figure 3-7. Solution Explorer Click on Toolchain and select AVR/GNU C Compiler for mega / XMEGA / UC3 devices or ARM /GNU C Compiler for SAM devices Click on Symbols tab Click on Add Item icon in Defined Symbols tab 24

25 Figure 3-8. Add Defined Symbols Tab Similarly the build switch ENABLE_TSTAMP can be added if the application requires capturing the time when an event is occurred Click on the Build : to compile your project. The project should build without errors, but there could be a number of warnings. See the following information point: Third party ASF components 3.4 Creating Simple TAL Application The component is one of the ASF components of the category Third Party. These are software modules that have been ported to ASF, e.g. an existing module has been modified so that it can be used with the rest of ASF. However, these modules cannot be expected to follow the same standard as native ASF modules. For example, this means that when building a project that includes a 3 rd party ASF module, the compiler could raise a number of warnings. The major functionality of TAL layer is to provide an interface to the MAC core layer independent of the underlying transceiver. It is also possible to create application on top of TAL layer. The TAL API on top of the Platform Abstraction Layer (PAL) can be used to create a basic application without adding the MAC Core Layer (MCL). This section will explain how to create a simple application on top of TAL layer. For this we will create a simple application, on top of TAL layer, that will transmit a packet when the push button is pressed. The receiver board will toggle a LED when the packet is received. After creating the project for User Board and configuring the Board, Clock, TAL & PAL layer. Open the main.c file Include the header files as shown in Figure 3-9. These header files are required for creating the above said application Figure 3-9. Header Files #include <asf.h> #include <string.h> #include "tal.h" #include "tal_helper.h" #include "tal_internal.h" #include "common_sw_timer.h" #include "ieee_const.h" #include "tal_constants.h" #include "compiler.h" Define the macros as shown in Figure

26 Figure Macro Configuration #define DEBOUNCE_DELAY_MS (200) #define DEFAULT_CHANNEL CCPU_ENDIAN_TO_LE16(21) #define FRAME_CONTROL_FIELD CCPU_ENDIAN_TO_LE16(0x8001) #define DEFAULT_PAN_ID CCPU_ENDIAN_TO_LE16(0xCAFE) #define SOURCE_ADDRESS CCPU_ENDIAN_TO_LE16(0xBABE) The macro DEBOUNCE_DELAY_MS is used to define the delay required for checking the push button debouncing The macro DEFAULT_CHANNEL is used to define the channel IEEE defined channel The macro FRAME_CONTROL_FIELD is used to define Frame Control field defined by IEEE The format of Frame Control field is shown in Table 3-1 Table 3-1. Frame Control Field Bits Source Addressing Mode Frame Version Dest Addressing Mode Reserved PAN ID Compression Ack Requested Frame Pending Security Enabled Frame Type The macro DEFAULT_PAN_ID is used to define the PAN ID of the network The macro SOURCE_ADDRESS is used to define the address of the node Now we will define the structure of the frame that needs to be transmitted. For this define a structure app_frame_t as shown in Figure 3-11 Figure Application Frame Structure typedef struct uint8_t phr; /**< PHY header (frame length field). uint16_t fcf; /**< Frame control field uint8_t seq; /**< Frame sequence number. uint16_t span; /**< source PAN identifier uint16_t saddr; /**< source address char data[5]; /**< Frame payload uint16_t crc; /**< CRC16 field of the frame. app_frame_t; Initialize the following variable as shown in Figure 3-12 Figure Variable Initialization bool tx_ready_flag = 1; static uint8_t seq_num = 0; frame_info_t tx_frame_info; app_frame_t tx_frame, rx_frame; uint8_t msg[5] = "Hello"; tx_ready_flag is used to indicate the status of packet transmission seq_num hold the sequence number of the frame tx_frame_info hold the transmit frame structure used by the TAL layer tx_frame and rx_frame holds the transmitted and received frame data msg array hold the data that is to be transmitted In the main function, initialize the irq vector, clock, board, software timer, and tal_layer as shown in Figure

34 4. Creating a MAC Project The MAC software package follows a layered approach based on several stack modules and applications. The stack modules are: Platform Abstraction Layer (PAL) Transceiver Abstraction Layer (TAL) and Transceiver Feature Access (TFA) MAC including MAC Core Layer and MAC-API Security Abstraction Layer (SAL) and Security Toolbox (STB) Resource Management including Buffer and Queue Management (BMM and QMM) For a complete description of the API of each layer and component refer the Atmel AVR2025: IEEE MAC Software Package User Guide [1] The Platform Abstraction Layer (PAL) contains wrapper functions, which provides a seamless interface between the MAC software and ASF-PAL modules. To configure the Atmel MAC Software package for customer board, the PAL layer needs to be configured as per the hardware configuration. This chapter will explain how to configure Atmel MAC Software package for customer board using the ASF Wizard in Atmel Studio. This chapter will also explain how to configure the Atmel MAC Software Package for the user board. After port the MAC package to the user board, the later section will explain how to run the MAC example project in User board. 4.1 Create a New Project from the User Board Template Create a new project from the User Board template and configure the board. Create a new project from User Board template and configure the board as mentioned in the Chapter 2 Creating the ASF User Board 4.2 Adding IEEE MAC Component to the Project Adding AVR2025 IEEE MAC (component) to the project. Click on the ASF Wizard icon or ASF ASF Wizard (Alt + W) Wait while ASF Wizard is being loaded In ASF wizard tab, select the project as shown in Figure 4-1 In Available Modules pane, select Extensions as Atmel ASF (3.11.0) or above. Now we will add AVR2025 IEEE (component) in the project Type AVR2025 IEEE in the ASF Wizard Search box Select AVR2025 IEEE MAC (component). Add it to the selected component by clicking the Add button In Selected Modules AVR 2025 IEEE MAC Stack (component), the MAC layer needs to be configured as follows To include IEEE MAC source file into the project, Select source in the AVR 2025 IEEE MAC Stack (component). To include the user callback function into the project, select yes in the MAC API Configuration (driver). For the device ATmega256RFR2, the TAL layer is automatically included as shown in Figure 4-1. For other devices the transceiver need to be selected in TAL Configuration driver tab as shown in Figure 4-2 or as described in Section 3.2 Adding TAL Component to the Project 34

36 Figure 4-2. ASF Wizard Click the Apply button Atmel Software Framework summary window may pop-up as shown in Figure 4-5, click OK to continue. To view the list of files added, click the Summary Figure 4-3. ASF Summary of Operations Accept the license agreements to continue To enable serial communication between the node and the Host (PC), the Serial I/O Host needs to be added to the project. This can be done as described in Section 4.3 Add Serial I/O Host (Component) 36

37 4.3 Add Serial I/O Host (Component) Adding Serial I/O Host to the project. Type Serial I/O - Host in the ASF Wizard Search box Select Serial I/O Host (component), add it to the selected component by clicking add button In Selected Modules Serial I/O Host (component), select uart from the dropdown menu as shown in Figure 4-4 If the device supports USB, then USB can also be selected to print the result on PC Figure 4-4. ASF Wizard Click the Apply button The Atmel MAC Software package and Serial I/O Host is loaded into your project now, but the PAL layer is not configured to work with the device Configure the PAL layer. Configure the PAL layer as described in Section 3.3 for the device family Configure the Serial I/O Host. In Solution Explorer tab, expand the config folder and open the conf_sio2host.h file by double clicking on it. This file is the configuration file for Serial I/O Host (component) Delete the warning message: #warning "Using a default value. Edit this conf_sio2host.h file to modify that define value according to the current board." In ATmega256RFR2 Demo Board, UART0 is connected to the PC using RS232 level shifter. This COM port is used to print the results into Terminal program 37

R ANGE TEST APPLICATION FOR EZRADIO AND EZRADIOPRO 1. Introduction The range evaluation demo provides an easy way to evaluate the link budget of EZRadio and EZRadioPRO devices by performing a range test

SKP16C62P Tutorial 1 Software Development Process using HEW Renesas Technology America Inc. 1 Overview The following tutorial is a brief introduction on how to develop and debug programs using HEW (Highperformance

Section 1 Introduction to the AT91SAMD20 and the Development Environment Tasks In this section you will learn: The basics of the core you will be working on AT91SAMD20 and its features The basics of the

April 2014 7 Serial Communications Objectives - To be familiar with the USART (RS-232) protocol. - To be able to transfer data from PIC-PC, PC-PIC and PIC-PIC. - To test serial communications with virtual

USER GUIDE EDBG Description The Atmel Embedded Debugger (EDBG) is an onboard debugger for integration into development kits with Atmel MCUs. In addition to programming and debugging support through Atmel

Lab Workbook Introduction This lab guides you through the process of using Vivado and IP Integrator to create a simple ARM Cortex-A9 based processor design targeting either the ZedBoard or the Zybo development

User Configuration Guide The ECB2500 is shipped with factory default configuration that works without any additional parameter changes. However, if a network security password is required or if a specific

APPLICATION NOTE M16C/26 1.0 Abstract The following article describes using a synchronous serial port and the FoUSB (Flash-over-USB ) Programmer application to program the user flash memory of the M16C/26

USER GUIDE ZigBit USB Stick User Guide Introduction This user guide describes how to get started with the Atmel ZigBit USB sticks. The ZigBit USB sticks is targeted for evaluating the USB features of the

Getting Started with C Programming for the ATMEL AVR Microcontrollers By Son Lam Phung Version 2.0 Latest version of this document is available at: http://www.elec.uow.edu.au/avr Son Lam Phung, 2008-2015.

Learning Objectives: Interfacing a Servo to the ATmega16 After successfully completing this lab, students will be able to: Desribe how a radio control (RC) servo works Interface a RC servo to a microcontroller

Configuring Ports and Port Channels This chapter includes the following sections: Server and Uplink Ports on the 6100 Series Fabric Interconnect, page 1 Unified Ports on the 6200 Series Fabric Interconnect,

User manual Developing and debugging your STM8S-DISCOVERY application code Introduction This document complements the information in the STM8S datasheets by describing the software environment and development

Develop a Dallas 1-Wire Master Using the Z8F1680 Series of MCUs AN033101-0412 Abstract This describes how to interface the Dallas 1-Wire bus with Zilog s Z8F1680 Series of MCUs as master devices. The Z8F0880,

ATMega Development Board Manual V1.0 ATMega Development Board.doc Page 1/9 Introduction Development boards allow a quick implementation of a prototype design and successive downloads of the program directly

An Introduction to MPLAB Integrated Development Environment 2004 Microchip Technology Incorporated An introduction to MPLAB Integrated Development Environment Slide 1 This seminar is an introduction to

A comprehensive guide to programming & flashing the R-IoT wifi sensor module The R-IoT module is based upon the CC3200 chip from Texas Instrument. Its core feature is to be compatible with Energia, a branch

CpE 487 Digital Design Lab Lab 1: Seven Segment Decoder 1. Getting Started The purpose of this lab is to introduce you to the NEXYS2 FPGA development board and a software environment that will allow you

Ethernet Core Module 100 Version Key Points Use as a high-performance single board computer or add Ethernet connectivity to a new or existing design DATASHEET Customize with a development kit and begin

WA Manager Alarming System Management Software Windows 98, NT, XP, 2000 User Guide Version 2.1, 4/2010 Disclaimer While every effort has been made to ensure that the information in this guide is accurate

Using Motorola s HCS12 Serial Monitor on Wytec s Dragon-12 boards Wytec s Dragon-12 development boards are pre-installed with DBug-12, a small monitor program which allows a user to interact with the board

The USART is used for synchronous and asynchronous serial communication. USART = Universal Synchronous/Asynchronous Receiver Transmitter Our focus will be on asynchronous serial communication. Asynchronous

Hello, and welcome to this presentation of the STM32 Universal Synchronous/Asynchronous Receiver/Transmitter Interface. It covers the main features of this USART interface, which is widely used for serial

C++ project using Arduino.cc core and AVR Studio The following tutorial requires Arduino 022 (version 1.0 and higher are currently not supported) and AVR Studio 4 (AVR Studio 5 and higher are currently

ebus Player Quick Start Guide This guide provides you with the information you need to efficiently set up and start using the ebus Player software application to control your GigE Vision or USB3 Vision

SubCue Analyzer Software - Introduction The SubCue Analyzer is a tool to initialize and download the temperature data from implantable SubCue Dataloggers. To begin, open the SubCue Analyzer program from

GPIO with ATmega328 (Arduino board) This is pin configuration for the ATmega328 in PDIP28 package, which is used in Arduino Uno. The I/O pins are organized to ports. Ports are named port B, port C, etc.

AVR303: SPI-UART Gateway Features Communicate with a SPI slave device using a RS232 terminal SPI Modes 0 3, bit order and slave select (SS) is supported SPI clock frequency 28kHz to 1.8MHz when using a