www.pudn.com > flashhuibian.rar > flash.h
* File: vc5402vs.h * * Include file with I/O Port declarations * * CPU Clock CPUCLK .set 100 PLLx7 .set 6007H PLLx10 .set 9007H timer_EN .set 0C00H TINT0_EN .set 0008H TINT1_EN .set 0080H INT1_EN .set 0002H HPINT_EN .set 0200H * CPU Init OVLY_0 .set 0005BH ;OVLY = 0 OVLY_1 .set 0003BH ;OVLY = 1 MP_1 .set 00040H ;MP/MC = 1 MP_0 .set 00000H ;MP/MC = 0 SWWSR_VAL .set 0FfffH ;I/O:10w/s;Data U:10w/s,L:4w/s;PROG U:10w/s,L:4w/s SWCR_VAL .set 0000H ;Wait states x2 CPL_0 .set 0bfffH ;set Dp way ZERO .set 0000H * Flash Operation Flash_base .set 0008H Flash_5555 .set 5555H Flash_2AAA .set 2AAAH Flash_rst .set 00F0H Flash_sa0 .set 0000H Flash_sa1 .set 0001H *... Flash_sa127 .set 007FH Flash_ba2 .set 0002H Flash_ba3 .set 0003H Flash_ba4 .set 0004H Flash_ba5 .set 0005H Flash_ba6 .set 0006H Flash_ba7 .set 0007H Flash_UL1 .set 00AAH Flash_UL2 .set 0055H Flash_PRG .set 00A0H Flash_ERASE .set 0080H Flash_SE .set 0030H Flash_BE .set 0050H Flash_CE .set 0010H Flash_SBIT .set 000BH Flash_BBIT .set 000FH Flash_SSIZE .set 0800H Flash_BSIZE .set 8000H Flash_CSIZE .set 4000H ; *16 Flash_BLANK .set 0FFFFH Polling_Bit .set 0080H Toggle_Bit .set 15-6 *DSK operation register CNTL2 .set 0004H ;the address of CNTL2 is 0x0004H STAT .set 0001H ;the address of STAT is 0x0001H CNTL1 .set 0000H ;the address of CNTL1 is 0x0000H DMCTRL .set 0002H ;the address of DMCTRL is 0x0002H *the function of the register FLASHENB .set 0000H ;make the flash in the high 512k DMSEL .set 0080H ;make the extral memory in the data space