Is it possible to implement UART by GPIO?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: P (nospamp_at_hotmail.com)
Date: 01/12/05


Date: 12 Jan 2005 00:34:32 -0800

I'm sure sending is possible on a PXA255, if the transfer speed is not
too high. But not using the OS Sleep and Timer functions, which only
use millisecond intervals. You would have to use the OSCR register in
the PXA255 and implement busy waiting in a high priority thread.
Receiving would be even harder because you would have to tell the
difference between 1 and 2 bit times to keep track of the number of
bits.

I wouldn't do it, your timings will not be very good, you will bot be
able to do anything else while transferring data and most of all it's
just not something you want to do in software.

I did't know there was a thing like 9 bit data in serial
communications? Are you sure it's not 8 + parity? Which reminds me,
you could send 9 bit data by manipulating the parity setting every
time before sending a byte, depending on what you want as last bit.
Now that would be fun! Receiving seems a bit harder though, you would
have to be fast enough to check the parity error after every single
byte (and PXA255 would have to let you read the bytes with a parity
error, I'm not really sure about that).

Another idea: do you have control over this 8051 you're communicating
with? Can you not switch this to 8 bit or change your protocol so the
ninth bit is ignored?

Good luck with it,

P

BTW Sorry I started a new thread, anyone know why I get "Unable to
retrieve message OzpoAi$9EHA.3820@TK2MSFTNGP11.phx.gbl" when trying to
reply to a message?



Relevant Pages

  • Re: Serial communication, detecting parity bits
    ... by-passes the parity generation, creating a ninth bit which can be controlled with the even/odd parity bit. ... Since the protocol that I have to use does not use any parity but uses the wakeup bit I can set my serial port to use either even or odd parity and then bytes that has a parity error will be prefixed with the bytes 0xff and 0x00. ... The receiving end has to detect the marker byte and decode the next byte as the real payload byte. ...
    (comp.os.linux.development.system)
  • Re: [PATCH] input: handle bad parity PS/2 packets in mouse drivers better
    ... finish transmitting entire packet when parity error is detected, ... psmouse - ignore parity error for basic protocols ... unsigned char pktsize; ...
    (Linux-Kernel)
  • Re: Bitwise Operators
    ... connected via serial communications lines. ... such communications using ASCII characters would add a parity bit to ... parity bit, if present, to retrieve the original ASCII character. ... have an appropriate newsgroups line in your header for your mail to be seen, ...
    (comp.lang.c.moderated)
  • Re: [PATCH] input: handle bad parity PS/2 packets in mouse drivers better
    ... The patch works by always accumulating a full PS/2 packet, ... finish transmitting entire packet when parity error is detected, ... psmouse - ignore parity error for basic protocols ... Let's do the same for standard PS/2 protocols (bare, ...
    (Linux-Kernel)
  • Re: wince serial driver
    ... I am using the parity bit as a signal bit ... it raises a parity error. ... But if I try to port the application to an ARM platform ... >> The Data Read out is from IST and WaitCommEvent is call from Application ...
    (microsoft.public.windowsce.platbuilder)