| Electronic Components Datasheet Search |
|
ATmega32A Datasheet(PDF) 77 Page - ATMEL Corporation |
|
|
|||||||||||||||||||||||||||||
ATmega32A Datasheet(HTML) 77 Page - ATMEL Corporation |
|
77 / 352 page ![]() 77 8155B–AVR–07/09 ATmega32A the OCR0 value, the compare match will be missed, resulting in incorrect waveform generation. Similarly, do not write the TCNT0 value equal to BOTTOM when the counter is downcounting. The setup of the OC0 should be performed before setting the Data Direction Register for the port pin to output. The easiest way of setting the OC0 value is to use the Force Output Compare (FOC0) strobe bits in Normal mode. The OC0 Register keeps its value even when changing between waveform generation modes. Be aware that the COM0[1:0] bits are not double buffered together with the compare value. Changing the COM0[1:0] bits will take effect immediately. 14.6 Compare Match Output Unit The Compare Output mode (COM0[1:0]) bits have two functions. The Waveform Generator uses the COM0[1:0] bits for defining the Output Compare (OC0) state at the next compare match. Also, the COM0[1:0] bits control the OC0 pin output source. Figure 14-4 shows a simplified schematic of the logic affected by the COM0[1:0] bit setting. The I/O Registers, I/O bits, and I/O pins in the figure are shown in bold. Only the parts of the general I/O port Control Registers (DDR and PORT) that are affected by the COM0[1:0] bits are shown. When referring to the OC0 state, the reference is for the internal OC0 Register, not the OC0 pin. If a System Reset occur, the OC0 Register is reset to “0”. Figure 14-4. Compare Match Output Unit, Schematic The general I/O port function is overridden by the Output Compare (OC0) from the Waveform Generator if either of the COM0[1:0] bits are set. However, the OC0 pin direction (input or out- put) is still controlled by the Data Direction Register (DDR) for the port pin. The Data Direction Register bit for the OC0 pin (DDR_OC0) must be set as output before the OC0 value is visible on the pin. The port override function is independent of the Waveform Generation mode. The design of the output compare pin logic allows initialization of the OC0 state before the out- put is enabled. Note that some COM01:0 bit settings are reserved for certain modes of operation. See “Register Description” on page 84. PORT DDR DQ DQ OCn Pin OCn DQ Waveform Generator COMn1 COMn0 0 1 FOCn clk I/O |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |