Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Help me with errors in FIR filter for PIC18F458

Status
Not open for further replies.

Moof

Full Member level 2
Joined
Nov 21, 2003
Messages
149
Helped
7
Reputation
14
Reaction score
3
Trophy points
1,298
Location
Argentina
Activity points
1,230
Hi: i am trying to make a Fir Filter like the Application Note 852 (iir Fir filter) for a pic 18f458.

I did everyhinh that the paper says but when i try to biuld my filter i have this errors:

Error[149] C:\FILTRODIG\FIR_BUF.INC 2 : Directive only allowed when generating an object file
Error[149] C:\FILTRODIG\FIR_BUF.INC 21 : Directive only allowed when generating an object file
Error[149] C:\FILTRODIG\FIR_BUF.INC 31 : Directive only allowed when generating an object file
Error[149] C:\FILTRODIG\EXPL_FIR.ASM 59 : Directive only allowed when generating an object file
Error[149] C:\FILTRODIG\EXPL_FIR.ASM 63 : Directive only allowed when generating an object file
Error[149] C:\FILTRODIG\EXPL_FIR.ASM 66 : Directive only allowed when generating an object file
Error[149] C:\FILTRODIG\EXPL_FIR.ASM 69 : Directive only allowed when generating an object file

This files a part of the microchip example, i dont need to change this files to build my filter, only the coef file to change filter response.

I try to build an object file, but i dont know how to turn all the objects into valid hex file. but then i said. Microchip put bad app notes and examples?. What im doing wrong?

Please i need helllllpppppppp
 
mplab error 149

Well after all i could build this program doing this:

1. Add 'expl_fir.asm' to 'Source Files'
2. Add processor specific .LKR file (e.g. 18c452.LKR) to the the 'Linker Scripts'
3.Please keep all .INC files included in 'expl_fir.asm' in the same project directory (this I believe you are already doing---otherwise you may have got lots of other errors)
4. Build the project
Processor specific .LKR files are available in MPLAB IDE\MCHIP_Tools\Lkr directory

and i mplab 6.4 put this in the screen

Executing: "C:\Archivos de programa\MPLAB IDE\MCHIP_Tools\mpasmwin.exe" /q /p18C452 "expl_fir.asm" /l"expl_fir.lst" /e"expl_fir.err" /o"expl_fir.o" /w2
Executing: "C:\Archivos de programa\MPLAB IDE\MCHIP_Tools\mplink.exe" "C:\Archivos de programa\MPLAB IDE\MCHIP_Tools\LKR\18f458.lkr" "C:\FIltroDig\expl_fir.o" /o"FiltroDig.cof"
MPLINK 3.60, Linker
Copyright (c) 2003 Microchip Technology Inc.
Errors : 0

MP2COD 3.60, COFF to COD File Converter
Copyright (c) 2003 Microchip Technology Inc.
Errors : 0

MP2HEX 3.60, COFF to HEX File Converter
Copyright (c) 2003 Microchip Technology Inc.
Errors : 0

Loaded C:\FIltroDig\FiltroDig.cof
BUILD SUCCEEDED: Thu Dec 13 14:40:28 2001


But im still in probles cos the HEX file is all full of "FFFF" im still needing help!!!!

HELP!!!!!
 
18f458.lkr

Moof said:
Hi: i am trying to make a Fir Filter like the Application Note 852 (iir Fir filter) for a pic 18f458.

I did everyhinh that the paper says but when i try to biuld my filter i have this errors:

Create a project (project/new) and in the project files area select the root node (HEX file). Click node properties, select MPLINK as language tool. Enter appropriate linker file name (eg 18f458.lkr) into additional command line options. Close window. Click add node to add all the source files one by one. Place the specified lkr file (eg 18f458.lkr) in the same directory containing the sources. The linker file can usually be copied from your mplab(/lkr) program directory. Choose the file matching your processor.
Explanation: There are two incompatible source styles for one-file absolute and multiple-file linked projects, you can't write code both styles. If you want to build modular code which can be combined with other libraries, code must be written in the linkable format, even if it is the only source file in the beginning. But linkable format source must be compiled differently, in two steps: first compiled into an intermediate object format, then linked into a HEX file.

Study the resulting listing file (xy.lst) and see where in program memory the assembler & linker placed your instructions (lines start with the absolute addresses in program memory). If you are not satisfied, modify the linker file and correct the segment definitions until everithing is OK.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top