
สวัสดีปีใหม่ครับ ชาว electoday
ขอให้มีความสุข สุขภาพแข็งแรง จิตใจแจ่มใสเบิกบานไปตลอดปีนะครับ

ขอให้ประดิษฐ์คิดค้นอะไรใหม่ๆขึ้นมาได้ด้วย
มาว่ากันต่อนะ
14.12.3. Power Reduction Register
Bit 7 – PRTWI0: Power Reduction TWI0เขียนลอจิก "1"ไปยังบิทนี้จะ shuts down the TWI0 โดยการหยุด the clock ที่ไปยัง the module นี้. เมื่อปลุกให้ the TWI ตื่นอีกครั้ง, the TWI ควรถูกเริ่มต้นซ้ำเพื่อให้แน่ใจว่าการทำงานได้อย่างเหมาะสม
Bit 6 – PRTIM2: Power Reduction Timer/Counter2เขียนลอจิก "1"ไปยังบิทนี้จะ shuts down the Timer/Counter2 module ใน synchronous mode (AS2 เป็น 0). เมื่อ the Timer/Counter2 ถูก enabled, การทำงานจะดำเนินต่อไปเหมือนก่อนที่จะ the shutdown.
Bit 5 – PRTIM0: Power Reduction Timer/Counter0เขียนลอจิก "1"ไปยังบิทนี้จะ shuts down the Timer/Counter0 module. เมื่อ the Timer/Counter0 ถูก enabled, การทำงานจะดำเนินต่อไปเหมือนก่อนที่จะ the shutdown.
Bit 3 – PRTIM1: Power Reduction Timer/Counter1เขียนลอจิก "1"ไปยังบิทนี้จะ shuts down the Timer/Counter1 module. เมื่อ the Timer/Counter1 ถูก enabled, การทำงานจะดำเนินต่อไปเหมือนก่อนที่จะ the shutdown.
Bit 2 – PRSPI0: Power Reduction Serial Peripheral Interface 0ถ้ามีการใช้ debugWIRE On-chip Debug System, บิทนี้ควรไม่ถูกเขียนให้เป็น "1". เขียนลอจิก "1"ไปยังบิทนี้จะ shuts down the Serial Peripheral Interface โดยการหยุด the clock ที่ไปยัง the module นี้..เมื่อปลุกให้ the SPI ตื่นอีกครั้ง, the SPI ควรถูกเริ่มต้นซ้ำเพื่อให้แน่ใจว่าการทำงานได้อย่างเหมาะสม
Bit 1 – PRUSART0: Power Reduction USART0เขียนลอจิก "1"ไปยังบิทนี้จะ shuts down the USART โดยการหยุด the clock ที่ไปยัง the module นี้. เมื่อปลุกให้ the USART ตื่นอีกครั้ง, the USART ควรถูกเริ่มต้นซ้ำเพื่อให้แน่ใจว่าการทำงานได้อย่างเหมาะสม
Bit 0 – PRADC: Power Reduction ADCเขียนลอจิก "1"ไปยังบิทนี้จะ shuts down the ADC. The ADC ต้องถูก disabled ก่อน shut down. The analog comparator ไม่สามารถใช้ the ADC input MUX เมื่อ the ADC ถูก shut down.
ถ้าจะหยุดตัวไหน ก็ทำอย่างนี้ตรงที่ต้องการหยุดได้เลย อย่างนี้หรือเปล่า
PRR |= (1<<PRTWI0);
เมื่อปลุกให้ the TWI ตื่นอีกครั้ง ก็ทำอย่างนี้
PRR &= ~(1<<PRTWI0);
แล้วก็ re initialized ตัวโมดูลนี้ซ้ำอีกครั้ง ถูกต้องใหมอย่างนี้ ตัวอย่างอาจมีภายหลัง เนื่องจากแปลยังไม่ถึงตัว Module ต่างๆเลย