CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Hyperterminal/RS232/printing strings

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
EdWaugh



Joined: 07 Dec 2004
Posts: 127
Location: Southampton, UK

View user's profile Send private message

Hyperterminal/RS232/printing strings
PostPosted: Mon Mar 21, 2005 5:25 am     Reply with quote

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

View user's profile Send private message

PostPosted: Mon Mar 21, 2005 1:48 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Mon Mar 21, 2005 4:13 pm     Reply with quote

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
PostPosted: Wed Mar 23, 2005 9:15 am     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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