Jan-Eric, We all started somewhere... This guy has said he is a newbie, and I wish him the luck in the world. Ed, Something you may not have realised is that there are 2 very = different ways of using MPLAB. Absolute and relocatable. With absolute, you specify how things are done and due to this you have = to ensure that thing are done correctly, the examples you are using may = not have too many issues but there are pages and banks that need to be = considered. With relocatable, the linker does most of the work but you still have to = take certain precautionary measures. If you copy and paste lesson 5a into MPLAB and set up the environment = for absolute, it should compile, by the time you get to lesson 16, the = examples change to relocatable. Most of my 'old' projects were written using absolute mode and do = exactly what they were designed to do. As Jan-Eric has stated, when using relocatable code, you do not specify = addresses, you reserve variables and workspace and the linker does most = of the rest for you. When using absolute mode, you specify the = addresses. Also, when you make an error and are advised why, making the = same error and asking for the same help can wind engineers up :-) Cheers, Dave (G0GMK) Jan-Erik S=F6derholm wrote: > Sorry, the text below should have read : > > "...no CBLOCK or *ORG*. Use the RES and CODE..." > > Jan-Erik. > > > > Jan-Erik S=F6derholm wrote : > = >> If you are *still* using a "linker script" (LKR file), >> you should also have source code in relocatable mode >> format. That's is, no CBLOCK and no CODE. Use the RES >> and CODE directives. Or simple remove the LKR file >> from the project. >> >> I do not understand why you are trapped into this again... >> >> Jan-Erik. >> >> Dr. Ed Edmondson, PhD skrev: >> = >>> I just wanted to thank every one for their assistance with this probl= em. >>> = >>> I was able to build the lesson code with no further problems. >>> = >>> I have gone to lesson 5b and it had the same problem as 5a and wouldn= 't compile completely. So I went back and entered the org statement that fi= xed lesson 5a and another problem popped up. >>> = >>> I get the following error when I try and build this lesson: >>> = >>> MPLINK 4.05 LINKER >>> Copyright (c) 2006 Microchip Technology Inc. >>> ERROR-Section 'org_0' cannot fit the absolute section >>> Section 'org_0' start 0x00000004. Length 0x00000012 >>> Errors: 1 >>> = >>> The code is: >>> = >>> processor 16f84 >>> include >>> __config _HS_OSC & _WDT_OFF & _PWRTE_ON >>> cblock H'20' >>> spot1 >>> spot2 >>> endc >>> org 0x0000 >>> bcf Status,Z >>> bcf Status, C >>> bcf Status,DC >>> clrf spot1 >>> movlw D'15' >>> movwf spot2 >>> movlw D'03' >>> addwf spot2,F >>> nop >>> end >>> = >>> I have the above code formatted correctly in the IDE. I just typed it= in this way so it wouldn't run all over the page. >>> = >>> Can some one please tell me what the error is and why the org stateme= nt would not fix the problem like it did in lesson 5a. >>> = >>> I started this tutorial earlier this year and don't recall having any= of these problems? I just restarted this tutorial as a refresher and all t= hese problems popped up. The only difference is I am using a newer version = of MPLAB v7.43. >>> = >>> Thanks, >>> Ed >>> = >>> = >>> >>> >>> = >>> --------------------------------- >>> Sponsored Link >>> >>> $420,000 Mortgage for $1,399/month - Think You Pay Too Much For Your = Mortgage? Find Out! >>> = > > = -- = http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist