View Full Version : RS232 Problem
I am having trouble with my RS232 levels on my IsoPod_V2 with 2 RS232 ports. When I have the JTAG controller plugged in to my laptop, then everything works fine. When I unplug the JTAG connector, all I receive is gibberish. I am assuming that this has to do with the following statement in the manual:
The MAX3221/6/7 converts the 3.3V supply to the voltages necessary to drive the RS-
232 interface. Since a typical RS-232 line requires 10 mA of outputs at 10V or more, the
MAX3221/6/7 uses about 30 mA from the 3.3V supply. A shutdown is provided,
controlled by TD0.
I am making a further assumption that this refers to the TD0 on the JTAG header and not on the PWM Header. The problem is, I don't know how to ensure that the transiever is not shutdown.
I need to know how, using either hardware or software (programming in C), I can ensure that both RS232 Transceivers stay ON.
nmitech
03-25-03, 11:10 PM
The MAX3221/6/7 converts the 3.3V supply to the voltages necessary to drive the RS-
232 interface. Since a typical RS-232 line requires 10 mA of outputs at 10V or more, the
MAX3221/6/7 uses about 30 mA from the 3.3V supply. A shutdown is provided,
controlled by TD0.
The above info is applied for IsoPod V1 only.
Where PD4 & PD5 are controlled receiver & transmitter respectively of the RS-232 driver on IsoPod V2. By default, both receiver & transmitter drivers are enable.
When I unplug the JTAG connector, all I receive is gibberish.
Did you make your own serial cable? Sound to me the serial cable does not have a good grounding signal.
When I have the JTAG controller plugged in to my laptop, then everything works fine.
You meant, IsoMax is working, or Small C code working?
Since you have the JTAG cable, i don't know what to assume.
I need to know how, using either hardware or software (programming in C)
Download Small C compiler and instruction here,
http://home.attbi.com/~petegray/
Let me clarify my problem. First, I have tried this with both the serial cable I received from New Micros and a home made serial cable. My problem is this:
When the JTAG cable is attached to the IsoPod and the computer, I can receive serial data sent from the IsoPod without a problem. When I disconnect the JTAG cable, the serial data I receive from the IsoPod turns in to gibberish (it appears much the same as if the sender and receiver were at different speeds). The only thing changed in the two scenarios is the presence of the JTAG cable.
nmitech
03-26-03, 03:51 PM
Did you have the Ispod_V2 with the Switching regulator? If so, what about the transformer voltage rating, Is it 6V @ 300mA transformer you received from NMI or other rating?
Did you order a Quick_Kit? Development_Kit? or just IsoPod w/JTAG cable? Just want to makesure you received the proper accessories with the kit you ordered.
I ordered an IsoPod V2 Quick Kit and the JTAG 10 cable.
I'm not sure how to answer the switching regulator question. The two regulators on the board are the LM78LXX Series and the LM3940.
The problem appears to be the same with both the transformer supplied by NMI and an 8.4V battery.
nmitech
03-26-03, 04:48 PM
samOC, Thanks for the info.
Now i can eliminate the power suspect because you have the linear regulator circuit, this only needs about 5.5V to power the board where the switching circuit requires a little more than 6V, and the 6V transformer can barely turns on the switching circuit that is what i thought previously you may have the switching regulator circuit.
I think the custom made serial cable you recieved may have the Ground wire is going bad, based on what you described, "it works with the JTAG Cable Connect to the parallel port". If you can use the exacto knife or small tool to lift the pin lock and remove the ground wire off the plastic connector holder to check on the connection.
Let us know, www.nmiproduction@newmicros.com if you need a replacement cable.
petegray
03-26-03, 09:16 PM
samOC,
when you say you're disconnecting the cable, are you disconnecting it from the PC, the IsoPod, or both?
-Pete.
p.s. The reason I ask is because a couple of times I've disconnected just the PC end of the cable, and experienced what you're seeing - it was resolved by unplugging the JTAG cable from the 'Pod and hitting the reset.
Here are the different scenarios (note that it is the same for either SCI port and a variety of serial cables):
1. The JTAG cable is plugged in to the JTAG port on the IsoPod, everything works fine.
2. If the JTAG cable is plugged in to the board but not the computer, the processor will not come out of reset. (if it is removed from the computer and not the IsoPod, the processor goes into reset
3. if the JTAG cable is plugged in and I bring the processor out of reset, then remove the JTAG cable from the IsoPod, everything works fine (until the processor is reset again).
4. If I bring the processor out of reset without the JTAG cable attached to the IsoPod, all data out of the RS232 ports is jibberish. Further more, reattaching the JTAG cable and resetting the processor does not fix the problem. The flash has to be re-loaded. (this is the most troubling part to me).
If it helps, the 'gibberish' that I see seems consistent. That is, if I try this several times, I always get the same wrong data, it is not random. I don't know if you can make any sense out of it but if I try to send following sequence of bytes:
TC 0 70 0 70 0 255
I see this on the other end:
qɮ<Ip
Or the sequence of characters:
RS
Comes out as this:
Ҿ
(The ascii characters I'm copying and pasting don't appear be pasting right, so this may be worthless.)
I hope this helps clarify my problem.
nmitech
03-27-03, 12:24 AM
Plug in the JTAG cable and try to bring the IsoMax back the way you made it works correctly.
At the prompt enter "SCRUB". it should echo back with "IsoMax V0.5" within couple seconds.
Now turn off the power and remove the JTAG cable then power up the IsoPod without the JTAG plug in. If it works then you may have the corrupted IsoMax Srecord.
BTW, when is the first time you see the IsoPod responds with garbage characters. Does it work properly when you just received the product, or it just happenned when you reflashed the IsoMax Srecord?
To verify if the hardware problem or not, you can use JTAG cable to download any C program that communicates with the PC, such as serial bootloader, or leds_b.c, etc... on Pete Gray website. Just to makesure the data is sent correctly. Besure to set the terminal program baudrate for 115,200 for serial bootloader program.
I've tracked my problem down to a software issue, which makes no sense to me. A segment of code that works when the processor is reset with the JTAG plugged in stops working when the processor is reset without the JTAG plugged in. Here is the code
void main()
{
int i;
char string[3]={'R','S','\n'};
for(i=0;i<3;i++)
Transmit(1,string[i]);
}
void Transmit(int sci, char input)
{
unsigned int status;
status = *SCISR[sci]; //read status register
while((status&0x8000)==0) //wait for transmitter shift register to be empty
{
status = *SCISR[sci];
}
*SCIDR[sci] = input; //write to SCI data register
}
The transmit function works fine either way, so I have worked around this issue by simply eliminating the for loops from my program. Any insight as to what might be causing the characters from 'string' to be read wrong when the JTAG is not present on reset would be useful. Thank you for your help so far, being able to eliminate several other potential hardware issues helped me find this.
vBulletin v3.0.7, Copyright ©2000-2012, Jelsoft Enterprises Ltd.