| Electronic Components Datasheet Search |
|
AM8530 Datasheet(PDF) 183 Page - Advanced Micro Devices |
|
|
|||||||||||||||||||||||||||||
AM8530 Datasheet(HTML) 183 Page - Advanced Micro Devices |
|
183 / 194 page ![]() SCC Application Notes AMD 7–34 SOFTWARE ROUTINES Software to Transmit Data at 1 Mb/s Using DMA #include “stdio.h” #define arraysize 40 /*size of array for the 8530 sync. 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 18 /*size of array for the 8530 async. init*/ unsigned 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; /*TRANSMIT ROUTINE*/ main() { unsigned char var_nam, string1[8], N, n; unsigned int result, res; do { /*This routine chooses between synchronous and asynchronous data transfers*/ printf(“Do you want to print a file(Y/N)? “); var_nam = scanf(“%s”, string1); result + strcmp(string1,”N”); res = strcmp(string1,”n”); if(result != 0 && res != 0) { /*Main routine for asynchronous data transfer*/ printf(“Asynch transmit\n”); opnfile(); /*Read file from disk into system memory*/ asccinit(); /*Initialize the 8530 for asynchronous trans- mit*/ trnum(); /*Transmit length of file*/ cont(); atrans(); /*Transmit the entire file*/ else { /*Main routine for synchronous data transfer*/ printf(“Synchronous transmit\n” ); opnfile(); sccinit(); dmainit(); cont(); dminit(); } /*This allows the user to continue transmission of next file*/ printf(“Do you want to transmit another file(Y/N)? “); var_nam = scanf(“%s”, string1); result = strcmp(string1,”N”); res = strcmp(string1,”n”); } while(result != 0 && != 0); } |
|
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 |