More on Serial Ports
Check out the hex numbers for your parallel and serial ports. They are used in python (e.g. in rx.py) for receiving data from the microcontroller. In windows, Device manager > Ports (COM&LPT), right click > properties on the ports, go to Resources tab, it is the I/O Range - usually 0x378. In Linux, the serial port devices are usually called /dev/ttyS* where * is a number starting with 0.
Traditionally IBM PC systems have allocated their first four serial ports according to the configuration in the table below.
PORT Interrupt Starting I/O Ending I/O
COM1 IRQ 4 0x3f8 0x3ff
COM2 IRQ 3 0x2f8 0x2ff
COM3 IRQ 4 0x3e8 0x3ef
COM4 IRQ 3 0x2e8 0x2ef
RS-232
In RS-232, characters are sent one by one as a pattern of bits. The most common encoding format is the asynchronous start-stop format which uses a "start bit" followed by seven or eight data bits, possibly a "parity" bit, and one or two "stop bits". Thus 10 bits are used to send a single character, which has the nice side effect that dividing the signaling rate by ten results in the overall transmission speed. The most common alternative to asynchronous start-stop is HDLC.
The RS-232 standard defines the voltage levels that correspond to logical one and logical zero levels, the standard transmission speeds and connector types. Signals are plus or minus 3 to 15 volts. The range near zero volts is not a valid RS-232 level; logic one is defined as a negative voltage, the signal condition is called marking, and has the functional significance of OFF. Logic zero is positive, the signal condition is spacing, and has the function ON. Signal levels of +-5, +-10, +-12, and +-15 are all commonly seen depending on the power supplies available within a device.
http://www.lvr.com/serport.htm
Traditionally IBM PC systems have allocated their first four serial ports according to the configuration in the table below.
PORT Interrupt Starting I/O Ending I/O
COM1 IRQ 4 0x3f8 0x3ff
COM2 IRQ 3 0x2f8 0x2ff
COM3 IRQ 4 0x3e8 0x3ef
COM4 IRQ 3 0x2e8 0x2ef
RS-232
In RS-232, characters are sent one by one as a pattern of bits. The most common encoding format is the asynchronous start-stop format which uses a "start bit" followed by seven or eight data bits, possibly a "parity" bit, and one or two "stop bits". Thus 10 bits are used to send a single character, which has the nice side effect that dividing the signaling rate by ten results in the overall transmission speed. The most common alternative to asynchronous start-stop is HDLC.
The RS-232 standard defines the voltage levels that correspond to logical one and logical zero levels, the standard transmission speeds and connector types. Signals are plus or minus 3 to 15 volts. The range near zero volts is not a valid RS-232 level; logic one is defined as a negative voltage, the signal condition is called marking, and has the functional significance of OFF. Logic zero is positive, the signal condition is spacing, and has the function ON. Signal levels of +-5, +-10, +-12, and +-15 are all commonly seen depending on the power supplies available within a device.
http://www.lvr.com/serport.htm

<< Home