op version 0.9 (also 0.8.1)
When programming it gives me an error
Can't find CONFIG location (0x8007-0x8008)
But op is able to read whole chip including config bits written by another programmer. Another chips are OK.
Here is an example hex:
:08000000803102288731FC2F3A
:100F9E002F001208F03909389200FF309800FF3008
:100FAE009900FC3091050C309104FF30A000FF3009
:100FBE00A100FF30A300FF30A400FF30A600FF30D9
:100FCE00A700FF30A900FF30AA00FF3095002000D7
:100FDE0098152F00911720309200843091008030A8
:100FEE0093009401F0309500FB2F7E102000873186
:020FFE00CF2FF3
:020000040001F9
:02000E00A4E963
:00000001FF
It works if I write it by another programmer, config bits are OK, op is able to read it back.
Thanks in advance
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
hello,
your hex file specifies only config word1 (@0x8007) and its value is not allowed, as 0xE9A4 is not <0x3FFF.
Once you fix that you have to add a config2, which can be 0xFFFF in order to be ignored during write; you can do it by adding the following line:
:02001000fffff0
before
:00000001FF
However you should check if you really want to reset config2.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, Alberto
Thank you, it almost works, but strange.
I'm using Microchip xc8 v1.32 compiler and Hi-tech v9.83 and they generate this hex file. I suppose they just don't bother about those extra bits, you always can (and probably should) mask them.
Anyway, my problem solved by adding one config bit in config word 2
Here is my config in code:
#pragma config FCMEN = OFF
#pragma config IESO = OFF
#pragma config CLKOUTEN = OFF
#pragma config BOREN = OFF
#pragma config CPD = OFF
#pragma config CP = OFF
#pragma config MCLRE = OFF
#pragma config PWRTE = OFF
#pragma config WDTE = OFF
#pragma config FOSC = INTOSC
#pragma config LVP = OFF
LVP is located in config word 2
Here is a piece of hex generated by xc8 v1.32 linux:
Actually 0xC9A4 and 0xDFFF are not valid config words, as all words are limited to 14 bits so must be <= 0x3FFF.
I guess the compiler sets the unimplemeted bits to 1 instead of 0 like the assembler.
I will take this into account in the next software release, but for now you should use 0x9A4 and 0x1FFF instead.
Just substitute:
:04000E00A4C9FFDFA3
with:
:04000E00A409FF1F23
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
op version 0.9 (also 0.8.1)
When programming it gives me an error
Can't find CONFIG location (0x8007-0x8008)
But op is able to read whole chip including config bits written by another programmer. Another chips are OK.
Here is an example hex:
:08000000803102288731FC2F3A
:100F9E002F001208F03909389200FF309800FF3008
:100FAE009900FC3091050C309104FF30A000FF3009
:100FBE00A100FF30A300FF30A400FF30A600FF30D9
:100FCE00A700FF30A900FF30AA00FF3095002000D7
:100FDE0098152F00911720309200843091008030A8
:100FEE0093009401F0309500FB2F7E102000873186
:020FFE00CF2FF3
:020000040001F9
:02000E00A4E963
:00000001FF
It works if I write it by another programmer, config bits are OK, op is able to read it back.
Thanks in advance
hello,
your hex file specifies only config word1 (@0x8007) and its value is not allowed, as 0xE9A4 is not <0x3FFF.
Once you fix that you have to add a config2, which can be 0xFFFF in order to be ignored during write; you can do it by adding the following line:
:02001000fffff0
before
:00000001FF
However you should check if you really want to reset config2.
Hi, Alberto
Thank you, it almost works, but strange.
I'm using Microchip xc8 v1.32 compiler and Hi-tech v9.83 and they generate this hex file. I suppose they just don't bother about those extra bits, you always can (and probably should) mask them.
Anyway, my problem solved by adding one config bit in config word 2
Here is my config in code:
LVP is located in config word 2
Here is a piece of hex generated by xc8 v1.32 linux:
Actually 0xC9A4 and 0xDFFF are not valid config words, as all words are limited to 14 bits so must be <= 0x3FFF.
I guess the compiler sets the unimplemeted bits to 1 instead of 0 like the assembler.
I will take this into account in the next software release, but for now you should use 0x9A4 and 0x1FFF instead.
Just substitute:
:04000E00A4C9FFDFA3
with:
:04000E00A409FF1F23
I checked the code and all words are limited to 14 bits (AND with 0x3FFF), so the hex file is already ok.