 |
 |
View previous topic :: View next topic |
Author |
Message |
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
Re: reset rs232 |
Posted: Fri Jul 25, 2003 2:00 am |
|
|
:=
:=how do I "completely" reset the com port
-------------------------------------------------
In one of my old programs, I have this function:
#byte RCSTA=0x18 // Receive Status and Control
#define SPEN_BIT 7 // Bit position of SPEN within RCSTA
void reset_uart(void)
{
bit_clear(RCSTA, SPEN_BIT); // Reset the serial port
delay_ms(1);
bit_set(RCSTA, SPEN_BIT);
delay_ms(1);
}
This was for a 16F876.
I suggest that you try that, and also use the ERRORS directive
in your #use rs232 statement.
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516341 |
|
 |
vector Guest
|
reset rs232 |
Posted: Sun Jul 27, 2003 8:49 pm |
|
|
Tried this to no avail. have moved onto other projects. will revist as time permits.
:=:=
:=:=how do I "completely" reset the com port
:=-------------------------------------------------
:=
:=In one of my old programs, I have this function:
:=
:=#byte RCSTA=0x18 // Receive Status and Control
:=
:=#define SPEN_BIT 7 // Bit position of SPEN within RCSTA
:=
:=void reset_uart(void)
:={
:= bit_clear(RCSTA, SPEN_BIT); // Reset the serial port
:= delay_ms(1);
:= bit_set(RCSTA, SPEN_BIT);
:= delay_ms(1);
:=}
:=
:=This was for a 16F876.
:=
:=I suggest that you try that, and also use the ERRORS directive
:=in your #use rs232 statement.
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516414 |
|
 |
|
|
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
|