??? 06/27/10 10:14 Read: times |
#176937 - Voltage isn't enough Responding to: ???'s previous message |
Many errors there.
1) There is no clock signal. It's +5V, D+, D-, GND. 2) There is no 4MHz involved. You have 1.5MHz, 12MHz, 480MHz - USB3 can reach 4.8GBps but have multiple data channels. 3) Having the correct voltage isn't enough. A short and incomplete list of differences: * RS232 have one data line that switches voltage relative to ground. * USB have differential encoding using a D+/D- pair. Differential encoding improves handling of noise. * RS232 may run at just about any baudrate (but not too high unless the distance is very short) * USB have a few standardized speeds, and negotiates to decide the best speed both sides supports. * RS232 sends single characters (several lengths allowed, with/without parity and varying stop-bit count), and synchronizes with the start bit of every byte. * USB sends frames and synchronizes with a SOF (Start of Frame) every 1ms that may jitter max 500ns. No start bits involved. * RS232 leaves it to the application program to figure out how to combine multiple characters into messages. * USB have a huge standard whith unit types, report descriptors, ... * RS232 has no poll or resend. But have hardware handshake signals for ready-to-send, clear-to-send, data-carrier-detect, ... * USB uses special frames to constantly poll data, and to report back with dat, busy, error, ... * RS232 has a simple UART that basically is a shift register fed by a fixed-speed baudrate and that gets started by the start bit. * USB has an advanced state machine where a bit isn't simply sent as a one or a zero since the data is self-clocked for long lengths. The state machine also normally computes CRC for the frame. * RS232 have two almost identical sides. They may be called DCE or DTE, but the logic of the software and the design of the hardware is almost identical. * USB have a host or a device. There is a huge difference - a host is way more complex. Some new units have a host that can auto-detect if it should be a host or a device - USB OTG (On-The-Go). Do you realize that the amuont of power you are allowed to use from the USB connector depends on negotiation? Yes, the USB standard requires that the device and the host communicates to decide on the amount of power. The exception is special charge sockets, where D+ and D- are shorted together to let the device realize that it's a charge socket and doesn't have any intelligence for the power negotiation. So Nathan - how did you plan to write software that handles (at least) 1.5Mbps and that responds to the SOF every ms and synchronize every bit and computes every frame with CRC and all? I know about a project where an AVR chip implemented bit-banged USB, but I'm pretty sure that the guy who implemented it had a bit more experience than just "doing a lot with computers". |
Topic | Author | Date |
8052 and USB | 01/01/70 00:00 | |
USB | 01/01/70 00:00 | |
Just being serial isn't enough | 01/01/70 00:00 | |
simple; simplest | 01/01/70 00:00 | |
Serial communication | 01/01/70 00:00 | |
Yes, but it won't work | 01/01/70 00:00 | |
USB | 01/01/70 00:00 | |
Voltage isn't enough | 01/01/70 00:00 | |
Mixing with keyboard/mouse protocols? | 01/01/70 00:00 | |
Thanks | 01/01/70 00:00 | |
Not easy to know everything about USB | 01/01/70 00:00 |