Hello together,
Hello Matrix team,
i´m looking for a way to reset or claer the Pic EUSART Hardware.
It would be great if there is a command to clear EUSART in the same way like a MCLR.
Is there a known C-Code command???
BR
Dirk
Reset or claer for Pic EUSART Hardware
Moderator: Benj
-
Dirk Bubley
- Posts: 99
- Joined: Fri Feb 02, 2007 3:54 pm
- Location: Germany
- Has thanked: 14 times
- Been thanked: 12 times
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Reset or claer for Pic EUSART Hardware
Hello Dirk,
This code switches off the UART for a 8-bit PIC.
This code switches the UART back on.
Is this the kind of thing you were looking for?
This code switches off the UART for a 8-bit PIC.
Code: Select all
rcsta = 0;
txsta = 0;Code: Select all
st_bit(txsta, BRGH);
rcsta = 0;
st_bit(rcsta, SPEN);
st_bit(txsta, TXEN);
st_bit(rcsta, CREN);Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
Dirk Bubley
- Posts: 99
- Joined: Fri Feb 02, 2007 3:54 pm
- Location: Germany
- Has thanked: 14 times
- Been thanked: 12 times
Re: Reset or claer for Pic EUSART Hardware
Hello Benj,
many thanks for your input and reply!! It looks that your code is working!!
The possibility to switch the USART off and on will make my RS232 interface more robust because now i can patch the data cable during opperation.
I must still do some testing but at the moment it looks very good!!
Will your commands have a influence on the regular RS232 external properties like Baud rate or so on??
BR
Dirk
many thanks for your input and reply!! It looks that your code is working!!
The possibility to switch the USART off and on will make my RS232 interface more robust because now i can patch the data cable during opperation.
I must still do some testing but at the moment it looks very good!!
Will your commands have a influence on the regular RS232 external properties like Baud rate or so on??
BR
Dirk
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Reset or claer for Pic EUSART Hardware
Hello Dirk,
My commands will not effect the RS232 component baud rate but will probably disable the 9-bit mode of operation. If you are using this then let me know and I will add the commands to re-enable it.
My commands will not effect the RS232 component baud rate but will probably disable the 9-bit mode of operation. If you are using this then let me know and I will add the commands to re-enable it.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel