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.

mplab 8.92 compilation error

Status
Not open for further replies.

johnny78

Full Member level 4
Joined
Jun 28, 2017
Messages
206
Helped
0
Reputation
0
Reaction score
4
Trophy points
18
Activity points
1,701
hello Guys

few years ago i was using MPLAB 8.92 to write code for 8 bit devices like 12c508
& it was working
but now i needed an old file to com[pile again for use but the assembler give me errors
like directive only allowed when generating an object file

any idea ?
if i have to set anything before assemble it because i didnt use it since few years

thanks in advance
 
Last edited:

Sounds like something has reformatted the source code. MPLAB reserves the first location on a line for labels and needs at least one space before an opcode.

Brian.
 

thanks Sir
how to get the calibration value of the internal oscillator to move it to OSCCAL ?
i see in my code call 0x1ff before movwf OSCCAL but when assembling it gives me error of
"Call or jump not allowed at this address (must be in low half of page"

i think i have a problem with the calibration of the oscillator

thanks for help
 
Last edited by a moderator:

OSCCAL only adjusts the oscillator slightly and it won't stop your code running even with silly values in it. If you are seeing a misbehaving program, other than something very critical of timing, OSCCAL probably isn't the problem.

Resetting the calibration used to be easy with the Pickit2 programmer but the facility was removed in later versions. I'm sure if you search there will be a program that does it for you but you would probably need a reference oscillator to compare its speed against. When programming devices with a calibration register in future, either read the old value before reprogramming and then put the value back again or try to avoid overwriting the OSCCAL value.

Note that you don't normally jump or call to the last byte in memory where the value is saved. The reset vector is normally set to that address and the instruction there loads W with the value so when the address advances it rolls over to 0x000 with the calibration value in W.

Brian.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top