| Electronic Components Datasheet Search |
|
SPMCK16Z4MPV20 Datasheet(PDF) 470 Page - Freescale Semiconductor, Inc |
|
|
|||||||||||||||||||||||||||||
SPMCK16Z4MPV20 Datasheet(HTML) 470 Page - Freescale Semiconductor, Inc |
|
470 / 500 page ![]() INITIALIZATION AND PROGRAMMING EXAMPLES M68HC16 Z SERIES E-18 USER’S MANUAL JSR SEND_CH ;go send out the byte AIX #$01 ;increment IX to point to the next byte BRA SEND_STRING ;loop back and do next byte in string STRING_DONE: JSR DELAY ;wait for a moment RTS ;go back to whence we came SEND_CH: ;subroutine to send out one byte to SCI LDAA SCSR ;read SCI status reg to check/clear TDRE bit ANDA #$01 ;check only the TDRE flag bit BEQ SEND_CH ;if TDR is not empty, go back to check it ;again LDAA #$00 ;clear A to send a full word to SCDR ($FFC0E) STD SCDR ;transmit one ASCII character to the screen LOOP5: LDAB SCSR+1 ANDB #$80 ;test the TC bit (transfer complete) BEQ LOOP5 ;continue to wait until TC is set RTS ;return to send_string subroutine ***** The STRINGs ***** STRING DC 'The System Clock is now running at 16.777 MHz...',0a,0d,00 SEC_STR DC 'check this out!',0a,0d,00,00 STRING2 DC 'The System Clock is now running at 4.194 MHz...',0a,0d,00 ***** Interrupts/Exceptions ***** BDM: BGND ;exception vectors point here ;and put the user into background debug mode E.2.1.4 Example 4 - Software Watchdog, Periodic Interrupt, and Autovector Demo * Description : This program demonstrates the software watchdog, * the periodic interrupt, and an autovector. * The periodic interrupt runs a clock which is updated * on the dummy terminal. Every eight seconds the COP * will force a reset unless IRQ6 is grounded. When IRQ6 * is pulled low, an autovectored interrupt routine will * “feed” the watchdog with $55 and $AA, and the * clock will run without being reset on the dummy terminal. * ********************************************************************* INCLUDE 'EQUATES.ASM' ;table of EQUates for common registers INCLUDE 'ORG00000.ASM' ;initialize reset vectors INCLUDE 'ORG00008.ASM' ;initialize interrupt vectors ORG $002C ;put address of autovector routine DC.W AUTOV ;at the level 6 vector (IRQ6) ORG $0070 ;put address of periodic interrupt routine DC.W VECRT ;at 1st user defined interrupt vector 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 |