Electronic Components Datasheet Search
  English  ▼

X  

AM8530 Datasheet(PDF) 184 Page - Advanced Micro Devices

Part # AM8530
Description  Serial Communications Controller
PDF  194 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  AMD [Advanced Micro Devices]
Direct Link  http://www.amd.com
Logo AMD - Advanced Micro Devices

AM8530 Datasheet(HTML) 184 Page - Advanced Micro Devices

Back Button AM8530 Datasheet HTML 180Page - Advanced Micro Devices AM8530 Datasheet HTML 181Page - Advanced Micro Devices AM8530 Datasheet HTML 182Page - Advanced Micro Devices AM8530 Datasheet HTML 183Page - Advanced Micro Devices AM8530 Datasheet HTML 184Page - Advanced Micro Devices AM8530 Datasheet HTML 185Page - Advanced Micro Devices AM8530 Datasheet HTML 186Page - Advanced Micro Devices AM8530 Datasheet HTML 187Page - Advanced Micro Devices AM8530 Datasheet HTML 188Page - Advanced Micro Devices Next Button
Zoom Inzoom in Zoom Outzoom out
 184 / 194 page
background image
SCC Application Notes
AMD
7–35
/*THIS ROUTINE LOADS THE FILE FROM DISK TO BUFFER MEMORY*/
opnfile()
{
char var_nam, name[16],*ptrr;
extern char *alloc( );
unsigned int fd, endpos, begpos, count, numd;
unsigned int;
int num_read, i, numr;
printf(“Enter name of file to be transferred: “);
var_nam = scanf(“%s”, name);
fd = fopen(name, “rb”);
endpos = fseek(fd,OL,2);
/*looks for end of file*/
fclose(fd);
fd = open(name, BREAD);
/*opens the file as binary
file*/
if(fd<0)
{ fputs(“file not opened”, stdout); return;}
ptr = alloc(endpos+1);
/*allocates memory space for
file
beginning at ptr*/
for(i=0;i<endpos;i++) *(ptr+i)=’\0’;
ptrr = ptr;
num = 0;
num_read = 1;
while(num_read!=0)
{
/*This reads the file from disk starting at location ptrr*/
num_read = read(fed,ptrr,endpos);
num = num + num_read;
/*calculates length of file*/
ptrr = ptrr + num_read:
}
ptr = ptr – 2;
num = num + 2;
*ptr = num;
/*appends lower byte of length to beginning of
file*/
ptr++;
numd = num >> 0x08;
*ptr = 0x02;
/*address of receiving device is attached*/
adrr = 01;
segread(&rv);
data_segment = rv.sds;
data_seg = data_segment << 4;
addr = data_seg + (long int) ptr; /*absolute 20–bit address
is calculated
/*this is required by the DMA controller*/
/*num_read contains:
if –1 error
if
0 EOF
if >0 number of characters put in buffer*/
close(fd);
return;
}
/*THIS ROUTINE INITIALIZES THE 8530 FOR TRANSMIT*/
sccinit()
{
unsigned char array[arraysize];
/array to initialize SCC
registers*/
unsigned int i+0;



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


Datasheet Download

Go To PDF Page


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


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
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