Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

ECET 456 Lab: Distributed System Design with Multiprocessing - USB-1024LS App, Lab Reports of Electrical and Electronics Engineering

The code for a lab exercise in the ecet 456 distributed system design with multiprocessing course at purdue university calumet. The exercise involves designing an application program to demonstrate the interface between a usb-1024ls board and a pc. The program receives 8-bit input from a digital trainer and displays the corresponding poem line on the monitor based on the input bit. It also outputs the data value on port a.

Typology: Lab Reports

Pre 2010

Uploaded on 08/05/2009

koofers-user-eb6-1
koofers-user-eb6-1 🇺🇸

10 documents

1 / 4

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Purdue University Calumet Department of Electrical and Computer Engineering Technology
ECET 456 Distributed System Design with Multiprocessing
Page 1 of 4
Lab #5-B
Lab Objective:
Design an application program for PC. The program is to demonstrate the interface between
measurement computing’s USB-1024LS board and PC.
The task is to receive 8 bit input from digital trainer into port B and display on the
monitor.
Print the poem (8 lines), If nth bit is ‘0’, omit the nth line or if nth bit is ‘1’ print the nth
line.
And output the data value on port A also.
Schematic:
D1 D2 D3 D4 D5 D6 D7 D8
0
KEYBOARD
PC
USB
USB-1024LS
DIGITAL TRAINER
PORT B
PORT A
pf3
pf4

Partial preview of the text

Download ECET 456 Lab: Distributed System Design with Multiprocessing - USB-1024LS App and more Lab Reports Electrical and Electronics Engineering in PDF only on Docsity!

ECET 456 Distributed System Design with Multiprocessing

Lab #5-B

Lab Objective:

Design an application program for PC. The program is to demonstrate the interface between measurement computing’s USB-1024LS board and PC.

The task is to receive 8 bit input from digital trainer into port B and display on the monitor.

Print the poem (8 lines), If nth bit is ‘0’, omit the nth line or if nth bit is ‘1’ print the nth line.

And output the data value on port A also.

Schematic:

D1 D2 D3 D4 D5 D6 D7 D

0

KEYBOARD

PC

USB

USB-1024LS

DIGITAL TRAINER

PORT B

PORT A

ECET 456 Distributed System Design with Multiprocessing

#include <iostream.h> #include <windows.h> #include <stdio.h> #include <conio.h> #include <iomanip.h> #include #include <C:\Program Files\Measurement Computing\Examples\C\cbw.h> #include <dos.h> //------------------------------------------------------------------------- void input( int ); void output (int); void print_poem(int *); //------------------------------------------------------------------------- void main (void)

{ int BoardNum = 0; int PortNum, Direction; int key ;

PortNum = FIRSTPORTB; Direction = DIGITALIN; cbDConfigPort (BoardNum, PortNum, Direction);

PortNum = FIRSTPORTA; Direction = DIGITALOUT; cbDConfigPort (BoardNum, PortNum, Direction); for(int i = 0 ; i<1 ; i++) { input(&key); print_poem(&key); cout <<key; output (&key); } //cout << "The loop is finished"; char c1; cin >> c1; }

//-------------------------------------------------------------------------

void input (int *pk1) {

ECET 456 Distributed System Design with Multiprocessing