Microcontroller Systems. ELET 3232 Topic 8: Slot Machine Example

Size: px
Start display at page:

Download "Microcontroller Systems. ELET 3232 Topic 8: Slot Machine Example"

Transcription

1 Microcontroller Systems ELET 3232 Topic 8: Slot Machine Example 1

2 Agenda We will work through a complete example Use CodeVision and AVR Studio Discuss a few creative instructions Discuss #define and #include Read and write from/to ports Use some of the control statements learned in the last topic 2

3 Slot Machine // // "Slot Machine" -- The Mini-Exercise // // Phase 1.. #include <Mega8515.h> /* processor specific information */ #define xtal L /* quartz crystal frequency [Hz] */ #define baud 9600 /* Baud rate */ #include <stdio.h> /* this gets the printf() definition */ // Global Variable Declarations.. char first,second,third; // Columns in the slot machine. char seed; // Number to form a seed for random #s. char count; // General purpose counter. int delay; // A variable for delay time. void main(void) { PORTA = 0xFF; DDRA = 0x00; DDRB = 0x02; // Initialize the I/O ports // port A all inputs // port B.1 is an output (light) //Initialize the UART control register //RX & TX enabled, 8 data bits UCSRB=0x18; // initialize the UART's baud rate UBRRL=xtal/16/baud-1; while(1) { // do forever.. while(pina.0) // Wait for a button and seed++; // let the counter roll over and // over to form a seed. first = second = third = seed; // preload the columns do { // mix up the numbers // while waiting for button release. first ^= seed>>1; // Exclusive ORing in the moving seed second^= seed>>2; // can really stir up the numbers. third ^= seed>>3; seed++; // keep rolling over the seed pattern } while(pina.0 == 0); // while the button is pressed for(count = 0; count < 5; count++) { // flash light when done.. for(delay = 0; delay < 10000; delay++) ; // just count up and wait PORTB.1 = 0; // turn the LED on.. for(delay = 0; delay < 10000; delay++) ; PORTB.1 = 1; // turn the LED off.. } first &= 3; // limit number to values from 0 to 3 second &= 3; third &= 3; printf("--> %d, %d,%d <--\n",first, second, third); // show the values.. // determine a payout.. if((first == 3) && (second == 3) && (third == 3)) printf("paid out: JACKPOT!!\n"); // all "cherries" else if((first == 3) (second == 3) (third == 3)) printf("paid out: One Dime\n"); // if any are "cherries".. else if((first == second) && (second == third)) printf("paid out: One Nickle\n"); // if three are alike, of any kind.. else printf("paid out: ZERO\n"); // otherwise -- you lose.. } } 3

4 Initialization The #include commands instruct the compiler to include these files as part of the overall program when compiling The Mega8515.h file includes all of the definitions for labels as well as port addresses. The stdio.h file includes functions such as printf and scanf // // "Slot Machine" -- The Mini-Exercise // // Phase 1.. #include <Mega8515.h> /* processor specific information */ #define xtal L /* quartz crystal frequency [Hz] */ #define baud 9600 /* Baud rate */ #include <stdio.h> /* this gets the printf() definition */ // Global Variable Declarations.. char first,second,third; // Columns in the slot machine. char seed; // Number to form a seed for random #s. char count; // General purpose counter. int delay; // A variable for delay time. void main(void) { PORTA = 0xFF; DDRA = 0x00; DDRB = 0x02; //Initialize the UART control register //RX & TX enabled, 8 data bits // Initialize the I/O ports // port A all inputs // port B.1 is an output (light) UCSRB=0x18; // initialize the UART's baud rate UBRRL=xtal/16/baud-1; 4

5 Initialization For the Atmega128, we have to change this to Mega128 but, the Atmega128 does not have the UART initialized below // // "Slot Machine" -- The Mini-Exercise // // Phase 1.. #include <Mega8515.h> /* processor specific information */ #define xtal L /* quartz crystal frequency [Hz] */ #define baud 9600 /* Baud rate */ #include <stdio.h> /* this gets the printf() definition */ // Global Variable Declarations.. char first,second,third; // Columns in the slot machine. char seed; // Number to form a seed for random #s. char count; // General purpose counter. int delay; // A variable for delay time. void main(void) { PORTA = 0xFF; DDRA = 0x00; DDRB = 0x02; // Initialize the I/O ports // port A all inputs // port B.1 is an output (light) //Initialize the UART control register //RX & TX enabled, 8 data bits UCSRB=0x18; // initialize the UART's baud rate UBRRL=xtal/16/baud-1; 5

6 Initialization For the Atmega128, we have to change this to Mega128 but, the Atmega128 does not have the UART initialized below They will generate errors for the 128 // // "Slot Machine" -- The Mini-Exercise // // Phase 1.. #include <Mega8515.h> /* processor specific information */ #define xtal L /* quartz crystal frequency [Hz] */ #define baud 9600 /* Baud rate */ #include <stdio.h> /* this gets the printf() definition */ // Global Variable Declarations.. char first,second,third; // Columns in the slot machine. char seed; // Number to form a seed for random #s. char count; // General purpose counter. int delay; // A variable for delay time. void main(void) { PORTA = 0xFF; DDRA = 0x00; DDRB = 0x02; // Initialize the I/O ports // port A all inputs // port B.1 is an output (light) //Initialize the UART control register //RX & TX enabled, 8 data bits UCSRB=0x18; // initialize the UART's baud rate UBRRL=xtal/16/baud-1; 6

7 Initialization The #define commands instructs the compiler to equate these values with the labels baud and xtal. They are used in the program // // "Slot Machine" -- The Mini-Exercise // // Phase 1.. #include <Mega8515.h> /* processor specific information */ #define xtal L /* quartz crystal frequency [Hz] */ #define baud 9600 /* Baud rate */ #include <stdio.h> /* this gets the printf() definition */ // Global Variable Declarations.. char first,second,third; // Columns in the slot machine. char seed; // Number to form a seed for random #s. char count; // General purpose counter. int delay; // A variable for delay time. void main(void) { PORTA = 0xFF; DDRA = 0x00; DDRB = 0x02; // Initialize the I/O ports // port A all inputs // port B.1 is an output (light) //Initialize the UART control register //RX & TX enabled, 8 data bits UCSRB=0x18; // initialize the UART's baud rate UBRRL=xtal/16/baud-1; 7

8 Initialization These variables are global because they are declared outside the main() function first, second, third, seed, and count are declared as char (8-bit unsigned integers). delay is declared as an int, a 16- bit unsigned integer // // "Slot Machine" -- The Mini-Exercise // // Phase 1.. #include <Mega8515.h> /* processor specific information */ #define xtal L /* quartz crystal frequency [Hz] */ #define baud 9600 /* Baud rate */ #include <stdio.h> /* this gets the printf() definition */ // Global Variable Declarations.. char first,second,third; // Columns in the slot machine. char seed; // Number to form a seed for random #s. char count; // General purpose counter. int delay; // A variable for delay time. void main(void) { PORTA = 0xFF; DDRA = 0x00; DDRB = 0x02; //Initialize the UART control register //RX & TX enabled, 8 data bits // Initialize the I/O ports // port A all inputs // port B.1 is an output (light) UCSRB=0x18; // initialize the UART's baud rate UBRRL=xtal/16/baud-1; 8

9 Initialization This program has one function: main(). It: Accepts no inputs and Returns no values // // "Slot Machine" -- The Mini-Exercise // // Phase 1.. #include <Mega8515.h> /* processor specific information */ #define xtal L /* quartz crystal frequency [Hz] */ #define baud 9600 /* Baud rate */ #include <stdio.h> /* this gets the printf() definition */ // Global Variable Declarations.. char first,second,third; // Columns in the slot machine. char seed; // Number to form a seed for random #s. char count; // General purpose counter. int delay; // A variable for delay time. void main(void) { PORTA = 0xFF; DDRA = 0x00; DDRB = 0x02; // Initialize the I/O ports // port A all inputs // port B.1 is an output (light) //Initialize the UART control register //RX & TX enabled, 8 data bits UCSRB=0x18; // initialize the UART's baud rate UBRRL=xtal/16/baud-1; 9

10 Initialization It first initializes Port A and Port B // // "Slot Machine" -- The Mini-Exercise // // Phase 1.. #include <Mega8515.h> /* processor specific information */ #define xtal L /* quartz crystal frequency [Hz] */ #define baud 9600 /* Baud rate */ #include <stdio.h> /* this gets the printf() definition */ // Global Variable Declarations.. char first,second,third; // Columns in the slot machine. char seed; // Number to form a seed for random #s. char count; // General purpose counter. int delay; // A variable for delay time. void main(void) { PORTA = 0xFF; DDRA = 0x00; DDRB = 0x02; // Initialize the I/O ports // port A all inputs // port B.1 is an output (light) //Initialize the UART control register //RX & TX enabled, 8 data bits UCSRB=0x18; // initialize the UART's baud rate UBRRL=xtal/16/baud-1; 10

11 Initialization It first initializes Port A and Port B and then initializes the UART // // "Slot Machine" -- The Mini-Exercise // // Phase 1.. #include <Mega8515.h> /* processor specific information */ #define xtal L /* quartz crystal frequency [Hz] */ #define baud 9600 /* Baud rate */ #include <stdio.h> /* this gets the printf() definition */ // Global Variable Declarations.. char first,second,third; // Columns in the slot machine. char seed; // Number to form a seed for random #s. char count; // General purpose counter. int delay; // A variable for delay time. void main(void) { PORTA = 0xFF; DDRA = 0x00; DDRB = 0x02; // Initialize the I/O ports // port A all inputs // port B.1 is an output (light) //Initialize the UART control register //RX & TX enabled, 8 data bits UCSRB=0x18; // initialize the UART's baud rate UBRRL=xtal/16/baud-1; 11

12 Main Program The main program is contained in the while (1) { } loop structure: it mean run forever while (1) { // do forever.. while (PINA.0) // Wait for a button and seed++; // let the counter roll over and // over to form a seed. first = second = third = seed; // preload the columns do { // mix up the numbers // while waiting for button release. first ^= seed>>1; // Exclusive ORing in the moving seed second^= seed>>2; // can really stir up the numbers. third ^= seed>>3; seed++; // keep rolling over the seed pattern } while (PINA.0 == 0); // while the button is pressed for (count = 0; count < 5; count++) { // flash light when done.. for (delay = 0; delay < 10000; delay++) ; // just count up and wait PORTB.1 = 0; // turn the LED on.. for (delay = 0; delay < 10000; delay++) ; PORTB.1 = 1; // turn the LED off.. } first &= 3; // limit number to values from 0 to 3 second &= 3; third &= 3; printf("--> %d, %d,%d <--\n",first, second, third); // show the values.. // determine a payout.. if((first == 3) && (second == 3) && (third == 3)) printf("paid out: JACKPOT!!\n"); // all "cherries" else if((first == 3) (second == 3) (third == 3)) printf("paid out: One Dime\n"); // if any are "cherries".. else if((first == second) && (second == third)) printf("paid out: One Nickle\n"); // if three are alike, of any kind.. else printf("paid out: ZERO\n"); // otherwise -- you lose.. } } 12

13 Main Program The main program is contained in the while (1) { } loop structure: it mean run forever while (1) { // do forever.. while (PINA.0) // Wait for a button and seed++; // let the counter roll over and // over to form a seed. first = second = third = seed; // preload the columns do { // mix up the numbers // while waiting for button release. first ^= seed>>1; // Exclusive ORing in the moving seed second^= seed>>2; // can really stir up the numbers. third ^= seed>>3; seed++; // keep rolling over the seed pattern } while (PINA.0 == 0); // while the button is pressed This brace goes with main ( ) for (count = 0; count < 5; count++) { // flash light when done.. for (delay = 0; delay < 10000; delay++) ; // just count up and wait PORTB.1 = 0; // turn the LED on.. for (delay = 0; delay < 10000; delay++) ; PORTB.1 = 1; // turn the LED off.. } first &= 3; // limit number to values from 0 to 3 second &= 3; third &= 3; printf("--> %d, %d,%d <--\n",first, second, third); // show the values.. // determine a payout.. if((first == 3) && (second == 3) && (third == 3)) printf("paid out: JACKPOT!!\n"); // all "cherries" else if((first == 3) (second == 3) (third == 3)) printf("paid out: One Dime\n"); // if any are "cherries".. else if((first == second) && (second == third)) printf("paid out: One Nickle\n"); // if three are alike, of any kind.. else printf("paid out: ZERO\n"); // otherwise -- you lose.. } } 13

14 Main Program This while loop is made up of these two instructions while (1) { // do forever.. while (PINA.0) // Wait for a button and seed++; // let the counter roll over and // over to form a seed. first = second = third = seed; // preload the columns do { // mix up the numbers // while waiting for button release. first ^= seed>>1; // Exclusive ORing in the moving seed second^= seed>>2; // can really stir up the numbers. third ^= seed>>3; seed++; // keep rolling over the seed pattern } while (PINA.0 == 0); // while the button is pressed for (count = 0; count < 5; count++) { // flash light when done.. for (delay = 0; delay < 10000; delay++) ; // just count up and wait PORTB.1 = 0; // turn the LED on.. for (delay = 0; delay < 10000; delay++) ; PORTB.1 = 1; // turn the LED off.. } first &= 3; // limit number to values from 0 to 3 second &= 3; third &= 3; printf("--> %d, %d,%d <--\n",first, second, third); // show the values.. // determine a payout.. if((first == 3) && (second == 3) && (third == 3)) printf("paid out: JACKPOT!!\n"); // all "cherries" else if((first == 3) (second == 3) (third == 3)) printf("paid out: One Dime\n"); // if any are "cherries".. else if((first == second) && (second == third)) printf("paid out: One Nickle\n"); // if three are alike, of any kind.. else printf("paid out: ZERO\n"); // otherwise -- you lose.. } } 14

15 Main Program This while loop is made up of these two instructions. As long as the button is not pushed (connected to bit 0 of Port A), PINA.0 will be 1 (or TRUE) and seed will be incremented. while (1) { // do forever.. while (PINA.0) // Wait for a button and seed++; // let the counter roll over and // over to form a seed. first = second = third = seed; // preload the columns do { // mix up the numbers // while waiting for button release. first ^= seed>>1; // Exclusive ORing in the moving seed second^= seed>>2; // can really stir up the numbers. third ^= seed>>3; seed++; // keep rolling over the seed pattern } while (PINA.0 == 0); // while the button is pressed for (count = 0; count < 5; count++) { // flash light when done.. for (delay = 0; delay < 10000; delay++) ; // just count up and wait PORTB.1 = 0; // turn the LED on.. for (delay = 0; delay < 10000; delay++) ; PORTB.1 = 1; // turn the LED off.. } first &= 3; // limit number to values from 0 to 3 second &= 3; third &= 3; printf("--> %d, %d,%d <--\n",first, second, third); // show the values.. // determine a payout.. if((first == 3) && (second == 3) && (third == 3)) printf("paid out: JACKPOT!!\n"); // all "cherries" else if((first == 3) (second == 3) (third == 3)) printf("paid out: One Dime\n"); // if any are "cherries".. else if((first == second) && (second == third)) printf("paid out: One Nickle\n"); // if three are alike, of any kind.. else printf("paid out: ZERO\n"); // otherwise -- you lose.. } } 15

16 Main Program When the button is pushed, the program will execute this assignment statement. while (1) { // do forever.. while (PINA.0) // Wait for a button and seed++; // let the counter roll over and // over to form a seed. first = second = third = seed; // preload the columns do { // mix up the numbers // while waiting for button release. first ^= seed>>1; // Exclusive ORing in the moving seed second^= seed>>2; // can really stir up the numbers. third ^= seed>>3; seed++; // keep rolling over the seed pattern } while (PINA.0 == 0); // while the button is pressed for (count = 0; count < 5; count++) { // flash light when done.. for (delay = 0; delay < 10000; delay++) ; // just count up and wait PORTB.1 = 0; // turn the LED on.. for (delay = 0; delay < 10000; delay++) ; PORTB.1 = 1; // turn the LED off.. } first &= 3; // limit number to values from 0 to 3 second &= 3; third &= 3; printf("--> %d, %d,%d <--\n",first, second, third); // show the values.. // determine a payout.. if((first == 3) && (second == 3) && (third == 3)) printf("paid out: JACKPOT!!\n"); // all "cherries" else if((first == 3) (second == 3) (third == 3)) printf("paid out: One Dime\n"); // if any are "cherries".. else if((first == second) && (second == third)) printf("paid out: One Nickle\n"); // if three are alike, of any kind.. else printf("paid out: ZERO\n"); // otherwise -- you lose.. } } 16

17 Main Program Then the for loops are executed to blink the LED. PORTB.1 =0, instructs the program to make pin 1 of PORTB low, turning the LED on. PORTB.1 =1, instructs the program to make pin 1 of PORTB high, turning the LED off. while (1) { // do forever.. while (PINA.0) // Wait for a button and seed++; // let the counter roll over and // over to form a seed. first = second = third = seed; // preload the columns do { // mix up the numbers // while waiting for button release. first ^= seed>>1; // Exclusive ORing in the moving seed second^= seed>>2; // can really stir up the numbers. third ^= seed>>3; seed++; // keep rolling over the seed pattern } while (PINA.0 == 0); // while the button is pressed for (count = 0; count < 5; count++) { // flash light when done.. for (delay = 0; delay < 10000; delay++) ; // just count up and wait PORTB.1 = 0; // turn the LED on.. for (delay = 0; delay < 10000; delay++) ; PORTB.1 = 1; // turn the LED off.. } first &= 3; // limit number to values from 0 to 3 second &= 3; third &= 3; printf("--> %d, %d,%d <--\n",first, second, third); // show the values.. // determine a payout.. if((first == 3) && (second == 3) && (third == 3)) printf("paid out: JACKPOT!!\n"); // all "cherries" else if((first == 3) (second == 3) (third == 3)) printf("paid out: One Dime\n"); // if any are "cherries".. else if((first == second) && (second == third)) printf("paid out: One Nickle\n"); // if three are alike, of any kind.. else printf("paid out: ZERO\n"); // otherwise -- you lose.. } } 17

18 Main Program The program then ANDS each of the variables with the constant 3. It ensures that the variables have to be between 0 and 3. while (1) { // do forever.. while (PINA.0) // Wait for a button and seed++; // let the counter roll over and // over to form a seed. first = second = third = seed; // preload the columns do { // mix up the numbers // while waiting for button release. first ^= seed>>1; // Exclusive ORing in the moving seed second^= seed>>2; // can really stir up the numbers. third ^= seed>>3; seed++; // keep rolling over the seed pattern } while (PINA.0 == 0); // while the button is pressed for (count = 0; count < 5; count++) { // flash light when done.. for (delay = 0; delay < 10000; delay++) ; // just count up and wait PORTB.1 = 0; // turn the LED on.. for (delay = 0; delay < 10000; delay++) ; PORTB.1 = 1; // turn the LED off.. } first &= 3; // limit number to values from 0 to 3 second &= 3; third &= 3; printf("--> %d, %d,%d <--\n",first, second, third); // show the values.. // determine a payout.. if((first == 3) && (second == 3) && (third == 3)) printf("paid out: JACKPOT!!\n"); // all "cherries" else if((first == 3) (second == 3) (third == 3)) printf("paid out: One Dime\n"); // if any are "cherries".. else if((first == second) && (second == third)) printf("paid out: One Nickle\n"); // if three are alike, of any kind.. else printf("paid out: ZERO\n"); // otherwise -- you lose.. } } 18

19 Main Program The remainder of this program will have no effect because we don t have any output device connected (or simulated) while (1) { // do forever.. while (PINA.0) // Wait for a button and seed++; // let the counter roll over and // over to form a seed. first = second = third = seed; // preload the columns do { // mix up the numbers // while waiting for button release. first ^= seed>>1; // Exclusive ORing in the moving seed second^= seed>>2; // can really stir up the numbers. third ^= seed>>3; seed++; // keep rolling over the seed pattern } while (PINA.0 == 0); // while the button is pressed for (count = 0; count < 5; count++) { // flash light when done.. for (delay = 0; delay < 10000; delay++) ; // just count up and wait PORTB.1 = 0; // turn the LED on.. for (delay = 0; delay < 10000; delay++) ; PORTB.1 = 1; // turn the LED off.. } first &= 3; // limit number to values from 0 to 3 second &= 3; third &= 3; printf("--> %d, %d,%d <--\n",first, second, third); // show the values.. // determine a payout.. if((first == 3) && (second == 3) && (third == 3)) printf("paid out: JACKPOT!!\n"); // all "cherries" else if((first == 3) (second == 3) (third == 3)) printf("paid out: One Dime\n"); // if any are "cherries".. else if((first == second) && (second == third)) printf("paid out: One Nickle\n"); // if three are alike, of any kind.. else printf("paid out: ZERO\n"); // otherwise -- you lose.. } } 19

20 The program (Slot.c) was copied from the book It can be compiled by CodeVision and simulated with AVR Studio It was typed in using WordPad So, it must be loaded into a CodeVision project The project must be created first Typically the wizard would be used, but this time we won t use it 20

21 Open CodeVision Normally, the most recent project worked on would be loaded In this case, no project had been opened 21

22 Choose NEW from the File Menu 22

23 Choose NEW from the File Menu This dialog box will open Choose project 23

24 Choose NEW from the File Menu This dialog box will open Choose project You will be asked if you want to use the Wizard Normally, click YES 24

25 The Wizard allows you to do many things Specify AVR Specify Clock speed Configure ports Provide project information Define interrupts and timers etc.. 25

26 We will choose NO (this time) because most of these parameters have been specified in the source file 26

27 The Configure Project Box appears 27

28 The Configure Project Box appears Click Add Choose source file (I had typed it in in WordPad and stored it in this directory) Click OPEN 28

29 The Configure Project Box appears Click Add The source file appears as part of the project 29

30 The Configure Project Box appears Click Add The source file appears as part of the project You may specify output directories 30

31 The Configure Project Box appears You can specify many parameters AVR Clock speed Memory model RAM size etc. 31

32 The source file appears 32

33 The source file appears I assumed the file was correct Chose Build All 33

34 The source file appears I assumed the file was correct Chose Build All You ll get information about your program 34

35 The source file appears I assumed the file was correct Chose Build All You ll get information about your program And the assembler output 35

36 Click OK 36

37 Click OK And click on the debugger.. 37

38 Click OK And click on the debugger AVR Studio is called (to run its simulator) 38

39 Choose OPEN 39

40 Choose OPEN And then choose the *.cof file that was created by CodeVision 40

41 Choose OPEN And then choose the *.cof file that was created by CodeVision Then AVR Studio prompts you to save its project file Click SAVE 41

42 Choose AVR and AVR Simulator 42

43 Choose AVR and AVR Simulator Click finish The simulator (debugger) starts automatically 43

44 You ll want to watch the variables and registers (how else would you know if your program is working) 44

45 From the VIEW Menu choose Watch 45

46 From the VIEW Menu choose Watch The watch window opens 46

47 Double click on the slots in the NAME column Type in the names of the variables you want to watch 47

48 You may also want to watch the registers or memory Click on VIEW registers 48

49 The register window opens 49

50 You may also want to view the ports Click the + next to I/O ATMEGA128 And then the + next to PORTA and PORTB 50

51 Finally, set break points (variables will not be updated will running the program) 51

52 Click RUN. 52

53 Click RUN and the program will run to the 1 st break point 53

54 Click RUN and the program will run to the 1 st break point The do/while loop will continue as long as PINA.0 =0 54

55 A few iterations later, the values have changed for the variables 55

56 A few iterations later, the values have changed for the variables Set PINA.0 and the program will continue 56

57 We could also insert some other instructions to test the output For example: Instead of printf () commands we could set bits in PortB Or declare a few other variables to set or clear under specific circumstances 57

58 Summary We worked through a complete example using CodeVision and AVR Studio Saw a few creative instructions ex: first ^=seed>>1; Discussed and used #define and #include Ports Read ports Wrote to ports Used some of the control statements learned in the last topic 58

C Programming in AVR Studio using WinAVR

C Programming in AVR Studio using WinAVR C Programming in AVR Studio using WinAVR Sepehr Naimi (BIHE) 2010-06-08 Introduction This tutorial will teach you how to write, compile, and trace C programs in AVR Studio. For more information, you can

More information

Getting Started with C Programming for the ATMEL AVR Microcontrollers

Getting Started with C Programming for the ATMEL AVR Microcontrollers 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.

More information

How to use AVR Studio for Assembler Programming

How to use AVR Studio for Assembler Programming How to use AVR Studio for Assembler Programming Creating your first assembler AVR project Run the AVRStudio program by selecting Start\Programs\Atmel AVR Tools\AVR Studio. You should see a screen like

More information

ATmega103 Assembler I

ATmega103 Assembler I ATmega103 Assembler I 1 Outline: ATmega103 architecture AVR assembler language Elementary example program AVR Assembler Using the AVR STUDIO 4 simulator Downloading with PonyProg 2 The ATmega103 Microprocessor

More information

An Introduction to MPLAB Integrated Development Environment

An Introduction to MPLAB Integrated Development Environment 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

More information

Using Arduino Boards in Atmel Studio

Using Arduino Boards in Atmel Studio Using Arduino Boards in Atmel Studio Sepehr Naimi BIHE University 4/14/2015 Contents Introduction... 3 Installing Atmel Studio and Making the First Project... 3 Downloading Avrdude... 3 Checking COM Port...

More information

Why using ATmega16? University of Wollongong Australia. 7.1 Overview of ATmega16. Overview of ATmega16

Why using ATmega16? University of Wollongong Australia. 7.1 Overview of ATmega16. Overview of ATmega16 s schedule Lecture 7 - C Programming for the Atmel AVR School of Electrical, l Computer and Telecommunications i Engineering i University of Wollongong Australia Week Lecture (2h) Tutorial (1h) Lab (2h)

More information

Programing the Microprocessor in C Microprocessor System Design and Interfacing ECE 362

Programing the Microprocessor in C Microprocessor System Design and Interfacing ECE 362 PURDUE UNIVERSITY Programing the Microprocessor in C Microprocessor System Design and Interfacing ECE 362 Course Staff 1/31/2012 1 Introduction This tutorial is made to help the student use C language

More information

AVR033: Getting Started with the CodeVisionAVR C Compiler. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

AVR033: Getting Started with the CodeVisionAVR C Compiler. 8-bit Microcontrollers. Application Note. Features. 1 Introduction AVR033: Getting Started with the CodeVisionAVR C Compiler Features Installing and Configuring CodeVisionAVR to Work with the Atmel STK 500 Starter Kit and AVR Studio Debugger Creating a New Project Using

More information

ATMEGA16 Development Board May 2010

ATMEGA16 Development Board May 2010 ATMEGA16 Development Board May 2010 NEX Robotics Pvt. Ltd. 1 ATMEGA16 Development Board ATMEGA16 Development Board. Introduction ATMEGA16 Development Board is made from double sided PTH PCB board to provide

More information

GPIO with ATmega328 (Arduino board)

GPIO with ATmega328 (Arduino board) 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.

More information

MSP-EXP430G2 LaunchPad Workshop

MSP-EXP430G2 LaunchPad Workshop MSP-EXP430G2 LaunchPad Workshop Meet the LaunchPad Lab 1 : Blink LaunchPad LEDs By Adrian Fernandez Meet the LaunchPad MSP430 MCU Value Line LaunchPad only $4.30 A look inside the box Complete LaunchPad

More information

COMP2121 Experiment 5

COMP2121 Experiment 5 COMP2121 Experiment 5 1. Objectives In this lab, you will learn AVR programming on Parallel input/output; Some typical input/output devices; and Interrupts 2. Preparation Before coming to the laboratory,

More information

Lecture 22: C Programming 4 Embedded Systems

Lecture 22: C Programming 4 Embedded Systems Lecture 22: C Programming 4 Embedded Systems Today s Goals Basic C programming process Variables and constants in C Pointers to access addresses Using a High Level Language High-level languages More human

More information

Using the HCS12 Serial Monitor on Wytec Dragon-12 boards. Using Motorola s HCS12 Serial Monitor on Wytec s Dragon-12 boards

Using the HCS12 Serial Monitor on Wytec Dragon-12 boards. Using Motorola s HCS12 Serial Monitor on Wytec s Dragon-12 boards 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

More information

ET-AVR Board: Downloading and Executing Programs Tutorial

ET-AVR Board: Downloading and Executing Programs Tutorial ET-AVR Board: Downloading and Executing Programs Tutorial The ET-AVR Support Board and the AVR-Stamp board form a development kit for the ATmega128 and other AVR processors. This development kit includes

More information

Embedded Systems. Review of ANSI C Topics. A Review of ANSI C and Considerations for Embedded C Programming. Basic features of C

Embedded Systems. Review of ANSI C Topics. A Review of ANSI C and Considerations for Embedded C Programming. Basic features of C Embedded Systems A Review of ANSI C and Considerations for Embedded C Programming Dr. Jeff Jackson Lecture 2-1 Review of ANSI C Topics Basic features of C C fundamentals Basic data types Expressions Selection

More information

Creating a Standard C++ Program in Visual Studio C January 2013

Creating a Standard C++ Program in Visual Studio C January 2013 Creating a Standard C++ Program in Visual Studio C++ 10.0 January 2013 ref: http://msdn.microsoft.com/en-us/library/ms235629(v=vs.100).aspx To create a project and add a source file 1 1. On the File menu,

More information

SKP16C62P Tutorial 1 Software Development Process using HEW. Renesas Technology America Inc.

SKP16C62P Tutorial 1 Software Development Process using HEW. Renesas Technology America Inc. 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

More information

MSP430 Tutorial. BY K.Harish. Department of MME, NIT Trichy

MSP430 Tutorial. BY K.Harish. Department of MME, NIT Trichy MSP430 Tutorial BY K.Harish Department of MME, NIT Trichy GETTING STARTED WITH MSP430 Launchpad is a low cost development solution to get started with TI s MSP430 Value Line devices. The Launchpad kit

More information

Interrupts. Hardware and Software interrupts and event-driven programming

Interrupts. Hardware and Software interrupts and event-driven programming Interrupts Hardware and Software interrupts and event-driven programming References and Resources Introduction to Embedded Programming ASM and C examples http://www.scriptoriumdesigns.com/embedded/interrupts.php

More information

AVR030: Getting Started with IAR Embedded Workbench for Atmel AVR. 8-bit Microcontrollers. Application Note. Features.

AVR030: Getting Started with IAR Embedded Workbench for Atmel AVR. 8-bit Microcontrollers. Application Note. Features. AVR030: Getting Started with IAR Embedded Workbench for Atmel AVR Features How to open a new workspace and project in IAR Embedded Workbench Description and option settings for compiling the c-code Setting

More information

Quick Start Tutorial. Using the TASKING* Software Development Tools with the Intel 8x930 Family Evaluation Board

Quick Start Tutorial. Using the TASKING* Software Development Tools with the Intel 8x930 Family Evaluation Board Quick Start Tutorial Using the TASKING* Software Development Tools with the Intel 8x930 Family Evaluation Board This explains how to use the TASKING Microsoft* Windows*-based software development tools

More information

Experiment Objectives. 2. Tasks

Experiment Objectives. 2. Tasks Experiment 4 1. Objectives The objectives of this experiment are to Implement functions using AVR assembly language. Use a stack to store dynamic data such as parameters and local variables. Use AVR macros.

More information

LAB 1 REPRESENTATION OF NUMBERS AND INTRODUCTION TO C

LAB 1 REPRESENTATION OF NUMBERS AND INTRODUCTION TO C LAB 1 REPRESENTATION OF NUMBERS AND INTRODUCTION TO C 1. LAB OBJECTIVE The objective of this lab is to review binary numbers and to review/introduce you to the C programming language and the MATLAB environment.

More information

ET-BASE AVR ATmega64/128

ET-BASE AVR ATmega64/128 ET-BASE AVR ATmega64/128 ET-BASE AVR ATmega64/128 which is a Board Microcontroller AVR family from ATMEL uses MCU No.ATmega64 and ATmega128 64PIN. Board ET-BASE AVR ATmega64/128 uses MCU s resources on

More information

Getting Started with Embedded System Development using MicroBlaze processor & Spartan-3A FPGAs. MicroBlaze

Getting Started with Embedded System Development using MicroBlaze processor & Spartan-3A FPGAs. MicroBlaze Getting Started with Embedded System Development using MicroBlaze processor & Spartan-3A FPGAs This tutorial is an introduction to Embedded System development with the MicroBlaze soft processor and low

More information

Programming in C Language

Programming in C Language Brno University of Technology Programming in C Language Microprocessor Techniques and Embedded Systems Lecture 5 Dr. Tomas Fryza Ver. 2014-11-04 Contents Microcontrollers Programming in C Language Application

More information

Interrupts and the Timer Overflow Interrupts Huang Sections 6.1-6.4. What Happens When You Reset the HCS12?

Interrupts and the Timer Overflow Interrupts Huang Sections 6.1-6.4. What Happens When You Reset the HCS12? Interrupts and the Timer Overflow Interrupts Huang Sections 6.1-6.4 o Using the Timer Overflow Flag to interrupt a delay o Introduction to Interrupts o How to generate an interrupt when the timer overflows

More information

8-bit Microcontroller. Application Note. AVR134: Real-Time Clock (RTC) using the Asynchronous Timer. Features. Theory of Operation.

8-bit Microcontroller. Application Note. AVR134: Real-Time Clock (RTC) using the Asynchronous Timer. Features. Theory of Operation. AVR134: Real-Time Clock (RTC) using the Asynchronous Timer Features Real-Time Clock with Very Low Power Consumption (4µA @ 3.3V) Very Low Cost Solution Adjustable Prescaler to Adjust Precision Counts Time,

More information

Getting Started with GCC for Motorola 68HC11 Using EVBPlus2 with Buffalo

Getting Started with GCC for Motorola 68HC11 Using EVBPlus2 with Buffalo Getting Started with GCC for Motorola 68HC11 Using EVBPlus2 with Buffalo Application Note AN0005 Author : Lin Zhao Date : September 2, 2003 Abstract: This application note shows you how to write a Hello

More information

Laboratory 1 Task 1: Familiarisation

Laboratory 1 Task 1: Familiarisation Laboratory 1 Task 1: Familiarisation Laboratory 1 should take an average student 9 hours (3 lab sessions) to complete. Objectives: In this experiment you will learn the basic skills required to use and

More information

MiniPin II development board

MiniPin II development board MiniPin II development board BY JURIJ MIKELN www.svet-el.si\english MiniPin II is a smaller brother of MegaPin. Smaller, but still very user friendly and versatile development board, where programs for

More information

AVR Butterfly Training. Atmel Norway, AVR Applications Group

AVR Butterfly Training. Atmel Norway, AVR Applications Group AVR Butterfly Training Atmel Norway, AVR Applications Group 1 Table of Contents INTRODUCTION...3 GETTING STARTED...4 REQUIRED SOFTWARE AND HARDWARE...4 SETTING UP THE HARDWARE...4 SETTING UP THE SOFTWARE...5

More information

Lab Experiment 1: The LPC 2148 Education Board

Lab Experiment 1: The LPC 2148 Education Board Lab Experiment 1: The LPC 2148 Education Board 1 Introduction The aim of this course ECE 425L is to help you understand and utilize the functionalities of ARM7TDMI LPC2148 microcontroller. To do that,

More information

PC Base Adapter Daughter Card UART GPIO. Figure 1. ToolStick Development Platform Block Diagram

PC Base Adapter Daughter Card UART GPIO. Figure 1. ToolStick Development Platform Block Diagram TOOLSTICK VIRTUAL TOOLS USER S GUIDE RELEVANT DEVICES 1. Introduction The ToolStick development platform consists of a ToolStick Base Adapter and a ToolStick Daughter card. The ToolStick Virtual Tools

More information

Develop a Dallas 1-Wire Master Using the Z8F1680 Series of MCUs

Develop a Dallas 1-Wire Master Using the Z8F1680 Series of MCUs 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,

More information

The C Programming Language Guide

The C Programming Language Guide The C Programming Language Guide for the Robot Course work Module Table of Contents Variables...3 Assignments...3 Operators...4 Arithmetic Operators...4 Bitwise Logic Operators...5 Incremental Operators...5

More information

There are a number of ways of doing this, and we will examine two of them. Fig1. Circuit 3a Flash two LEDs

There are a number of ways of doing this, and we will examine two of them. Fig1. Circuit 3a Flash two LEDs Flashing LEDs We re going to experiment with flashing some LEDs in this part. First, we will just flash two alternate LEDs, then make a simple set of traffic lights, and finally a running pattern; you

More information

13 Managing Devices. Your computer is an assembly of many components from different manufacturers. LESSON OBJECTIVES

13 Managing Devices. Your computer is an assembly of many components from different manufacturers. LESSON OBJECTIVES LESSON 13 Managing Devices OBJECTIVES After completing this lesson, you will be able to: 1. Open System Properties. 2. Use Device Manager. 3. Understand hardware profiles. 4. Set performance options. Estimated

More information

1 Overview. 2 Basic Program Structure. 2.1 Required and Optional Parts of Sketch

1 Overview. 2 Basic Program Structure. 2.1 Required and Optional Parts of Sketch Living with the Lab What s this void loop thing? Fall 2011 Gerald Recktenwald v: October 7, 2011 gerry@me.pdx.edu 1 Overview This document aims to explain two kinds of loops: the loop function that is

More information

Getting Started. 1.1 Starting Visual C The aims of the chapter are to provide a quick introduction to the use of Visual C

Getting Started. 1.1 Starting Visual C The aims of the chapter are to provide a quick introduction to the use of Visual C Getting Started The aims of the chapter are to provide a quick introduction to the use of Visual C++ 6.0. 1.1 Starting Visual C++ 6.0 As shown in Figure 1, to start Visual C++ 6.0 click on Start in the

More information

PIC Programming in Assembly. (http://www.mstracey.btinternet.co.uk/index.htm)

PIC Programming in Assembly. (http://www.mstracey.btinternet.co.uk/index.htm) PIC Programming in Assembly (http://www.mstracey.btinternet.co.uk/index.htm) Tutorial 1 Good Programming Techniques. Before we get to the nitty gritty of programming the PIC, I think now is a good time

More information

Punctuation in C. Identifiers and Expressions. Identifiers. Variables. Keywords. Identifier Examples

Punctuation in C. Identifiers and Expressions. Identifiers. Variables. Keywords. Identifier Examples Identifiers and Expressions CSE 130: Introduction to C Programming Spring 2005 Punctuation in C Statements are terminated with a ; Groups of statements are enclosed by curly braces: { and } Commas separate

More information

Introduction to the Atmel Studio 6 Environment Colin Tan

Introduction to the Atmel Studio 6 Environment Colin Tan Introduction to the Atmel Studio 6 Environment Colin Tan (colin.ky.tan@gmail.com) 1. Introduction In this document you will be introduced to the Atmel Studio 6 environment. Atmel Studio 6 is a powerful

More information

EXERCISE 3: String Variables and ASCII Code

EXERCISE 3: String Variables and ASCII Code EXERCISE 3: String Variables and ASCII Code EXERCISE OBJECTIVE When you have completed this exercise, you will be able to describe the use of string variable and ASCII code. You will use Flowcode and the

More information

MS VS Express 2008 C++ Quick Introduction. A1 Visual C++ 1

MS VS Express 2008 C++ Quick Introduction. A1 Visual C++ 1 MS VS Express 2008 C++ A1 Visual C++ 1 Quick Introduction The following pages provide a quick tutorial on using Microsoft Visual Studio Express 2008 C++ to produce a small project. The following discussion

More information

NIOS CPU Based Embedded Computer System on Programmable Chip

NIOS CPU Based Embedded Computer System on Programmable Chip NIOS CPU Based Embedded Computer System on Programmable Chip COE718: Hardware Software Co-Design of Embedded Systems 1 Lab Objectives BONUS LAB: PART-I This lab has been constructed to introduce the development

More information

Assignment 09. Problem statement : Write a Embedded C program to switch-on/switch-off LED.

Assignment 09. Problem statement : Write a Embedded C program to switch-on/switch-off LED. Assignment 09 Problem statement : Write a Embedded C program to switch-on/switch-off LED. Learning Objective: -> To study embedded programming concepts -> To study LCD control functions -> How output is

More information

How to use WinAVR for the Microrobot AVR. Products(Rev 0.1)

How to use WinAVR for the Microrobot AVR. Products(Rev 0.1) How to use WinAVR for the Microrobot AVR Products(Rev 01) Contents What is WinAVR? How to Install? How to Use WinAVR How the Sample Source Code Works Useful Tips What is WinAVR? WinAVR (pronounced "whenever")

More information

AVR Timer/Counter. Prof Prabhat Ranjan DA-IICT, Gandhinagar

AVR Timer/Counter. Prof Prabhat Ranjan DA-IICT, Gandhinagar AVR Timer/Counter Prof Prabhat Ranjan DA-IICT, Gandhinagar 8-bit Timer/Counter0 with PWM Single Compare Unit Counter Clear Timer on Compare Match (Auto Reload) Glitch-free, Phase Correct Pulse Width Modulator

More information

Application Note: AN00141 xcore-xa - Application Development

Application Note: AN00141 xcore-xa - Application Development Application Note: AN00141 xcore-xa - Application Development This application note shows how to create a simple example which targets the XMOS xcore-xa device and demonstrates how to build and run this

More information

INTRODUCTION TO SERIAL ARM

INTRODUCTION TO SERIAL ARM INTRODUCTION TO SERIAL ARM A robot manipulator consists of links connected by joints. The links of the manipulator can be considered to form a kinematic chain. The business end of the kinematic chain of

More information

Project Manager Editor & Debugger

Project Manager Editor & Debugger TM IDE for Microcontrollers Quick Start µvision2, the new IDE from Keil Software, combines Project Management, Source Code Editing, and Program Debugging in one powerful environment. This Quick Start guide

More information

Using Arduino Microcontrollers to Sense DC Motor Speed and Position

Using Arduino Microcontrollers to Sense DC Motor Speed and Position ECE480 Design Team 3 Using Arduino Microcontrollers to Sense DC Motor Speed and Position Tom Manner April 4, 2011 page 1 of 7 Table of Contents 1. Introduction ----------------------------------------------------------

More information

Sources: On the Web: Slides will be available on:

Sources: On the Web: Slides will be available on: C programming Introduction The basics of algorithms Structure of a C code, compilation step Constant, variable type, variable scope Expression and operators: assignment, arithmetic operators, comparison,

More information

Programming PIC Microcontrollers in PicBasic Pro Lesson 1 Cornerstone Electronics Technology and Robotics II

Programming PIC Microcontrollers in PicBasic Pro Lesson 1 Cornerstone Electronics Technology and Robotics II Programming PIC Microcontrollers in PicBasic Pro Lesson 1 Cornerstone Electronics Technology and Robotics II Administration: o Prayer PicBasic Pro Programs Used in This Lesson: o General PicBasic Pro Program

More information

Hi-Speed USB Flash Disk User s Manual Guide

Hi-Speed USB Flash Disk User s Manual Guide Hi-Speed USB Flash Disk User s Manual Guide System Requirements Windows 98, ME, 2000, XP, Mac OS 10.1, Linux 2.4 or above AMD or Intel Pentium 133MHz or better based computer USB 1.1, USB 2.0 or higher

More information

Install MS SQL Server 2012 Express Edition

Install MS SQL Server 2012 Express Edition Install MS SQL Server 2012 Express Edition Sohodox now works with SQL Server Express Edition. Earlier versions of Sohodox created and used a MS Access based database for storing indexing data and other

More information

Informatica e Sistemi in Tempo Reale

Informatica e Sistemi in Tempo Reale Informatica e Sistemi in Tempo Reale Introduction to C programming Giuseppe Lipari http://retis.sssup.it/~lipari Scuola Superiore Sant Anna Pisa October 25, 2010 G. Lipari (Scuola Superiore Sant Anna)

More information

ATMega. Development Board. Manual V1.0

ATMega. Development Board. Manual V1.0 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

More information

8051 Microcontroller in EDWinXP Visionics

8051 Microcontroller in EDWinXP Visionics 1 Norlinvest Ltd, BVI. Visionics is a trade name of Norlinvest Ltd. All Rights Reserved. No part of the 8051 Microcontroller in EDWinXP document can be reproduced in any form or by any means without the

More information

Using Windows Task Scheduler instead of the Backup Express Scheduler

Using Windows Task Scheduler instead of the Backup Express Scheduler Using Windows Task Scheduler instead of the Backup Express Scheduler This document contains a step by step guide to using the Windows Task Scheduler instead of the Backup Express Scheduler. Backup Express

More information

Introduction to C Programming S Y STEMS

Introduction to C Programming S Y STEMS Introduction to C Programming CS 40: INTRODUCTION TO U NIX A ND L I NUX O P E R AT ING S Y STEMS Objectives Introduce C programming, including what it is and what it contains, which includes: Command line

More information

An Introduction To Simple Scheduling (Primarily targeted at Arduino Platform)

An Introduction To Simple Scheduling (Primarily targeted at Arduino Platform) An Introduction To Simple Scheduling (Primarily targeted at Arduino Platform) I'm late I'm late For a very important date. No time to say "Hello, Goodbye". I'm late, I'm late, I'm late. (White Rabbit in

More information

EE8205: Embedded Computer System Electrical and Computer Engineering, Ryerson University. Multitasking ARM-Applications with uvision and RTX

EE8205: Embedded Computer System Electrical and Computer Engineering, Ryerson University. Multitasking ARM-Applications with uvision and RTX EE8205: Embedded Computer System Electrical and Computer Engineering, Ryerson University Multitasking ARM-Applications with uvision and RTX 1. Objectives The purpose of this lab is to lab is to introduce

More information

C Programming Structure of a C18 Program

C Programming Structure of a C18 Program What does this document covers? This document attempts to explain the basic structure of a C18 program. It is followed by some simple examples. A very simple C18 program is shown below: Example 1 What

More information

Project Work. PCB Designing And AC/DC Power Supply Circuits. Micro-inverter. Microcontroller I/O Programming

Project Work. PCB Designing And AC/DC Power Supply Circuits. Micro-inverter. Microcontroller I/O Programming Project Work PCB Designing And AC/DC Power Supply Circuits Micro-inverter Microcontroller I/O Programming Pitd Printed circuit itboard d(pcb) Printed Circuit Boards are made specifically for each circuit.

More information

QUICK START GUIDE. SG2 Client - Programming Software SG2 Series Programmable Logic Relay

QUICK START GUIDE. SG2 Client - Programming Software SG2 Series Programmable Logic Relay QUICK START GUIDE SG2 Client - Programming Software SG2 Series Programmable Logic Relay SG2 Client Programming Software T he SG2 Client software is the program editor for the SG2 Series Programmable Logic

More information

CP Lab 2: Writing programs for simple arithmetic problems

CP Lab 2: Writing programs for simple arithmetic problems Computer Programming (CP) Lab 2, 2015/16 1 CP Lab 2: Writing programs for simple arithmetic problems Instructions The purpose of this Lab is to guide you through a series of simple programming problems,

More information

CSI 333 Lecture 2 Introduction to C: Part I 2 1 / 16

CSI 333 Lecture 2 Introduction to C: Part I 2 1 / 16 CSI 333 Lecture 2 Introduction to C: Part I 2 1 / 16 Basics of C Remark: Skim Chapters 1 through 6 of Deitel & Deitel. You will notice the following: C is (more or less) a subset of Java. (So, you are

More information

Microprocessors and Microcontrollers. Lab #0 Getting Started with MPLAB-X IDE

Microprocessors and Microcontrollers. Lab #0 Getting Started with MPLAB-X IDE EE 3954 Microprocessors and Microcontrollers Lab #0 Getting Started with MPLAB-X IDE Background: Some or all of the laboratory exercises performed throughout this course will involve writing assembly language

More information

Accurate Measurement of the Mains Electricity Frequency

Accurate Measurement of the Mains Electricity Frequency Accurate Measurement of the Mains Electricity Frequency Dogan Ibrahim Near East University, Faculty of Engineering, Lefkosa, TRNC dogan@neu.edu.tr Abstract The frequency of the mains electricity supply

More information

Animated Lighting Software Overview

Animated Lighting Software Overview Animated Lighting Software Revision 1.0 August 29, 2003 Table of Contents SOFTWARE OVERVIEW 1) Dasher Pro and Animation Director overviews 2) Installing the software 3) Help 4) Configuring the software

More information

Display Message on Notice Board using GSM

Display Message on Notice Board using GSM Advance in Electronic and Electric Engineering. ISSN 2231-1297, Volume 3, Number 7 (2013), pp. 827-832 Research India Publications http://www.ripublication.com/aeee.htm Display Message on Notice Board

More information

Mixing C and assembly language programs Copyright 2007 William Barnekow All Rights Reserved

Mixing C and assembly language programs Copyright 2007 William Barnekow <barnekow@msoe.edu> All Rights Reserved Mixing C and assembly language programs Copyright 2007 William Barnekow All Rights Reserved It is sometimes advantageous to call subroutines written in assembly language from programs

More information

Start A New Project with Keil Microcontroller Development Kit Version 5 and Freescale FRDM-KL25Z

Start A New Project with Keil Microcontroller Development Kit Version 5 and Freescale FRDM-KL25Z Start A New Project with Keil Microcontroller Development Kit Version 5 and Freescale FRDM-KL25Z This tutorial is intended for starting a new project to develop software with Freescale FRDM-KL25Z board

More information

Interfacing a Servo to the ATmega16

Interfacing a Servo to the ATmega16 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

More information

Setting Up a Windows Virtual Machine for SANS FOR526

Setting Up a Windows Virtual Machine for SANS FOR526 Setting Up a Windows Virtual Machine for SANS FOR526 As part of the Windows Memory Forensics course, SANS FOR526, you will need to create a Windows virtual machine to use in class. We recommend using VMware

More information

C++ project using Arduino.cc core and AVR Studio

C++ project using Arduino.cc core and AVR Studio 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

More information

4.3.2 Seven-Segment Displays

4.3.2 Seven-Segment Displays Figure 53 Connecting LEDs to PortB 4.3.2 Seven-Segment Displays Seven-segment displays can display the figures of our numbering system and a couple of special characters. There are many types of seven-segment

More information

Jump-Start Tutorial For ProcessModel

Jump-Start Tutorial For ProcessModel Jump-Start Tutorial For ProcessModel www.blueorange.org.uk ProcessModel Jump-Start Tutorial This tutorial provides step-by-step instructions for creating a process model, running the simulation, and viewing

More information

Serial Communications

Serial Communications Serial Communications 1 Serial Communication Introduction Serial communication buses Asynchronous and synchronous communication UART block diagram UART clock requirements Programming the UARTs Operation

More information

Interface and Simulation of a LCD Text Display

Interface and Simulation of a LCD Text Display OVERVIEW The following application note describes the interface of a LCD text display to a 8051 microcontroller system. This application note comes with the µvision2 project LCD_Display.UV2 that includes

More information

MS Visual C++ Introduction. Quick Introduction. A1 Visual C++

MS Visual C++ Introduction. Quick Introduction. A1 Visual C++ MS Visual C++ Introduction 1 Quick Introduction The following pages provide a quick tutorial on using Microsoft Visual C++ 6.0 to produce a small project. There should be no major differences if you are

More information

Software development and debugging for NXP ARM7 MCUs

Software development and debugging for NXP ARM7 MCUs THE MINISTRY of EDUCATION and SCIENCE of RUSSIAN FEDERATION SAMARA STATE AEROSPACE UNIVERSITY Software development and debugging for NXP ARM7 MCUs Learner s guide SAMARA 2011 2 Compilers: Kudryavtsev Ilya

More information

Automatic Threshold Values and Variables

Automatic Threshold Values and Variables Automatic Threshold Values and Variables In this lesson, we re going to look a little deeper into the world of values, and pay special attention to the programming structures that are used to represent

More information

PROGRAMMING WITH ARDUINO - 1

PROGRAMMING WITH ARDUINO - 1 PROGRAMMING WITH ARDUINO - 1 IESL RoboGames 2014 University of Moratuwa Department of Computer Science & Engineering Table of Contents Introduction... 2 Arduino Development Board... 2 How to Setup Arduino

More information

Intro to Microprocessors and Microcomputers

Intro to Microprocessors and Microcomputers Intro to Microprocessors and Microcomputers Content Microprocessor, microcontrollers and microcomputers Communication within microcomputers Registers Process architecture CPU Data and program storage Negative

More information

Definitions and Documents

Definitions and Documents C Compiler Real-Time OS Simulator Training Evaluation Boards Using and Programming the I 2 C BUS Application Note 153 June 8, 2000, Munich, Germany by Keil Support, Keil Elektronik GmbH support.intl@keil.com

More information

DsPIC HOW-TO GUIDE Creating & Debugging a Project in MPLAB

DsPIC HOW-TO GUIDE Creating & Debugging a Project in MPLAB DsPIC HOW-TO GUIDE Creating & Debugging a Project in MPLAB Contents at a Glance 1. Introduction of MPLAB... 4 2. Development Tools... 5 3. Getting Started... 6 3.1. Create a Project... 8 3.2. Start MPLAB...

More information

1. Constants. 2. Variables. 3. Reserved words or key words. 4. Constants. Character set in C

1. Constants. 2. Variables. 3. Reserved words or key words. 4. Constants. Character set in C Character set in C We should use only the following characters in writing a C program. These characters can be combined to create C words. Alphabet: A, B, C, D.. Z, a, b, c, d..z Numeric digits: 0, 1,

More information

Making a Mobile Application with the Compact Framework 2.0

Making a Mobile Application with the Compact Framework 2.0 Making a Mobile Application with the Compact Framework 2.0 Andrew Cain Swinburne University of Technology Faculty of Information and Communication Technologies P.O. Box 218, Hawthorn, Victoria 3122, Australia

More information

BitLocker To Go User Guide

BitLocker To Go User Guide BitLocker To Go User Guide 1. Introduction BitLocker To Go a new feature of Windows 7 is a full-disk encryption protection technology for removable storage devices that are connected to one of the USB

More information

The PIC16F819 Microcontroller

The PIC16F819 Microcontroller The PIC16F819 Microcontroller Introduction Digital electronic circuits, which process information represented as numbers rather than as analogue voltages, can be found everywhere from supercomputers to

More information

Magic 8 Ball. Student's name & ID (1): Partner's name & ID (2): Your Section number & TA's name

Magic 8 Ball. Student's name & ID (1): Partner's name & ID (2): Your Section number & TA's name MPS Magic 8 Ball Lab Exercise Magic 8 Ball Student's name & ID (1): Partner's name & ID (2): Your Section number & TA's name Notes: You must work on this assignment with your partner. Hand in a printer

More information

Connecting your Omega/BetaPAT PLUS to a PC via a USB

Connecting your Omega/BetaPAT PLUS to a PC via a USB Connecting your Omega/BetaPAT PLUS to a PC via a USB Install software Windows XP and below Insert the disc into your computers disc drive and run through the setup wizard. Windows Vista & 7 1. Insert the

More information

Arduino project. Arduino board. Serial transmission

Arduino project. Arduino board. Serial transmission Arduino project Arduino is an open-source physical computing platform based on a simple microcontroller board, and a development environment for writing software for the board. Open source means that the

More information

Debugging in AVR32 Studio

Debugging in AVR32 Studio Debugging in AVR32 Studio Debugging is a very powerful tool if you want to have a deeper look into your program. You can look at both variables and register values and check they are correct. In AVR32

More information

Introduction to the use of the environment of Microsoft Visual Studio 2008

Introduction to the use of the environment of Microsoft Visual Studio 2008 Steps to work with Visual Studio 2008 1) Start Visual Studio 2008. To do this you need to: a) Activate the Start menu by clicking the Start button at the lower-left corner of your screen. b) Set the mouse

More information