thanks Henrik,
I received your msg 7 just now. Now it is very clear to me ,.
In my previous msg I refer to register 05h.
rgds,
Ambro
thanks Henrik,
I received your msg 7 just now. Now it is very clear to me ,.
In my previous msg I refer to register 05h.
rgds,
Ambro
I wouldn't call the GPIO registers a "setting" (though it's really no different than any other register). It is the port register which is connected to the actual I/O pins.
Write to GPIO and the bits will appear on the port pins configured as outputs. Read from GPIO and you'll get the state of the register. The state of each individual bit will properly reflect the state logic state of the actual pin provided that the pin IS set to digital, it IS set to input and the voltage is either less than VIL (for a logic zero) or more than VIH (for a logic one).
In other words, if the voltage on GPIO.0 is less than VIL myVAR = GPIO.0 will be 0 and if the voltage is higher than VIH myVAR = GPIO.0 will be 1. If the voltage is somewhere in between VIL and VIH the result is unspecified.
Your original problem was that the pin was not set to digital and as the datasheet says: I/O pins configured as analog inputs always read ‘0’.
/Henrik.
Hi,
it is working for the first time. If I do reprogram the chip then I have the following message:
017-05-09 12:13:19 +0200 - Programming...
Target has invalid calibration data (0x00).
Device Erased...
Programming...
The following memory area(s) will be programmed:
program memory: start address = 0x0, end address = 0x45
configuration memory
program memory
Address: 0 Expected Value: 2828 Received Value: 0
Failed to program device
2017-05-09 12:13:23 +0200 - Programming failed
Pass Count: 49
It is the first time I face with a so small PIC devices... Is it critical ?
thanks
Ambro
Not sure but I believe it might have something to do with the calibration value for the internal oscillator. I see you're manually setting OSCCAL to 64 at the top of the program but I'm wondering if what the error message is trying to say is that you've erased the factory calibration value originally stored in the PIC. Does the program work at all?
If you want PBP to use the default calibration value add DEFINE OSCCAL_1K 1 but it will obviously not work on a device where you've erased the calibration value.
yes, the program that I loaded before still runs.
No other code can be loaded .
I changed the micro : all OK at first programming. The same message comes out at the second programming.
regards,
Thanks
Ambro
Hi to all,
I still have this message from PICKIT_3:
Target Detected
Programming...
The following memory regions failed to program correctly:
Program Memory
Address: 00000000 Expected Value: 00002842 Received Value: 00000000
Programming failed
Any advice please ?
Thanks in advance
Ambrogio
I forgot to tell that the PICKIT_3 works well when programming the pic18F252.
>> it seems to me that the PICKIT_ 3 is loading the BOOTloader when the device is changed from PIC18 to PIC12F675...
How to inhibit it ?
Thanks
Ambrogio
You can't. Different device families needs different things from the PICKit3 and it doesn't have enough memory on board to remember it all. So when you switch families (or switch software from which you "run" the PICKit3) it needs to have a different fimrware image loaded.it seems to me that the PICKIT_ 3 is loading the BOOTloader when the device is changed from PIC18 to PIC12F675...
How to inhibit it ?
There's an issue with using the internal oscillator AND GP3 as IO at the same time. The issue is that as soon as power is applied the internal oscillator starts and sets the IO pins up which now prevents the PK3 from "accessing" it in order to enter programming mode. IF you're supplying power to the device externally then try disconnecting that and power the device directly from the PICKit3, if you're running the standalone application for the PICKit3 look for the Vpp before Vdd setting and enable that (if there is one, I don't remember).
If you spend 5 minutes with Google you'll find threads on several forums (including this one) which discusses the issue. For example, here's one
Bookmarks