PDA

View Full Version : Start bit



Tekky
- 31st July 2008, 14:11
Hi,
Does anyone know how to add a start bit to either of the PIC Basic
commands SEROUT and SEROUT2. The handbook indicates that the default
settings are 8 data bit, no parity and one stop bit. Many thanks.

skimask
- 31st July 2008, 14:29
Hi,
Does anyone know how to add a start bit to either of the PIC Basic
commands SEROUT and SEROUT2. The handbook indicates that the default
settings are 8 data bit, no parity and one stop bit. Many thanks.

There are no options for start bits in SEROUT and SEROUT2.
You can't add one, therefore you can't start serial communications.

skimask
- 31st July 2008, 14:32
Sorry, I couldn't resist... If I had the graphic for the guy laughing on the floor I'd post it, but I don't...

:D Start bits are always present. Start bits are about the only thing that's constant in async-serial comm's. You can't have asynchronous serial communications without a start bit. Well, you could, but I can assure you it wouldn't work very well. :D

http://en.wikipedia.org/wiki/Asynchronous_serial_communication

Tekky
- 31st July 2008, 14:38
Many thanks for the info. Since posting I have looked at several serial comms
sites and seen that the start bit is necessary for synchronisation. I have been confused
by the PIC Basic literature not stipulating the fact the start bit must be present in the routine. Again many thanks.

Bruce
- 1st August 2008, 00:26
The start bit is already there. You don't need to ad it. Standard serial comms = 1 start bit
followed by 8 data bits, followed by the stop bit, which is just an idle period where the TX
pin is held at idle logic for one bit period before the next byte can be sent.