- Back to Home »
- CS609 Assignment no 5 Fall 2012 Full Solution
Posted by : Anonymous
Sunday, 13 January 2013
Assignment
Read carefully the C-language program in your course handouts (page 127-129). In this program, you are told how to set various serial port parameters. Based on the knowledge you gain here, answer the following by writing appropriate C-language instruction with single line comments to achieve stated task.
S.No. | Task | C-Language Instruction with single line comments |
1 | Write a single line of code to set the com pointer variable to COM port 3. | |
2 | Write a single line of code to set the size of Word Length to 8-bits to be used in serial communication for data transmission. | |
3 | Write a single line of code to set the size of Stop bits equals 3 in serial port communication. | |
4 | Write a single line of code to turn ON the parity bit and use Even parity. | |
5 | In the following piece of code, the Baud rate being used is 1200. Modify it in a way such that we shall have Baud Rate of 2400. outportb ((*com)+3,inport((*com)+3)|0x80); outportb ( (*com),0x60); outportb( (*com) +1, 0x00); |