PDA

View Full Version : 16F648A - ? error in M16F62XA.INC file



aerostar
- 14th November 2009, 15:20
I have been having problems with this device, I found one error where the file in PB2.46 had bank error in the files, Melabs corrected 2 versions later. But I still have had problems.

After spending many hours looking at my code, and wondering why it works in 628A and not in 648A, I concluded that there must be something else causing my problems, so decided to dig deeper into the compiler files.

On looking at the M16F62XA.INC file, see below, and this is from PB2.60 (2.46 has the same), I think that this has an error.

I cannot test my theory at the moment as the unit is at work, so I will try tomorrow morning and see if this is a cure for my problems.

The 16F648A has 4k of code, not as stated below 2k, and it has 256 of EEE not 128 as stated.

Could someone please confirm that it should read

PIC16F648A equ 50081003h ; 14-Bit, 4K Code, 256 EE, ID = 3

Thanks



;************************************************* ***************************
; PIC16F62xA Family Header
; Copyright 1995, 2006 microEngineering Labs, Inc.
;************************************************* ***************************
NOLIST
; *** Default Device Specifications
DEVICE 3FFF3FFFh ; All Fuse Bits On
DEVICE 50040802h ; 14-Bit, 2K Code, 128 EE, ID = 2

; *** DEVICE Device Definitions
PIC16F627A equ 50020801h ; 14-Bit, 1K Code, 128 EE, ID = 1
PIC16F628A equ 50040802h ; 14-Bit, 2K Code, 128 EE, ID = 2
PIC16F648A equ 50081003h ; 14-Bit, 2K Code, 128 EE, ID = 3

Acetronics2
- 14th November 2009, 15:57
Hi,

I do not want to be rude ...

BUT, instead of loosing your time ( might I say " and ours ??? " ) Wouldn't it be MUCH more Clever to reload all your PBP files from a Safe source ( i.e. a genuine PBP 2.60 release .... ).

I know some mods have to be done on the libs to use Darrel's goodies ... I saw you made Hazardous ( ! ) mods too ...

BUT surely worth the time to restart from a SAFE basis ...

You MUST admit you do not know where you are, at this time ...

Alain

aerostar
- 14th November 2009, 17:18
Note typo on 2.46 should read 2.43 on original post


Hi,

I do not want to be rude ...

BUT, instead of loosing your time ( might I say " and ours ??? " ) Wouldn't it be MUCH more Clever to reload all your PBP files from a Safe source ( i.e. a genuine PBP 2.60 release .... ).

I know some mods have to be done on the libs to use Darrel's goodies ... I saw you made Hazardous ( ! ) mods too ...

BUT surely worth the time to restart from a SAFE basis ...

You MUST admit you do not know where you are, at this time ...

Alain



From your comments you imply that I am using a non genuine copy, my copies/upgrades, are all from CROWNHILL !!!, 2.60 only arrived couple of weeks ago, so I suggest you refrain from making that type of accusation.

The PB2.60 WAS a clean new install. !

My hazadous mods ??? correcting the file where Melabs admitted there was a correction needed, if you had bothered to look at the version history, you would have seen the remark about the bank 2 setting, 2 versions on from my original 2.43.


This is what it says about the corrections in the 2.45 file Note last line but one.

Previous Release: 2.45
Adds support for PIC12F508, 509, 683, PIC16F505, 684, 688, 716, 737, 747, 767, 777, 87, 88, PIC18F2331, 2431, 2515, 2525, 2585, 2610, 2620, 2680, 4331, 4431, 4515, 4525, 4585, 4610, 4620, 4680, 6410, 6490, 8410 and 8490.
Allows spaces in path/filename.
Improves compatility with MPLABŪ 6.
Updates USB routines to version 1.25.
Removes dependence on some Microchip PIC18Xxxxx macros.
Fixes subtract bit from byte and word to word result.
Fixes PIC16F648A BANK2 RAM setting.
Fixes some PIC18Xxxxx bank selections.

I know exactly where I am,

1. there was an error made by Melabs on 2.43, yes my fault for not checking the version changes, but then I wonder how many do.

2, in my opinion there appears to be an error on the M16F62XA.INC file.
I have PB 2.43,2.5,2.6 ( All legal and paid for from Crownhill) and on all of them it shows what I think is an error.

All I have asked was, does someone else think that there is an error in the M16F62XA.INC file.

So instead of jumping on someone without knowing all the facts, you could either have ignored the posting, or given a simple opinion on the entries in that file and without making unfounded accusations !.

Darrel Taylor
- 14th November 2009, 18:29
; *** DEVICE Device Definitions
PIC16F627A equ 50020801h ; 14-Bit, 1K Code, 128 EE, ID = 1
PIC16F628A equ 50040802h ; 14-Bit, 2K Code, 128 EE, ID = 2
PIC16F648A equ 50081003h ; 14-Bit, 2K Code, 128 EE, ID = 3

In the M16F62XA.INC file, the things you are calling an error (marked in red), are comments.
They have no effect on the operation of the program.

The actual definitions of RAM Banks are in the 16F648A.BAS file in the PBP folder.
And they have been correct for a long time.

The line that the comments are in, are not the lines that were fixed in 2.45, and aren't even in the same file, so I can see how the comments didn't get updated with the fix.

I do think you should stop using 2.43 though.
2.43 was from around 2001. Each successive version fixed many things. Why find them all again?
<hr>
And don't worry about Alain.
His post was probably directed more at me, than you.
<br>

Acetronics2
- 14th November 2009, 20:15
Hi, Aerostar

Ok, You're the one and only who knows ... Won't disturb you anymore ...




And don't worry about Alain.
His post was probably directed more at me, than you.


Hi, Darrel ...

You forgot the [ Humour ON ] key ????
ROFL.

Alain