You will pause for 2000 if you keep the 2nd PAUSE.
Robert
You will pause for 2000 if you keep the 2nd PAUSE.
Robert
Yes, but the LED on PORTA.1 is blinking faster than that.
If I set PAUSE 5000 the LED blinks around every second so there must be something wrong with the speed of the PIC.
Then there most likely is something wrong with CONFIG1 settings.
Robert
Edit: Last time I used USB on an 18F2550, I think I had to use 48 MHz.
If you have an 8 MHz oscillator, then CONFIG1 has to be set accordingly.
Last edited by Demon; - 1st June 2014 at 15:11.
I only use the USB for loading the program. so I don´t care if the USB not working in my PBP program.
EDIT.
Maybe the bootloader don´t allows me to change Configs from my PBP program?
I changed the DEFINE OSC 8 to DEFINE OSC 48 and now the pause times is OK and the Serin/Serout also works so I assume that I with this bootloader I can only run my PBP program at 48Mhz?
Last edited by Fredrick; - 1st June 2014 at 16:00.
You are dealing with a PLL chip read this post.
http://www.picbasic.co.uk/forum/showthread.php?t=18498
look at your config section and you will find the settings for pll.
for more info search for pll and if you understand it you can possibly explain it to me.
Obviously Henrik understands it! amongst others.
Last edited by EarlyBird2; - 1st June 2014 at 19:11.
Steve Earl www.datageo.co.uk
The board is designed for USB applications, hence the need for 48MHz.
It's "possible" the bootloader overrides the CONFIGs, just like we can with a programmer (never used bootloader).
Robert
That's correct. It's the bootloader that contains the CONFIG. When you download your PBP program using the bootloader then the CONFIG contained in your "download" will not be used. Exactly how it works may differ from bootloader to bootloader but basically the CONFIG is part of the bootloader and the bootloader protects itself from being overwritten.Maybe the bootloader don´t allows me to change Configs from my PBP program?
Had you been allowed to change the CONFIG via the bootloader then you could possibly set it to such a state the bootloader, which of course is just another piece of code in the PIC, wouldn't run as intended and you end up with a bricked PIC needing to be reprogrammed with a device programmer.
/Henrik.
Haven't found a thread with 18F2550 with 8MHz crystal and USB (I'm assuming the end goal is to use USB feature).
Some reading on PLL:
http://www.picbasic.co.uk/forum/showthread.php?t=4333
Robert
Just to clarify, DEFINE OSC setting does not have to match external oscillator. By adjusting CONFIG1 you can use a 8MHz crystal and have the PIC run at 48MHz for USB.
Robert
Bookmarks