Hello, i am not shure if this is the wright topic for tech board.
But i am looking for some info on how to program usb.
is there any cind of chip or something that wuld make programming simple like printer port.
Printer port gets data in 8bit block and you have to write a number 0 - 255 to port 0x378, and you can turn on some leds from pins i think 2 - 9.
and this works wery good and is also easy, only problem is that you can flash only 8 led-s.
I read on how stuf works that USB can send data in 64-bit block, so i think this culd mean 64 led-s, and if you hook up another device it can be 64 bits of upstream too.
But usb has only 4 wires, and 2 of tham are for power supplay.
that means you need a chip that 64 outputs and 4 inputs, i also read that the device like this needs to comunicate back to the computer so that it can know what it is.
Does anyone have any good links, or forums, or books were i can find more info about this, couse google is very poor on info about usb.
On most OSs USB devices appear as normal disk devices. Are you trying to implement a driver or something?
USB is a serial protocol, so it uses only one wire to transfer the data in each direction. Data is sent one bit at a time, so if you send 8 bits, the data is sent over 8 times the bitrate (e.g. 1.5Mbit/s -> 0.67 microseconds per bit, so one byte (8 bits) takes 5.33 microseconds to transfer at this speed).
USB uses a "protocol" to indicate what it wants done and to where, so it's not sending data as simply as the parallel port or serial port on the PC, which just sends exactly the data you send to the respective port.
USB has a packet format that acts as an "envelope" to hold the data.
To make a 64-bit LED-array, you need a noticable amount of both software and hardware to implement the protocol and translate it into a 64-bit value. It would probably be easier to use a parallel port and some latches (using for example the upper 4 bits for "address" and the lower 4 bits for data - 16 addresses x 4 bits of data = 64 bits) - this can be done with a handfull of 74-series logic chips, or in a relatively simple FPGA type chip - USB implementation will require quite a lot more.
 In USB, the data is actually transmitted on TWO data-lines at the same time, D+ and D-, and data goes in one direction at a time - It works like when you have road-works so that only one lane is available, the trafic-lights control which direction of traffic flows. Or a CB-radio, where the talker says "Over" to indicate that the other side can talk now - similarly, USB uses a protocol between the two ends to indicate which side "can talk now".
yes making 4 addres and 4 data bits on paralel port is ok, but if you want to controol more than 4 stepper motors it is not practical, couse each motor needs a step and direction ping, and on step ping you need to put the steps in very fast.
so if i understand this corectly using usb port to controll more than 4 stepper motors is not so good idea?
Or can i make a software together with hardware so that it wuld mimic a paralel port?
i have no ide how much work this wuld need, i am a beginer in programming.
How do you think USB manages things like say cameras, scanners, flash drives, etc etc?
There's a chip (and maybe another processor) at the other end of the wire which is able to understand the USB protocol and information that you send it.
For example, for 64 motors, you could use a single byte.
6 bits to address the motor
1 bit for 1 step clockwise
1 bit for 1 step anticlockwise
I would suggest you get one of these, or something like it available at a store near you.
yes you can do it this way on paralle port too, but than you need a special curcit with some ram to store how motors must move, couse all the mottors must move at exactly the same time, for input were you check if the mottors did move as you orderd tham you need, difrent cind of comunication, couse you need to get information if the motor moved to much or to little so u can stop it. andd all this is happening very fast, and i am not sure if computer can keep up, so i am thinking that i need a very minimal number of chips.
It sounds like what you really need is a small microcontroller that can control 64 motors at the same time - you could then tell it what needs to be done by whatever interface the microcontroller supports - there are several on the market that does USB, as well as serial interface.
yes that is what i need, but i wanna control it wia usb, and a program wich i can write in c++ on debian, i wuld like to get some experience interfacing usb port
The good thing is that the low-level USB interface is already there.
You need to do some research in how to interface to a USB device from Linux - I have no experience in this, so I can't help. Try the web-site described above.