PDA

View Full Version : Using serial ports


panorama
08-12-02, 12:32 PM
I notice the IsoPod has two serial ports. One is used for programming. The other is RS-422/RS-485.

My project will be a stand-alone device to read 2 joysticks, three encoders, and 10 buttons, and send the data out a serial port (RS-232.) It will be a lot easier to use the second serial port to do this.

Can I easily modify the RS-485 to get RS-232?

Will it work with most PC's to just tie the two minus signals to ground?

Can I special order the IsoPod with two RS-232's?

Thanks

nmitech
08-12-02, 06:18 PM
Can I easily modify the RS-485 to get RS-232?
- There is no extra RS-232 level shifter for the replacement RS-422. Beside, It is not simple to remove or modify any surface mount component onboard, and I am not recommended.


Will it work with most PC's to just tie the two minus signals to ground?
- No!

Can I special order the IsoPod with two RS-232's?
- We can modify the IsoPod without the RS-422 driver chips to TTL serial signals. From here, you need additional RS-232 level shifter such as the NMII-0232 to convert TTL serial to true RS-232 level.

panorama
08-12-02, 08:59 PM
You mention RS-485. Is that an option, or is the output compatible with both RS-422 and RS-485. If so, then the - signals and + signals could possibly be connected together with a couple of diodes to pass the + and - signals onto a single RS-232 compatible line. What do you think about this?

Otherwise, I will have to use the same port we use for development. It would seem to work ok as long as I don't burn a bad program that boots to a situation where I am unable to continue development. I'll just have to be careful.

What I need to do in this case is to let the program run for a while (say 100 data points,) and then continue in development mode. When everything works, then I can take out the return to development mode.

Is there a chance that this can work?

Thanks.

perisoft
08-13-02, 12:51 PM
Panorama, I'm working on much the same type of thing, although a little more ambitious I think. :) I'm developing a six-degree-of-freedom motion platform for use with racing simulations; the Isopod is doing our pulse output for motor control.

So, I've got to communicate to the Isopod what lengths I want each strut to be via the serial line. I'd been assuming I'd use the RS232 line; however, I am aware of 232-485 converters.

I'd been talking to somebody at NMI about this, but my machine blew out, and while I backed everything up, an Outlook XP inbox is worthless with a new install. No way to import. Clap clap, MS. So I've lost all my email even though I backed up!

Anyway, the upshot is I lost that info. I'm going to get in touch with them again, though.

If you'd be interested in sharing info and experience about this (first time I've tried the isopod, so it's all new) that would be cool.

nmitech
08-13-02, 01:09 PM
Just want y'all to know that we are currently working on another version that supports two RS-232 drivers instead of the current version, 1 Rs-422 and 1 RS-232.

we will keep you posted.

chris
------

nmitech
08-24-02, 09:49 AM
panorama,

Your recent Post was lost during the site schedule for maintenance. Please re-post your question again.
We are sorry for the inconvinience that caused you.

nmitech
----------

panorama
08-24-02, 06:52 PM
I seem to have answered my own question about converting the RS-422 port to RS-232. I made a cable as show below, and it works great. The cable assumes a DB9 female at the RS-232 end, and a 10 pin connector at the IsoPod end (connector J4). WARNING: The IsoPod pin numbers are as shown on the IsoPod Documentation, which is not as you might find on the connector you use to plug into the IsoPod. The connector I used has pin 1 at IsoPod pin 2, and vice versa.

DISCLAMER: I cannot guarantee that the following will work on all systems. RS-232 can vary considerably, and some versions require a swing from low to high of –12 Volts to +12 Volts. The solution shown will transmit –3V to +3V and will receive from 3V to 12 V depending on the system it is connected to.

The diodes I used are 1N4001’s which can handle up to 50 volts and 1 amp. The resistors are ¼ watt.

On the DB9, jumper the following wires: 1-4-6, and 7-8. This is to make sure transmit and receive is enabled at all times.

Connect Pin 2 of the DB9 to the IsoPod Pins 7 and 8 by splitting the wire into two, with a diode on each. Arrange one diode so that the ring is at the end toward Pin 8 of J4, and so that the ring of the other diode is away from Pin 7.

Connect Pin 3 of the DB9 in the same way to Pin 4 (ring of diode toward) and Pin 3 (ring of diode away.) In addition, add a 10K Resistor between Pin 6 and Pin 4, and another between Pin 6 and Pin 3 (all pins relate to IsoPod.) Pin 6 is a ground pin.

Connect Pin 5 (ground) of the DB9 to Pin 5 of the IsoPod J4.

To transmit data from the IsoPod, use the following:
HEX
104 F10 ! ( select 9600 baud in Baud register )
000C F11 ! ( enable transmit and receive circuits via Control register )
F12 @ U. ( read and display the status register, if high bit set, ok to send. You must always read the status register before transmitting )
41 F13 ! ( send the letter ‘A’ out the data register )

To receive a character, I used this:
F12 @ U. ( read status, if bit 13 set, there is a character in the receive buffer. You must always read the
status register before reading the data )
F13 @ U. ( read and display the character value )

Error flags are in bits 9-12 of the Status register. To clear these bits, do the following:
0F00 F12 ! ( write a bit to each flag to be cleared )
0 F12 ! ( write a zero to the status register )
F12 @ U. ( notice that bits 9-12 are now clear )

I hope all this is useful to someone.

Sorry, I tried to upload a diagram, but it kept failing.

Pan

nmitech
09-13-02, 06:29 PM
Check these out,

http://www.newmicros.com/isopod/images/isopods.jpg

and

http://www.newmicros.com/isopod/images/isopod_v2.jpg


Here is the shematic for the IsoPod_V2,

http://www.newmicros.com/store/product_schematics_pdf/isopod_v2.pdf

The IsoPod_V2 will be available within 2 weeks. We are taking pre-order now.

panorama
09-13-02, 08:22 PM
Thanks nmitech,

I will use this board in future, providing it has the pins for support of a third quadrature decoder.

For those who do not know, the processor has up to 4 quadrature decoders. Two are dedicated, and two share pins with the index and home pins of the primary decoders and timers.

Panorama