Please allow me to get the setup info out of the way.
PIC 10F206 genuine from Microchip directly.
Picket 2 ( has the OSCCAL auto-regeneration )
very simple flash test hex file
PICBASIC PRO 3 compiler
the code
*************************************
BLUE var GPIO.0
WHT var GPIO.1
Main:
high WHT
pause 100
low WHT
pause 100
high WHT
pause 100
low WHT
pause 250
high BLUE
pause 100
low BLUE
pause 100
high BLUE
pause 100
low BLUE
pause 250
goto main
*************************************
When I compile and load the hex file nothing happens.
Pickit2 VDD ON and MCLR off (unchecked)
If I run the auto OSCCAL regeneration routine and then reload the hex file it runs.
Turn off VDD and then back on, the program does not startup.
If I MANUALLY enter the OSCCAL value, load the hex file, no run.
Do the auto regen routine, load the hex, it works.
I tried two similar hex programs, same results.
There seems to be some state the PIC is left in after the auto OSCCAL routine which allows the program to
start after loading the hex file. VDD MUST BE ON WHEN WRITING TO THE PIC. If you fail to have it on during the
program writing, turning it on afterwards will not work. But once you perform that auto-regenerate routine, and the VDD is on,
you can load either hex test file and it will run. You cannot turn VDD off and then back on, or it will stop running.
Connecting the PIC to an external power source yields the same result as turning VDD off then back on, it doesn't run.
The OSCCAL value does not change after running the auto-regenerate routine. Mine is 0C14
The config is 0008.
Wisdom please.
Bookmarks