|
|
View previous topic :: View next topic |
Author |
Message |
rvdbogae Guest
|
rs232 |
Posted: Tue Apr 16, 2002 3:40 pm |
|
|
Hi
I am experimenting with rs232 communication.
I' ve send characters to a computer, this is easy.
Now I like to read characters from this computer(a value) into my pic. (16F877).
Is it possible with a terminal programm????
Are there free terminal programms avaliable
I'm looking for an example, how to read a value from a rs232 connection (PC) into my pic.
Thanks a lot,
___________________________
This message was ported from CCS's old forum
Original Post ID: 3824 |
|
|
Jay Guest
|
Re: rs232 |
Posted: Wed Apr 17, 2002 1:55 am |
|
|
Try HyperTerminal (standard in most Windows versions)
Regards,
:=Hi
:=
:=I am experimenting with rs232 communication.
:=
:=I' ve send characters to a computer, this is easy.
:=
:=Now I like to read characters from this computer(a value) into my pic. (16F877).
:=
:=Is it possible with a terminal programm????
:=Are there free terminal programms avaliable
:=
:=I'm looking for an example, how to read a value from a rs232 connection (PC) into my pic.
:=
:=Thanks a lot,
___________________________
This message was ported from CCS's old forum
Original Post ID: 3828 |
|
|
Jay Guest
|
Re: rs232 |
Posted: Wed Apr 17, 2002 1:56 am |
|
|
Try HyperTerminal (standard in most windows versions)
Regards,
Jay
:=Hi
:=
:=I am experimenting with rs232 communication.
:=
:=I' ve send characters to a computer, this is easy.
:=
:=Now I like to read characters from this computer(a value) into my pic. (16F877).
:=
:=Is it possible with a terminal programm????
:=Are there free terminal programms avaliable
:=
:=I'm looking for an example, how to read a value from a rs232 connection (PC) into my pic.
:=
:=Thanks a lot,
___________________________
This message was ported from CCS's old forum
Original Post ID: 3830 |
|
|
rvdbogae Guest
|
Re: rs232 whats wrong |
Posted: Wed Apr 17, 2002 5:19 am |
|
|
This rs232 example does not work at all,
what is wrong??
Thanks
#include <16f877.h>
#fuses HS,NOWDT,NOPROTECT
#use delay(clock=20000000)
#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7)
main() {
printf("start");
while(TRUE)
putc( getc()+1);
}
___________________________
This message was ported from CCS's old forum
Original Post ID: 3832 |
|
|
Sherpa Doug Guest
|
Re: rs232 whats wrong |
Posted: Wed Apr 17, 2002 7:59 am |
|
|
Are you using a software UART? I am not familliar with the 16f877). If so getc() will return what is sees in the input pin when it is called. This will probably be $00 or $ff depending on how the serial line is setup. Getc() does not wait for the next character to come along. You need to make sure the line is at Stop bit level, then wait for it to begin a Start bit, then call getc(). Look at the kbhit() function.
:=This rs232 example does not work at all,
:=what is wrong??
:=
:=Thanks
:=
:=
:=
:=#include <16f877.h>
:=
:=#fuses HS,NOWDT,NOPROTECT
:=
:=#use delay(clock=20000000)
:=#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7)
:=
:=
:=main() {
:= printf("start");
:= while(TRUE)
:= putc( getc()+1);
:=
:=}
___________________________
This message was ported from CCS's old forum
Original Post ID: 3836 |
|
|
|
|
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
|