Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Pins availables to program PIC18F452

Status
Not open for further replies.

ZERS

New Member
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
 

Attachments

  • controller_156.jpg
    controller_156.jpg
    97 KB · Views: 1,614
ZERS said:
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 https://www.microchipc.com/PIC18bootload/ for information on bootloaders.
 
Nigel Goodwin said:
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 ?

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

Regards
 
ZERS said:
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.

Nigel Goodwin said:
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.
 
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 :oops:
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
 
ZERS said:
By the way, I did not really understand the difference (in terms of circuit) between a bootloader and a simpler programmer :oops:
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.
 
Nigel Goodwin said:
ZERS said:
By the way, I did not really understand the difference (in terms of circuit) between a bootloader and a simpler programmer :oops:
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
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top