參數(shù)資料
型號(hào): AN2635
廠商: 飛思卡爾半導(dǎo)體(中國)有限公司
英文描述: On-Chip FLASH Programming Routines
中文描述: 片上閃存編程例程
文件頁數(shù): 26/36頁
文件大?。?/td> 150K
代理商: AN2635
On-Chip FLASH Programming Routines, Rev. 4
26
Freescale Semiconductor
On-Chip Routines Source Code
;*********************************************************************
;* NAME: GetByte
;* PURPOSE:
;* Get one byte data through PTA0 serially. This routine supports
;* a baud rate 9600 bps at internal 4MHz and external 2.4576MHz bus
;* frequencies. A clock is distinguished by the state of ECGST bit
;* (bit 0) in OSCSTAT. When ECGST=1, an external clock is selected.
;* ENTRY CONDITIONS:
;* PTA0 configured as an input.
;* EXIT CONDITIONS:
;* A contains a byte received when START bit is detected
;* C-bit in CCR indicates a framing error
;* If C-bit is cleared, a framing error is indicated because
;* the STOP bit was detected as a 0 instead of a 1
;* PTA0 configured as an input
;* SUBROUTINES CALLED: GetBit
;* VARIABLES READ:
;* VARIABLES MODIFIED:
;* STACK USED: 6 (including the call to this routine)
;* SIZE: 18 bytes
;* DESCRIPTION: EXECUTED OUT OF ROM
;* Once called, program will remain in GetByte until a byte is
;* received. Signal to start receiving a byte is a valid
;* (low) START bit.
;* This routine does not service COP.
;* NOTE: Cycle path for each bit reception must be kept the same to
;* maintain a steady baud rate.
;* When OSCSTAT[0]=0 (internal clock is selected):
;* 9+(28+10*38)= 417 cycles @ 4.0 MHZ=104.3 us=9592 bps
;* (closest PC baud rate 9,600 bps)
;* When OSCSTAT[0]=1 (external clock is selected):
;* 9+(27+10*22) = 256 cycles @ 2.4576 MHZ = 104 us = 9,600 bps
;*********************************************************************
GetByte: brset 0,PTA,GetByte ;[.r...] loop till PTA0=0 (start)
bsr GetBit ;[4+GetBit] check sense of start bit
bcs GetByte ;[3] C-bit should be 0, else noise
lda #$80 ;[2] Rx byte done when 1 RORs into C
NextBit: ; top of loop to get 8 bits
bsr GetBit ;[4+GetBit] sense level of next bit
rora ;[1] rotate into A from left
nop ;[1] pad to tune timing
bcc NextBit ;[3] continue 'till 1 RORs into C
stpBit: bsr GetBit ;[4+GetBit] sense level of stop bit
rts ;[4]
;* GetByte DONE ******************
;*********************************************************************
;* NAME: PutByte
;* PURPOSE:
;* Send one byte data through PTA0 serially. This routine supports
;* a baud rate 9600 bps at internal 4MHz and external 2.4576MHz bus
;* frequencies. A clock is distinguished by the state of ECGST bit
;* (bit 0) in OSCSTAT. When ECGST=1, an external clock is selected.
;* ENTRY CONDITIONS:
;* PTA0 configured as an input, PTA0 data bit = 0
;* A contains data to be sent
;* EXIT CONDITIONS:
相關(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ù)閃速存儲(chǔ)器)
相關(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