Forum Discussion
Altera_Forum
Honored Contributor
11 years agolast what i do is sending email to Benjamin David Lunt asking him to read this thread trying to help me
this man have great website and tutorials about FPGA and Microcontroller also programming with USB Interface and use it in electronic projects i got his answer and i thing that's enough to me i will try to do it by myself from scratch thank you very much Ben for your answer and thanks for every one post trying to help me admin please close the thread the answer from BEN :- Hi, First let me say that I congratulate you on your desire to build this project. After reading the replies in the links you sent me, and not knowing what kind of background and experience you have with electronics, I might have to agree with some of the replies when they say "start smaller". A blinking LED is a pretty easy project once you get started and learn a bit. http://www.fysnet.net/docs/appendixq.pdf However, if I was going to create a communications device between two PC's, 100 meters apart, using fiber optic cable, I would start with a device at both ends, similar as you see in the .pdf file above. Each device would allow you to send and receive data to and from the device using a low- or full-speed USB port on the PC. Then I would use the ATTiny2313 to send bits (flashes of light) across the fiber optic wire. However, you will have to write software (firmware) for the 2313 to send start, stop, and parity bit information, just like the old time serial ports do. This would also be considerably slow, maybe 8 megabits per second, since the 2313 runs at about 16500000 Khz (or 16.5Mhz). (Normal USB communication is 12Mhz, for low speed devices such as the one listed above) However, this would accomplish the task you are trying to do, though considerably slow. You would also have to have an external power supply for the sending and receiving diodes, (each device having one of each). The USB's 5.0 volts, 500milliamps most likely will not power them. Here is my suggestion, and please take it as one guy who learned hands on just as explained above, to another with all due respect and admiration for your desire to learn. 1. Buy a cheap bread board, something similar to http://canada.newark.com/twin-industries/tw-e40-1020/breadboard-solderless-830-tie/dp/56t0250?mer=tstso_s_c_breadboard_none 2. Buy all the components described on page three of http://www.fysnet.net/docs/appendixq.pdf (minus the break out board (line 2)). 3. Assemble the three projects described in that appendix. Once you have a good knowledge of what they do and how they do it, I think you could go quite far creating a device to send and receive data across a fiber optic wire. You will need to realize, though, that it would be considerably slow, and maybe even unreliable, though if you are simply doing it for the task, then by all means, do it. Now, there are a few other questions you had, that I will try to answer. You want to be able to grab the data from D+ and D- and simply send a 1 or 0 bit along the optic depending on the values D+ and D- are. This will not work. The USB must have an ACKnowledge that you received the data, etc. You can not simply monitor D+ and D-. The USB will expect bytes in return after each packet is sent, using these two pins. Second, by sending the commands explained in the AppendixQ .pdf listed above, you will see that you can bring high one of the pins of the 2313, maybe hooking it to pin 7 of your "transmitter" as you explain in your post(s), keeping in mind the amount of current supplied by the 2313 will be less than 500milli-amps. Therefore, you may need an external power supply and a "relay" (a transistor?). I hope that I have been of some help to you. Ben