Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Tools
Old 1st December 2008, 02:40 PM   #1
Default Bootloaders

I know you can use boot loaders to load/upgrade a new program into the pic from like USART/USB but can you load it off External EEPROM chip or SD card? Like would it be possible instead of it checking taking the new program in automatically i can hold a button down on starup and have it load the new data from a sd card and then program itself and afterward still use data off the SD to load info.

I was thinking of testing on a PIC18F452 or PIC18F4620
AtomSoft is online now  
Old 1st December 2008, 03:53 PM   #2
Default

A bootloader could be programmed to pull the hex data from almost anywhere you like...

Mike
Mike, K8LH is offline  
Old 1st December 2008, 04:17 PM   #3
Default

As above - just have the bootloader software in your PIC which pulls the data from the SD card and copies it into its program memory.
picbits is offline  
Old 1st December 2008, 05:32 PM   #4
Default

awsome. ok cool. I think using something like this would make upgrading a product easy and as simple as drag n drop hex on card and place card connected to PIC and done!
AtomSoft is online now  
Old 1st December 2008, 09:34 PM   #5
Default

Yes a bootloader can take the data from nearly anything from a COM port to a SD card to the internet.

I saw the propeller video demo board has a nice bootloder. It displays all the programs found on a SD card on a TV or monitor connected to the video port and you can select what program to run using the buttons.
__________________
Il give you shocking experience.
Someone Electro is offline  
Old 1st December 2008, 09:38 PM   #6
Default

Cool! I was just woundering. I understand the concept somewhat of what needs to be done but. No one ever mentioned how to make the HEX to upload. Like once you setup the boot-loader how do you create the hex file to upload to it? Is it just a normal program like hex created by MPLAB just without the bootloader? Like if i made a bootloader and then have it on the pic.

Would i just make the program or main code next like normal with no bootloader code and just send it to it via bootloader?
AtomSoft is online now  
Old 2nd December 2008, 12:49 AM   #7
Default

Quote:
Originally Posted by AtomSoft View Post
Cool! I was just woundering. I understand the concept somewhat of what needs to be done but. No one ever mentioned how to make the HEX to upload. Like once you setup the boot-loader how do you create the hex file to upload to it? Is it just a normal program like hex created by MPLAB just without the bootloader? Like if i made a bootloader and then have it on the pic.

Would i just make the program or main code next like normal with no bootloader code and just send it to it via bootloader?
It's just the normal hex file. It would be really dumb to require a special, different hex file just for bootloaders. It's just software.

Try a ready made bootloader for a while before writing your own. You'll understand better what you need then.
__________________
=========================
Futz's Microcontrollers & Robotics
=========================
futz is offline  
Old 2nd December 2008, 01:10 AM   #8
Default

ok so i load a ready made bootloader then i write my own normal code and upload the normal code to the pic via bootloader?

Can you recommend some bootloader i would prefer in C please. Whether its in CSS, C18 or any other C (not Mikro tho) im sure i can port over.
AtomSoft is online now  
Old 2nd December 2008, 01:52 AM   #9
Default

Quote:
Originally Posted by AtomSoft View Post
ok so i load a ready made bootloader then i write my own normal code and upload the normal code to the pic via bootloader?

Can you recommend some bootloader i would prefer in C please. Whether its in CSS, C18 or any other C (not Mikro tho) im sure i can port over.
Doesn't Microchip have one? Thought I heard of one from them. I could be wrong. Anyway, Google for it.
__________________
=========================
Futz's Microcontrollers & Robotics
=========================
futz is offline  
Old 2nd December 2008, 02:21 AM   #10
Default

The USB bitwacker uses one as does the PICkit2.
__________________
Please post questions to the forums. PM's are for personal communication.

BCHS/3v0's Tutorials
Junebug USB PIC programmer kit., USB Bit Whacker,
The 15 Minute Printed Circuit Board! (+drill time)
3v0 is offline  
Old 2nd December 2008, 12:02 PM   #11
Default

I was afraid of the USB one because i might get lost in the code since its mixed with so many things to run the USB. So i wanted to start with a non-usb one. This way i can learn how it works better.

Futz. You are right "AN851" but its in ASM. And as you may think its like 3 pages long which would be a pain to convert to C; but since i seem to have no choice i guess i will.
AtomSoft is online now  
Old 2nd December 2008, 12:37 PM   #12
Default

Have a look here

Microchip PIC micros and C - source and sample code

I've not used the 18F one, but I've used the 16F version over the years, and found it excellent (and requires no extra pins to be used).
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 2nd December 2008, 12:42 PM   #13
Default

thx i downloaded it and will play now! i have like 5-6 18F1320s on hand
AtomSoft is online now  
Reply

Tags
bootloaders

Thread Tools
Display Modes


Similar
Title Starter Forum Replies Latest
Bootloaders Oznog Micro Controllers 4 2nd March 2005 01:34 PM
Bootloaders Zacman Micro Controllers 5 29th March 2004 01:25 AM



All times are GMT. The time now is 12:44 AM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker