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 CCS Technical Support

DISABLE 12LF1822 EUSART

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



Joined: 23 Jun 2010
Posts: 19

View user's profile Send private message

DISABLE 12LF1822 EUSART
PostPosted: Fri Feb 04, 2011 3:18 am     Reply with quote

Hi everyone,

Still having challenges with the 12LF1822. Am trying to completely disable the EUSART - both transmit and receive.

Used setup_uart(0) and setup_uart_speed(0) but CCS C compiler (version 4.110) gave an error of unidentified for both.

Appreciate your suggestions.

Regards
delesan



Joined: 23 Jun 2010
Posts: 19

View user's profile Send private message

DISABLE 12LF1822 EUSART
PostPosted: Fri Feb 04, 2011 4:03 am     Reply with quote

Included the following code before main() to disable the EUSART:

#byte TXSTA=0x02
#byte RCSTA=0x08

The registers TXSTA and RCSTA are the registers for configuring the EUSART for the 12LF1822.

Regards.
dyeatman



Joined: 06 Sep 2003
Posts: 1933
Location: Norman, OK

View user's profile Send private message

PostPosted: Fri Feb 04, 2011 6:57 am     Reply with quote

FWIW, If you take a look at the device header file:

Quote:

////////////////////////////////////////////////////////////////// UART
// Constants used in setup_uart() are:
// FALSE - Turn UART off
// TRUE - Turn UART on

_________________
Google and Forum Search are some of your best tools!!!!
delesan



Joined: 23 Jun 2010
Posts: 19

View user's profile Send private message

PostPosted: Fri Feb 04, 2011 7:00 am     Reply with quote

dyeatman wrote:
FWIW, If you take a look at the device header file:

Quote:

////////////////////////////////////////////////////////////////// UART
// Constants used in setup_uart() are:
// FALSE - Turn UART off
// TRUE - Turn UART on



Thanks dyeatman.

I actually tried that but got a compiler error of "undefined identifier".

delesan
Ttelmah



Joined: 11 Mar 2010
Posts: 19499

View user's profile Send private message

PostPosted: Fri Feb 04, 2011 7:57 am     Reply with quote

You will get that error, if you have not got a #USE RS232 using the hardware UART (the UART is _off_ in this case anyway).
The setup_uart command, only becomes supported if UART code is present.

Best Wishes
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