| Electronic Components Datasheet Search |
|
AM8530 Datasheet(PDF) 168 Page - Advanced Micro Devices |
|
|
|||||||||||||||||||||||||||||
AM8530 Datasheet(HTML) 168 Page - Advanced Micro Devices |
|
168 / 194 page ![]() SCC Application Notes 7-19 AMD /********************************************************************* /* Initializing the Z8530 asynchronuously /* (using pointer referring to memory map I/O device) /************************************************************************** #include "stdio.h" #define spaddress 0x22FS5 /* status port address */ #define dpaddress 0x22F87 /* dataport address */ #define rxbit 2 /* receive ready bit */ #define txbit 1 /* transmit ready bit */ #define tablesize 16 main () { unsigned char table[tablesize]; unsigned long *ptspa, *ptdpa; unsigned char value; int i; /* data table for initialization */ table[0]=0x9; /* address WR9 */ table[l]=0xC0; /* hardware reset SCC */ table[2]=0x3; /* address WR3 */ table[3]=0x41; /* set # of bits etc. */ table[4]=0x4; /* address WR4 */ table[5]=0x4C; /* misc mode */ table[6]=0x5; /* address WR5 */ table[7]=0x28; /* bits/char and TXEN */ table[8]=0xB. /* address WRIi */ table[9]=0x56; /* select baud generator */ table[l0]=0xC; /* address WR12 */ table[ll]=0xC; /* upper TC */ table[l2]=0xD; /* address WR13 */ table[13]=0; /* lower TC */ table[l4]=0xE; /* address WR14 */ table[l5]=0x7; /* set DTR/REQ enable baud generator */ /* output data from table to perfore initialization */ ptspa=spaddress; /* pointer to status port address */ ptdpa=dpaddress; /* pointer to data port address */ value=*ptspa; /* read status to set the set state machine */ for (i--0; i<tablesize; i++) /* perform initialization */ *ptspa=table[i]; /* receive and echo character routine */ for ( ;;) { while (((*ptspa) & rxbit) == 0); /* wait for receive ready bit */ value=*ptdpa; /* receive character */ while (((*ptspa) & txbit) == 0); /* wait for transmit ready bit */ *ptdpa--value' /* transmit character */ Figure 7-10. SCC Initialization - Memory Mapped |
|
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 |