2011-03-29, 02:12:58
(2011-03-28, 22:02:02)Mikael Gustafsson Wrote: The configs look pretty good. You cold disable fail safe clock monitoring because you only have one clock source.
If you look in the data sheet you will see that the internal oscillator defaults to 500kHz on start-up. You will need to configure the osccon register to make it operate at 16MHz.
There is a template in ds30loader.asm for osccon configuration.
You're right with the default frequency, 500kHz.
For setting the oscillator to 16MHz with my current options:
Code:
banksel OSCCON
movlw 0x79
I'm still at the same point though, where the bootloader is not found. The code compiles fine, and the programmer does program without errors with the programming fuse option on. after programming, I turn the device off, open up ds30 loader and set the proper options (proper port and 9600 baud for now, same as with the bootloader code), turn the device on and then (within 3 seconds) click on the find bl button. I keep getting the timeout.
I'm goign with plain settings meaning a low baud rate of 9600, and the cpu at 500khz to limit the changes to the project for the moment.
I'll start back from a fresh file and all, although I haven't made much changes. I am pretty confident that your response had the answer to my problem, but something else must be happening.