bootloader and USB Connection

General discussion on mikroC.
Author
Message
phil31
Posts: 348
Joined: 02 Apr 2009 15:02
Location: France
Contact:

Re: bootloader and USB Connection

#16 Post by phil31 » 31 May 2010 16:31

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

phil31
Posts: 348
Joined: 02 Apr 2009 15:02
Location: France
Contact:

Re: bootloader and USB Connection

#17 Post by phil31 » 31 May 2010 16:41

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

w7ami
Posts: 111
Joined: 21 Aug 2008 00:08
Location: Idaho

Re: bootloader and USB Connection

#18 Post by w7ami » 31 May 2010 16:53

Yes, I use interrupts in my code. They drive the entire program. USB I/O, blinking LEDs, Servos, scanned switch matrix. You name it.

phil31
Posts: 348
Joined: 02 Apr 2009 15:02
Location: France
Contact:

Re: bootloader and USB Connection

#19 Post by phil31 » 31 May 2010 17:50

and for which CPU this MLK ?

thanks

w7ami
Posts: 111
Joined: 21 Aug 2008 00:08
Location: Idaho

Re: bootloader and USB Connection

#20 Post by w7ami » 31 May 2010 18:13

PIC18F4550. I haven't tried this with any other PIC so you may have to adjust it to work with yours..

phil31
Posts: 348
Joined: 02 Apr 2009 15:02
Location: France
Contact:

Re: bootloader and USB Connection

#21 Post by phil31 » 31 May 2010 23:06

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

sakender
Posts: 15
Joined: 29 Aug 2009 08:31

Re: bootloader and USB Connection

#22 Post by sakender » 15 Sep 2010 13:01

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

User avatar
slavisa.zlatanovic
mikroElektronika team
Posts: 1321
Joined: 07 Apr 2009 09:39

Re: bootloader and USB Connection

#23 Post by slavisa.zlatanovic » 17 Sep 2010 14:42

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 2329 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/
Best regards
Slavisa

Post Reply

Return to “mikroC General”