Lecture 24.

Slides:



Advertisements
Similar presentations
Device Drivers. Linux Device Drivers Linux supports three types of hardware device: character, block and network –character devices: R/W without buffering.
Advertisements

For(int i = 1; i
Programming In C++ Spring Semester 2013 Practice 1-3 Lectures Programming In C++, Lecture 3 By Umer Rana.
OPTIMIZING C CODE FOR THE ARM PROCESSOR Optimizing code takes time and reduces source code readability Usually done for functions that are critical for.
Lecture # 12. PIC Printer Interface Printer IRQ7 INT ACK Printer Interface.
void count_down (int count) { for(i=count; i>1; i--) printf(" %d\t", count); } printf("A%d\n", count); if(count>1) count_down(count-1); printf("B%d\n",
3-1 Peripherals & I/O lines All the on-chip peripherals are configured and controlled through Special Function Registers (SFR) Many of the SFR’s are bit.
Introduction to Programming Lecture 39. Copy Constructor.
Templated Functions. Overloading vs Templating  Overloaded functions allow multiple functions with the same name.
Copyright © 2000, Daniel W. Lewis. All Rights Reserved. CHAPTER 3 GETTING THE MOST OUT OF C.
Pointer to Structure. Structure variable can be access using pointers int a=10,*p; Here p  is an integer type pointer variable, p can hold the address.
EC-241 Object-Oriented Programming
Sort the given string, without using string handling functions.
1 Class Vehicle #include #define N 10../.. 2 Class Vehicle class vehicle { public: float speed; char colour[N+1]; char make[N+1];
Union, bitfield, typedef, enum union nama_u{ }; union nama_u{ struct nama_s byte; }; enum{ }; Tipedef var BYTE.
By Senem Kumova Metin 1 POINTERS + ARRAYS + STRINGS REVIEW.
Outline  Examine some of the H/W supplied with a typical PC and consider the software required to control it.  Introduce Commkit, a software tool that.
Selection Sorting Lecture 21. Selection Sort Given an array of length n, –In first iteration: Search elements 0 through n-1 and select the smallest Swap.
C language issues CSC 172 SPRING 2002 EXTRA LECTURE.
Pointers Example Use int main() { int *x; int y; int z; y = 10; x = &y; y = 11; *x = 12; z = 15; x = &z; *x = 5; z = 8; printf(“%d %d %d\n”, *x, y, z);
Lecture No: 16. The scanf() function In C programming language, the scanf() function is used to read information from standard input device (keyboard).
Lecture 9. - Synchronous Devices require a timing signal. Clock generated Interval Timer Microprocessor Interval Timer Clk PCLK = MHz PCLK (for.
1-1 NET+OS Software Group Flash API Multiple flash memory bank support New Flash API introduction Detailed Flash API Function presentation Supporting.
Dynamic Memory Allocation The process of allocating memory at run time is known as dynamic memory allocation. C does not Inherently have this facility,
Ethernet Driver Changes for NET+OS V5.1. Design Changes Resides in bsp\devices\ethernet directory. Source code broken into more C files. Native driver.
Telnet Server API Setting up the Server Callback Functions Setting Server and Client Options Other Telnet API Functions.
Asynchronous Serial I/O Unit 12 - Part 1. SCI Registers – Channel 0 SCI0BDH – SCI Baud Rate Register High Byte SCI0BDL – SCI Baud Rate Register Low.
Control Transfer and Arithmetic Conditional/Unconditional branches Delayed Control Transfer –Increases the efficiency of pipelining Annulled branches.
FTP Server API Implementing the FTP Server Registering FTP Command Callbacks Data and Control Port Close Callbacks Other Server Calls.
Passing Structure to function.  structure to function structure to function  Passing structure to function in C Passing structure to function in C 
Lec 7aOperating Systems1 Operating Systems Lecture 7a: Linux Memory Manager William M. Mongan.
Direct Memory Access (DMA). DMA Features  7 independently configurable channels  Software programmable priorities: Very high, High, Medium or Low. 
Data Types Always data types will decide which type of information we are storing into variables In C programming language we are having 3 types of basic.
Test Review. General Info. All tests will be comprehensive. You will be tested more on your understanding of code as opposed to your ability to write.
DMA Driver APIs DMA State Diagram Loading Driver and Opening Channel DMA Channel Attributes Loading Data to a Channel Unloading Data from a Channel.
Print Row Function void PrintRow(float x[ ][4],int i) { int j; for(j=0;j
 Memory setup  Pointer declaration  Address operator  Indirection  Printing addresses or pointers.
2009/12/8 Report 報告學生 : 黃健瑋 指導教授 : 李正帆 1. Content seq_file structure proc file Data structure(not completed) 2.
Lecture 26.
Lecture 25. #include char st[2048]="hello u whats up?\0asnfdnflmflsmfldf"; char st1[2048]="xyz"; unsigned long int temp; unsigned int i; void main (void)
#include <dos. h> void interrupt(
Introduction to Programming
Lecture 22.
Introduction to Programming and the C Language
Too Much Milk With Locks
Too Much Milk With Locks
8237 DMA CONTROLLER.
Lecture 10.
Lecture 16.
Introduction to Programming
Pointers & Functions.
Too Much Milk With Locks
Too Much Milk With Locks
8237 DMA CONTROLLER.
Too Much Milk With Locks
Introduction to Programming
unsigned char far *scr=0xb ;
Lecture 19.
Lecture # 11.
Pointers Lecture 2 Tue, Jan 24, 2006.
Moving Arrays -- 2 Completion of ideas needed for a general and complete program Final concepts needed for Final DMA.
Programming Language C Language.
C Programming Lecture-8 Pointers and Memory Management
Lecture 23.
Lecture 17.
Pointers & Functions.
The Stack.
UNIT 26 SPI Test 로봇 SW 교육원 조용수.
Too Much Milk With Locks
Bit Manipulations CS212.
Presentation transcript:

Lecture 24

DMA Request Register

DMA Mask–1 Register

DMA Mask–2 Register

DMA Mode Register

Setup & Query of DMA Channels

High Address Nibble/Byte

#include <dos.h> #include <bios.h> char st[80]; unsigned long int temp; unsigned int i; unsigned int count=48; void main (void) { temp=(unsigned long int)_DS; temp = temp << 4L; i = *((unsigned int *)(&temp)); temp = temp>>16L;

outportb (0x81,*((unsigned char *)(&temp))); outportb(0x06,*(((unsigned char *)(&i)))); outportb(0x06,*(((unsigned char *)(&i))+1)); count--; outportb(0x07,*((unsigned char *)(&count))); outportb(0x07,*(((unsigned char*)(&count))+1)); outportb(0x0b,0x0b); outportb(0x08,0); outport(0x0a,3); getch(); }