| Forum |
|
|||||||
| Open Source A place where you can talk to like-minded people about the fastest growing software movement today! Discuss anything and everything about Open Source software and Operating Systems. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Right Off the Assembly Line
Join Date: May 2006
Location: Delhi
Posts: 21
|
Guys! anyone who can help me with that would help me create something you people would like getting ur hands on. |
|
|
| Advertisements. Register and be a member of the community to get rid of them. | |
|
Advertisement
|
|
|
|
#2 (permalink) |
|
Right Off the Assembly Line
Join Date: Feb 2005
Posts: 8
|
Hi ,
Pc's know only 0's and 1's. however as u want to control those switches it can be easily done with the Pc (provided the switch has only two states ON & OFF). PCs communicate with the external world thru ports. Your PC will have three ports 1.Parallel Port (25 pins that loooong one) 2.Serial Port (9 pins ,a bit smaller one) 3.USB port ( a small rectangular socket) Of these three, the USB port is the fastest, however its the hardest one to implement in your custom device. Hence unless ur app dont need Tremoooooodus speed u can go for either of the first two. Each has its own advantages. The serial port communication needs least wiring ( 5 wires max and is the most suitable for wireless commn where only one bit can be sent at a time ). However it is harder to implement. The parallel port commn needs more wires but as u need to control only 4 switches the wiring can be reduced. It is also the easiest one to implement. However remember , its unsuitable for wireless applns. Now after deciding which port to use just google for further info. Also contact me if u need any further info ( particularly if u r interested in implementing serial port using Mc, I can help u .) The following links may help u. http://electrosofts.com/parallel/index.html http://www.epanorama.net/circuits/parallel_output.html http://www.arcelect.com/rs232.htm http://www.beyondlogic.org/serial/serial.htm Raja rajagopal87 <<<@>>>gmail+++com |
|
|
|
|
#3 (permalink) |
|
Right Off the Assembly Line
Join Date: May 2006
Location: Delhi
Posts: 21
|
If the serial port is not too harder to implement i would like to go for it because I need to carry signals at longer distances. I dont need any wireless application but Ease in implementation is also a big issue for me because I am amateur at it. If the serial port is too harder to implement I can do with the parallel port. I also need Info about program level control I know a bit of Fortran and C language if Someone can tell me how to use them for my purpose It would mean a lot.
Last edited by Nitin_Tyagi; 15-05-2006 at 04:48 AM. |
|
|
|
|
#4 (permalink) |
|
Right Off the Assembly Line
Join Date: Feb 2005
Posts: 8
|
Do u have any exposure to microcontrollers??? . If u have, then implementing serial port commn will not be a big task. Go for an Mc with inbuilt hardware uart and u r done.
But in case u dont have any exposure to mcs, it will be too much difficult to imp it. In that case I would advice u to go for Parallel port. The programming part , I have no idea abt pascal , however a simple c program will do the job. Just see the following program, /*flash an led on and off*/ #include <stdio.h> #include<dos.h> int main() { while(1) { outport(0x378,0); sleep(1); outport(0x378,1); sleep(1); } return 0; } The outport instruction outputs the given value in the parallel port. Here it outputs 1 and 0. 0x378 is the address of the parallel port. The sleep command provides a time delay of 1 sec. You can check this program by using some other port monitoring software or by using the following ckt in ur parallel port. [data0] ~~ resistor ~~~~~ LED~~~~~~[gnd] pin2----------XXXXX-----------|>|---------pin 20 330~470ohm ~~~~ ``` here the LED will keep flashing. Since u r placing values 0 & 1 in parallel port the first data bit (least significant) will alone keep changing. The first data bit or data0 is hardware pin2. pin 18 - pin 25 are all gnd and u can use anyone gnd pin. Hope u can understand the method. If u still had any doubt reg this feel free to contact me. Raja Last edited by rajagopal87; 15-05-2006 at 02:47 PM. |
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|