Friday, November 21, 2008

Parallel Port Programming

Parallel port is very common and popular tool which widely using in computer. Most of time we use this as our printer port. The main cause that makes it popular is simple and inexpensive tool for building computer controlled devices and projects. The simplicity and ease of programming makes parallel port popular in electronics hobbyist world. The parallel port is often used in Computer controlled robots, Atmel/PIC programmers, home automation, ...etc...
In versions of Windows that did not use the Windows NT kernel (as well as MS-DOS and some other operating systems), programs could access the parallel port with simple outportb() and inportb() subroutine commands. Now I'm going to show a very simple Parallel port accessing program which will control LED On/Off.
First have a look in Parallel port pin configration. In 25 pin parallel port have following pin functions.


Port-----------Pin No.------------Mode
Data-----------2-9----------------Output (O/P)
Status---------10-13, 15----------Input (I/P)
Control--------1, 14, 16, 17--------Output (O/P)
GND-----------18-25--------------Single Ground

I have written a simple program in C++ , where port address is defined 0x378 as global variable. Now a array data is use where some data such 0,1,2......etc those are in decimal value. Next I just make decimal to binary conversion which just perform for display . Here I'm using 8 LED and my i/p will be 0,1,2,3......etc , so if press 1 then 1st LED will be on rest of will remain off and m program will give o/p 0-0-0-0-0-0-0-1 so 1 indicated LED is on and 0 for off. thats all. :)


A simple program which I wrote in C++


That Program will give such o/p





LED On (In this case I/P was 1)

Now this same parallel port program which I shown in C++ , if you try to run in XP OS then we don't get any result although that program is ok. Because not only in XP, also Windows NT/2000/Xp we cannot control parallel port by directly accessing port addresses. This is because the Windows NT kernel does not allow usermode programs to have direct access to I/O ports. we have to communicate with a driver that will access port addresses.

Those who are fimilar with programming may know the term API(Application Programming Interface) which is a set of functions / protocols contain a description of the way one piece of software asks another program to perform a service . So we can access ports by using the drivers included with Windows. So we need a device driver . Such Driver should already installed in the case of the standard PC parallel port, now the next question is how do you access it. Well I'm open the device like a file using a name such as "LPT1" (for the first parallel port device) using the likes of the Win32 API function CreateFile. Then read and write to it using the likes of ReadFile and WriteFile (or ReadFileEx and WriteFileEx) like usual programming language . For more information on these topics look in the MSDN library (online at http://www.msdn.microsoft.com/). There is a section on Device I/O in the Windows Development / Windows Base Services area. :)

Tuesday, October 21, 2008

Prize Giving N Cultural Ceremony

Intro:

Our university organized a very exciting and enjoyble Prize Giving & Cultural ceremony at our university place. It was started at 10.00 AM . Our chief guest, speaker and all teachers was precent there. At first we recive our hounarable sir Engr. Badiuzzaman with flower who now our Head of the Dept.



Engr. Badiuzzaman (Head of the Dept.)

(Form Left odd no.)Al-Amin Bhuiya(Prof.), Akramuzzaman(Prof.), Engr. Badiuzzaman(Head of the Dept.) (FromRight odd no.) Mr. Md. Noman(Lecturer Dept. CSE , DU) , Mr. Nurul Islam (Dean of science faculty )


Mr. Nurul Islam (Dean of science faculty)

Then a conference held , topics was Bioinformatics , Data mining & Robotics.

Prize Giving:
Then prize giving ceremony start at 1.00PM . First cultural prize then announced Software competition wonner name (1st,2nd,3rd category).

Sabbir Bhai reciving 1st prize in Modern song
Muhin Bhai reciving certificate for ACM contest
Javed Sir our ACM coach
Gazi Safiullah Sir

My Achivement:

I got 3 prize in 3 category. In Quiz competition I got 1st prize , Software competition I got 3rd position and for contribute in ICT competiton our team got the University Crest.

Reciving 1st Prize for Quiz Competition

Reciving certificate for 3rd place in software competition

Reciving University Crest from Prof. Nurul Islam(Dean of Science faculty)

Cultural Program:




Friday, July 25, 2008

CITY IT Fair 2008 BCS Computer City

City-IT Fair 2008
CONTEST

City-IT Fair 2008 which was organized by BCS Computer City from 27th may to 31th may . Bangladesh Computer Somity was another organizer of this fair . Agargaon IDB bhaban which is also called The BCS Computer City that was the fair venue. In this fair a Quiz and IT contest was held , where some very well known university of Dhaka were participated. My
university also participated on that contest . I got a chance to participate there . Other university : Bangladesh University of Engineering & Technogy (BUET) , Stamford University , Brac University , Bangladesh Agriculture University Sherebangla Nogore and our university NUB. That Contest was divided in to two part . In the 1st part , each university face each other and which one is won they will go for next or final round. In the 1st round : the team combination was like that :- Brac University VS IUB , Stamford University VS Northern University , BUET VS Agriculture University. Then Brac University , Northern University and Agriculture University was pass though the 2nd round or final round . And finally my university beat Agriculture University and we got Runners-up , the 2nd position and Brac University is 1st position. Here im going to give some descriptions of the fair.
1st Round :
The fair place was so much rush and crowdies. Everybody participated in the fair. Basically most of them
come to visit the fair and buy things and also enjoying the events. I already mentioned earlier our opponent name so i dont want to repeat again , 1st round was Stamford University. Me (Faisal) , Tanvir bhai & Sabbir bhai was in our team. Judge panel was placed from BCS Computer City members ,
Chancellor and Director.


City-IT Fair 2008--BCS Computer City--

Picture 1 : Judge panel observing our performance. (From left Me(Md. Faisal),
Tanvir Bhai , Sabbir Bhai )

City-IT Fair 2008--BCS Computer City--

Picture 2: During the contest with Stamford University (1st day)

We beat Stamford University and won prize and also pass 1st round . Then we take preparation for our 2nd round and final round . Which was held on the 3rd day of fair. Where our opponent was Brac University and Agriculture University. 1st time we were tents but after get result my feeling was cool. Then we join in photo session with Stamford University.

City-IT Fair 2008--BCS Computer City--

Picture 3 : Taking prize from Moderators.

City-IT Fair 2008--BCS Computer City--

Picture 4 : Beat Stamford University and won 1st Prize .


City-IT Fair 2008--BCS Computer City--

Picture 5 : Our team and Stamford team

2nd Round / Final Round :

In the second round we face Brac University and Agriculture University . Then we beat Agriculture University But cannot be champion . We make runners-up team.


City-IT Fair 2008--BCS Computer City--

Picture 7 : Final with Brac University

City-IT Fair 2008--BCS Computer City--

Picture 8 : Fair Out look in the Final round , with Brac
University.



City-IT Fair 2008--BCS Computer City--

Picture 9 : Annajiat Rassel Bhai -
(President of Brac Uni. Computer Club(
BUCC)) appreciating me.



City-IT Fair 2008--BCS Computer City--

Picture 10 : Brac Uni.and Our team in Final round.



City-IT Fair 2008--BCS Computer City--

Picture 11 : In a different mode

During the fair all our team member and others university specially our opponents team all help us and all was so much cooperative. I thanks my almighty Allah who help me . Specially I like to thanks my Mother and Father and also my teacher, all of them help me to participate and make this result . A special thanks goes to our Gazi Safiullah sir .




Friday, February 29, 2008

February and Me faisal11vcv


This is the month of february. We had to sacrifice lives for our mother tongue on 21st February, 1952. 21st February being declared International Mother Language Day by UNESCO. We are the only one nation who sacrificed life for mother tongue.


I'm working hard for our first ever music album "BLACK WIZARD". Hopefully it will be released in the last of 2008.

Tuesday, November 27, 2007

Faisal

IN THE NAME OF ALLAH , THE MOST MERCIFUL GOD 

Hello Everyone !
THIS IS FAISAL.
Undergraduate Student

Please Visit My Home Page: http://www.mdfaisal.co.nr/ or http://www.engr-faisal.co.nr/

My Mail :