Note: Serial quick turn programming (SQTP) is Microchip specified standard for serial
programming of Microchip PIC microcontrollers. Microchip PIC devices allows you to program
a unique serial number into each microcontroller. This number can be used as an entry code,
password, or ID number.
Serialization is done by using a series of RETLW (Return Literal W) instructions, with the
serial number bytes as the literal data. To serialize, you can use Incremental mode
serialization or From file mode serialization.
Incremental serialization offers serial number Split function. Serial number split allows usage
of incremental numbers separated into even or odd bytes and between each byte of serial
number RETLW instruction code is inserted.
From file serialization is using proprietary serial numbers file. This file can consist of various
serial numbers. The numbers can have format suitable for SQTP that means number RETLW
b1 RETLW b2 and so on. Note that PG4UW serial file format is not compatible with SQTP
serial file generated by Microchip MPLAB.
Example 2a:
Use of serialization split with RETLW instructions for Microchip PIC16F628 devices.
Device PIC16F628 has 14 bit wide instruction word. Instruction RETLW has 14-Bit Opcode:
Description
MSB
14-Bit word
LSB
RETLW
Return with literal in W
11
01xx
kkkk
kkkk
where xx can be replaced by 00 and k are data bits, i.e. serial number byte
Opcode of RETLW instruction is hexadecimal 34KKH where KK is data Byte (serial number
byte)
Let’s assume we want to write serial number 1234ABCDH as part of four RETLW instructions
to device PIC. The highest Byte of serial number is the most significant Byte. We want to
write the serial number to device program memory at address 40H. Serial number split us
very useful in this situation. Serialization without serial number split will write the following
number to buffer and device:
Address
0000080
Data
CD AB 34 12 xx xx xx xx xx xx xx xx xx xx xx xx
Note: address 80H is because buffer has byte organization and PIC has word organization
so it has equivalent program memory address 40H. When buffer has word organization x16,
the address will be 40H and number 1234ABCDH will be placed to buffer as following:
Address
0000040
Data
ABCD 1234 xxxx xxxx xxxx xxxx xxxx xxxx
We want to use RETLW instruction so buffer has to be:
Address
0000040
Data
34CD 34AB 3434 3412 xxxx xxxx xxxx xxxx
76
相关PDF资料
84702-0008 CONN RECEPT ETHERNET 8-8 PNL MNT
848A MEMORY PROGRAMMER PARALLEL INTER
85506-0001 CONN MOD JACK VERT 8-8 HI-SPEED
85507-0001 CONN MOD JACK VERT 8-8 SHIELDED
85508-0001 CONN MOD JACK VERT 8-8 SHIELDED
85508-5001 CONN MOD JACK 8POS T/H HI SPEED
85511-0001 CONN MOD JACK VERT 8-8 HI-SPEED
862015-1 6 POS RECEPTACLE
相关代理商/技术参数
845 功能描述:程序设计器 - 基于通用和内存 REORD 615-865 UNIV. WITH SOFTWARE RoHS:否 制造商:Xeltek 产品:Universal Device Programmers 工具用于评估:EPROM, Parallel/Serial EEPROM, FPGA, PROM, Flash, BPROM, MCUs, PLD Devices 接口类型:Parallel, USB 工作电源电压:90 VAC to 250 VAC
845 1 1/2"X15YD 功能描述:SCOTCH BOOK TAPE 845 1-1/2 IN X 制造商:3m 系列:* 零件状态:在售 标准包装:24
845 3"X15YD 功能描述:SCOTCH BOOK TAPE 845 3 IN X 15 Y 制造商:3m 系列:* 零件状态:在售 标准包装:12
845 4"X15YD 功能描述:SCOTCH BOOK TAPE 845 4 IN X 15 Y 制造商:3m 系列:* 零件状态:在售 标准包装:8
845 PRO4 制造商:Micro-Star International 功能描述:845 P4 S478 SDRAM LAN - Bulk
845 PRO4-L 制造商:Micro-Star International 功能描述:845 P4 SKT478 ATX SDRAM - Bulk
845 ULTRA 制造商:Micro-Star International 功能描述:845 SKT-478 P4 DDR ATX AUD - Bulk
845 ULTRA-DF 制造商:Micro-Star International 功能描述:845 SKT-478 P4 DDR ATX AUD - Bulk