12.07.2015 Views

MC80F7708 - abov.co.kr

MC80F7708 - abov.co.kr

MC80F7708 - abov.co.kr

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>MC80F7708</strong>8.2 Program MemoryA 16-bit program <strong>co</strong>unter is capable of addressing up to64K bytes, but this device has 8K bytes program memoryspace only physically implemented. Accessing a location<strong>abov</strong>e FFFF H will cause a wrap-around to 0000 H .Figure 8-5 shows a map of Program Memory. After reset,the CPU begins execution from reset vector which is storedin address FFFE H and FFFF H as shown in Figure 8-6.As shown in Figure 8-5, each area is assigned a fixed locationin Program Memory. Program Memory area <strong>co</strong>ntainsthe user program.E000 HExample: Usage of TCALLLDA #5TCALL 0FH ;1BYTE INSTRUCTION: ;INSTEAD OF 2 BYTES: ;NORMAL CALL;;TABLE CALL ROUTINE;FUNC_A: LDA LRG0RET;FUNC_B: LDARETLRG1 2 1;;TABLE CALL ADD. AREA;ORG 0FFC0H ;TCALL ADDRESS AREADW FUNC_ADW FUNC_BFEFF HFF00 HFFC0 HFFDF HFFE0 HFFFF HTCALL areaInterruptVector AreaFigure 8-5 Program Memory MapPage Call (PCALL) area <strong>co</strong>ntains subroutine program toreduce program byte length by using 2 bytes PCALL insteadof 3 bytes CALL instruction. If it is frequently called,it is more useful to save program byte length.Table Call (TCALL) causes the CPU to jump to eachTCALL address, where it <strong>co</strong>mmences the execution of theservice routine. The Table Call service area spaces 2-bytefor every TCALL: 0FFC0 H for TCALL15, 0FFC2 H forTCALL14, etc., as shown in Figure 8-7.PCALL area8K MTPThe interrupt causes the CPU to jump to specific location,where it <strong>co</strong>mmences the execution of the service routine.The External interrupt 0, for example, is assigned to location0FFFA H . The interrupt service locations spaces 2-byteinterval: 0FFF8 H and 0FFF9 H for External Interrupt 1,0FFFA H and 0FFFB H for External Interrupt 0, etc.Any area from 0FF00 H to 0FFFF H , if it is not going to beused, its service location is available as general purposeProgram Memory.Address0FFE0 HE2E4E6E8EAECEEF0F2F4F6F8FAFCFEVector Area MemoryWatch Timer interrupt Vector AreaWatch dog timer interrupt VectorBasic Interval Timer Interrupt Vector AreaAD Converter Interrupt Vector Area-Timer/Counter 3 Interrupt Vector AreaTimer/Counter 2 Interrupt Vector AreaTimer/Counter 1 Interrupt Vector AreaTimer/Counter 0 Interrupt Vector Area-UART TX0 Interrupt Vector AreaUART RX0 Interrupt Vector AreaExternal Interrupt 3 Vector AreaExternal Interrupt 2 Vector AreaExternal Interrupt 1 Vector AreaExternal Interrupt 0 Vector Area-Reset Interrupt Vector AreaFigure 8-6 Interrupt Vector Area24 December 3, 2012 Ver 1.21

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!