Home
        ARMmite Pro - Embedded System and Software Interview Questions
         Contents
1.  28  PO 7 SSELO MAT2 0       FERERECERENEE sue  FRA  HHE FHF  HH   ces    8898  ESE E ee ge    ARMmite Pro Board    CORIDIUM 2  Neo mo      amp   TE E    Lie  vi       bi  ti te    is        ol  LR       ant 1       Lighten the LED       1  Enable the high speed GPIO on GPIO port 0  PO 15 is the bit 15 of port 0   O Find information about system control and status flags register  SCS  in LPC2103 user manual  O The first bit of the register can enable GPIO port 0     O The register SCS is mapped to memory location OxE01FC1A0  called memory mapped I O     L  2  Set the direction of the bit 15 in fast GPIO port 0   O Find information about fast GPIO direction register  FIODIR   O Bit 15 in FIODIR controls P0 15  Set it to 1  gt  P0 15 becomes output    O FIODIR is mapped to 0x3FFFC000     O 3  Set the bit 15 in port 0 to LOW     O Find information about fast GPIO output clear register  FIOCLR   O lt is used to produce a LOW level output at a output GPIO   FLOSET produces HIGH level     O FIOCLR is mapped to 0x3FFFC01C     Program in C    i FF V     PFFKEE  include  lt arch philips Ipc2103 k9supd h       include  coridium h       void main void      SCS    0x01     enable high speed GPIO port 0     FIODIR     1  lt  lt  15      set P0 15 as an output     FIOCLR     1  lt  lt  15      switch P0 15 to LOW level            O The header file    Ipc2103_k9supd h    defines all memory mapped IO in LPC2103  microcontroller     O    coridium h    defines important system dependent inform
2. FFCOOO  to r2       load content in FIODIR register to r3       fr     1   lt  15        store the value back to FIODIR register          load FIOCLR  0x3FFFCO1C  to r2       load content in FIOCLR register to r3       rs       16  77     store the value back to FIOCLR register       Program in Assembly  Me    O    Notice your assembly file must be named   S with capital S  or MakeltC can t recognize     Put your assembly file  Lab1 S  under  examples  and run it by MakeltC  It should lighten the  onboard LED     You could use the cross assembler arm elf gcc to translate a C code into an assembly code     Open a new command prompt and go to the folder containing the C file     Type    arm elf gcc  S filename c  O A filename s will be generated in the same folder    O You can read the file and compare the difference between it and your own assembly code   mov instruction only contains 8 bits field for immediate number    Idr   reg      lt constant expression gt  is a pseudo instruction  it support 32 bits immediate  number    Idr   reg      lt constant expression gt  will be translated into mov and add instructions        Idr r0   0x0c002000     gt     mov rO   0x0c000000         add rO  rO   0x00002000       
3. LABI       Outline  E    Intro to ARMmite Pro development board  Intro to LPC2103 microcontroller   Cross development environment and tools  Program the broad in C  light the LED  Program the board in ARM Assembly    l O OO A O    ARMmite Pro     o   CORIDIUM  gt   ia SEI ARMniteo PRO    PN    Tia      me       FTDI Basic Breakout     g ANALOGS 3       USB cable ARMmite pro development board    ARMmite Pro    a  i        o     uo o_o    LI ARMZTDMI CPU running at 60 MHz    O 32K Flash memory and 8K SRAM memory   LI 7 10 bit A D converters  100 KHz sample rate  O 24 TTL compatible digital I O   Q 8 Hardware PWM channels    LI You need a FTDI bread out board to connect the ARMmite board and  your laptop    LI User Guide  http   www coridiumcorp com ARMhelp index htm page HWproPins html    O More feature  http   www coridiumcorp com ARMduino php    LPC2103 Microcontroller    L  L  L  L  L  L  L  L  L  L    The main chip on ARMmite is a LPC2103 microcontroller   With 32 bit ARM7TDMI S CPU running at 60MHzZ   32K on chip Flash memory   8K on chip SRAM memory   Two 32 bit timers with combined seven capture and compare channels  Two 16 bit timers with combined three capture and compare channels  Serial interfaces  two UARTs  two I2C buses  SPI        10 bit A D converter provides eight analog inputs   Up to thirty two 5V tolerant fast general purpose I O pins    Up to 13 edge or level sensitive external interrupt pins    Cross Development Environment  o    O Use laptops  host machin
4. ation     O Put the file  named Lab1 c  under  examples  and run it by MakeltC     O    If nothing wrong  the LED light should become orange     Program in Assembly  Me       text    equ SCS  OxEOIFCIAO   equ FIODIR  0x3FFFC000   equ FIOCLR  Ox3FFFCO1 C     start     global start      global main      global UNDEF Routine     global SWI Routine     global PAbt Routine     global DAbt Routine     global FIQ_Routine   b main  UNDEF Routine    SWI Routine    PAbt Routine    DAbt Routine    FIQ Routine          Define SCS as OxEOIFCIAO        Define FIODIR as Ox3FFFCOOO        Define FIOCLR as Ox3FFFCOIC          Execution starts from here          Branch to main         Bootloader expects these 5 routines         Even if we don t really implement them         we must define them          These are interrupt service routines           In the lab  we needn t bother about them            Write application code here       Program in Assembly    a    main     SCS     0x01  orr    str    Idr   Idr  FIODIR     1  lt  lt  15  mov   orr    str    Idr   Idr  FIOCLR     1  lt  lt  15  mov   orr    str    r2    SCS  r3   r2   0   r3   0x01  r3   r2   0     r2    FIODIR  r3   r2   0    rl   0x01   r3  rl  LSL  15  r3   r2   0     r2    FIOCLR  r3   r2   0    rl   0x01  r3 rl  LSL  15  r3   r2   0       load SCS  OxEO1FC1A0  to r2        load content in SCS register to r3         set the bit O to 1 2 enable fast GPIO port O        store the value back to SCS register         load FIODIR  Ox3F
5. e  to develop applications     Generate executables for embedded system  target machine     O Why  Because an embedded target isn   t a good develop environment     ex  small memory  no keyboard  no screen  limited I O     O Suppose your laptop is x86 architecture  LI The ARMmite pro is ARM architecture    LI We use cross compiler in our x86 machine  to build applications running    on ARM machine     Install the Tools and Software        O0 Coridium provides cross tool trains  for Windows  in the CD ROM    O Install the cross tool trains and development software    Install the file setupC exe in the CD coming with your ARMmite board       The following steps enable you to use the cross assembler    Right click on  My Computer  and click  Properties      Click  Advanced System Settings   and click  Environment Variables     Under  User Variables   select   PATH  and click  Edit      If a variable named  PATH  does not exist  click  New  and type in  PATH  for the variable name     Append the following text to the end of the Value field     C  Program Files Coridium bin  C  Program  Files Coridium arm elf bin      Click OK and close all currently open dialog boxes   Open a new command prompt by going to Start  gt  Run  typing  cmd  and click ok     Type  arm elf gcc  v  and hit enter  If everything went right  it will print out some text  and the last  line should read  gcc version 4 1 1  WinARM      Run An C Example    O Run an C program example provided by Coridium      Conn
6. ect the ARMmite broad and the FTID breakout   Connect FTID breakout and your computer through USB cable   Double click the icon    MackltC    on your desktop   Click    Option     gt     Serial Port     gt     refresh     gt  choose correct COM port  Click    File     gt     Choose Main      Browse and open    C  Program Files Coridium examples Csample c       Click    Tools     gt     Build and Run       Click    Tools     gt     Terminal     LI Type in an integer into the terminal window  and see what happen  LI You could read the    Csample c    file and do some modification     O Coridium provides many C functions  You can include them to implement your  own application     O Click    Help     gt     ARMexpress C     gt  Read the spec of the board    The Whole Process    O    When you click    Build and Run     the MakeltC software calls the cross    compiler to translate the C program     Then the linker is called to link the library functions and the application     generating an executable     Then the loader is called to load the executable into the flash ROM on    LPC2103  A bootloader executable is also loaded into the flash ROM     When the CPU starts working  it first run the bootloader executable  which    initialize the board  ex  setup timers  initialize interrupt system         Then the bootloader moves the application from ROM to RAM  and finally the    CPU jumps to execute the application program     Program in C  Lighten the LED    O    O    The previous C 
7. program example calls library functions     In the following exercise  we don t use functions provided in the library  We    want to directly control the I O pins   You need to read the hardware specs of both ARMmite pro and LPC2103  Goal  lighten the LED on the board    LPC2103 User Manual    http   www nxp com documents user manual UM10161 pdf    ARMmite pro User Guide  http   www coridiumcorp com ARMhelp index htm page HWproPins html    ARMmite pro schematic    http   www sparkfun com datasheets DevTools ARMproSCH pdf    ARMmite SCH    Ni 20 MHz  MAZZO  R ETO Bo  XD  RXDO  X02 open drain    x06___open drain 21   Ba 2  POS  PO  Laci  SUS   POSITXDI  K POS RXD1  ADO 5   P10  i abe  BM ra P   gt  VM 41 p13  EINTO ag   P15  open drain PIE      open drain p 48  PWMIZ      PWMI3  BIOMO    ADOO P21  ADO   ADDOZ la  ADOE    AL 9  P29    PWN SS    output oniy           27   a    C6 c7  22pF 22pF    32 KHz not loaded    LED is controlled by the  pin P0 15 of LPC2103       LPC2103 Pin Out                  E 3  4a k    E  HH JE  LED lled by th  REND E 385 is controlled by the  32868  8 8338 in PO 15 of LPC2103  sssss 883 8335 p  gt   aca        36  PO 11 CTS1 CAP1 1 ADO 4   35  PO 10 RTS1 CAP1 0 ADO 3    PO 19 MAT1 2 MISO1  1    PO 20 MAT1 3 MOSI1    O    P0 21 SSEL1 MAT3 0  3   134  P0 24 A00 2  VBAT  4   133  PO ZWADO 1  Vonx1ve  LE 132  PO 22 AD0 0   RST 6   131  Vssa    LPC2101 2102 2103  130  PO 9 RXD1 MAT2 2    PO 27 TRSTICAPZO   8    29  PO 8 TXD1 MATZ 1  P0 28 TMS CAP2 1  9   
    
Download Pdf Manuals
 
 
    
Related Search
    
Related Contents
ケアストリーム ダイレクトビュー Max CR システム  Cables Direct KVM-627A KVM switch  avant projet def - Chaudfontaine.be  Targus THZ22902EU  Integral IN2T2GRVZDX1K2 memory module  Mon médecin m`a prescrit de la cortisone…  Teleserver Mobile Pro  Manuale Utente User Manual ARCBAR36RGB    Specification - Jaipur Vidyut Vitran Nigam Limited ,Government of    Copyright © All rights reserved. 
   Failed to retrieve file