DatasheetQ Logo
Electronic component search and free download site. Transistors,MosFET ,Diode,Integrated circuits

MC68HC908LB8_05 データシートの表示(PDF) - Freescale Semiconductor

部品番号
コンポーネント説明
メーカー
MC68HC908LB8_05
Freescale
Freescale Semiconductor Freescale
MC68HC908LB8_05 Datasheet PDF : 36 Pages
1 2 3 4 5 6 7 8 9 10 Next Last
Example 2: Sending a Byte Serially
Example 2 shows how to send a byte ($55) serially on PTA0:
PutByte equ $0381
bclr 0,DDRA
bclr 0,PTA
lda #$55
jsr PutByte
;LB8 PutByte jump address
;Configure port A bit 0 as an input
;Initialize data bit to zero PTA0=0
;Load sent data $55 to A
;Call PutByte routine
How to Use the Routines
RDVRRNG
When using the RDVRRNG routine, the user must select one of the following function options:
• Send-out option — Used to read a range of FLASH locations and to send the read data to a host
through PTA0 by using the PutByte routine.
• Verify option — Used to read a range of FLASH locations and to verify the read data against the
DATA array.
Send-Out Option
If the accumulator (A) is initialized with $00 at the routine entry, the read data will be sent out serially
through PTA0. The communication baud rate is the same as the baud rate described in the PutByte
routine. When this option is selected, the PTA0 must be pulled up and configured as an input and the
PTA0 data bit must be initialized to 0.
Verify Option
If A is initialized with a non-zero value, the read data is verified against the DATA array for each byte of
FLASH and the DATA array is replaced by the data read from FLASH. If the data does not match the
corresponding value, the data read from FLASH can be confirmed in the DATA array. All data in the DATA
array must be in the zero page, but a range can be beyond a row size or a page size.
Carry (C) Bit and Checksum
The first and last addresses of the range to be read and/or verified are specified as parameters in
registers H:X and LADDR, respectively. In the verify option, the carry (C) bit of the condition code register
(CCR) is set if the data in the specified range is verified successfully against the data in the DATA array.
However when the send-out option is selected, the status of the C bit is meaningless because this
function does not include the verify operation. Both options calculate a checksum on data read in the
range. This checksum, which is the LSB of the sum of all bytes in the entire data collection, is stored in A
upon return from the function.
Interrupts are not masked. The COP is serviced in RDVRRNG. The first COP is serviced at 23 bus cycles
after this routine is called in the user software. However, the COP timeout might still occur in the send-out
option if the COP is configured for a short timeout period.
On-Chip FLASH Programming Routines, Rev. 4
Freescale Semiconductor
9

Share Link: 

datasheetq.com  [ Privacy Policy ]Request Datasheet ] [ Contact Us ]