How are you setting the WDT postscaler to 128?
How are you setting the WDT postscaler to 128?
The watchdog timer postscaler & on/off options are configuration options. These are set at
program time.
PBP allows you to DEFINE pretty much anything without throwing an error, but that doesn't
mean your defines are doing anything.
If you're using the older version Microchip USB boot-loader firmware, these are set in the C
code.
You can open the loader .HEX file with your programmer, change WDTPS from 32768 to 128Code:#pragma config WDT = OFF #pragma config WDTPS = 32768
then save the .HEX file & re-program your 4550 with the modified loader firmware. Then you
will have a postscaler of 128. I would leave WDT=OFF, and use the software enable option
WDTCON.0=1.
You'll also want to use DEFINE OSC 48 so PBP will use the correct timing. Without defining
the osc speed PBP defaults to 4MHz.
Thank you Bruce!
So, this means that you can not override them later with your running program?
The date for the "USB Device - HID - HID Bootloader - C18 - PIC18F4450.hex" is 19.6.2008. I opened the zip-file maybe 1,5-2 month ago.If you're using the older version Microchip USB boot-loader firmware, these are set in the C code.
I don't grasp this. How can I see or found WDTPS in a .HEX file?You can open the loader .HEX file with your programmer, change WDTPS from 32768 to 128 then save the .HEX file & re-program your 4550 with the modified loader firmware. Then you will have a postscaler of 128. I would leave WDT=OFF, and use the software enable option WDTCON.0=1.Code:#pragma config WDT = OFF #pragma config WDTPS = 32768
My program has DEFINE OSC 48, so that can not be the reason for this sleep-error.You'll also want to use DEFINE OSC 48 so PBP will use the correct timing. Without defining the osc speed PBP defaults to 4MHz.
Some 18F parts allow you to change config settings at run-time, but I wouldn't advise trying this until you're a bit more familiar with how to set them & what they all do. If you're using a boot-loader, you'll need to know every setting the loader expects, or you may end up doing a lot of loader firmware re-programming. If you search here for modifying config settings on-the-fly you'll find a couple routines showing you how.So, this means that you can not override them later with your running program?
You probably have the latest version then.[The date for the "USB Device - HID - HID Bootloader - C18 - PIC18F4450.hex" is 19.6.2008. I opened the zip-file maybe 1,5-2 month ago.
Easy. Open the loader .HEX file with your programmers software. Change it, save the .HEX file, and re-program the loader into your PIC.I don't grasp this. How can I see or found WDTPS in a .HEX file?
OK. It wasn't shown in the example you posted. Note this won't have anything to do with the WDT or sleep error. Only timing for PBP commands.My program has DEFINE OSC 48, so that can not be the reason for this sleep-error.
If your programmers software doesn't allow you to read a .HEX file and make changes to config settings, then you can re-compile the loader firmware with the free version of C18.
Or I can send you a modified version .HEX file if you need it.
What USB board are you using?
YESSSSS!
With meProg of course you can change such things, of course. I have just used for "so long time" now only the bootloader so I forgot the meProg.
Sleep works and NAP works also even that the manual does not confirm that.
What is USB board (melabs U2?) or what ? or 4550? or...What USB board are you using?![]()
Just curious if you were using a USB development board.What is USB board (melabs U2?) or what ? or 4550? or...
Did you get it working?
Bookmarks