From: "Matt Foster"
References: <firstname.lastname@example.org> <3E15B302.email@example.com>
Subject: Re: RS232 newbie - in need of assistance!
X-Newsreader: Microsoft Outlook Express 6.00.2720.3000
Date: Fri, 3 Jan 2003 16:06:19 -0000
NNTP-Posting-Date: Fri, 03 Jan 2003 16:06:16 GMT
Organization: blueyonder (post doesn't reflect views of blueyonder)
I'm rather attached to my PIC, MAX232 combo now....
"Fred Bloggs" wrote in message
> Matt Foster wrote:
> > Hmm no code, sounds easy - but expensive?
> > Here's my basic request then (I figured I need 5 switches now)
> > 5 push to make switches, (say 1,2,3,4,5), when switch 1 is pressed, I'd
> > the screen to say "1" and the same for 2 3 4 5.
> > The final thing will be a bit more complex oin the software side, all I
> > the hardware to do is send one of 5 characters (they can be anything) to
> > serial port (does it need to be followed by a line feed or anything?) so
> > that the program can recognise what was pressed.
> > If it's simple and possible, then I'd like the PCB to filter out which
> > button was pressed first out of 1,2,3 and 4 - then not accept any more
> > inputs until switch 5 is pressed (a reset). But I can do this software
> > if necessary.
> You cannot send arbitrary binary 8-bit patterns over the RS-232, you
> should stick to the printable ASCII character codes. Since you have only
> 5 switches that would make it only 32 different characters. The simplest
> thing to do would be to dedicate each switch to a fixed bit position,
> parallel load the total switch state into a shift register and shift
> through a RS-232 driver to the port at the required baud rate-this
> process repeating at a fixed scan rate like 100Hz. This can be done with
> a single low-cost in-circuit-programmable PLD from Lattice Semiconductor:
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.434 / Virus Database: 243 - Release Date: 25/12/2002