|
Introduction to Microcontroller Programming * Course Index * Introduction * About the Author * About this Course * Feedback * Course Navigation * Quick Course Navigation * How to use this Course * Acronyms Used and Course Conventions About PICmicro Chips * What is a PICmicro? * Microcontrollers * Digital versus Analogue * Inputs and Outputs * Memory * Programming * 16F1937 Architecture ## PORT A ## PORT B ## PORT C ## PORT D ## PORT E ## Memory in the 16F1937 ## ALU ## Timer 1 ## Timer 0 ## RB0 Interrupt ## Port B Interrupt ## A/D Conversion ## Busses Clocking Your PICmicro Devices * Introduction * The Clock Circuit * Clock Settings * Clock Confusion E-Blocks * Introduction to E-blocks * Using E-blocks * E-blocks Boards Flowcode Step By Step * Introduction to Flowcode * Basic Flowcode Functions * Digital Outputs * Digital Inputs * Basic Loops * The LCD Display * Binary Numbers * Decisions * Goto (Connection Point) * 7-Segment Displays * Software Macro * Strings and Memory * A Simple Hi-Fi PICmicro Projects * Introduction to PICmicro Projects * Construction Methods * Choosing a Power Source * Adding Inputs * Input Conditioning * Adding Outputs * Adding Drivers Labs * Introduction and Lesson Plan * 1. Output * 2. Delay * 3. Connection Point * 4. Calculations * 5. Loop * 6. Input * 7. Decision * 8. LCD * 9. Keypad * 10. Analogue + EEPROM * 11. Software Macro * 12. External Interrupt * 13. Timer Interrupt |
(:Summary:Contains the 'action' links (like Browse, Edit, History, etc.), placed at the top of the page, see site page actions:) (:comment This page can be somewhat complex to figure out the first time you see it. Its contents are documented at PmWiki.SitePageActions if you need help. :) * Print (:comment (:if group Site,SiteAdmin,Cookbook,Profiles,PmWiki*:) (:comment delete if and ifend to enable backlinks:) * %item rel=nofollow class=backlinks accesskey='$[ak_backlinks]'% [[{*$Name}?action=search&q=link={*$FullName} | $[Backlinks] ]] (:ifend:) :) * Login Timer 1<^< ALU | Course Index | Timer 0 >^>(:nl:) Largely simplified block schematic to demonstrate where the 'Timer 1' ('TMR1') is located in the PIC 16F1937 Architecture: ![]() TMR1:* This timer interrupt is used to provide the PICmicro with exact timing info. * It is clocked by the system clock or by an external clock on RC0. * Either the external clock or the system clock can be divided by 1, 2, 4 or 8 by configuring the Prescaler of TMR1 in Flowcode. * This divided clock triggers the TMR1 to increment the TMR1 register. * This TMR1 register is a 16-bit register and will have an overflow when it reaches 65536. * On the exact moment when this overflow occurs, TMR1 generates an interrupt and the TMR1 register is set back to 0. * This TMR1 Interrupt will stop the main program immediately and start up the TMR1 Macro. * After the TMR1 Macro is finished, the main program goes further where it had left before. Example:
Conclusion: In this situation, TMR1 will interrupt the main program and execute the TMR1 Macro 2400 times per second. (:nl:)(:table style="clear:both":)
| |
(:Summary: Website page footer:)
Print - (:comment (:if group Site,SiteAdmin,Cookbook,Profiles,PmWiki*:) (:comment delete if and ifend to enable backlinks:) %item rel=nofollow class=backlinks accesskey='$[ak_backlinks]'% [[{*$Name}?action=search&q=link={*$FullName} | $[Backlinks] ]] (:ifend:) :) Search - Login
Page last modified on May 14, 2013, at 08:10 AM