Problem with 32.768KHz crystal and driving seven segment

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello
i was designing a digital clock i got a problem about 32.768KHz crystal on timer 2
the problem is the datasheet says:

Quote:

A crystal can
then be connected between the TOSC1 and TOSC2 pins to serve as an independent clock
source for Timer/Counter2. The Oscillator is optimized for use with a 32.768kHz crystal. Applying an external clock source to TOSC1 is not recommended.

but my TOSC1 is already connected to another thing
is there gonna be any problem if i connect the crystal between the TOSC2 pin and the ground?
if so how should i connect the the crystal ? just put it between them? no capacitors?

the second problem is driving 16 seven-segments.
i want something just to increase the current so the Micro Controller wont be in any problem driving 16 seven-segments
and i don't want that driver to invert like uln2803.
how is the Udn2981?
is good for driving?
one Udn2981 for port C
one for port A
and one for PORT D

i tried to stimulate it in Proteus but the Udn2981 does not work in the stimulation
thank you
here is the picture

Attachment(s): 

I don't need a Handkerchief; i have no more tear to shed anymore - Solid Snake

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
s there gonna be any problem if i connect the crystal between the TOSC2 pin and the ground?

A big one : Xal is not an oscillator (it is part of it, one must add another circuit -an inverter- to have some oscillations).

Quote:
if so how should i connect the the crystal ? just put it between them? no capacitors?

First, you should verify T1 is occupied (you write it , but it is inconsistant with your schaamatics).
And is this connection necessary (Xal clocks need T1 and T2; external oscillator -self made one- needs at least T1 (T2 being open : it is the output of an inverter/amplifier)?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

so you mean if i want to use 32.768kHz crystal i must apply it between TOSC1 TOSC2 ? other wise it wont work?
how should i put it? just between the TOSC1 and TOSC2?

why does the stimulation work well ?

the timer 2 is enabled and the ASSR is 0x08 and the RTC Timer is clocked at F_CPU/128

I don't need a Handkerchief; i have no more tear to shed anymore - Solid Snake

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

just between the TOSC1 and TOSC2?
http://www.atmel.com/Images/doc2... p31 says yes (no extra capacitors)
Or you can use it as (slow) system oscillator on T1 and T2

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

alright I emptied the TOSC1 PIN
thank you dbrion0606

I don't need a Handkerchief; i have no more tear to shed anymore - Solid Snake