Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

timer2 asyncronous mode

Status
Not open for further replies.

lok

Junior Member level 3
Joined
Feb 6, 2014
Messages
25
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,469
hi all,



I am working with atmega256rfr2 and I stuck with some portion of the program which is like asynchronous operation of the chip....I have connected 32.768 crystal between tosc1 and tosc2 pin but its not works for me ..please give your suggestion to get out from this problem ...

this is the program that I am stuck with


Code:
#define HAL_ASSR_FLAGS ((1 << TCN2UB) | (1 << OCR2AUB) | (1 << OCR2BUB) | (1 << TCR2AUB) | (1 << TCR2BUB))
 TIMSK2 &= (~(1 << OCIE2A) & ~(1 << TOIE2));
ASSR|=(1<<AS2);
TCNT2=0;
TCCR2A=0x00;
TCCR2B=0x00;
OCR2A=0x00;
while(ASSR&HAL_ASSR_FLAGS );


the pro gram is not exit from this while loop

what would be the problem ?? is it the register initialization proplem ? or the crystal oscillator problem??




Regards,

lok
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top