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

Serial data

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







Serial data
PostPosted: Sat Mar 08, 2008 7:11 am     Reply with quote

Is there some program which i can use for sending serial data from PC to my demo board ?. I hate to use hyper terminal and i need constant data transfer which will loop some defined data.

Any suggestions ?
meereck



Joined: 09 Nov 2006
Posts: 173

View user's profile Send private message

PostPosted: Sat Mar 08, 2008 8:59 am     Reply with quote

this one is great:
http://braypp.googlepages.com/terminal
Guest2
Guest







PostPosted: Sun Mar 09, 2008 2:37 pm     Reply with quote

I'm using the terminal that you have suggested and i must say it's quite simple but effective.

As example i have choose the ex_sisr.c example and this is what i get:
As delay time i have set 5 seconds.

I compile and run program on the demoboard and on the lcd display you can see "running".

I open the terminal program ( i tested with the hyperterminal too ) and i send some chars... "test" . After cca 5 second i get message Buffered data => and that is that. There is no test chars, no garbage chars etc.
How come ?
Storic



Joined: 03 Dec 2005
Posts: 182
Location: Australia SA

View user's profile Send private message Send e-mail

PostPosted: Sun Mar 09, 2008 11:48 pm     Reply with quote

these may be of intrest
http://www.freedownloadscenter.com/Programming/Misc__Programming_Tools/Free_Serial_Port_Monitor.html

http://www.serial-port-monitor.com/
_________________
What has been learnt if you make the same mistake? Wink
Guest2
Guest







PostPosted: Mon Mar 10, 2008 12:59 pm     Reply with quote

The serial port monitor is great ! :-)

I can see that the process has started and i can see that data has been send, so the problem is in the software. Ok.

#include <16F877.h>
#fuses HS,NOWDT,NOPROTECT,NOLVP
#use delay(clock=20000000)
#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7)
#include "lcdDriver.c"

:
:
:
do {
delay_ms(3000);
printf(lcd_putc,"\r\n Data ");
while(bkbhit)
putc( bgetc() );
} while (TRUE);

Is the problem in lcd output ? I can see the "Data" text but that all.
Did someone used this example ?
meereck



Joined: 09 Nov 2006
Posts: 173

View user's profile Send private message

PostPosted: Mon Mar 10, 2008 1:39 pm     Reply with quote

I have just tried the latest Terminal version.
As for me and my USB-RS232 adapter, the latest version of Bray's terminal can't send any data to the serial line.
It freezes immediately when I hit the Send button. I therefore use an old version released in 2006.

M.
Guest2
Guest







PostPosted: Tue Mar 11, 2008 11:40 am     Reply with quote

Do you have some other software example which i can test cuz i think that serial connection is OK. ?
Humberto



Joined: 08 Sep 2003
Posts: 1215
Location: Buenos Aires, La Reina del Plata

View user's profile Send private message

PostPosted: Tue Mar 11, 2008 1:52 pm     Reply with quote

Quote:

Do you have some other software example which i can test cuz i think that serial connection is OK. ?

You should start with the most simplest code - like the one posted by PCM Programmer
in the following thread - to test this kind of problems.
If it run properly, you can be sure that the MCU in the board and the whole hardware is OK.
Then and after this, you would be able to test any PC communication software.

http://www.ccsinfo.com/forum/viewtopic.php?t=32831&highlight=rs232


Humberto
guest2
Guest







PostPosted: Fri Mar 14, 2008 12:07 pm     Reply with quote

I established the connection but there in problem in formating, at least i think so...

I want to enter HEX value thru my keyboard and then i need to receive the same one in the HEX format. So i try with printf(lcd_putc,"%x",c); and this is the LCD output:

Keyboard input: 10
LCD output: f8

Keyboard input: 11
LCD output: f8

Keyboard input: 15
LCD output: f8

Keyboard input: 25
LCD output: fe

Is this just the formating problem or is this something else ?
guest2
Guest







PostPosted: Sat Mar 15, 2008 1:47 am     Reply with quote

One more thing, that i forget to mention.

If i dont want to type the characters, if i just want to read the whole
string, can i pass this data as like thru file transfer ?

If so, then how to read this data on my picdem ?

E.g.
This is the text that i have writen before and this is what i want to see on
my LCD. 0x1,0x2,0x3,0x4, bla bla bla.
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