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.

Hyperterminal and USBRS232

An Elektor Distance Learning Course

Postby carcar » Sun May 30, 2010 12:00 am

I tried to send a string to the serial port using the "MyLibrary" function and I can´t receive it with Hyperterminal. However, I could receive any single char I sent. I tried several diferent routines, with the same result. With all of them I can receive a single char, but no string. I tried other terminal programs like Bray+ and delays but the final result was the same. The UART initiation routine is from " MyLibrary" too, with no modifications . I used the USBRS232 e-block and SourceBoost C compiler 6.96.

Any sugestions?



Attachments
rs232.txt
(589 Bytes) Downloaded 91 times
carcar
 
Posts: 5
Joined: Thu Jan 02, 2014 10:49 am

Postby geenbert » Fri Jun 25, 2010 12:00 am

The recommended software for this course is Flowcode 3 or 4. This is also used for learning C and Assembly, it has not been tested any other compiler.
geenbert
 
Posts: 83
Joined: Thu Jan 02, 2014 10:41 am

Postby carcar » Sat Jul 31, 2010 12:00 am

With Flowcode 4 professional the problem remains.After some trial and error work and some consulting with Matrix Multimedia we concluded that the communication malfunction has to do with timing. It manifests itself with serial communications modules (EB 039 and EB 015)and LCD board (EB 005). However, with ECIO – 40 and associated baseboard (EB 061) everything flows smoothly with every program of the manual or mine.
Contacted Matrix Multimedia support, they wanted to see my chip configuration data (PIC 4455) for EB 006 programmer which is the prescribed on the Manual (p.55,56). They sent me an alternative configuration which didn´t work as well(see attached file). Next step was to change the crystal of EB 006 from 19.6608 MHz to 20.0 MHz. This modification didn’t produce also positive results.
As a last resort, I changed the chip to a PIC 16F887A in the programmer and, this time things went well. All the programs I tried with serial communications and LCD worked first time.
Has somebody an alternative chip configuration for PIC 18F4455 or any other suggestion that may put things to work flawlessly?
Attachments

[The extension fcf has been deactivated and can no longer be displayed.]

carcar
 
Posts: 5
Joined: Thu Jan 02, 2014 10:49 am

Postby geenbert » Thu Aug 05, 2010 12:00 am

The whole course is designed using the 18f4455, and all programs work as advertised using this PIC. In addition they have been tested with the ECIO. The configuration settings that you need are the ones described in the course.

If this doesn't work for you there either is a problem with the 18F4455, but more likely a problem with the 18F4455 in combination with your EB006. That might be as simple as intererence from nearby power lines or your own PC if not properly grounded, because the 18F4455 in the EB006 programmer is rather sensitive to this type of problems. Much more sensitive than the 16F877A for example.
geenbert
 
Posts: 83
Joined: Thu Jan 02, 2014 10:41 am

Postby carcar » Thu Aug 05, 2010 12:00 am

Thanks for the help. I think the earth problems you mentioned, as to do with the malfunction. Today, by chance, I succeeded for the first time to send a string in a serial communications program to Hyper terminal with the help of EB 06 programmer. But, I changed the crystal of the board to 4 MHZ and did a new fuse setting configuration (PLL prescaler = 1). However, I worked with SourceBoost C compiler and in a different computer than I normally work, and much better earthed than mine. I will try it with Flowcode .
Attachments
curso-rs232-printf.c
(1.04 KiB) Downloaded 82 times
carcar
 
Posts: 5
Joined: Thu Jan 02, 2014 10:49 am

Postby carcar » Sun Aug 15, 2010 12:00 am

Here goes a configuration for the EB 006 multiprogrammer - PIC 18F4455 with a 4 MHz crístal. It works.
Attachments
PIC18F4455-4MHz-Config.rtf
(44.27 KiB) Downloaded 83 times
carcar
 
Posts: 5
Joined: Thu Jan 02, 2014 10:49 am

Postby geenbert » Mon Aug 23, 2010 12:00 am

This configuration and crystal speed is not recommended for the course and may cause several projects to fail.

The issues you are experiencing are not caused by an incorrect configuration of crystal speed, but by grounding problems as I mentioned before. Reducing the speed may make these problems invisible but it doesn't fix them.
geenbert
 
Posts: 83
Joined: Thu Jan 02, 2014 10:41 am

Postby carcar » Mon Aug 23, 2010 12:00 am

I know. But, I changed again the crystal to 19.6608 MHz (PLL prescaler /5 ), and, for the moment, everything is working well
carcar
 
Posts: 5
Joined: Thu Jan 02, 2014 10:49 am

Postby chuckie » Sun Mar 03, 2013 12:00 am

I was having exactly the same problems as carcar (I'm using the EB039 USB232 board). Single characters worked ok but variable results when using serial_printf, sometimes nothing and sometimes garbage. Berts conclusion that it was caused by noise/bad earth prompted me to rout all mains/psu cables as far from the boards as possible. serial_printf now works 100%. Thanks Bert!
chuckie
 
Posts: 2
Joined: Thu Jan 02, 2014 10:49 am

Postby geenbert » Mon Mar 04, 2013 12:00 am

Glad to see that this solved your problem, thanks for the feedback!
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