| Electronic Components Datasheet Search |
|
AVR465 Datasheet(PDF) 13 Page - ATMEL Corporation |
|
|
|||||||||||||||||||||||||||||
AVR465 Datasheet(HTML) 13 Page - ATMEL Corporation |
|
13 / 40 page ![]() AVR465 13 2566A-AVR-07/04 Equation 15. Interval of Energy Pulse Output. MC P PS 000 600 3 f T CLK × × × = It should be noted that after the meter constant has been set there is only one variable; active power, P. In order to save instruction cycles, the expression is reduced to T = N/P, where N is a pre-calculated, constant numerator. The numerator is calculated during firmware initialization, when MC is read from EEPROM. The default numerator is as follows: Equation 16. Constant Numerator at Default Meter Constant. 250 406 1 000 10 024 1 000 600 3 000 000 4 MC PS 000 600 3 f N CLK = × × = × × = After the required pulse interval has been calculated the timer/counter (T/C) is programmed to produce a pulse output with an interval as close as possible to the one derived. The 16-bit T/C is clocked by a prescaled system clock. The prescaler is chosen such that even the smallest pulse intervals can be accurately represented. The problem is to also be able to accurately produce pulses with very long intervals. For this purpose, the T/C is extended with a firmware counter. The regular T/C mechanism is illustrated in Figure 6. In this mode of operation the energy pulse is set on each compare match. Figure 6. Basic Timer/Counter Operation. A compare match with OCR1A sets the OC1A output and a compare match with OCR1B clears the same. The pulse interval, tEP, is controlled by OCR1A and the pulse width, tEPH, by OCR1B. When the calculated energy pulse interval exceeds 16 bits the firmware extended, 16- bit counter (TC1ext) is activated. The firmware counter value is increased each time the hardware counter reaches 16-bit maximum, effectively making the extended counter 32 bits in length. The extended counter mechanism is illustrated in Figure 7. Regular Mode T/C Extended Mode T/C OCR1A OCR1B TCNT1 OC1A (EP) t EPH t EP |
|
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 |