Easy RS232?

This is the place for any magazine-related discussions that don't fit in any of the column discussion boards below.
Post Reply
P Berry
Posts: 4
Joined: Mon Apr 07, 2003 1:01 am
Contact:

Easy RS232?

Post by P Berry » Sun Apr 27, 2003 4:22 pm

I'm building a 42 bit binary counter that I want to input to the serial port of a PC. The count will be in a shift register. Is there an easy way to get those 42 bits into the serial port of a PC? I was looking for a chip that I could shift the bits into and it would send it out RS232. Couldn't find it though, or don't know what to look for. Prefer not to use a PIC or Stamp, because then it becomes an entire project in itself. Any ideas on how to do this?<p>Thanks,
Paul

greg123
Posts: 361
Joined: Sat Sep 07, 2002 1:01 am
Location: St. John's NFLD Canada
Contact:

Re: Easy RS232?

Post by greg123 » Sun Apr 27, 2003 4:35 pm

Check out the MAX232.<p>The max chip will convert TTL to RS232 levels for you and its cheap!<p>You must also use a null modem configuration to trick the serial port into thinking handshaking signals are present.<p>Check these links out:<p>Connection Possibility, shows null modem<p>PDF Datasheet<p>Maxim Website, RS232 Driver/Receiver<p>Any more questions? Dont hesistate to ask<p>greg

greg123
Posts: 361
Joined: Sat Sep 07, 2002 1:01 am
Location: St. John's NFLD Canada
Contact:

Re: Easy RS232?

Post by greg123 » Sun Apr 27, 2003 4:54 pm

One more thing,<p>The serial port cannont accept random data like the parallel port. Thus your software must be configured with the bit parameters.<p>An ic that can add the proper start and stop bits, as well as sending the data at the proper baud rate is the PC16550 UART. The UART requires 8 bit parallel data input, but the shift register can accomplish that.<p>What software are you using to read the data? The data will have to be sent at a known Baud Rate, will proper start and stops bits. The data bits are placed inside. A parity bit is not necessary. <p>Visual Basic makes it really easy to accept data from the serial port using it's Active X controls. <p>UART 16550 Info<p>UART Devisors<p>Technical Spec's<p>Purchasing Info<p>Datasheet from National Semi<p>Sorry for all the links, but i had them on hand.<p>greg

P Berry
Posts: 4
Joined: Mon Apr 07, 2003 1:01 am
Contact:

Re: Easy RS232?

Post by P Berry » Mon Apr 28, 2003 5:32 pm

Thanks for the reply! I'll have to see if I can decipher what the chips require to operate. Can you tell me if the UART functions as a single chip binary to RS232 interface? In other words can I shift bits into it, and have it take care of all RS232 protocol requirements? I'll be using Visual BASIC to read the serial port.<p>Paul

greg123
Posts: 361
Joined: Sat Sep 07, 2002 1:01 am
Location: St. John's NFLD Canada
Contact:

Re: Easy RS232?

Post by greg123 » Mon Apr 28, 2003 5:51 pm

The UART connects directly with the system BUS for the parallel but requires the max chip for the TTL to RS232 and RS232 to TTL serial Data.<p>Thus the max chip is needed.<p>Unfortunatly, I only have C++ available for the UART. The visual basic code is for use with the ADR products. <p>I will search for VB code to use with the UART.<p>greg<p>[ April 28, 2003: Message edited by: Greg ]</p>

P Berry
Posts: 4
Joined: Mon Apr 07, 2003 1:01 am
Contact:

Re: Easy RS232?

Post by P Berry » Mon Apr 28, 2003 9:41 pm

Greg, thanks for your efforts.<p>It seems to me that the complexity is building to a level that I wanted (maybe unrealistically) to avoid. I was hoping for one chip with 8 parallel bit inputs and a pair of output pins that would directly interface with the serial port. It sounds like the UART interfaces with the PC bus rather than my shift register. I'll print out the datasheet and take a better look. Maybe it would be easier to use a digital IO board to get the bits? This might be a fun project, but I just want to get the job done without too much time commitment.<p>Paul

greg123
Posts: 361
Joined: Sat Sep 07, 2002 1:01 am
Location: St. John's NFLD Canada
Contact:

Re: Easy RS232?

Post by greg123 » Mon Apr 28, 2003 9:45 pm

Is there a reason you want to use the serial port over parallel port? <p>Using the parallel port, you do not have to worry about baud rate, start/stop or parity bits or opening and closing the com ports.<p>With the parallel port, i use a program called NT port and the visual basic code is very simple:<p>variable = ntport1.value<p>that is it. You can use the time feature to read the data until all bits are read.<p>I'll keep checking as well, it's summer vacation time....<p>
greg

P Berry
Posts: 4
Joined: Mon Apr 07, 2003 1:01 am
Contact:

Re: Easy RS232?

Post by P Berry » Tue Apr 29, 2003 9:37 pm

I was staying away from the parallel port because I previously had a parallel port DAC device that required a driver be loaded. I want to keep this portable and not have to load the driver (and risk problems) on any PC.
I looked up NTPORT (for Win NT) and it is apparently an add-in that will compile with the .exe, so I don't have to worry about that. The program I need is IOPORT (for Win 95/98). The price is $15, so that is by far the cheapest solution. For anyone interested, here is the site for the utility:
http://www.uct.on.ca/<p>Thanks for the help,
Paul<p>[ April 29, 2003: Message edited by: P Berry ]</p>

greg123
Posts: 361
Joined: Sat Sep 07, 2002 1:01 am
Location: St. John's NFLD Canada
Contact:

Re: Easy RS232?

Post by greg123 » Tue Apr 29, 2003 9:49 pm

Both I/O port and NTport are available from Upper Canada Technologies for free. It is a "demo" with a suggested donation if you like the product.<p>The try it for free link is a working componant for the VB library and works without time restriction.<p>I have used both products and they work great.<p>Actually, when you download the programs they come with sample code for the library. Its good stuff.<p>Dont hesistate with questions...<p>greg<p>[ April 29, 2003: Message edited by: Greg ]</p>

Post Reply

Who is online

Users browsing this forum: No registered users and 26 guests