I'm getting the following error: MPLINK 3.90, Linker Copyright (c) 2004 Microchip Technology Inc. Error - section '.org_0' can not fit the absolute section. Section '.org_0' start=0x00000000, length=0x00000046 Errors : 1 On my code. Can anyone help? (Also, feel free to make suggestions on the code, it's my first attempt). Thanks! Alex Code: ;****************************************************************************** ; Assuming clock speed = 10 MHz ; Structure: ; Initialize ; Main Loop: ; Setup A/D Channel ; Wait to settle (15uS) ; Sample (20uS) ; Wait to finish sample ; Label results with channel # ; Poll UART until it's RTS ; Send A/D Value ; Restart Loop ;****************************************************************************** LIST P=18F452 ;directive to define processor #include ;processor specific variable definitions ;****************************************************************************** ;Configuration bits ; The __CONFIG directive defines configuration data within the .ASM file. ; The labels following the directive are defined in the P18F452.INC file. ; The PIC18FXX2 Data Sheet explains the functions of the configuration bits. __CONFIG _CONFIG1H, _OSCS_OFF_1H & _HS_OSC_1H __CONFIG _CONFIG2L, _BOR_OFF_2L & _PWRT_OFF_2L __CONFIG _CONFIG2H, _WDT_OFF_2H __CONFIG _CONFIG3H, _CCP2MX_OFF_3H __CONFIG _CONFIG4L, _STVR_OFF_4L & _LVP_OFF_4L & _DEBUG_OFF_4L __CONFIG _CONFIG5L, _CP0_OFF_5L & _CP1_OFF_5L & _CP2_OFF_5L & _CP3_OFF_5L __CONFIG _CONFIG5H, _CPB_OFF_5H & _CPD_OFF_5H __CONFIG _CONFIG6L, _WRT0_OFF_6L & _WRT1_OFF_6L & _WRT2_OFF_6L & _WRT3_OFF_6L __CONFIG _CONFIG6H, _WRTC_OFF_6H & _WRTB_OFF_6H & _WRTD_OFF_6H __CONFIG _CONFIG7L, _EBTR0_OFF_7L & _EBTR1_OFF_7L & _EBTR2_OFF_7L & _EBTR3_OFF_7L __CONFIG _CONFIG7H, _EBTRB_OFF_7H ;****************************************************************************** ;Variable definitions CBLOCK 0x000 EXAMPLE ;example of a variable in access RAM ENDC ;****************************************************************************** ;Macros MOVLF macro literal,dest movlw literal movwf dest endm ;****************************************************************************** ;Reset vector ; This code will start executing when a reset occurs. ORG 0x0000 goto Main ;go to start of main code ;****************************************************************************** ;Start of main program Main: rcall Initial Loop ; A/D Conversion - still missing channel increment routine MOVLF B'01000001',ADCON0 ; Select Channel 0 ; "Wait 15uS to settle" missing here bsf ADCON0,2 ; Start conversion Check_Done btfsc ADCON0,2 bra Check_Done ; Loop till done (~20uS) ; Label results movlw ADCON0 ;Load setup andlw B'00111000' ;Mask all but channel # iorwf ADRESH,F ;Add channel # to unused bits ; UART - usually still transmitting previous results Check_TXREG1 btfss PIR1,TXIF ;TXIF is set if ready to transmit bra Check_TXREG1 movff ADRESL,TXREG ;Transmit first byte Check_again btfss PIR1,TXIF ;TXIF is set if ready bra Check_again movff ADRESH,TXREG ;Transmit second byte ;Start with next channel bra Loop ;****************************************************************************** ; Initialize Initial ; A/D & Ports MOVLF B'11001000',ADCON1 MOVLF B'11111111',TRISA ; UART MOVLF B'10000000',TRISC MOVLF D'10',SPBRG ;Set Baud rate = 57.6k MOVLF B'00100100',TXSTA ;Enable Transmission MOVLF B'10000000',RCSTA ;Disable Reception MOVLF B'00000000',PIE1 ;Disable Interrupts return ;****************************************************************************** ;End of program END -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist