Page 2 of 2

Re: bootloader and USB Connection

Posted: 31 May 2010 16:31
by phil31
thanks terry, i will try it ..
this MLK is for which processor ?

but i don't understand .. you write x1008 and x1000 ..
are these the adress of the interrupts ( hig & low priority ) vectors ?
if yes, why it's not x1008 and x1018 ...?

Code: Select all

//ROM MEMORY for Boot Loader
#pragma    SetPage(PAGE0, 0x001008, 0x7FFF)    // <----- add only for boot loader version
#pragma    SetPage(PAGE1, 0x001000, 0x7FFF)    // <----- add only for boot loader version
and in the interrupts code, why it's not x8 and x18 ...?

Code: Select all

//INTERRUPTS
#pragma SetInterrupt(I0,0x000008,0)
#pragma SetInterrupt(I1,0x000000,1)

i will try it now, back in some minutes ..
thanks

Re: bootloader and USB Connection

Posted: 31 May 2010 16:41
by phil31
well i try this setting :

Code: Select all

//------------------------------------------------------ stuff for bootloader
//ROM MEMORY
//#pragma    SetRomSize(131071)
//#pragma   SetPage(PAGE0, 0x000008, 0x1FFFF)

//ROM MEMORY FOR USB BOOTLOADER
#pragma    SetRomSize(131071)
#pragma   SetPage(PAGE0, 0x001008, 0x1FFFF)
#pragma   SetPage(PAGE1, 0x001000, 0x1FFFF)

//INTERRUPTS
#pragma SetInterrupt(I0,0x000008,0)      // original setting
#pragma SetInterrupt(I1,0x000018,1)     // original setting

//INTERRUPTS FOR USB BOOTLOADER
//#pragma SetInterrupt(I0,0x001008,0)
//#pragma SetInterrupt(I1,0x001018,1)
//------------------------------------------------------

same result .. my test LED blink ONLY IF ALL interrupts are commented ..
if i add some interrupt sub routine ( even with only "nop" inside) or try to enable some interrupts ( INTCON register ), the test LED blink will not work any more ....

do you have already play with interrupts when you use bootloader ?

thanks

Re: bootloader and USB Connection

Posted: 31 May 2010 16:53
by w7ami
Yes, I use interrupts in my code. They drive the entire program. USB I/O, blinking LEDs, Servos, scanned switch matrix. You name it.

Re: bootloader and USB Connection

Posted: 31 May 2010 17:50
by phil31
and for which CPU this MLK ?

thanks

Re: bootloader and USB Connection

Posted: 31 May 2010 18:13
by w7ami
PIC18F4550. I haven't tried this with any other PIC so you may have to adjust it to work with yours..

Re: bootloader and USB Connection

Posted: 31 May 2010 23:06
by phil31
Please Terry,

can you share us a succesful compiled program with interrupts and configured to be upload by the bootloader ? just the ASM file ..
i would like see how the assembler work .

thanks

Re: bootloader and USB Connection

Posted: 15 Sep 2010 13:01
by sakender
Hi dear

i have some problem regarding bootloader and usb connecton, i have successful make a usb connection but now problem is that if we want to update our code or firmware in the filed then we have to require programmer that why we want to use boot loader option ,i haven't so much information regarding bootloader but it seems to solve our problem ,so plz help
what kind of hex file is to burn,We are using USB HID interface so i thinks we require HIDbootloader
plz help me
thanks

Re: bootloader and USB Connection

Posted: 17 Sep 2010 14:42
by slavisa.zlatanovic
Hi!

We strongly encourage our users to switch to mikroC PRO for PIC version because non-PRO version is an ancestor of PRO compiler
and is no longer being developed. Every new feature, improvement and bug fix will only affect new versions of PRO compilers.
If you're a registered user you'll receive PRO license key free of charge.
See the migration document for more details:
Migration_document.PNG
Migration_document.PNG (15.87 KiB) Viewed 2393 times
Currently, we don't provide HID Bootloader but it is in our near future plans to provide one.
For the time being you could use Bootloaders distributed with our compilers:
...\Program Files\Mikroelektronika\mikroC PRO for PIC\Examples\Other\Bootloader\

together with the USB UART Boards:
http://www.mikroe.com/eng/products/view ... rt-boards/
http://www.mikroe.com/eng/products/view ... t-2-board/