Electronic Components Datasheet Search
  English  ▼
ALLDATASHEET.NET

X  

SPMCK16Z4MPV20 Datasheet(PDF) 474 Page - Freescale Semiconductor, Inc

Part # SPMCK16Z4MPV20
Description  M68HC16Z Series
PDF  500 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  FREESCALE [Freescale Semiconductor, Inc]
Direct Link  http://www.freescale.com
Logo FREESCALE - Freescale Semiconductor, Inc

SPMCK16Z4MPV20 Datasheet(HTML) 474 Page - Freescale Semiconductor, Inc

Back Button SPMCK16Z4MPV20 Datasheet HTML 470Page - Freescale Semiconductor, Inc SPMCK16Z4MPV20 Datasheet HTML 471Page - Freescale Semiconductor, Inc SPMCK16Z4MPV20 Datasheet HTML 472Page - Freescale Semiconductor, Inc SPMCK16Z4MPV20 Datasheet HTML 473Page - Freescale Semiconductor, Inc SPMCK16Z4MPV20 Datasheet HTML 474Page - Freescale Semiconductor, Inc SPMCK16Z4MPV20 Datasheet HTML 475Page - Freescale Semiconductor, Inc SPMCK16Z4MPV20 Datasheet HTML 476Page - Freescale Semiconductor, Inc SPMCK16Z4MPV20 Datasheet HTML 477Page - Freescale Semiconductor, Inc SPMCK16Z4MPV20 Datasheet HTML 478Page - Freescale Semiconductor, Inc Next Button
Zoom Inzoom in Zoom Outzoom out
 474 / 500 page
background image
INITIALIZATION AND PROGRAMMING EXAMPLES
M68HC16 Z SERIES
E-22
USER’S MANUAL
LDAB
SCCNT,Z
JSR
HEXTOASC
;convert hex number to ASCII and print
LINE_FD:
;output a linefeed
LDAB
#$0A
;load ASCII number for line feed
JSR
SEND_CH
;send character to terminal
CARRIAGE:
;output a carriage return
LDAB
#$0D
;ASCII number for carriage return
JSR
SEND_CH
;send character to terminal
RTS
;done with display routine
*****
Hexadecimal to ASCII conversion
*****
HEXTOASC:
;the following code takes a number or
;character stored in register D, assumes
;it's in its hexadecimal form and converts
;it to an ASCII equivalent. It also sends
;that character to the screen.
STD
TEMP,Z
;store the hex number temporarily into “TEMP”
JSR
PRTMSB
LDD
TEMP,Z
;reload value of hex number into D register
ANDB
#$0F
;get rid of upper 4 bits in hex number
BRA
PRTLSB
PRTMSB: LSRB
;shift high 4 bits down to low 4 bits position
LSRB
LSRB
LSRB
PRTLSB:
;the actual conversion process:
ADDB
#$30
;add $30 to the hex number
CMPB
#$39
;check for digithood
BLS
NOTAF
;go print now if it's a digit 0-9
ADDB
#$07
;it's a letter A-F, so add $07 before printing
NOTAF:
JSR
SEND_CH
;send the character to the SCI
RTS
;done with hex to ascii conversion
*****
Autovector Routine
*****
AUTOV:
;when IRQ6 is low, this autovector routine starts
LDAB #$55
;These four lines reset the watchdog and keep it
STAB SWSR
;from causing a system reset by writing to the SWSR
LDAB #$AA
;By writing a #$55 and a #$AA to the SWSR before
;the end
STAB SWSR
;of every time-out period, the watchdog will be
reset.
LDX
#AUTOV_STRING
JSR
SEND_STRING
RTI
;return to the main loop
*****
Other exception/interrupts
*****
BDM:
BGND
;all other exception vectors point here
;and put the user into background mode
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


Datasheet Download

Go To PDF Page


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


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
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