NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Everything Else » Serial Port Problems

December 14, 2010
by Mujda
Mujda's Avatar

I'm attempting to get my ATmega168 to communicate with my Nokia 1203 phone over the 'F-Bus'. As a first step, I'm simply trying to communicate direct from my PC to the phone using a standard data cable. It turns out that the data cable uses the same chip set as the Nerdkits USB cable (no new driver needed). I've been using Realterm on the PC end to Rx/Tx data. I've been using the very helpful site,

http://www.embedtronics.com/nokia/fbus.html

I've had some success. After synchronising the bus with 128 0x55's, I can send the 'get hardware version' frame, and I get the correct FBus frame back. The curious thing is that I need to send it 3 times, and only then will there be a response, which will be 3 correct return frames.

It's like the data is being buffered on the way out somewhere, but I don't know where. Realterm doesn't seem to buffer data (I get a Tx pulse indication when I should). I'm running Vista Home Premium SP2, and changing any of the port settings under Device Manager, COM2 doesn't change anything.

Equally, on a different PC running XP, I can't even get Realterm to transmit the data - the Tx indicator simply stays on, like it's got stuck. All other port settings are the same, and the virtual port Com2 exists and it's the same USD cable.

Any ideas?

December 14, 2010
by mongo
mongo's Avatar

You might have a signal level backwards. Try an inverter in the line between the two. If one is not available, a 2n2222 or a 2n3904 NPN transistor and a couple of resistors will do the trick.

Between the positive rail and the collector of the transistor, install a 4.7K resistor.

The emitter would go to the negative rail.

Between the base and the signal source, install a 1fK resistor.

Connect the input of the signal receiver to the junction at the collector.

There, you have a simple TTL inverter capable of driving almost any device.

How it inverts...

A positive (high) signal at the base turns on the transistor. The transistor conducts the signal output to the negative side.

A lack of input, (low) at the base turns the transistor off. The resistor conducts the current giving the output effectively a high signal out.

December 15, 2010
by Mujda
Mujda's Avatar

Thanks Mongo.

Well, regarding the hardware, I'm using shop bought cable straight from the PC to the phone. Saying that, your little signal inverter is very handy to know about, and was recently looking for something to achieve that result. Thanks.

To try to determine the problem, I went back to what I knew worked...

Previously, I've done all my m/c programming from this computer using the Nerdkits cable with no problem. Now, using all the same hardware as before (i.e. the original Newrdkits cable) it fails to program any m/c (avrdude hangs when trying to communicate with m/c). It appears to be able to receive data (can see it on Hyperterminal) but can't transmit anything. Everything else is identical to before.

It seems like XP is somehow completely messing up the process. I've uninstalled and reinstalled the PL2303 driver, and it behaves no better. The baudrate and other settings are correct. COM2 pops up correctly in Device Manager. It's really odd, 'cos I've really changed nothing. The only thing I can think of is plugging in the shop bought data cable, but this is identified as a PL2303 so the PC shouldn't know the difference between the cables (so it didn't install any new driver). I've plugged other USB devices into the same USB port where the Nerdkits cable goes, and they work fine.

Is there anything I can do to fix this com port problem without a complete reinstallation of XP?

Thanks,

Mujda

December 15, 2010
by mongo
mongo's Avatar

The PL2303 driver works fine in my XP system. I don't know if it is different versions...

Post a Reply

Please log in to post a reply.

Did you know that you can make a capacitive proximity sensor with some aluminum foil and paperclips? Learn more...