EPROM to RS232

I'd like to build a handheld unit that will send what is on an EPROM over RS232 to a PC. I'll program ASCII characters (in binary), one at each address including line feeds and carriage returns, on the EPROM. A nine volt battery with a 5 volt voltage regulator will power the unit and drive a 555 clock pulse. A kind of flowchart below has the 555 fire the binary counter which then fires addresses of the EPROM whose data goes into a shift register to take the data in and send it out serially to the RS232 driver, and out to the PC. I'm sure my unfamiliarity shows, is my approach way off? Any tips/suggestions/help is appreciated. Thanks in advance, Bart

- BATTERY

VOLTAGE REGULATOR 5V

CLOCK PULSE (555)

BINARY COUNTER

EPROM

SHIFT REGISTER (SERIAL OUTPUT)

RS232 DRIVER

PC (created by AACircuit v1.28.6 beta 04/19/05

formatting link

Reply to
Bart
Loading thread data ...

Interested idea.

However, you will need to have a means to add stop & start bits if you wish to transfer the info from the eprom as ascii.

You may wish to consider using cheap uart rather than shift register.

Reply to
Brian Lyons

--- Your approach is OK, but you'll need to add a stop and start bit to the serial data stream. That's easily done with half of an XX74 "D" type flip-flop though, by tying one of the "D" input of a "D" type flip-flop to the serial output ("Q") of an XX165 or XX166 parallel-in serial-out shift register, tying 74's RESET\\ input to the the 165's LOAD\\ input, and tying the 165's serial data input high. That way, when you load the 165 and take your data from the

74's Q output, you atomatically generate the start and stop bits and the data will be properly framed.

You'll also need to arrange for your serial data clock to pump data out of the shift register at a baud rate your PC can recognize and you'll need to divide that clock down so that it increments the ROM address counter by one count every time the stop bit ends and then, when data from the ROM settles, load the '165 and start a new cycle.

Want a schematic?

-- John Fields Professional Circuit Designer

Reply to
John Fields

If you can deal with a parallel port, it'll be easier. The port already has enough signals to transfer a byte at a time, so you can get away with fewer parts. You could also probably power the device from the port, which provides signals at 5V. In fact, you could clock the address counter from the PC, wait a bit, then retrieve the data from the data port.

Using a serial port means having a UART, or alternately a device to simulate one. UARTs are usually designed to be driven by a processor. However, using a 16 bit parallel-in serial-out buffer, you can probably simulate a 10 bit transmission. RS232 wants the line to be logic 1 until the 'start bit', which goes to 0, followed by the data bits, followed by a logic 1 'stop bit', and more logic 1s until the next character. It also likes low to high bit ordering. So, load bits 1111xxxxxxxx0111 into the 16 bit register, and shift the low order bits out. Make sure the serial in bit is set to 1, to keep the line idle. The data would go to an RS232 driver chip, like a MAX232 or something.

One problem is that using a 555 for the clock is going to be tricky, since it won't be very stable over time. RS232 assumes synchronized clocks on both sides, and won't tolerate more than about 5% of deviation. Thus, you might have to tune the clock occasionally. Using a crystal oscillator is generally a better way to go. Since you can get a crystal that is

38.4k, you might use that as your bit rate. Clock your counters (the number of bits in the counter should be the number of address bits in the eprom, plus 4 (or 5, see below)) with an oscillator built from that crystal (an unbuffered inverter is a good way to go), and use D4 on from the counters to address the EPROM. You will probably want to use synchronous counter, or you'll get glitches in the address lines. Use the D0 bit to load the next value into the shift register, since when that changes, the eprom will have had a bit time to settle since the address increment.

Use a modem control signal to reset the counters to 0... also, if you use an extra bit in the counter at the top, you can use that bit to inhibit the counting, and signal completion using a modem signal. Otherwise, you'll get wraparound.

These are just off-the-cuff ideas, you can clearly improve on them...

--
Regards,
  Bob Monsen

There once was a man from Hornepayne,
Who tried to transform the whole plane,
It bent a meridian
So it wasn\'t Euclidean,
And frustration drove him insane.
- Anonymous
Reply to
Bob Monsen

You could build this with counters, gates and shift registers if you like, and that's fine for a hobby project, but it would be easier to use a PIC. If you do decide to do it with discrete logic, then you're on the right lines. Some more things to consider are:

  1. you need to generate start bits and stop bits as well as data bits, so you need some logic to handle this;
  2. you might need a negative supply rail for the RS232 driver, and this could possibly be taken from the RS232 port itself).
  3. How many times will the message be sent? What will trigger it?
  4. How long is the message? Do you need to store a special end-of-message code?

It would be just as easy, take about the same board space, and be more accurate to use a 4060 crystal oscillator / divider to generate the clock.

Reply to
Andrew Holme

You can de-complicate your design effort greatly by using an SPROM (Serial PROM). Such devices are usually EE-type when it comes to programming and erasing (though many are OTP -- shop carefully!), and they are accessed via serial data stream as opposed to the parallel architecture of a normal EPROM.

At least one example of such devices, data-wise, may be found here:

formatting link

Further search should turn up others.

Happy tweaking.

--
Dr. Anton T. Squeegee, Director, Dutch Surrealist Plumbing Institute.
(Known to some as Bruce Lane, ARS KC7GR, 
kyrrin (a/t) bluefeathertech[d=o=t]calm -- www.bluefeathertech.com
"If Salvador Dali had owned a computer, would it have been equipped
with surreal ports?"
Reply to
Dr. Anton T. Squeegee

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.