| Electronic Components Datasheet Search |
|
SPMCK16Z4MPV20 Datasheet(PDF) 473 Page - Freescale Semiconductor, Inc |
|
|
|||||||||||||||||||||||||||||
SPMCK16Z4MPV20 Datasheet(HTML) 473 Page - Freescale Semiconductor, Inc |
|
473 / 500 page ![]() M68HC16 Z SERIES INITIALIZATION AND PROGRAMMING EXAMPLES USER’S MANUAL E-21 LDAA SCCNT,Z ADDA #$01 ;increment # of seconds DAA ;decimal adjust A CMPA #$60 ;compare # of seconds to 60 BEQ MINUTES ;if # of sec=60, then branch to minute routine STD SCCNT,Z ;if # of sec<60, store new # of sec JSR DISPLAY ;send new time to dummy terminal for display RTI ;return to main loop & wait for next interrupt MINUTES: ;advance counter for minutes CLR SCCNT,Z ;set # of seconds to 0 LDAA MNCNT,Z ADDA #$01 ;increment # of minutes DAA ;decimal adjust A CMPA #$60 ;compare # of minutes to 60 BEQ HOURS ;if # of min=60, then branch to hours routine STD MNCNT,Z ;if # of min<60, then store new # of min JSR DISPLAY ;send new time to dummy terminal for display RTI ;return to main loop & wait for next interrupt HOURS: ;advance counter for hours CLR MNCNT,Z ;set # of minutes to 0 LDAA HRCNT,Z ADDA #$01 ;increment # of hours DAA ;decimal adjust A STD HRCNT,Z ;store new # of hours CMPA #$24 ;compare # of hours to 24 BNE RETURN ;if # of hours < 24, then display new time CLR HRCNT,Z ;if # of hours=24 then clear # of hours RETURN: JSR DISPLAY ;send new time to dummy terminal for display RTI ;return to main loop & wait for next interrupt ***** Send Time to Dummy Terminal Routine ***** DISPLAY: ;this routine takes what is stored in sccnt, ;mncnt and hrcnt, converts them to ASCII ;characters, and then sends them to a dummy ;terminal. SEND_HR: ;output the hours LDAB HRCNT,Z JSR HEXTOASC ;convert hex number into ASCII and print SEND_COL: ;output a colon LDAB #$3A ;ASCII number for a colon JSR SEND_CH ;send character to terminal SEND_MIN: ;output the minutes LDAB MNCNT,Z JSR HEXTOASC ;convert hex number to ASCII and print SN_COLON: ;output another colon LDAB #$3A ;ASCII number for a colon JSR SEND_CH ;send character to terminal SEND_SEC: ;output the seconds 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 |