EasyManuals Logo

Agilent Technologies 34401A User Manual

Agilent Technologies 34401A
242 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #200 background imageLoading...
Page #200 background image
#define IRQ4_int 0xC /* IRQ4 interrupt vector number */
#define IRQ4_enab 0xEF /* IRQ4 interrupt controller enable mask */
#define INT_controller 0x20 /* 8259 Interrupt controller address */
#define End_of_interrupt 0x20 /* Non-specific end of interrupt command */
void interrupt int_char_in(void);
void send_ctlc(void);
#define INT_BUF_size 9000
char int_buf[INT_BUF_size], *int_buf_in = int_buf, *int_buf_out = int_buf;
unsigned int int_buf_count = 0;
unsigned char int_buf_ovfl = 0;
int main(int argc, char *argv[])
{
void interrupt (*oldvect)();
char command[80], c;
int i;
oldvect = getvect(IRQ4_int); /* Save old interrupt vector */
setvect(IRQ4_int,int_char_in); /* Set up new interrupt handler */
bioscom(0,BAUD9600 | EVEN_7,0); /* Initialize settings for COM1 */
outportb(MCR,0x9); /* Enable IRQ buffer, DTR = 1 */
outportb(IER,0x1); /* Enable UART data receive interrupt */
/* Enable IRQ4 in 8259 interrupt controller register */
outportb(INT_controller+1,inportb(INT_controller+1) & IRQ4_enab);
do {
if(int_buf_ovfl) {
printf("\nBuffer Overflow!!!\n\n");
int_buf_in = int_buf_out = int_buf;
int_buf_count = int_buf_ovfl = 0;
}
RS-232 Operation Using Turbo C (continued)
Continued on next page >
Chapter 6 Application Programs
RS-232 Operation Using Turbo C
194

Table of Contents

Other manuals for Agilent Technologies 34401A

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Agilent Technologies 34401A and is the answer not in the manual?

Agilent Technologies 34401A Specifications

General IconGeneral
BrandAgilent Technologies
Model34401A
CategoryMultimeter
LanguageEnglish

Related product manuals