The Elektor Forum will close. See also this link. From Friday March 1st it is no longer possible to log in to the forum. However, the content of the forum will remain visible until the end of March. As of April 1st the forum will definitely go off the air.

Serial comunication

An Elektor Distance Learning Course

Postby iamborg1of1 » Sat Mar 17, 2012 12:00 am

Hi im have a bit of a problem im on the part RS232 communication I have both the eb039 and the RS232 board but with both it does not transmit but if I type using the keyboard it echos back( This is not with the echo program)and if i unplug the power to the programmer it stops echoing back . I had this program working fine on my laptop a few weeks ago . This is on my desktop which run windows vista, my laptop runs windows 7. But a few months ago I was using a different desktop and it was running vista and every thing was fine I also have 8 x 18F4455 and it makes no difference. has anybody any ideas
iamborg1of1
 
Posts: 9
Joined: Thu Jan 02, 2014 10:49 am

Postby geenbert » Sat Mar 17, 2012 12:00 am

So if I understand you correctly the software and the e-boards and the pic work as they should on multiple systems, except on 1 desktop PC.

That means the problem is not in your software or your e-boards or your pic, but in that particular desktop PC.

Assuming you selected the correct serial port on the PC (the one that is actually connected to the e-board) it would appear that something is wrong with that PC's serial ports.

My guess is that this PC uses virtual serial ports over USB, so it may be a simple driver problem. Perhaps uninstalling and then re-installing the serial drivers may solve your problem.
geenbert
 
Posts: 83
Joined: Thu Jan 02, 2014 10:41 am

Postby iamborg1of1 » Sun Mar 18, 2012 12:00 am

I will remove the on-board serial port and the one for EB039.
and reinstall , I've got several USB to serial devices I will install one of those after and try it , thank for your help I will let you know if it help
Regards
Peter
iamborg1of1
 
Posts: 9
Joined: Thu Jan 02, 2014 10:49 am

Postby iamborg1of1 » Fri Mar 23, 2012 12:00 am

Hi just to let you know that I installed a virtual coms port with no success. But I noticed some thing in the program on page 139/140 that the usloop had no value another error in the course no a fence this course really need proof reading by some one that understand ASM,C and Flowcode. So I took the delay out of the program on the basis that the speed and capability of PC these days it was not needed and again connected the PCs serial port and would you believe it it started to work BUT and a BIG BUT it is sending the Capital P instead of A the computer is a COMPAQ is there anything known about This PC and ASCII code, and thank your for the previous help
Regards Peter
iamborg1of1
 
Posts: 9
Joined: Thu Jan 02, 2014 10:49 am

Postby geenbert » Fri Mar 23, 2012 12:00 am

You wrote yourself that the software from the course works on multiple PC's except one single desktop. From that you somehow conclude that the software must be wrong. So you change it, and now it sends the wrong data, so you conclude that Compaq doesn't understand ASCII.

The software is of course correct (hundreds of students have used this already). The sources on the course CD were copied directly from a working computer, so they are guaranteed to work.

The usloop does have a value: movlw 255 followed by movwf _wait, which is duly decremented after one microsecond using decfsz _wait,1. And even if your PC is fast enough and doesn't need a delay, it will still work with one.

Your experiment show that there is a problem with your Compaq PC's serial port (driver) which has nothing to do with the course software or the course hardware or Compaq's understanding of ASCII.

Many PC's don't power down completely if you switch them off, preventing the driver from reloading. Switch off your PC and make sure it powers down completely by pulling the plug from the wall outlet (don't trust the switch, actually remove the plug). Wait a minute or two and then put the plug back in and start the PC back up. This will force the operating system to reload all drivers. Perhaps this will solve your problem.

If not your cable may have a bad connection, possibly ground, assuming you use this cable exclusively for your Compaq and not for your other computers.
geenbert
 
Posts: 83
Joined: Thu Jan 02, 2014 10:41 am


Return to Programming Embedded PIC Microcontrollers using Assembly, C and Flowcode

Who is online

Users browsing this forum: No registered users and 1 guest