In article < .com>,
Amit <> wrote:
> On May 19, 9:53 pm, "David M. Palmer" <dmpal...@email.com> wrote:
> > In article <1179633279.496132.20...@n59g2000hsh.googlegroups. com>, Amit
> >
> > <amit.ko...@gmail.com> wrote:
> > > Hello group,
> >
> > > Can somebody help me with this before I go nuts. I'm thinking of
> > > writing a VHDL code for uart with parity check. I believe there must
> > > be 11bits but I visited a website (by chance) that explains it with 12
> > > bits!!!
> >
> > > I thought of bit0, ...,bit7 for data (8 bits)
> > > stop bit and start bits (data frame)
> > > and one parity check (1 bit)
> >
> > > total = 11bit
> > > but this linkhttp://eshop.engineering.uiowa.edu/NI/pdfs/00/97/DS009795.pdf
> > > explains 12 bit must be there. Why?!!!!!
> >
> > You can have 2 stop bits. (Or even 1.5)http://en.wikipedia.org/wiki/UART
> > "In mechanical teletypes, the "stop" bit was often stretched to two bit
> > times to give the mechanism more time to finish printing a character. A
> > stretched "stop" bit also helps resynchronization."
> >
> > --
> > David M. Palmer dmpal...@email.com (formerly @clark.net, @ematic.com)
>
>
> Thank you All:
>
> 1) How 1.5 bit is possible? I'm new to digital field and I don't get
> it. How come I must allocate 1.5 bit for a specific purpose?
1.5 stop bits just means that the UART will give a '0' signal for at
least 1.5 bit times between the end of one character (last data or
parity bit) and the time when the signal goes to '1' for the start bit
of the next character. For a 300 Baud signal (3.33.. ms bit time) it
means that the start bit of one character is at least 5 ms after the
end of the previous.
It is unlikely to cause problems if you pause for 2 bits when sending a
character, and only require one bit of pause when receiving a
character, when 1.5 stop bits have been requested.
And just because a stop bit exists doesn't mean that you have to store
it. (Likewise the start bit.)
> 2) I was thinking of start-bit and stop-bit as data frame but now you
> are saying that only stop-bit is necessary! how can a receiver must
> know the starting of data then?
No, you need a start bit for the reasons you describe. I don't see
anybody in this thread telling you that you don't need a start bit.
Other potential gotchas in serial ports:
Least Significant Bit is transmitted first.
On reading, you want to sample in the middle of the bit time (n.5
bit-times after the edge of the start bit going high) for best
reliability with imperfect clocks.
The UART typically puts out Vcc (5V, 3.3 V, whatever) for '1' bits and
0V ground for '0' bits. The level convertor does the inversion to the
standard, e.g. -5V for '1' and +5V for '0' .
Some computer serial ports accept 0V for '1' and 5V for '0', so if you
are never going to plug your circuitry into anything else, you can in
theory get away with a little bit of protection circuitry and inverters
in your FPGA. Just don't pretend it is RS-232.
Level convertors are cheap, small, reliable, provide input protection
and are easy to use. They include the power inverter to generate the
negative voltages from your positive supply.
--
David M. Palmer
(formerly @clark.net, @ematic.com)