Thinklabs UNIBOARD V1.1 User Manual

Table of Contents

Advertisement

T
LABS
HINK
Open platform for Embedded and Real Time Systems Programming
Open platform for Embedded and Real Time Systems Programming
Open platform for Embedded and Real Time Systems Programming
N
B
1.1 U
U
I
OARD V
OARD V
Licensed by:
TRI Technosolutions Pvt. Ltd.
TRI Technosolutions Pvt. Ltd.
G
SER
UIDE
4/7/2009
|

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the UNIBOARD V1.1 and is the answer not in the manual?

Questions and answers

Summary of Contents for Thinklabs UNIBOARD V1.1

  • Page 1 4/7/2009 1.1 U LABS OARD V OARD V UIDE HINK Licensed by: Open platform for Embedded and Real Time Systems Programming Open platform for Embedded and Real Time Systems Programming Open platform for Embedded and Real Time Systems Programming TRI Technosolutions Pvt. Ltd. TRI Technosolutions Pvt.
  • Page 2: Table Of Contents

    ThinkLABS Table of Contents Introduction ................................ 5 Package Contents ..............................6 Testing the Board ..............................7 Testing the Board on Windows OS ..........................7 Testing the Board on Linux OS ............................ 11 What you need for programming the Board ......................12 Hardware requirements ..............................
  • Page 3 ThinkLABS Software Installations ............................22 Software Installations for Linux OS ..........................22 Text Editor (Gedit Editor) ............................22 Installing Gedit Editor: ............................22 Gedit Editor Plug-in (Embedded Terminal): ......................24 Compiler (avr-gcc) ..............................29 avr-libc (Standard C library for Atmel AVR development) : ..................31 avrdude (software for programming Atmel AVR microcontrollers): ..............
  • Page 4 What you can do with the uNiBoard ......................... 114 Add-ons ................................118 SD/MMC card Interface ............................118 Ethernet Interface ..............................118 uNiBoard v1.1 Schematic ..........................119 Controller section: ATmega128 pin connections ...................... 119 Buzzer section ................................120 Joystick and connectors section ..........................120 LCD section ................................
  • Page 5: Introduction

    You don’t need to pay a license fee to the ThinkLABS team or even ask permission. However, if you republish the reference design, you have to credit the original group. And if you tweak or change the board, your new design must use the same or a similar Creative Commons license to ensure that new versions of the board will be equally free and open.
  • Page 6: Package Contents

    ThinkLABS Package Contents The uNiBoard development platform with the peripherals listed below uNiBoard development board – 1 unit • 16x2 LCD – 1 unit • Serial cable (DB9) – 1 unit • USB cable – 1 unit • FRC connector cables – 2 units •...
  • Page 7: Testing The Board

    ThinkLABS Testing the Board This section lists the procedure to test the board. To enable you to quickly test the Board, it comes with a test program loaded. So, make sure you first test the board before any programming. If you have programmed the controller thereby erasing the test program from the flash or in case you find...
  • Page 8 ThinkLABS STEP 8: Select File menu >> New Connection then Enter Name for connection and click OK. STEP 9: Select the COM Port where you have connected the serial cable. © TRI Technosolutions Pvt Ltd Page 8 of 129 http://thinklabs.in...
  • Page 9 ThinkLABS STEP 10: Select the settings as given below for this test program. STEP 11: Select Apply and then OK. © TRI Technosolutions Pvt Ltd Page 9 of 129 http://thinklabs.in...
  • Page 10 ThinkLABS STEP 12: Turn ON the Board. STEP 13: The test program that we have loaded demonstrates SNAKE game on any serial terminal which is VT102 compatible. If everything is correctly installed you should be able to see a game of SNAKE (modified) as well as play using the Joystick.
  • Page 11: Testing The Board On Linux Os

    ThinkLABS Testing the Board on Linux OS Follow the steps to check whether or not the uNiBoard is working properly on Linux OS STEP 1: Step 1 to Step 3 is same as given in the Windows OS procedure. STEP 2: Turn ON the Board. If you are wondering how to install the USB drivers, you don’t need to do that at all since Linux kernel has those drivers inbuilt.
  • Page 12: What You Need For Programming The Board

    ThinkLABS What you need for programming the Board Hardware requirements uNiBoard version 1.1 along with USB cable • Serial cable (optional) • FRC Cable (optional) • Software requirements Text Editor (Gedit on Linux/ Programmers Notepad on Windows) • Tool chain (avr-gcc, avr-binutils, avrdude): Installation procedure is explained in the upcoming •...
  • Page 13: Hardware Connections

    ThinkLABS Hardware Connections SW4, SW3, RTC Backup SW2, SW1 8 LED’s battery UART 0 switch i/p’s Reset switch Test Motor 2 LEDs PORT Motor 1 Buzzer beneath Cable Controller PORTC Ext Power Connector JTAG programmer PORT Port PORT connector 8 Sensor...
  • Page 14: Features

    ThinkLABS Features Board Features ATmega128 controller with external crystal of 16MHZ • usbasp: ATmega8 based USB programmer for ATmega128 (open source firmware running on • hardware licensed under GNU GPLv2 from http://www.fischl.de/usbasp) I2C communication lines • SPI communication lines •...
  • Page 15: Controller Features

    ThinkLABS Controller Features The features of Atmega128 are as follows: Advanced RISC Architecture • 128K Bytes of In-System Self-programmable Flash program memory • 4K Bytes EEPROM • 4K Bytes Internal SRAM • JTAG (IEEE std. 1149.1 Compliant) Interface • Two 8-bit Timer/Counters with Separate pre-scaler and Compare Modes •...
  • Page 16: Setting Up The Board Configuration

    ThinkLABS Setting up the Board configuration Board Description Atmega128 controller The ATmega128 is a low-power 8-bit microcontroller based on the AVR enhanced RISC architecture. The Atmel ATmega128 is a powerful microcontroller that provides a highly flexible and cost effective solution to many embedded control applications.
  • Page 17: External Power

    ThinkLABS External power The external power connector in the above figure can also be used for connecting rechargeable batteries and making the board operate on battery power in case of robotic or other such mobile applications. Test LEDs Test LED's are pulled-up so to glow the LEDs we need to make the particular port pin Low. You can connect the General Purpose PORT to test LED Port using FRC Cable.
  • Page 18: General Purpose Ports

    ThinkLABS USB Power (Pressed) / External power (Depressed) Refer to the uNiBoard figure where the components have been labeled to understand where these switches are physically placed on the board. While you have connected the uNiBoard cable for programming purposes or for powering the board this switch should be in the pressed position.
  • Page 19: Jumper Settings

    ThinkLABS The PORTC and PORTF (ADC) are open ports and can be connected to test LEDs through FRC cable. These can be accessed using 10-pin the FRC connector. The pin diagram of Atmega128 is given below along with the manner in which we have utilized the port pins...
  • Page 20 ThinkLABS There are two jumpers on the board one for programming or SPI jumper and other one for LDR or External ADC selection. As shown in the figure below: 4 SPI Lines Joystick/External USB Power Programming Program Enable sensor Selection...
  • Page 21 ThinkLABS Position of jumper while using LDR sensor While connecting external sensors at the open interface of PORTF, this jumper position should be changed to the alternate position as shown below: Position of jumper using external analog sensors Programming jumper: The programming jumper has to be retained in the position shown below under all cases except when using the SPI communication lines.
  • Page 22: Software Installations

    ThinkLABS Software Installation Software Installations Software Installations for Linux OS s for Linux OS The procedure that we are discussing for U The procedure that we are discussing for Ubuntu Linux involves downloading packages through the synaptic Linux involves downloading packages through the synaptic manager.
  • Page 23 ThinkLABS STEP 2: Enter root password. STEP 3: It will show a list of all dependencies It will show a list of all dependencies installed as shown below © TRI Technosolutions Pvt Ltd Page 23 of 129 http://thinklabs.in...
  • Page 24: Gedit Editor Plug-In (Embedded Terminal)

    ThinkLABS STEP 4: Press ALT + F2 and type gedit and press enter to open the Gedit application Press ALT + F2 and type gedit and press enter to open the Gedit application Press ALT + F2 and type gedit and press enter to open the Gedit application...
  • Page 25 ThinkLABS STEP 2: Enter root password. STEP 3: It will show a list of all dependencies installed as shown below It will show a list of all dependencies installed as shown below © TRI Technosolutions Pvt Ltd Page 25 of 129...
  • Page 26 ThinkLABS STEP 4: Press ALT + F2 and type gedit and press enter to open the Gedit application Press ALT + F2 and type gedit and press enter to open the Gedit application Press ALT + F2 and type gedit and press enter to open the Gedit application STEP 5: The Gedit application will open The Gedit application will open.
  • Page 27 ThinkLABS STEP 6: Then in gedit open Edit menu > preferences and goto plugins tab Then in gedit open Edit menu > preferences and goto plugins tab STEP 7: Select Embedded Terminal and press close button Select Embedded Terminal and press close button.
  • Page 28 ThinkLABS STEP 8: Go to the View menu and select Bottom pane Go to the View menu and select Bottom pane © TRI Technosolutions Pvt Ltd Page 28 of 129 http://thinklabs.in...
  • Page 29: Compiler (Avr-Gcc)

    ThinkLABS Compiler (avr-gcc) STEP 1: Open terminal and type: “sudo aptitude install Open terminal and type: “sudo aptitude install gcc-avr” and press enter © TRI Technosolutions Pvt Ltd Page 29 of 129 http://thinklabs.in...
  • Page 30 ThinkLABS STEP 2: Enter root password. STEP 3: It will show a list of all dependencies install as shown below It will show a list of all dependencies install as shown below. © TRI Technosolutions Pvt Ltd Page 30 of 129...
  • Page 31: Avr-Libc (Standard C Library For Atmel Avr Development)

    ThinkLABS avr-libc (Standard C library for Atmel AVR development) : libc (Standard C library for Atmel AVR development) : STEP 1: Open terminal and type: “sudo aptitude install avr Open terminal and type: “sudo aptitude install avr-libc” and press enter ©...
  • Page 32 ThinkLABS STEP 2: Enter root password STEP 3: It will show a list of all dependencies install as shown below It will show a list of all dependencies install as shown below © TRI Technosolutions Pvt Ltd Page 32 of 129...
  • Page 33: Avrdude (Software For Programming Atmel Avr Microcontrollers)

    ThinkLABS avrdude (software for programming Atmel AVR microcontrollers): (software for programming Atmel AVR microcontrollers): (software for programming Atmel AVR microcontrollers): STEP 1: Open terminal and type: “sudo aptitude install avrdude” and press Open terminal and type: “sudo aptitude install avrdude” and press enter enter ©...
  • Page 34: Serial Port Terminal (Gtkterm)

    ThinkLABS STEP 2: Enter root password STEP 3: It will show a list of all dependencies install as shown below It will show a list of all dependencies install as shown below Serial port terminal (Gtkterm) Gtkterm) The Gtkterm is analogous to Windows HyperTerminal which is useful for serial commutations between PC...
  • Page 35 ThinkLABS STEP 2: Enter root password. STEP 3: It will show a list of all dependencies installed as shown below It will show a list of all dependencies installed as shown below. © TRI Technosolutions Pvt Ltd Page 35 of 129...
  • Page 36 ThinkLABS STEP 4: Press ALT + F2 and type gtkterm and press enter to open the Gtkterm application d type gtkterm and press enter to open the Gtkterm application d type gtkterm and press enter to open the Gtkterm application ©...
  • Page 37: Gtkterm Configurations For Setting The Baud Rate, Parity, Stop Bits

    ThinkLABS Gtkterm Configurations for setting the Gtkterm Configurations for setting the Baud rate, Parity, Stop bits Stop bits STEP 1: Press ALT + F2 and type gtkterm and press enter to open the Gtkterm application Press ALT + F2 and type gtkterm and press enter to open the Gtkterm application...
  • Page 38 ThinkLABS STEP 3: Select the Port: /dev/ttyS0 if you have connected to the serial Select the Port: /dev/ttyS0 if you have connected to the serial communication communication port, if not change the Port. STEP 4: Select the Speed to the Baud rate Baud rate as per in your code, you have configured as per in your code, you have configured for the UART.
  • Page 39: Software Installations For Windows Os

    ThinkLABS Software Installations for Windows OS oftware Installations for Windows OS WinAVR (Includes avr-gcc, gcc, avr-binutils, avrdude) Copy the software packages from the uNiBoard contents Copy the software packages from the uNiBoard contents on CD or download latest version of WinAVR from...
  • Page 40 ThinkLABS Step 2: Select the language and press OK. © TRI Technosolutions Pvt Ltd Page 40 of 129 http://thinklabs.in...
  • Page 41 ThinkLABS Step 3: click on Next Step 4: Click on I Agree © TRI Technosolutions Pvt Ltd Page 41 of 129 http://thinklabs.in...
  • Page 42 ThinkLABS Step 5: Type the destination Folder where you want to install WinAVR and click on Next. Step 6: Check on all i.e. Install files, Add Directories to path, and Programmer’s Notepad and click on Install. Step 7: It will display as shown below and then click on finish ©...
  • Page 43 ThinkLABS © TRI Technosolutions Pvt Ltd Page 43 of 129 http://thinklabs.in...
  • Page 44: Installing Usb Drivers For Uniboard

    ThinkLABS Installing USB drivers for uNiBoard STEP 1: Insert the uNiBoard USB cable to PC. STEP 2: If the drivers are not installed then it will display the installation wizard as shown below. STEP 3: Select the options as install from a list or specific location (Advanced) and click on next. It will display options as shown below ©...
  • Page 45 ThinkLABS STEP 4: Click on Browse and select the drivers from the CD UNIBOARD CONTENTS directory path as \UNIBOARD CONTENTS\UNIBOARD_DRIVERS\WINDOWS\usbasp and click on OK STEP 5: Click on Next. © TRI Technosolutions Pvt Ltd Page 45 of 129 http://thinklabs.in...
  • Page 46 ThinkLABS STEP 6: Give the same path of drivers and click on OK © TRI Technosolutions Pvt Ltd Page 46 of 129 http://thinklabs.in...
  • Page 47 ThinkLABS STEP 7: Click on Finish. After the drivers are installed you are ready to program the Board. © TRI Technosolutions Pvt Ltd Page 47 of 129 http://thinklabs.in...
  • Page 48: Programming The Board

    ThinkLABS Programming the Board Programming the Board NOTE: Refer to the above section sections to check that you are having all the required to check that you are having all the required software tools. Getting Started on Linux Linux For programming the Board you must first have the hex file to be loaded into the flash section of the...
  • Page 49 ThinkLABS STEP 3: Save the File as Xfilename.c Save the File as Xfilename.c © TRI Technosolutions Pvt Ltd Page 49 of 129 http://thinklabs.in...
  • Page 50 ThinkLABS STEP 4: Copy the Makefile (NOTE: (NOTE: Make is the Utility which calls all the compiler related options which ompiler related options which are in script file called as Makefile) in your working are in script file called as Makefile) in your working project directory ©...
  • Page 51 ThinkLABS STEP 5: Write your code. © TRI Technosolutions Pvt Ltd Page 51 of 129 http://thinklabs.in...
  • Page 52 ThinkLABS STEP 6: Save the file STEP 7: Edit the Makefile in this file change TARGET = Xfilename (with no extensions and no quotes (“)). If you put any extensions it won’t work. NOTE: Xfilename indicates any filename that a user will use.
  • Page 53 ThinkLABS STEP 8: Save the Makefile. STEP 9: On Linux based systems, you can use one of the makefiles of the sample codes marked as On Linux based systems, you can use one of the makefiles of the sample codes marked as On Linux based systems, you can use one of the makefiles of the sample codes marked as Makefile_LINUX by renaming it to Makefile, failing which you will get an error saying “No rule to make...
  • Page 54 ThinkLABS STEP 10: Type: make all (this will compile the sourc (this will compile the source file and generate hex file if e file and generate hex file if there are no errors in code). © TRI Technosolutions Pvt Ltd Page 54 of 129 http://thinklabs.in...
  • Page 55 ThinkLABS STEP 11: type: make program make program (this will burn the hex into the microcontroller) (this will burn the hex into the microcontroller) © TRI Technosolutions Pvt Ltd Page 55 of 129 http://thinklabs.in...
  • Page 56 ThinkLABS 1.1. Changing the Fuse settings Changing the Fuse settings NOTE: The fuse setting must be changed only if The fuse setting must be changed only if required. The ATmega128 has three fuse bytes The ATmega128 has three fuse bytes referred as High Fuse Byte, Low Fuse Byte and Extended Fuse referred as High Fuse Byte, Low Fuse Byte and Extended Fuse Byte.
  • Page 57 ThinkLABS M103C Atmega103 compatibility mode 0 (programmed) WDTON Watchdog timer is always ON 1 (unprogrammed) The following Table represents High Fuse Byte: High Fuse Byte BIT No. Description Default Value OCDEN Enable OCD 1 (unprogrammed, OCD disabled) Enable JTAG 0 (programmed,...
  • Page 58 ThinkLABS CKSEL1 Select Clock source 0 (programmed) CKSEL0 Select Clock source 1 (unprogrammed) The Make utility allows programming the fuse bits. The following The Make utility allows programming the fuse bits. The following procedure will procedure will help you configuring the fuse bits.
  • Page 59 ThinkLABS STEP 2: Edit the Makefile as shown in the in the above picture as per the fuse setting (HFUSE, LFUSE and EFUSE are the (HFUSE, LFUSE and EFUSE are the labels to be edited) that is required. STEP 3: On Embedded terminal type make fuses (This will read the fuse setting currently present on the board)
  • Page 60 ThinkLABS STEP 4: Again on the embedded terminal type make readfuses to verify that fuse bit have been saved. terminal type make readfuses to verify that fuse bit have been saved. terminal type make readfuses to verify that fuse bit have been saved.
  • Page 61 ThinkLABS As shown below the fuse setting have been modified successfully. fuse setting have been modified successfully. © TRI Technosolutions Pvt Ltd Page 61 of 129 http://thinklabs.in...
  • Page 62: Getting Started On Windows

    ThinkLABS Getting Started on Windows Getting Started on Windows The sample programs have been given been given in the CD folder named “\UNIBOARD CONTENTS\UNIBOARD_SAMPLE_CODES UNIBOARD_SAMPLE_CODES\NON_RTOS\” and “\UNIBOARD CONTENTS\UNIBOARD_SAMPLE_CODES UNIBOARD_SAMPLE_CODES\ RTOS” Or you can download it from our website at link oad it from our website at link http://thinklabs.in/download/...
  • Page 63: Text Editor (Programmer's Notepad)

    ThinkLABS Text Editor (programmer’s Notepad) Step 1: Select Programmer’s Notepad from Start menu->Programs->Win-avr->Programmers Notepad. Step 2: Type your code here and save the file as shown below: © TRI Technosolutions Pvt Ltd Page 63 of 129 http://thinklabs.in...
  • Page 64 ThinkLABS STEP 3: Save the file as anyfilename.c © TRI Technosolutions Pvt Ltd Page 64 of 129 http://thinklabs.in...
  • Page 65 ThinkLABS STEP 4: You can view the line numbers by selecting view menu ->Line Numbers. © TRI Technosolutions Pvt Ltd Page 65 of 129 http://thinklabs.in...
  • Page 66 ThinkLABS © TRI Technosolutions Pvt Ltd Page 66 of 129 http://thinklabs.in...
  • Page 67: Compile The Code And Program The Board On Windows (Command Prompt)

    ThinkLABS Compile the code and program the board on Windows (Command Prompt) STEP 1: Open the command prompt by selecting Start->Run and type cmd STEP 2: It will display the Command prompt and goto your project directory. © TRI Technosolutions Pvt Ltd Page 67 of 129 http://thinklabs.in...
  • Page 68 ThinkLABS STEP 3: You must have the Makefile in your project directory. In case of windows you would find a file named Makefile_WINDOWS, which you can rename as Makefile. Make sure that you have only a single Makefile in your working directory.
  • Page 69 ThinkLABS STEP 5: In command prompt window, type command as make clean and press enter © TRI Technosolutions Pvt Ltd Page 69 of 129 http://thinklabs.in...
  • Page 70 ThinkLABS STEP 6: This will remove all previously files created due to compilation as shown below: © TRI Technosolutions Pvt Ltd Page 70 of 129 http://thinklabs.in...
  • Page 71 ThinkLABS STEP 7: type make all and press enter © TRI Technosolutions Pvt Ltd Page 71 of 129 http://thinklabs.in...
  • Page 72 ThinkLABS STEP 8: This command will compile the file and generate a Hex file. Type dir and press enter and check if there hex file generated as shown below. © TRI Technosolutions Pvt Ltd Page 72 of 129 http://thinklabs.in...
  • Page 73 ThinkLABS STEP 9: For loading the compiled output to the board the board i.e. burning the hex file into the Atmega128 type command as make program. © TRI Technosolutions Pvt Ltd Page 73 of 129 http://thinklabs.in...
  • Page 74 ThinkLABS STEP 10: press enter © TRI Technosolutions Pvt Ltd Page 74 of 129 http://thinklabs.in...
  • Page 75: Using Hyper Terminal Of Windows

    ThinkLABS Using hyper terminal of windows STEP 1: Run Hyper Terminal start menu->all programs->accessories->Communications->HyperTerminal. STEP 2: Type name for make new connection STEP 3: Select the serial port (usually it is COM1) © TRI Technosolutions Pvt Ltd Page 75 of 129...
  • Page 76 ThinkLABS © TRI Technosolutions Pvt Ltd Page 76 of 129 http://thinklabs.in...
  • Page 77 ThinkLABS STEP 4: Select the Baud rate (9600), Data bits (8 bits), parity (none), stop bits (1), and flow control (none) as shown below. © TRI Technosolutions Pvt Ltd Page 77 of 129 http://thinklabs.in...
  • Page 78 ThinkLABS STEP 5: You can even save this connection from File->save so that you need not set all the settings again. © TRI Technosolutions Pvt Ltd Page 78 of 129 http://thinklabs.in...
  • Page 79: Getting Started With Rtos (Uc/Os-Ii) On Windows Os

    ThinkLABS Getting Started with RTOS (uC/OS-II) on Windows OS uC/OS-II Hardware and Software Architecture Before starting of with the uC/OS-II programming you need to know its file structure i.e. how the uC/OS-II source code and its ports are structured. The diagram below gives an idea of the way in which these files have been maintained.
  • Page 80: Code, Compile And Program The Rtos (Uc/Os-Ii) Programs On Linux Os

    ThinkLABS Every RTOS project/source code consists of (as shown in the above figure): Portable kernel code: This is generally a code written in ANSI C which can be ported to any platform • fulfilling certain requirements like memory footprint, computational power, number of registers etc.
  • Page 81 ThinkLABS STEP 4: Go to the current program program directory from Gedit Embedded terminal using cd using cd command or right click on Bottom terminal and select change directory (refer to the sub-section getting started on Linux section getting started on Linux).
  • Page 82 ThinkLABS STEP 5: Type make clean on Gedit Embedded terminal. on Gedit Embedded terminal. © TRI Technosolutions Pvt Ltd Page 82 of 129 http://thinklabs.in...
  • Page 83 ThinkLABS STEP 6: Type make all on Gedit Embedded terminal. on Gedit Embedded terminal. © TRI Technosolutions Pvt Ltd Page 83 of 129 http://thinklabs.in...
  • Page 84 ThinkLABS STEP 7: Type make program on Gedit Embedded terminal. on Gedit Embedded terminal. © TRI Technosolutions Pvt Ltd Page 84 of 129 http://thinklabs.in...
  • Page 85 ThinkLABS STEP 8: Enter the root password to program the Board Enter the root password to program the Board and press enter (if prompted) and press enter (if prompted). © TRI Technosolutions Pvt Ltd Page 85 of 129 http://thinklabs.in...
  • Page 86 ThinkLABS STEP 9: Turn OFF the uNiBoard after the program has been loaded successfully as shown below after the program has been loaded successfully as shown below. © TRI Technosolutions Pvt Ltd Page 86 of 129 http://thinklabs.in...
  • Page 87 ThinkLABS STEP 10: Open Gtkterm (refer to the sub refer to the sub-section Gtkterm Configurations for settin section Gtkterm Configurations for setting the Baud rate, Parity, Stop bits). © TRI Technosolutions Pvt Ltd Page 87 of 129 http://thinklabs.in...
  • Page 88 ThinkLABS STEP 11: Turn ON the uNiBoard and the uNiBoard and Output will be displayed as shown below on Gtkterm on Gtkterm. © TRI Technosolutions Pvt Ltd Page 88 of 129 http://thinklabs.in...
  • Page 89: Code, Compile And Program The Rtos (Uc/Os-Ii) Programs On Windows Os

    ThinkLABS Code, Compile and program the RTOS (uC/OS-II) programs on Windows OS NOTE: You Should have the required software tools i.e. text editor, compiler, programmer, serial terminal and required drivers for programmer as shown in the sub-section Software Installations for Windows OS.
  • Page 90 ThinkLABS © TRI Technosolutions Pvt Ltd Page 90 of 129 http://thinklabs.in...
  • Page 91 ThinkLABS © TRI Technosolutions Pvt Ltd Page 91 of 129 http://thinklabs.in...
  • Page 92 ThinkLABS © TRI Technosolutions Pvt Ltd Page 92 of 129 http://thinklabs.in...
  • Page 93 ThinkLABS © TRI Technosolutions Pvt Ltd Page 93 of 129 http://thinklabs.in...
  • Page 94 ThinkLABS © TRI Technosolutions Pvt Ltd Page 94 of 129 http://thinklabs.in...
  • Page 95 ThinkLABS © TRI Technosolutions Pvt Ltd Page 95 of 129 http://thinklabs.in...
  • Page 96 ThinkLABS © TRI Technosolutions Pvt Ltd Page 96 of 129 http://thinklabs.in...
  • Page 97 ThinkLABS STEP 5: Open event_sem.c from the current directory and the code will be displayed as shown below. © TRI Technosolutions Pvt Ltd Page 97 of 129 http://thinklabs.in...
  • Page 98 ThinkLABS © TRI Technosolutions Pvt Ltd Page 98 of 129 http://thinklabs.in...
  • Page 99 ThinkLABS © TRI Technosolutions Pvt Ltd Page 99 of 129 http://thinklabs.in...
  • Page 100 ThinkLABS © TRI Technosolutions Pvt Ltd Page 100 of 129 http://thinklabs.in...
  • Page 101 ThinkLABS © TRI Technosolutions Pvt Ltd Page 101 of 129 http://thinklabs.in...
  • Page 102 ThinkLABS NOTE: Check the code at line 108 to 112 in function named as void MyTask(void *pdata). This code is initializing the timer0 i.e. required by scheduler for correct time delays and this macro named as CPU_CLOCK_HZ and OS_TICKS_PER_SEC are defined in the file os_cfg.h as shown in next step.
  • Page 103 ThinkLABS © TRI Technosolutions Pvt Ltd Page 103 of 129 http://thinklabs.in...
  • Page 104 ThinkLABS © TRI Technosolutions Pvt Ltd Page 104 of 129 http://thinklabs.in...
  • Page 105 ThinkLABS © TRI Technosolutions Pvt Ltd Page 105 of 129 http://thinklabs.in...
  • Page 106 ThinkLABS © TRI Technosolutions Pvt Ltd Page 106 of 129 http://thinklabs.in...
  • Page 107 ThinkLABS NOTE 1: Here in this file os_cfg.h check at the line 27 for the macro CPU_CLOCK_HZ which should be assigned as 16MHZ i.e. the CPU frequency and at line 67 the macro OS_TICKS_PER_SEC which should be assigned as 61.
  • Page 108 ThinkLABS make: *** No rule to make target `/home/XYZUSER/ucos-II/software/uCOS-II/Source/ucos_ii.c', needed by `ucos_ii.d'. Stop Then you need to remove *.d files from current program directory. Type rm *.d and then try to use make clean command again. STEP 8: Go to prompt and type make all ©...
  • Page 109 ThinkLABS STEP 9: Go to prompt and type make program © TRI Technosolutions Pvt Ltd Page 109 of 129 http://thinklabs.in...
  • Page 110 ThinkLABS STEP 10: Turn OFF the Board’s Power Switch STEP 11: Open the HyperTerminal utility (refer to section Using Hyper terminal of Windows). STEP 12: Now turn it ON. The output will be displayed as shown below © TRI Technosolutions Pvt Ltd Page 110 of 129 http://thinklabs.in...
  • Page 111 ThinkLABS You can also download the latest uC/OS-II source code from Micrium website link as http://www.micrium.com/products/rtos/ucos-ii_download.html and ports for Atmel’s Mega series from http://www.micrium.com/atmel/ATmega.html © TRI Technosolutions Pvt Ltd Page 111 of 129 http://thinklabs.in...
  • Page 112: Troubleshooting

    ThinkLABS Troubleshooting Make utility Make sure that you are in current project working directory. • Make sure that you have Makefile in your current working directory. If not then rename the • Makefile_WINDOWS or Makefile_LINUX to Makefile from uNiBoard Contents.
  • Page 113: Ldr

    ThinkLABS Make sure that you are using correct ADC channel. • Make sure that LDR Jumper is placed on the Board and in the correct position. • External Interrupts Make sure that you have enabled pull-ups in your code. •...
  • Page 114: What You Can Do With The Uniboard

    ThinkLABS What you can do with the uNiBoard This section describes the purpose of every sample Code given in the CD’s uNiBoard Contents directory which contains the sample codes for RTOS based and Non-RTOS. NOTE: The sample code given contains the Makefile. You need to rename the Makefile_LINUX to Makefile for Linux OS and similarly Makefile_WINDOWS to Makefile for Windows OS while using the code.
  • Page 115 ThinkLABS The VT 100 is video terminal made by DEC. It became a de facto standard used by terminal emulators. Digital’s first ANSI-compliant terminal, introduced in August 1978. The VT100 was more of architecture than a simple terminal. There are two display formats: 80 columns by 24 lines and 132 columns by 14 lines.
  • Page 116 ThinkLABS MASTER SLAVE MISO MISO MOSI MOSI 9. I2C (RTC) The DS1307 is the RTC (Real Time Clock) chip interfaced on the I2C lines of the controller. The API’s can be used for reading the date and time from RTC. Before reading you need to call this API Update_RTC_variables() which actually updates local variables that data and time API’s returns.
  • Page 117 ThinkLABS The score is printed by this task on LCD whenever snake eats food. Also every time food is generated LEDs would blink. Every time the SNAKE eats food the buzzer will give a beep sound. 3. Semaphores This is a sample code which displays the shared resource as a global variable which is shared among the various tasks.
  • Page 118: Add-Ons

    ThinkLABS Add-ons What we have discussed till now are some completely standalone activities. We assume that you wont just What we have discussed till now are some completely standalone activities. We assume that you wont just What we have discussed till now are some completely standalone activities. We assume that you wont just limit yourselves to these activities and explo limit yourselves to these activities and explore the board’s power further using accessories like SD/MMC...
  • Page 119: Uniboard V1.1 Schematic

    ThinkLABS uNiBoard v1.1 Schematic Controller section: ATmega128 pin connections © TRI Technosolutions Pvt Ltd Page 119 of 129 http://thinklabs.in...
  • Page 120: Buzzer Section

    ThinkLABS Buzzer section: Joystick and connectors section: © TRI Technosolutions Pvt Ltd Page 120 of 129 http://thinklabs.in...
  • Page 121: Lcd Section

    ThinkLABS LCD section: LDR section: LEDs section: © TRI Technosolutions Pvt Ltd Page 121 of 129 http://thinklabs.in...
  • Page 122: Motor Driver Section

    ThinkLABS Motor Driver section: Power supply section: RTC section: © TRI Technosolutions Pvt Ltd Page 122 of 129 http://thinklabs.in...
  • Page 123: Sensor Port Section

    ThinkLABS Sensor port section: Switches section: UART section: © TRI Technosolutions Pvt Ltd Page 123 of 129 http://thinklabs.in...
  • Page 124: Usb Programmer Section (Courtesy: Http://Www.fischl.de/Usbasp/)

    ThinkLABS USB programmer section (Courtesy: http://www.fischl.de/usbasp/): © TRI Technosolutions Pvt Ltd Page 124 of 129 http://thinklabs.in...
  • Page 125: Licensing Terms

    You don’t need to pay a license fee to the a license fee to the ThinkLABS team or even ask permission. However, if you or even ask permission. However, if you republish the reference design, you have to cre republish the reference design, you have to credit the original group.
  • Page 126: Bill Of Materials (Bom)

    ThinkLABS Bill of Materials (BOM): uNiBoard ver. 1.1 Bill of Materials Sr. no. Components Quantity Micro-controllers Atmega128 (TQFP) Atmega8 (TQFP) Other chips L293D Motor driver 7805 voltage regulator MAX232 level translator DS1307 RTC Battery back-up Battery 3V (button cell) Crystal...
  • Page 127 ThinkLABS Diodes 3.6V Zener 4148 Diode Resistors 270K 330 Ohms 68 Ohm 1K SMD SIP 10K POT Capacitors 100uF/10V 4.7uF/50V 470uF/16V 220uF/16V 15pF 22pF 0.1uF 0.22pF Transistors 2N2222 Switches Power switches (Push to ON) SMD Micro key Two pin jumpers Metal spacers (3x15) ©...
  • Page 128: Appendix A - References

    ThinkLABS Appendix A – References Websites: www.atmel.com www.avrfreaks.net www.fishl.de/usbasp/ www.maxim-ic.com http://en.wikibooks.org/wiki/Embedded_Systems/Atmel_AVR Books: 1. MicroC/OS-II by JEAN J. LABROSSE 2. Programming & Customizing The AVR Microcontroller By Dhananjay V. Gadre 3. Embedded C Programming and the Atmel AVR By Barnett and Cox 4.
  • Page 129: Appendix B - Services And Support

    ThinkLABS Appendix B - Services and Support Our website support: For any technical queries related to uNiBoard: http://www.thinklabs.in/forums/ For articles, activities and updates related to uNiBoard: http://www.thinklabs.in/resources/ For purchasing uNiBoard accessories or other related components: http://www.thinklabs.in/shop/ © TRI Technosolutions Pvt Ltd Page 129 of 129 http://thinklabs.in...

Table of Contents