Presentation is loading. Please wait.

Presentation is loading. Please wait.

Single Chip Microcontrollers 7765J Mount Druitt College of TAFE Lesson 2.

Similar presentations


Presentation on theme: "Single Chip Microcontrollers 7765J Mount Druitt College of TAFE Lesson 2."— Presentation transcript:

1 Single Chip Microcontrollers 7765J Mount Druitt College of TAFE Lesson 2

2 Plagiarism  Plagiarism is the practice of claiming or implying original authorship of (or incorporating material from) someone else's written or creative work, in whole or in part, into one's own without adequate acknowledgement  Within academia, plagiarism by students, professors, or researchers is considered academic dishonesty or academic fraud and offenders are subject to academic censure © Mike Stacey 2008

3 Plagiarism [2]  Common forms of plagiarism Downloading, borrowing or stealing an assignment and presenting it as your own work. Copying a section of a book or article and submitting it as your own work. Copying, cutting and pasting text from an electronic source and submitting it as your own work. Using the words or ideas of someone else and presenting them as your own. Relying too much on other people's material. Use your own words as much as you can. © Mike Stacey 2008

4 Plagiarism [3]  Plagiarism & the Internet “The internet can be a great source of information and an effective research tool. However, just because electronic information is easily available does not mean it is 'free'. Remember that the information you find online should be referenced, just like any other source. Online sources should be used with care, fully acknowledged and evaluated in the same way you would any print-based source of information.”[1] References [1] "plagiarize." Merriam-Webster Online Dictionary. 2008. Merriam-Webster Online. 8 May 2008, © Mike Stacey 2008

5 Flow Charts – example from prac 2 You need to show this level of detail in your assignment reports.

6 © Mike Stacey 2008 I/O Ports [1]  8 bit bi-directional  Individual pins can be configured as either input or output  3 address locations for the port One for Data Register PORTA One for Data Direction Register DDRA One for Port A input pins PINA  Check out the memory map on page 11 and see what range of address space is used for the ports.

7 © Mike Stacey 2008 I/O Ports [2]  Port A has an alternate function as analog inputs for the ADC. If some of the pins are configured as outputs care must be taken to ensure that none of the outputs switches state as this may corrupt the result of the conversion.  The DDRAn bit in the DDRA register selects direction of that pin (read or write, output or input) If DDAn = 1 then DDAn is an input pin (READ) Example: ser temp out DDRC, temp If DDAn = 0 then DDAn is an output pin (WRITE) Example: clr temp out DDRA, temp

8 © Mike Stacey 2008 Memory Maps. See pp 7-11 of data sheets  Conventional memory addressing modes can be used on the registers as well. This is enabled by the fact that the registers are assigned an address space of $00 - $1F

9 © Mike Stacey 2008 Memory Map for 90S8535

10 © Mike Stacey 2008 Register addressing The registers are physically implemented in internal memory. The registers are accessed by using the address. This is invisible to the programmer. Observe the register address space in AVR Studio

11 © Mike Stacey 2008 Memory mapped I/O – see pp 17- 18 of data sheets  Data going out to a port first goes to a space in RAM memory defined by an address and is then transferred out to the port’s output register.  The output register itself is also mapped to an address in memory space but, like the general purpose registers, this is not physically implemented in RAM

12 © Mike Stacey 2008 Memory mapped I/O Observe these addresses in AVR Studio

13 © Mike Stacey 2008 Observe memory mapping in AVR Studio  Step through the ledbutton.asm program from prac exercise 1b.  Find r16 and r15 in the register section of the “memory view” What addresses do they have?  Find DDRA, DDRC, PINA, PORTC in memory What addresses do they have?


Download ppt "Single Chip Microcontrollers 7765J Mount Druitt College of TAFE Lesson 2."

Similar presentations


Ads by Google