| Electronic Components Datasheet Search |
|
SPMCK16Z4MPV20 Datasheet(PDF) 478 Page - Freescale Semiconductor, Inc |
|
|
|||||||||||||||||||||||||||||
SPMCK16Z4MPV20 Datasheet(HTML) 478 Page - Freescale Semiconductor, Inc |
|
478 / 500 page ![]() INITIALIZATION AND PROGRAMMING EXAMPLES M68HC16 Z SERIES E-26 USER’S MANUAL * has overflowed ten times. * **************************************************************************** INCLUDE 'EQUATES.ASM' ;table of EQUates for common register ;addresses INCLUDE 'ORG00000.ASM' ;initialize reset vector INCLUDE 'ORG00008.ASM' ;initialize interrupt vectors * We are choosing User Defined Interrupt Vector 9 (interrupt vector 64 * at address $0080) to be the base vector number (VBA) for the GPT * because the least significant nibble in the address must be a $0. * * The VBA should be reflected in the GPT Interrupt Configuration * Register (ICR) at $YFF904. ORG $0080 ;Address for interrupt vector 64 DC.W PAOV_ROUTINE ;Adjusted Priority Channel -- PAC DC.W IC1_ROUTINE ;Input Capture 1 DC.W IC2_ROUTINE ;Input Capture 2 DC.W IC3_ROUTINE ;Input Capture 3 DC.W BDM ;Output Compare 1 DC.W OC2_ROUTINE ;Output Compare 2 DC.W BDM ;Output Compare 3 DC.W BDM ;Output Compare 4 DC.W BDM ;Input Capture 4 / Output Compare 5 DC.W BDM ;Timer Overflow DC.W BDM ;Pulse Accumulator Overflow -- elevated DC.W BDM ;Pulse Accumulator Input ORG $0200 ;start program after interrupt vectors ***** Initialization Routines ***** INCLUDE 'INITSYS.ASM' ;initially set EK=F, XK=0, YK=0, ZK=0 ;set sys clock at 16.78 MHz, disable COP INCLUDE 'INITRAM.ASM' ;turn on 1k internal SRAM at $10000 ;set stack in bank 1 (SK=1, SP=03FE) INCLUDE 'INITSCI.ASM' ;set SCI baud rate at 9600 ;enable SCI transmitter and receiver * Set up the interrupts LDD #$008E ;Give the GPT an IARB of $E STD GPTMCR ;so we can generate interrupts LDD #$A640 ;elevate interrupt priority of PAOV, STD ICR ;set GPT IRQ level to 6, ;& assign vector 64 (User vector 9) of the ;interrupt/exception vector table as the ;GPT's Interrupt Vector Base Address LDAB #$17 ;set OC2, IC1, IC2, IC3 to generate interrupts STAB TMSK1 LDAB #$25 ;set PAC Overflows to generate interrupts Freescale Semiconductor, Inc. For More Information On This Product, Go to: www.freescale.com |
|
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 |