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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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 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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

ENGI E1112 Departmental Project Report: Computer Science/Computer Engineering

ENGI E1112 Departmental Project Report: Computer Science/Computer Engineering ENGI E1112 Departmental Project Report: Computer Science/Computer Engineering Daniel Estrada Taylor, Dev Harrington, Sekou Harris December 2012 Abstract This document is the final report for ENGI E1112,

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

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

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

Milwaukee School of Engineering MSOE 2013 CE-2800 Embedded Systems I

Milwaukee School of Engineering MSOE 2013 CE-2800 Embedded Systems I Milwaukee School of Engineering MSOE 2013 CE-2800 Embedded Systems I Description Required Materials Course Learning Outcomes This course presents a typical embedded microcontroller and assembly language

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

www.dragino.com Yun Shield Quick Start Guide VERSION: 1.0 Version Description Date 1.0 Release 2014-Jul-08 Yun Shield Quick Start Guide 1 / 14

www.dragino.com Yun Shield Quick Start Guide VERSION: 1.0 Version Description Date 1.0 Release 2014-Jul-08 Yun Shield Quick Start Guide 1 / 14 Yun Shield Quick Start Guide VERSION: 1.0 Version Description Date 1.0 Release 2014-Jul-08 Yun Shield Quick Start Guide 1 / 14 Index: 1 Introduction... 3 1.1 About this quick start guide... 3 1.2 What

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

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

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

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

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

8-bit Microcontroller. Application Note. AVR286: LIN Firmware Base for LIN/UART Controller. LIN Features. 1. Atmel LIN/UART Controller

8-bit Microcontroller. Application Note. AVR286: LIN Firmware Base for LIN/UART Controller. LIN Features. 1. Atmel LIN/UART Controller AVR286: LIN Firmware Base for LIN/UART Controller LIN Features The LIN (Local Interconnect Network) is a serial communications protocol which efficiently supports the control of mechatronics nodes in distributed

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

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

Control III Programming in C (small PLC)

Control III Programming in C (small PLC) Description of the commands Revision date: 2013-02-21 Subject to modifications without notice. Generally, this manual refers to products without mentioning existing patents, utility models, or trademarks.

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

EVAL-UFDC-1/UFDC-1M-16

EVAL-UFDC-1/UFDC-1M-16 Evaluation Board for Universal Frequency-to- Digital Converters UFDC-1 and UFDC-1M-16 EVAL-UFDC-1/UFDC-1M-16 FEATURES Full-Featured Evaluation Board for the Universal Frequency-to-Digital Converters UFDC-1

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

AVR317: Using the Master SPI Mode of the USART module. 8-bit Microcontrollers. Application Note. Features. Introduction

AVR317: Using the Master SPI Mode of the USART module. 8-bit Microcontrollers. Application Note. Features. Introduction AVR317: Using the Master SPI Mode of the USART module Features Enables Two SPI buses in one device Hardware buffered SPI communication Polled communication example Interrupt-controlled communication example

More information

8051 MICROCONTROLLER COURSE

8051 MICROCONTROLLER COURSE 8051 MICROCONTROLLER COURSE Objective: 1. Familiarization with different types of Microcontroller 2. To know 8051 microcontroller in detail 3. Programming and Interfacing 8051 microcontroller Prerequisites:

More information

Arduino and PLC Communication

Arduino and PLC Communication Arduino and PLC Communication Designed and written by: Jason Eddrief 1 Table of Contents System Introduction... 3 Communication Protocol... 5 Arduino... 6 Sending Data:... 6 Receiving Data:... 7 Communicating:...

More information

Setting up Windows Phone 8 environment in VMWare

Setting up Windows Phone 8 environment in VMWare Setting up Windows Phone 8 environment in VMWare Pre Requisites Windows Phone 8 SDK is only supported with 64-bit Windows 8 Pro or higher. VMware player 5.0.1 or workstation 9. ( The Hypervisor is not

More information

Introduction to LogixPro - Lab

Introduction to LogixPro - Lab Programmable Logic and Automation Controllers Industrial Control Systems I Introduction to LogixPro - Lab Purpose This is a self-paced lab that will introduce the student to the LogixPro PLC Simulator

More information

Speed Based on Volume Values & Assignment (Part 1)

Speed Based on Volume Values & Assignment (Part 1) Speed Based on Volume Values & Assignment (Part 1) The Sound Sensor is the last of the standard NXT sensors. In essence it s a kind of microphone which senses amplitude (how loud or soft a sound is), but

More information

Using the RDTSC Instruction for Performance Monitoring

Using the RDTSC Instruction for Performance Monitoring Using the Instruction for Performance Monitoring http://developer.intel.com/drg/pentiumii/appnotes/pm1.htm Using the Instruction for Performance Monitoring Information in this document is provided in connection

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

3. Programming the STM32F4-Discovery

3. Programming the STM32F4-Discovery 1 3. Programming the STM32F4-Discovery The programming environment including the settings for compiling and programming are described. 3.1. Hardware - The programming interface A program for a microcontroller

More information

Computer Organization and Components

Computer Organization and Components Computer Organization and Components IS1500, fall 2015 Lecture 5: I/O Systems, part I Associate Professor, KTH Royal Institute of Technology Assistant Research Engineer, University of California, Berkeley

More information

How to design and implement firmware for embedded systems

How to design and implement firmware for embedded systems How to design and implement firmware for embedded systems Last changes: 17.06.2010 Author: Rico Möckel The very beginning: What should I avoid when implementing firmware for embedded systems? Writing code

More information

Tutorial for MPLAB Starter Kit for PIC18F

Tutorial for MPLAB Starter Kit for PIC18F Tutorial for MPLAB Starter Kit for PIC18F 2006 Microchip Technology Incorporated. All Rights Reserved. WebSeminar Title Slide 1 Welcome to the tutorial for the MPLAB Starter Kit for PIC18F. My name is

More information

Lab 1 Course Guideline and Review

Lab 1 Course Guideline and Review Lab 1 Course Guideline and Review Overview Welcome to ECE 3567 Introduction to Microcontroller Lab. In this lab we are going to experimentally explore various useful peripherals of a modern microcontroller

More information

2.0 Command and Data Handling Subsystem

2.0 Command and Data Handling Subsystem 2.0 Command and Data Handling Subsystem The Command and Data Handling Subsystem is the brain of the whole autonomous CubeSat. The C&DH system consists of an Onboard Computer, OBC, which controls the operation

More information

STANDALONE AVR ISP PROGRAMMER QUICK GUIDE

STANDALONE AVR ISP PROGRAMMER QUICK GUIDE SELFROG STANDALONE AVR ISP PROGRAMMER QUICK GUIDE PC Driver installation You can download the windows driver from the download link in the product page. SELFROG uses a USB virtual COM port to communicate

More information

Freescale Semiconductor, I

Freescale Semiconductor, I nc. Application Note 6/2002 8-Bit Software Development Kit By Jiri Ryba Introduction 8-Bit SDK Overview This application note describes the features and advantages of the 8-bit SDK (software development

More information

APPLICATION NOTE. Atmel AT02607: Wireless Product Development Using Atmel Studio and ASF. Atmel MCU Wireless. Description.

APPLICATION NOTE. Atmel AT02607: Wireless Product Development Using Atmel Studio and ASF. Atmel MCU Wireless. Description. APPLICATION NOTE Atmel AT02607: Wireless Product Development Using Atmel Studio and ASF Description Atmel MCU Wireless This application note introduces the users on how to develop products using Atmel

More information

ezsystem elab16m Project 1F: Alarm System (Full Project description)

ezsystem elab16m Project 1F: Alarm System (Full Project description) ezsystem elab16m Project 1F: Alarm System (Full Project description) ezsystem The aim of ezsystem is to enable Creativity and Innovation at an early age in a Problem Based Learning (PBL) approach. ezsystem

More information

ELEG3924 Microprocessor Ch.7 Programming In C

ELEG3924 Microprocessor Ch.7 Programming In C Department of Electrical Engineering University of Arkansas ELEG3924 Microprocessor Ch.7 Programming In C Dr. Jingxian Wu wuj@uark.edu OUTLINE 2 Data types and time delay I/O programming and Logic operations

More information

Dual Ports Serial PC Card User Manual

Dual Ports Serial PC Card User Manual Dual Ports Serial PC Card User Manual FCC COMPLIANCE STATEMENTS This equipment has been tested and found to comply with the limits for a Class B digital device, pursuant to Part 15 of the FCC Rules. These

More information

Chapter 28: Expanding Web Studio

Chapter 28: Expanding Web Studio CHAPTER 25 - SAVING WEB SITES TO THE INTERNET Having successfully completed your Web site you are now ready to save (or post, or upload, or ftp) your Web site to the Internet. Web Studio has three ways

More information

USBSPYDER08 Discovery Kit for Freescale MC9RS08KA, MC9S08QD and MC9S08QG Microcontrollers User s Manual

USBSPYDER08 Discovery Kit for Freescale MC9RS08KA, MC9S08QD and MC9S08QG Microcontrollers User s Manual USBSPYDER08 Discovery Kit for Freescale MC9RS08KA, MC9S08QD and MC9S08QG Microcontrollers User s Manual Copyright 2007 SofTec Microsystems DC01197 We want your feedback! SofTec Microsystems is always on

More information

BioWin Network Installation

BioWin Network Installation BioWin Network Installation Introduction This document outlines the procedures for installing the network version of BioWin. There are three parts to the network version installation: 1. The installation

More information

Programming the PIC18/ XC8 Using C- Coding Dr. Farahmand

Programming the PIC18/ XC8 Using C- Coding Dr. Farahmand Programming the PIC18/ XC8 Using C- Coding Dr. Farahmand Updated: 3/14/12 The C Compiler n The C18/XC8 compiler is a free program for students used for programing the PIC in C- Language. n Programming

More information

1998-2002 by NetMedia, Inc. All rights reserved. Basic Express, BasicX, BX-01, BX-24 and BX-35 are trademarks of NetMedia, Inc.

1998-2002 by NetMedia, Inc. All rights reserved. Basic Express, BasicX, BX-01, BX-24 and BX-35 are trademarks of NetMedia, Inc. 1998-2002 by NetMedia, Inc. All rights reserved. Basic Express, BasicX, BX-01, BX-24 and BX-35 are trademarks of NetMedia, Inc. Microsoft, Windows and Visual Basic are either registered trademarks or trademarks

More information

After: bmotorreflected[port2]= 1; //Flip port2 s direction

After: bmotorreflected[port2]= 1; //Flip port2 s direction Motors Motor control and some fine-tuning commands. motor[output] = power; This turns the referenced VEX motor output either on or off and simultaneously sets its power level. The VEX has 8 motor outputs:

More information

Experiment #3 Programming the PLC Via Ladder logic. OBJECTIVES After successfully completing this laboratory, you should be able to:

Experiment #3 Programming the PLC Via Ladder logic. OBJECTIVES After successfully completing this laboratory, you should be able to: Experiment #3 Programming the PLC Via Ladder logic OBJECTIVES After successfully completing this laboratory, you should be able to: to convert a simple electrical ladder diagram to a PLC program. Know

More information

Keil C51 Cross Compiler

Keil C51 Cross Compiler Keil C51 Cross Compiler ANSI C Compiler Generates fast compact code for the 8051 and it s derivatives Advantages of C over Assembler Do not need to know the microcontroller instruction set Register allocation

More information

Stage One - Applying For an Assent Remote Access Login

Stage One - Applying For an Assent Remote Access Login Trading From Home or Other Remote Locations The incredibly fast, feature rich, reliable Assent trading platform can be accessed from one of Assent s many branch locations, or from your home or other locations.

More information

C What Happens INTRODUCTION PIC MICROCONTROLLER PRODUCT OVERVIEW SELECTING A DEVICE FOR EXPERIMENTS PIC16F818

C What Happens INTRODUCTION PIC MICROCONTROLLER PRODUCT OVERVIEW SELECTING A DEVICE FOR EXPERIMENTS PIC16F818 C What Happens INTRODUCTION PIC MICROCONTROLLER PRODUCT OVERVIEW SELECTING A DEVICE FOR EXPERIMENTS PIC16F818 Pins and functions Package Clock oscillator Reset Ports Special Features PIC microcontroller

More information

Chapter 5 Real time clock by John Leung

Chapter 5 Real time clock by John Leung Chapter 5 Real time clock 5.1 Philips PCF8563 Real time clock (RTC) Philips PCF8563 (U5) is an I 2 C compatible real time clock (RTC). Alternatively, this chip can be replaced by a software module like

More information

Hosted VoIP Phone System. Meet-Me Conferencing Add-in for Microsoft Outlook

Hosted VoIP Phone System. Meet-Me Conferencing Add-in for Microsoft Outlook Hosted VoIP Phone System Meet-Me Conferencing Add-in for Microsoft Outlook Introduction The is an Add- in that makes it easy to add an audio conference to an Outlook Appointment. It is compatible with

More information

The Basics of C Programming. Marshall Brain

The Basics of C Programming. Marshall Brain The Basics of C Programming Marshall Brain Last updated: October 30, 2013 Contents 1 C programming 1 What is C?................................. 2 The simplest C program, I........................ 2 Spacing

More information