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

uart + timer2

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



Joined: 23 May 2005
Posts: 3

View user's profile Send private message

uart + timer2
PostPosted: Sat Jun 25, 2005 2:05 pm     Reply with quote

hi!
is it NOT possible to use both the usart- and the timer2-module the same time? this question emerged when i read that the usart-module need the timer2 module to work.

thanks!
Ttelmah
Guest







PostPosted: Sat Jun 25, 2005 2:54 pm     Reply with quote

What chip?.
Where did you read this?.
Timer2, is used by the PWM timings, but not normally by the USART.

Best Wishes
i2c2k



Joined: 23 May 2005
Posts: 3

View user's profile Send private message

PostPosted: Sun Jun 26, 2005 4:25 am     Reply with quote

it's the 18FXX8 datasheet on page 118 (adobe reader: page 120) 13.3 Output of TMR2.
oh sorry, i mixed it up with the SSP module!
but does that mean that i can't use built-in i2c or spi capabilities together with the timer2?
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Sun Jun 26, 2005 7:46 am     Reply with quote

From the PIC18Fxx8 datasheet:
Quote:
13.3 Output of TMR2
The output of TMR2 (before the postscaler) is a clock
input to the Synchronous Serial Port module which
optionally uses it to generate the shift clock.
For a better understanding also have a look at figure 13-1 which says
Quote:
Note 1: TMR2 register output can be software selected by the SSP module as a baud clock.

The keywords are 'optionally' and 'can be software selected'. It is under control of the programmer for the SSP module to use either the timer2 output or use the CPU-clock. Studying the SSP module I could only find the SSP-module in SPI-mode using the timer2 as an alternative baudrate generator. I2C isn't using timer2 in any configuration.

You can use timer2 independent of I2C and SPI, only for very specific SPI baudrates you might consider using the SSP to use timer2 as an input.
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