參數(shù)資料
型號: AN2635
廠商: 飛思卡爾半導(dǎo)體(中國)有限公司
英文描述: On-Chip FLASH Programming Routines
中文描述: 片上閃存編程例程
文件頁數(shù): 27/36頁
文件大?。?/td> 150K
代理商: AN2635
On-Chip Routines Source Code
On-Chip FLASH Programming Routines, Rev. 4
Freescale Semiconductor
27
;* A and X is restored to entry values
;* PTA0 configured as an input (PTA0=high idle line)
;* SUBROUTINES CALLED:
;* VARIABLES READ:
;* VARIABLES MODIFIED:
;* STACK USED: 4 (including the call to this routine)
;* SIZE: 46 bytes
;* DESCRIPTION: EXECUTED OUT OF ROM
;* After ~2 bit times delay, a character in A is sent via PTA0
;* Once called, program will remain in PutByte until PTA0=high
;* This routine does not service COP
;*********************************************************************
PutByte: pshx ;[2] save X
psha ;[2] temp save Tx data
lda #10 ;[2] start, 8 data, stop = 10 loops
brclr 0,PTA,* ;[.r...] wait for PTA0 high (idle)
ldx #BitX2 ;[2] load constant for Ext
;* delay ~2 bit times before transmitting data (time not critical)
;* Ext 2 bit is 25% longer and Int 2 bit is 23% shorter
delay: dbnzx delay ;[3] loop 3 cyc * BitX2I
sec ;[1] becomes stop bit after 9 RORs
bra outLow ;[3] Tx a low for start bit
PutLoop: ror 1,SP ;[5] LSB to C-bit, Tx that level
bcc outLow ;[3] if C=0 Tx low, else Tx high
outHi: bclr 0,DDRA ;[4] PTA0 input pulls up to high
bra outDelay ;[3] go to time 1 bit delay
outLow: bset 0,DDRA ;[4] PTA0 output makes pin drive low
bra outDelay ;[3] time 1 bit delay (match time)
outDelay: ldx OSCSTAT ;[3] check for Int/Ext clk
bne BitE ;[3] branch if Ext (OSCSTAT!=$00)
ldx #BitTimeI ;[2] load Int bit delay
bra delOut ;[3] skip to delOut
BitE: nop ;[1] timing adjust
ldx #BitTimeE ;[2] load Ext bit delay
delOut: dbnzx delOut ;[3] loop 3~ * (value in X)
nop ;[1] timing adjust
dbnza PutLoop ;[3] repeat for start, 8 data, stop
pula ;[2] restore Tx data
pulx ;[2] restore X
rts ;[4]
;* PutByte DONE ******************
;*********************************************************************
;* NAME: GetBit
;* PURPOSE:
;* Receive one serial bit via PTA0 and return it in C-bit
;* ENTRY CONDITIONS:
;* PTA0 configured as an input.
;* EXIT CONDITIONS:
;* A and X is restored to entry values
;* Bit level is returned to C bit in CCR
;* PTA0 configured as an input.
;* SUBROUTINES CALLED: GetBit
;* VARIABLES READ:
相關(guān)PDF資料
PDF描述
AN4009 ALARM IC SAMPLE APPLICATIONS
ARP2805D/SF 1-OUTPUT 150 W DC-DC REG PWR SUPPLY MODULE
AS1977-T nPower Single Comp. Open-Drain; Package Type: SOT23-5
AS1976-T nPower,Single Comp. Push-Pull; Package Type: SOT23-5
AT45D161 16-megabit 5-volt Only Serial DataFlash(16M位 5V串行數(shù)據(jù)閃速存儲器)
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
AN264 制造商:Panasonic Industrial Company 功能描述:IC
AN-264 制造商:AD 制造商全稱:Analog Devices 功能描述:DYNAMIC CHARACTERISTICS OF TRACKING CONVERTERS BY MARK THOMAS
AN2640K 制造商:未知廠家 制造商全稱:未知廠家 功能描述:VHD VIDEO DISC PLAYER CHROMA AND LUMINANCE PROCESSING CIRCUIT
AN2641 制造商:Distributed By MCM 功能描述:USB FILE TRANSFER CABLEPC / MAC 制造商:MCM 功能描述:USB FILE TRANSFER CABLE PC / MAC
AN265 制造商:SILABS 制造商全稱:SILABS 功能描述:2ND-GENERATION PROSLIC㈢ GUI USER’S GUIDE