| Electronic Components Datasheet Search |
|
SCD1284 Datasheet(PDF) 98 Page - Intel Corporation |
|
|
|||||||||||||||||||||||||||||
SCD1284 Datasheet(HTML) 98 Page - Intel Corporation |
|
98 / 176 page ![]() CD1284 — IEEE 1284-Compatible Parallel Interface Controller 98 Datasheet char serv_type, vector, channel, status, char; int char_count, i; vector = inportb(SVCACKR); /* gen. ack and get vector (read LIVR) */ channel = inportb(RICR) >> 2; /* extract channel number from the RICR*/ serv_type = vector & 0x07; /* mask RIVR to get type (good/ exception)*/ switch (serv_type) { case 3: /* good data service */ char_count = inportb(RDCR); /* get number of characters in FIFO */ for ( i = 1; i <= char_count; i++) {/* - read that number of chars */ char = inportb(RDSR); /* read char from FIFO */ /* Code here would put the character in a buffer of some sort for each * channel. That code would be dependent on system software design * so it won’t be shown here; this code just shows how to manipulate the * CD1284 registers to implement the poll mode service acknowledge. */ } break; case 7: /* exception data service request */ status = inportb(RDSR);/* by definition, only one char; get status */ break; } outportb(EOSRR, 0x00); /* write dummy value to EOSRR to terminate */ } 6.4.2 Serial Transmit Service /* The transmit service acknowledge routine follows very nearly the same steps that the receive service routine follows. The SVCACKT* input is activated to start the service cycle, reading the contents of the TIVR, and the TICR is read to get the channel number. */ service_txm( ) { char vector, channel; int char_count, i; vector = inportb(SVCACKT); /* retrieve and save transmit interrupt value */ channel = inportb(TICR) >> 2; /* extract channel number from the RICR*/ /* Buffer management code would set-up pointers to the next 12 * characters (maximum) to be sent on this channel. Again, buffer * layout is system design dependent and won’t be shown here. */ for ( i = 0; i < char_count; i++) {/* transmit FIFO can take 12 characters */ outportb(TDR, *next_char++); /* it is assumed that char_count and next_char is set up by buffer code */ } outportb(EOSRR, 0x00); /* write dummy value to EOSRR to terminate */ } |
|
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 |