Sign in

username:

password:



Not a member?

Search basicx



Search tips

Subscribe to basicx



basicx by Keywords

Accelerometer | ADC | ADXL | Adxl20 | AVR | BasicStamp | BX-35 | BX28 | BX35 | COM3 | Compiler | Downloader | EEPROM | Electromagnet | GetADC | GP2D1 | GPS | I2C | IDE | Keypad | LCD | LCD+ | MIDI | Motors | Multitasking | Netmedia | Networking | PCB | PID | PlaySound | PWM | Relays | RTC | Servo | ShiftOut | SitePlayer | SPI | Stack | Timer | USB

Ads

Discussion Groups

See Also

DSPFPGAElectronics

Discussion Groups | BasicX | Low Power Mode using timer1 interrupt On LCDX (BX-34)

Discussion forum for the BasicX family of microcontroller chips.

Low Power Mode using timer1 interrupt On LCDX (BX-34) - ssonderhoff - Mar 17 12:49:55 2009

Does anyone know how this is done? I want to put the cpu into idle mode using an interrupt from the the compare function on timer 1. According to the Atmel documentation this should be possible and they specifically mention using the timer interrupt to wake up the processor. I can put the system to sleep having, as best as I can tell, set the appropriate registers, however the system fails to wake up - ever.
*************
Register.TCCR1A = 0
Register.TCNT1H = 0
Register.TCNT1L = 0
Register.TIFR = bx00000100 'clears overflow flag
Register.TCCR1B = bx00001101 'SET TO RESET TIMER ON COMPARE MATCH AND 7.2KHZ TICK
Register.OCR1AH = bx10001100 'SET COMPARE TO AROUND 36044 TICKS
Register.OCR1AL = bx11001100
Register.TIMSK = bx00010000 'enable interrupt outcompA
Register.MCUCR = bx01000000 'enable sleep in Idle mode
sleep 100 'delay to allow everything to settle
call CPUSleep
****************
At which point it goes to sleep and stays that way.

Interestingly I noticed that the the system is sending a strange character to the downloader window at about the frequency that I would expect the interrupt to occur.

Any help would be appreciated.
Thanks,
Stefan

------------------------------------



(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )