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
 
Thread Tools Display Modes
Old 14th January 2005, 11:52 AM   (permalink)
Default Pins availables to program PIC18F452

Hi all,

I was wondering if the attached schematic is correct to program th e PIC18F452 'in situ'.

I've got a PIC programmer but I want to be able to re-program the PIC when it will be in position into my CD player.

The "programming" circuit is made of :
1-MAX232 to connect the DB9F cable, coming from my PC
2- The max232A is linked to the pic as follows :
- TX to RC6 (pin 26 of the PIC)
- RX to RC7 (pin 27) and RB6 (pin 39)

Is it correct ?

regards
Attached Images
File Type: jpg controller_156.jpg (97.0 KB, 438 views)
__________________
It\'s better to burn out than to fade away
ZERS is offline   Reply With Quote
Old 14th January 2005, 12:14 PM   (permalink)
Default Re: Pins availables to program PIC18F452

Quote:
Originally Posted by ZERS
Hi all,

I was wondering if the attached schematic is correct to program th e PIC18F452 'in situ'.

I've got a PIC programmer but I want to be able to re-program the PIC when it will be in position into my CD player.

The "programming" circuit is made of :
1-MAX232 to connect the DB9F cable, coming from my PC
2- The max232A is linked to the pic as follows :
- TX to RC6 (pin 26 of the PIC)
- RX to RC7 (pin 27) and RB6 (pin 39)

Is it correct ?

regards
I'm presuming this is for using a 'bootloader'?, and not for using a programmer?, if so the chip needs to be programmed with the bootloader code before fitting it in the circuit.

I don't see what the connection to RB6 is for?.

Have a look at http://www.microchipc.com/PIC18bootload/ for information on bootloaders.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline   Reply With Quote
Old 14th January 2005, 12:41 PM   (permalink)
Default Re: Pins availables to program PIC18F452

Quote:
Originally Posted by Nigel Goodwin
I'm presuming this is for using a 'bootloader'?, and not for using a programmer?, if so the chip needs to be programmed with the bootloader code before fitting it in the circuit.
Might be that's why I'm talking about.

Let me explain :
The PIC is used to control a DIY CD PLAYER.

Firstly, the pic will be programmed using a programmer and MAPLAB "outside" the CD PLAYER.
Then the PIC will be placed in the controller board of the player.
That could be a "bootoader" but the size of the program might be big. Does a bootloader support this ?

Quote:
Originally Posted by Nigel Goodwin
I don't see what the connection to RB6 is for?.
That's my problem. What's the good schematic ?

Regards
__________________
It\'s better to burn out than to fade away
ZERS is offline   Reply With Quote
Old 14th January 2005, 02:29 PM   (permalink)
Default Re: Pins availables to program PIC18F452

Quote:
Originally Posted by ZERS
Firstly, the pic will be programmed using a programmer and MAPLAB "outside" the CD PLAYER.
Then the PIC will be placed in the controller board of the player.
That could be a "bootoader" but the size of the program might be big. Does a bootloader support this ?
Bootloaders are usually under 256 bytes, although I've only used 16Fxxx ones.

Quote:

Quote:
Originally Posted by Nigel Goodwin
I don't see what the connection to RB6 is for?.
That's my problem. What's the good schematic ?
Try the link I posted above, it tells you everything you need to know, and provides all the software.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline   Reply With Quote
Old 14th January 2005, 02:33 PM   (permalink)
Default

thanks nigel, I've visited the link above and everything is OK, excepted the crystal frequency.

I will amend my code to deal with 20Mhz..

By the way, I did not really understand the difference (in terms of circuit) between a bootloader and a simpler programmer ops:
Could you please explain in short terms ?


As far as the code is concerned, the application code must be located in a specific part of the memory. Adding such an instruction to the application code is not a real issue..

Regards
__________________
It\'s better to burn out than to fade away
ZERS is offline   Reply With Quote
Old 14th January 2005, 02:40 PM   (permalink)
Default

Quote:
Originally Posted by ZERS
By the way, I did not really understand the difference (in terms of circuit) between a bootloader and a simpler programmer ops:
Could you please explain in short terms ?
Again, that website probably explains it all!.

But basically a programmer runs software which writes to the target chip, the target chip doesn't run (and mustn't run) during this process.

A bootloader runs in the target chip, it receives a simple RS232 file from the computer, so the computer doesn't run any programming software, it's all in the target chip.

When you buy a PIC it's blank, so the only way to get code in it is to use a programmer, you can then load a bootloader into it, and use a serial port bootloader transfer after that.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline   Reply With Quote
Old 17th January 2005, 07:52 AM   (permalink)
Default

Quote:
Originally Posted by Nigel Goodwin
Quote:
Originally Posted by ZERS
By the way, I did not really understand the difference (in terms of circuit) between a bootloader and a simpler programmer ops:
Could you please explain in short terms ?
Again, that website probably explains it all!.

But basically a programmer runs software which writes to the target chip, the target chip doesn't run (and mustn't run) during this process.

A bootloader runs in the target chip, it receives a simple RS232 file from the computer, so the computer doesn't run any programming software, it's all in the target chip.

When you buy a PIC it's blank, so the only way to get code in it is to use a programmer, you can then load a bootloader into it, and use a serial port bootloader transfer after that.

thanks, it is clear now...

Will look into the bootloader above.

Regards
__________________
It\'s better to burn out than to fade away
ZERS is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes




All times are GMT. The time now is 05:14 AM.


Electronic Circuits  |  Electronics Wiki
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.