|
|
View previous topic :: View next topic |
Author |
Message |
EdWaugh
Joined: 07 Dec 2004 Posts: 127 Location: Southampton, UK
|
Hyperterminal/RS232/printing strings |
Posted: Mon Mar 21, 2005 5:25 am |
|
|
Hi all,
I've still been having some problems printing my strings with printf but I think I may have figured it out. I started thinking when I found that my code would simulate ok but not work properly on the real device. I tried using RealTerm instead of HyperTerminal and magically all my data would appear. Looking at the Hex output it seems like the PIC is doing exactly what I would expect so I figured it must be something to do with the way hyperterminal interprets the data although fiddling with its settings I couldn't get it to cooperate.
Eventually:
I think it may be to do with my choice of RS232 format, I usually do 115200, 8 bits, 1 stop, even parity and this seems to work fine except for this bizarre behaviour when printing a string. By switching to 7bits same other settings it works fine.
Am asking more of the RS232D spec. than I am allowed? Surely 8bit with parity must exist...? 7 bit is fine for ascii but in binary mode i guess its no good! RealTerm seems to have no problems but is a bit unfinished and I often wonder if its really doing what it says. Can anyone recomend a really good terminal/serial comms program?
I'm using compiler version 3.172 and Hyperterminal XP SP2.
cheers
ed |
|
|
drh
Joined: 12 Jul 2004 Posts: 192 Location: Hemet, California USA
|
|
Posted: Mon Mar 21, 2005 1:48 pm |
|
|
Have you tried SIOW. It's one of the utility programs included with the compiler. _________________ David |
|
|
EdWaugh
Joined: 07 Dec 2004 Posts: 127 Location: Southampton, UK
|
|
Posted: Mon Mar 21, 2005 4:13 pm |
|
|
cheers david,
thats a good suggestion I'd forgotton about that. I would quite like to get it sorted with Hyperterminal as its handy to have a standard interface for people when your giving them hardware. Hyperterminal is also handy as you can use the terminal codes to do deletes, go back lines etc...
As long as I can use that with 7E1 tho thats the main thing, I was just curious if anyone else had seen this behaviour and if I'm doing something fundamentally wrong. I'm wondering if you can only add parity to 7 bits when you have one stop bit as RS232 might only support 10bits total, ie: 1 start, 7data, 1 parity, 1 stop, or 1 start, 8 data, 1 stop.
I tried to find the proper spec document but couldn't get it at a first look. Maybe I'll try again and see if I can solve the mystery. Although I think it is more likely that its the very terminal commands I find handy that are causing the problem asi it only seems to affect hyperterminal.
ed |
|
|
salva Guest
|
From PIC16F877 to computer by RS232 |
Posted: Wed Mar 23, 2005 9:15 am |
|
|
Hello,
I'm a student in electronics and I've got a problem because I need comunicate a PIC16F877 whith computer (hyperterminal) using RS232.
I must to send words of 16 bits. I've been watching the reference's manual CCS but I don't understand when starts the comunication, when finishes and how I indicate the data to transmit.
If you could help me sending code or any example...
Thanks |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|