Need help in establishing communication b/w MR16 and Computer via RS232.

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Need help in establishing communication b/w MR16 and Computer via RS232.

跳至解决方案
7,297 次查看
vivek
Contributor II
Dear all,
 
Im a newbie :smileyindifferent: to hc908mr16 and Code warrior. My aim is to flash my code into MR16 using Code Warrior :smileysurprised:. I read the devlopment support sec given im MR16 datasheet Pg no. 279.  I used MAX 232N instead of MC145407 and GD74HC125 instead of MC74HC125.
 
I wired up a circuit as given there. After verifiying wether all necessary conditions as mentioned in the datasheet were being satisfied i opened a demo program for mr32 :smileysad:.
 
In true simulator i selected Monitor Target mode interface and tried to autodetedct the baud rate. It did not detect the minimal baud rate. It din't work out :smileymad:.
 
Then i tried P&E Debug - Class3 and 4. it dint even detect the hardware loopback :smileysurprised:.
 
I was taken around in loops :smileytongue:. Now i jus dont know how to carry on further.
 
Could anyone give me the circuit diagram for establishing communication b/w PC and MC68HC908MR32 via RS232 .
 
I welcome all kinds of views, suggestions, guidance. Sooner the better:womansad:.
 
Thanks and Regards
 
Vivek :manmad:
标签 (1)
标记 (1)
0 项奖励
回复
1 解答
1,612 次查看
vivek
Contributor II
Hi Peg,
 
I have finally flashed MR16 from my PC.
 
U were right i.e. The monitor mode circuit given in the datasheet (MR32 Rev 6.0)is for DB25 pin cable. So i made the necessary changes as u said.
 
Another important point is that the 10 mfd capacitor connected b/w pins 19 and 17 of MC145407 has to reversed i.e. +ve to pin 17 and -ve to pin 19(I found this in a couple of other serial communication circuits that i downloaded from the internet).
 
Then it finally worked!?!?!?!... 
 
Thanks Peg for all ur suggestions.
 
I am also a newbie to Programming...
 
So i am expecting to come across more such obstacles...
 
Thanks and regards
 
Vivek

在原帖中查看解决方案

0 项奖励
回复
8 回复数
1,612 次查看
peg
Senior Contributor IV

Hi Vivek,

Then i tried P&E Debug - Class3 and 4. it dint even detect the hardware loopback.
 
You have a fairly basic problem here.
Toss your programmer for a moment.
Short TxD to RxD (pins 2 and 3 on a 9 pin D).
Now try P&E again.
If you don't get loopback now blame cable, COM port selection, computer etc.
If you do try your programmer not connected to the device.
If you don't get it now find out why TxD is not looping back on your programmer.
Then get back here with your result.
 
Regards
Peg
 
0 项奖励
回复
1,612 次查看
vivek
Contributor II

Tnx Peg,

Tnx for ur quick reply...

I wasn't aware of the fact that one needs to short 2&3 pins of the 9-pin D connector.

I was actually planning to reconstruct the circuit with exactly the same ICs(MXC145407 & 74HXC125) as mentioned in the datasheet.

But then i would prefer to try out ur suggtestion first and will promptly get baxck to you.

With Love and regards

Vivek 

 

0 项奖励
回复
1,612 次查看
peg
Senior Contributor IV

Hi Vivek,

The short is only for a quick test, not a permanent feature of the programmer!

Revised instructions:

Toss your programmer for a moment.
Short TxD to RxD (pins 2 and 3 on a 9 pin D).
Now try P&E again.
Then remove the short.
If you don't get loopback now blame cable, COM port selection, computer etc.
If you do try your programmer not connected to the device.
If you don't get it now find out why TxD is not looping back on your programmer.
Then get back here with your result.
 
The path for the loopback on the programmer is in through the MC145407 (MAX232etc) through one gate of HC125 then back through another HC125 gate back through the 145407 and back down the serial cable.
 
Regards Peg
 
0 项奖励
回复
1,612 次查看
vivek
Contributor II
Hi Peg,
 
The following were my attempts. It jus din't workout:womansad:.
 
1) I shorted the pins Rxd and Txd  - No Loopback
2) I checked my RS232 cable - Passed:smileysurprised:
3) I replaced Max232N with MC145407 [Back to datasheet(MC68HC908MR32)] - No result
4) I Unistalled and then reinstalled Codewarrior - No result
 
 
I started this assuming that this is a very simple subsystem in my project. I ve applied the BruteForce algorithm (its essence - to leave no stones unturned) to my max capablity. Lack of results is putting my motivation to death. Since this is the first step in my project I positively want to work this out by all means:smileywink:.
 
Can u giv me a working circuit diagram for establishing communication b/w MC68HC908MR16 and the PC:smileyindifferent:.
 
Eagerly waiting for a reply that would help me to gain my confidence back.
 
With Love & Regards
 
Vivek
0 项奖励
回复
1,612 次查看
peg
Senior Contributor IV

Hi Vivek,

There is no use of a circuit for a programmer if you can't get a loopback result at the cable. No programmer will function.

Let's start again.

Just run P&E programmer with a cable plugged into your COM port with pin 2 shorted to pin 3. Thats it just a PC, a cable and a short, nothing else.

If you don't get a loopback positive result you PC/cable is broken or you are specifying the wrong port or something PC related.

Can you use this COM port for something else? Does it work?

Peg

Ah... not sure about this love thing....

 

0 项奖励
回复
1,612 次查看
vivek
Contributor II

Hi Peg,

It worked ....

Now we can say that there is no problem with the cable, PC, Software.

So problem shld be with my circuit?!?!?!...

Untill now i had built my circuit in a bread board.

Now i ll solder the circuit in a general purpose pcb.

What nxt?

First sign of HOPE:smileyvery-happy:!!!...

Tnx Peg.

With Love and Regards

V.Vivek 

 

 

 

 

0 项奖励
回复
1,612 次查看
peg
Senior Contributor IV

Hi Vivek,

I am looking at Monitor circuit in my old GP32 manual (a paper one, remember them!) it shows the pc connection as DB25. You are aware that pins 2 and 3 function swap between DB25 and DB9? (and GND is 7 on DB25 and 5 on DB9)

Otherwise take just your programmer and touch 5V onto DB9 pin 3 (TxD input) now follow the signal through the level translater through the HC125 and then back through HC125 and back through the MAX to pin2 and find out where it stops. Connect 5v and disconnect while measuring every test point!

Peg

0 项奖励
回复
1,613 次查看
vivek
Contributor II
Hi Peg,
 
I have finally flashed MR16 from my PC.
 
U were right i.e. The monitor mode circuit given in the datasheet (MR32 Rev 6.0)is for DB25 pin cable. So i made the necessary changes as u said.
 
Another important point is that the 10 mfd capacitor connected b/w pins 19 and 17 of MC145407 has to reversed i.e. +ve to pin 17 and -ve to pin 19(I found this in a couple of other serial communication circuits that i downloaded from the internet).
 
Then it finally worked!?!?!?!... 
 
Thanks Peg for all ur suggestions.
 
I am also a newbie to Programming...
 
So i am expecting to come across more such obstacles...
 
Thanks and regards
 
Vivek
0 项奖励
回复