


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
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
1 / 4
This page cannot be seen from the preview
Don't miss anything!
ECET 456 Distributed System Design with Multiprocessing
Lab #5-B
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
DIGITAL TRAINER
ECET 456 Distributed System Design with Multiprocessing
#include <iostream.h> #include <windows.h> #include <stdio.h> #include <conio.h> #include <iomanip.h> #include
{ 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