| Electronic Components Datasheet Search |
|
AM85C30 Datasheet(PDF) 189 Page - Advanced Micro Devices |
|
|
|||||||||||||||||||||||||||||
AM85C30 Datasheet(HTML) 189 Page - Advanced Micro Devices |
|
189 / 194 page ![]() SCC Application Notes AMD 7–40 Software to Receive Data at 1 Mb/s using DMA #include “stdio.h” #define arraysize 40 /*size of array for the 8530 init*/ #define port 0x0382 /*I/O port address for the SCC channel A*/ #define aport 0x0380 /*I/O port address for 8530 channel B*/ #define aportd 0x0381 /*I/O data address for 8530 channel B*/ #define arraysiz 22 /*size of array for 8530 asynch. init.*/ char *ptr; unsigned int segread(); struct{int scs, sss, sds, ses; } rv; unsigned long int data_segment; unsigned long int data_seg; unsigned int num; unsigned long int adrr; /*RECEIVE ROUTINE*/ main() { unsigned int result, res; char var_nam, string1[8], N, n; do { /*Choose synchronous or asynchronous receiving*/ printf(“IS THIS DEVICE A PRINTER(Y/N)? “); var_nam = scanf(“%s”, string1); result = strcamp(string1, “N”); res = strcmp(string1, “n’); if(result!=0 && res!=0) { /*Main routine for asynchronous receive*/ num = 0x03; opnfile(); asccinit(); /*Initialize 8530 for async rec.*/ printf(“WAITING FOR DATA\n”); recnum(); /*Receive length of file*/ length(); /*Determine length of file*/ opnfile(); recfile(); /*Receive the entire file*/ printf(“WOW!! I RECEIVED THE DATA!\N”); closfile(); /*Transfer received file to disk*/ } else { /*Main routine for synchronous receive*/ num = 0x03; opnfile(); sccinit(); dmainit(); printf(“WAITING FOR DATA\n”); end(); length(); opnfile(); dminit(); end(); printf(“WOW!! I RECEIVED THE DATA\n”); closfile(); } /*Allows user continuous reception of files*/ printf(“Do you wish to receive another file(Y/N)? “); |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |