totty@m.cs.uiuc.edu (08/18/90)
I am trying to build a circuit to convert a synchronous serial data line (with no flow control or error detection) into RS-232 serial data. My original idea was to build a finite state machine to take the synchronous serial data, pack it into a byte, and sent the byte to a UART, which will send out RS-232 data on the other end. Unfortunately, most available UARTs I have seen are intended to be connected to a CPU bus, which make them more complicated to use (I have to simulate the bus protocol and write initial data to initialize the UART), and the FSM looks fairly complicated to build. Here are my questions: (1) What simple UARTs to people recommend, especially simple ones whose options can be hard-wired and not require writing words or initialization data to the UARTs? (2) Are there any chips to do what I want (synchronous serial to RS-232)? (3) Would it make sense to use a microcontroller instead? If so what microcontrollers are recommended, how wide are their I/O paths, and what support circuitry do they need? Are they easily programmable? Thanks For The Help, --- Bri / Brian Totty o o /__ __ o 406 E. Michigan / Apt. 6 o / / / / Urbana, IL 61801 \_/ "We have corn in /__/ / / totty@cs.uiuc.edu Massachusetts too!"
mmm@cup.portal.com (Mark Robert Thorson) (08/19/90)
Lots of uC's have both async and sync serial I/O on-chip. The Z180 from Zilog (second-sourced by Hitachi) is a good example. That particular chip isn't really a microcontroller, because it has no RAM or ROM on-chip. Software tools are widely available, because it is code-compatible with the Z80. If we're talking about a one-of-a-kind application, NEC makes the 78213, which is a Z80-like microcontroller with on-chip sync and async serial I/O, in addition to a lot of other stuff like A/D. It's available ROMless, and with UV EPROM. This might be a good choice for a one-of-a-kind system because the evaluation board is reasonably priced. It's $295, and that includes an assembler and linker for the IBM PC. The Motorola 68HC11 also has both sync and async serial I/O. I think their evaluation board is even cheaper, like around $100. If I remember correctly, they've got a BBS from which you can download a C compiler.
rainer@boulder.Colorado.EDU (Rainer Malzbender) (08/19/90)
In article <21000091@m.cs.uiuc.edu> totty@m.cs.uiuc.edu writes: > > .. stuff deleted .. > > (1) What simple UARTs to people recommend, especially simple ones > whose options can be hard-wired and not require writing words > or initialization data to the UARTs? Back in the bad old days I used to use the AY-5-1015 uart. Everything is programmed using dedicated pins on the chip. I think Jameco and JDR still sell this dino. See below. > (2) Are there any chips to do what I want (synchronous serial to > RS-232)? My favorite uart is the Signetics 2681 dual uart. Unfortunately it is only asynchronous. However, its cousin, the 2661, does both sync and async. So does the Intel 8251A (I have an old databook, there may be newer versions). Both will require a micro unless you are really twisted. See below. > (3) Would it make sense to use a microcontroller instead? If so > what microcontrollers are recommended, how wide are their I/O > paths, and what support circuitry do they need? Are they > easily programmable? > Let's face it, micros win most of the time, as much as the dyed-in-the-wool hardware types protest. Get a 68HC11, 8031, or something like those. Having done a similar thing with an 8031 I can tell you that it takes exactly one eprom and some TTL-to-RS232 level converters (a single MAX232 with caps or 1488/1489 combination) [1]. Use one of the general purpose I/O bits to sample the sync input, and send what you get out the built-in uart. The built-in timer gives you a sample clock (assuming you're not running too fast). For this application even the 128 or 256 bytes of internal RAM (depending on which specific chip of the 8031 family you use) would be sufficient. The August '88 Byte has an intro article on the 8031. Both are 8 bit micros, and public domain assemblers exist for them. If you pay money you can get nice C compilers with emulators and debuggers, but for this application you can almost hand assemble the code anyway. [1]: Forgot, there's a latch involved also. Ok, eprom, latch, micro, and MAX232. -- Rainer M. Malzbender Technology recapitulates biology. Dept. of Physics (303)492-6829 rainer@hibachi.colorado.edu U. of Colorado, Boulder, USA malzbender%opus@vaxf.colorado.edu
mmm@cup.portal.com (Mark Robert Thorson) (08/20/90)
BTW, Analog Devices now has pin-compatible versions of the MAX232 and similar chips from Maxim. AD's parts are lower power, and they have some new designs which don't need the capacitor. Analog Devices, One Technology Way, P.O. Box 9106, Norwood MA, 02062-9106 (617) 329-4700
totty@flute.cs.uiuc.edu (Brian Totty) (08/21/90)
Thanks for all the help with this question. I tried to reply individually, but I couldn't mail to several people who sent me replies. / Brian Totty o o /__ __ o 1304 W. Springfield Avenue o / / / / Urbana, IL 61801 \_/ "We have corn in /__/ / / totty@cs.uiuc.edu Massachusetts too!"
deanr@sco.COM (Dean Reece) (08/21/90)
In article <21000091@m.cs.uiuc.edu> totty@m.cs.uiuc.edu writes: > > I am trying to build a circuit to convert a synchronous serial > data line (with no flow control or error detection) into RS-232 > serial data. > > My original idea was to build a finite state machine to take the > synchronous serial data, pack it into a byte, and sent the byte > to a UART, which will send out RS-232 data on the other end. > Unfortunately, most available UARTs I have seen are intended to > be connected to a CPU bus, which make them more complicated to use > (I have to simulate the bus protocol and write initial data to > initialize the UART), and the FSM looks fairly complicated to build. > > Here are my questions: > > (1) What simple UARTs to people recommend, especially simple ones > whose options can be hard-wired and not require writing words > or initialization data to the UARTs? AY-3-1015D 40 pin 25K Baud UART $4.95 (Jameco 1990) AY-3-1013D 40 pin 40K Baud UART $2.95 (Jameco 1990) One (or perhaps both) of these chips are exactly what you need (I forget which one I've used in my past projects). It is a basic register-less UART. This is a neet chip. The transmitter and receiver are so totally independant that they have seperate clocks and data busses. I used one once to bump up the rate on a 232 line (I hooked data out to data in, set the clocks right and tied the data available pin to the start transmit pin and viola') The options for parity, start bits, stop bits, and word size are strapable. The error & status codes are also available at the pins (parity error, framing error, over-run, and data available). Really the chip is only somewhat smarter than a shift register. > (2) Are there any chips to do what I want (synchronous serial to > RS-232)? Well, If you have some way of accumulating bytes from your sync line and providing a pulse every time a byte is ready, just pick the next higher baud rate and hook up one of the AY-3-101?? chips above and, unless you need flow control on your RS-232 side, things will work nicely. If you HAVE TO HAVE Xon/Xoff or DTR/DSR CTS/RTS type handshaking, a uProcessor is probably your best bet. > (3) Would it make sense to use a microcontroller instead? If so > what microcontrollers are recommended, how wide are their I/O > paths, and what support circuitry do they need? Are they > easily programmable? If you decide for a uProcessor, I think the 68701 would do a nice job for you. It has a serial port built in (which can be clocked from the CPU clock, so only 1 xtal needed), 2K of EPROM for code/data, 128 bytes of RAM for stack and buffering, and lots of I/O pins to hook to up to your sync interface. Its an 8-bit CPU thats code compatible with the (Motorola) 6801 CPU. If your sync data is coming in slow enough, you can use an interrupt on the 68701 to shift in the bits, and do in-software assembly of the bytes. MC68701 40 pins 8bit MPU 2KEPROM 128RAM I/O $19.95 (Jameco 1990) The only drawback of the 68701 is that programming one can be a trick. I just built a programmer for my PC, but its not worth it unless you use them often. Its easier to find a company with the right programmer and just borrow some time on it. (They can be erased just like an EPROM, so you don't have to worry about wasting a $20 part!!) > > Thanks For The Help, Hope it helps -deanr@sco.com
krolnik@convex.COM (Adam Krolnick) (08/21/90)
One thing to watch out for..... the AY-3-1015 Uart is no longer made. You still can purchase them now.. but later on that might not be the case. just in case people are thinking about this for products (or for the future) Adam Krolnik Convex Computer Corp. 3000 Waterview pkwy Richardson, Tx 75080
bmw@isgtec.UUCP (Bruce Walker) (08/21/90)
In article <21000091@m.cs.uiuc.edu> totty@m.cs.uiuc.edu writes: > (1) What simple UARTs to people recommend, especially simple ones > whose options can be hard-wired and not require writing words > or initialization data to the UARTs? I don't have an SMC catalog handy but they have several UARTs like you need. There is an "industry standard" 40 pin device where the input and output busses are separate and all control lines are brought out to pins. > (2) Are there any chips to do what I want (synchronous serial to > RS-232)? Don't know, never heard of one. > (3) Would it make sense to use a microcontroller instead? If so > what microcontrollers are recommended, how wide are their I/O > paths, and what support circuitry do they need? Are they > easily programmable? The Hitachi 64180 (aka Zilog Z180) has both synchronous i/o and async serial ports but the synch port is extremely limited in cababilities. These uP's have an improved Z80 instruction set. I/O is 8 bits. Support ccts would be minimal, they have xtal oscillators and most i/o you need built-in; you might need to decode ROM/RAM addresses but even there you get 20 pins of address (built-in MMU) so you can be wasteful with address space. I'd tend to use a couple of PAL's and a 40 pin UART myself. A state machine to do this would be simple (all the terms would fit in a 16R4, likely) and you'd need a shift register for the sync input part. If you can get AMD to give you PALASM for the PC you get a reasonable state-machine syntax to describe your FSM therefore eliminating a major headache. -- bmw@isgtec.uucp [ ..uunet!utai!lsuc!isgtec!bmw ] Bruce Walker
rickl@nsc.nsc.com (Richard Leach) (08/28/90)
National Semiconductor has a large selection of microcontrollers from 4 to 16 bits. These controllers have a lot on on-board stuff like UART, PWM timmers, 30MHz clocking, regular timers with synchronous outputs, capture registers, 52 general purpose I/O lines, Microwire serial interface, Interrupts, A/D, HDLC channels, DMA, 64k direct memory addressing, and emulator parts with UV EPROM. Rich