5
 2014 B A .   ED. B :   328:  28 A8/48/88/168/328   24/44/84:  14 A20/24/44/84/441/841   25/45/85:  8 A13/25/45/85 B 328 :  A FD : A A  E C . : A 2.1 (DC, 9) . : A 5 3.3 . ** : C FD B . . ** : G . : C . **B 328 B A D E, A, A A DE. A , , B . . A . , A .

130581 T-Board Getting Started

Embed Size (px)

Citation preview

  • 2014

    Getting Started with the TGetting Started with the TGetting Started with the TGetting Started with the T----BoardBoardBoardBoard The T-Board modules were designed to speed up your AVR prototyping. This guide will show you

    just how quickly you can get up and running with the Hello World for microcontrollers a blinking

    LED.

    Variants There are three T-Board variants:

    T-Board 328: a 28-pin version supporting ATmega8/48/88/168/328 microcontrollers

    T-Board 24/44/84: a 14-pin version supporting ATtiny20/24/44/84/441/841

    microcontrollers

    T-Board 25/45/85: an 8-pin version supporting ATtiny13/25/45/85 microcontrollers

    The T-Board 328 has two features not supported by the other variants:

    An FTDI connection: The ATtiny microcontrollers dont have a hardware UART

    External Crystal header pins for an optional crystal

    Module Layout and Function

    A. Power Connector: A standard 2.1mm centre-positive jack (DC,

    max 9V)

    B. Voltage Selection Jumper: Allows the microcontroller to

    operate at either 5V or 3.3V

    C. **FTDI Connector: Connect an FTDI breakout board for Serial

    communication over USB

    D. Reset switch

    E. **Crystal header pins: Gives you the option of connecting an

    external crystal

    F. ICSP Connector: Connect an ISP programmer to program the

    microcontroller

    G. Power LED

    **T-Board 328 only

    What Software Should I Use? The T-Board works with all AVR Integrated Development Environments, including WinAVR, Atmel

    Studio and the Arduino IDE. We recommend Atmel Studio as it is simple to use, has advanced

    debugging functionality, and supports the T-Board without any additional configuration. It does

    however require Microsoft Windows.

    If you dont already have Atmel Studio installed then youll need to download and install it.

    Installation is straightforward, and covered on the Atmel website.

  • 2014

    Hello World Blink For the Hello World project you will need:

    1. 1 x T-Board

    2. 1 x Breadboard

    3. 1 x LED

    4. 1 x Resistor (matched to the LED)

    5. 1 x jumper wire

    6. 1 x ISP Programmer

    Step 1: Setup the Breadboard

    1. Place the T-Board on the breadboard

    2. Move the Voltage Selection jumper to the 5V position

    3. Connect the jumper wire between GND and the negative power rail

    4. Connect the resistor between an empty row on the breadboard and

    a. PB0on the T-Board 328

    b. PA5 on the T-Board 24/44/84

    c. PB4 on the T-Board 25/45/85

    5. Connect the anode of the LED to the resistor and the cathode to the negative power rail

    Step 2: Write the Program

    1. Create a new project in Atmel Studio:

    a. Click the File menu, then New, then Project

    b. Choose GCC C Executable Project, give the project a name, choose where to save it

    and click OK.

  • 2014

    c. Choose the correct device:

    T-Board 328: ATmega328P

    T-Board 24/44/84: ATtiny 84

    T-Board 25/45/85: ATtiny 85

    2. Type the following code into Atmel Studio

  • 2014

    /* * T_Board_Blink.c * * Created: 24/05/2014 11:54:26 * Author: Andrew Retallack, Crash-Bang Prototyping * */ #define F_CPU 16000000UL //We are running at 16MHz. Used to time the delay #include #include int main(void) { //Configure the LED port DDRB |= (1

  • 2014

    9. If you like you can now disconnect the T-Board from the ISP programmer, and connect it to a

    9V battery to operate in stand-alone mode.

    Using the FTDI Connector By connecting an FTDI breakout board or

    cable, youre able to communicate with your

    computer using the serial protocol.

    The T-Board was designed to work with

    Sparkfuns Basic FTDI breakout board, but can

    be used with any (including the Elektor FT232R

    USB/Serial Bridge) - just ensure the correct

    pins are connected.

    You can also use the FTDI breakout board to

    program your T-Board, however this requires a

    bootloader on your microcontroller. This is a

    great way to program your board if youre using the Arduino IDE.

    Additional Resources Atmel Studio Documentation: http://www.atmel.no/webdoc/atmelstudio/index.html

    Atmel Programmer: http://www.atmel.com/tools/AVRISPMKII.aspx

    USBTiny Programmer: https://learn.adafruit.com/usbtinyisp or

    https://www.sparkfun.com/products/9825

    Using Atmel Studio with a USBTiny Programmer: http://www.crash-bang.com/getting-started-

    atmel-studio/

    Atmel In-System Debuggers:

    http://www.atmel.com/microsite/atmel_studio6/debugging_simulation.aspx

    Sparkfuns FTDI Breakout: https://www.sparkfun.com/products/9716

    Arduino IDE: http://arduino.cc/en/Main/Software

    Atmel Studio: http://www.atmel.com/tools/ATMELSTUDIO.aspx