Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

helllllllllllllllllllllllllllp pgming micro controller flash

Status
Not open for further replies.

mdeepamenon

Junior Member level 2
Junior Member level 2
Joined
Apr 13, 2006
Messages
24
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,497
how to program the flash memory of the mocrocontroller? please explain using any microcontroller .
 

Re: helllllllllllllllllllllllllllp pgming micro controller f

Hi
You should have a programmer board to be able to do this
Based om your MC, it will have its programmer

Thanks
 
Re: helllllllllllllllllllllllllllp pgming micro controller f

Each micro is different, so describing the process is not really meaningful.

consider the PICs. You put the part in programming mode, then send the data serially, then send a "start programming" command ( also serially) and the part does the programming internally. You just need to wait during this time (if not checking). When you are done programming, you can read out the data, again serially, to verify it.
But other micros are different. Take the 89C52 from Philips. They can be programmed in-cuircuit, using the internal bootloader, but they can also be programmed externally, sending the data parallel from a relatively conventional programmer. You have to have the oscillator running, since the micro does internally data transfers.

As you can see, things can be very different, so you should just check the datasheet/ programming document for your part.
 
Re: helllllllllllllllllllllllllllp pgming micro controller f

actually i want the micro controller to be programmed in circuit, in application. the flash memory need to be programmed. is it possible to do that?
what is the difference between the configuration data and the firmware?
 

Re: helllllllllllllllllllllllllllp pgming micro controller f

Hi
PIC microcontroller have in circuit programming option.
F/W is the code you write to do your job. While configuration data is a data written to configure the hardware resources of the microcontroller.

Thanks
haytham
 
Re: helllllllllllllllllllllllllllp pgming micro controller f

is it possible to write directly to the micro controller flash in the development board from PC?
in my application i have different sub applications. the sub applications are chosen with a pc. the code for different sub applications must be send to the micro controller only after choosing that particular application.
the code must be send to flash memory.
how is it possible?
 

Re: helllllllllllllllllllllllllllp pgming micro controller f

Yes, under the control of the micro that needs to update its FLASH.
Since the board is powered and running while you want the update to take place, it's best to use a bootloader in the micro that needs to have its FLASH updated. The bootloader can then write to the micro's own FLASH. To invoke the bootloader you need to send some special command or request.

If you are using PIC's (or any other part for that matter), make sure the part you have does support internal writes to the FLASH. Otherwise this approach will not work.

The communication between the part that sends the updated code and the micro that needs to update its FLASH can be done over SPI, I2C, parallel interface, etc.
 
Re: helllllllllllllllllllllllllllp pgming micro controller f

Hi Deepa,
Its exactly like mentioned in the above post, The bootloader is a program that occupies a small area of the flash of the PIC. In 18F452 that we had worked in its a 512 Byte Boot Block and it has to be write enabled by the configuration bytes of the bootloader program.
Burn the appropriate bootloader firmware on the PIC18F microcontroller . Unless the firmware is configured to use the internal oscillator, it is configured with HS oscillator type. You will want to change this if you don't plan to use a 4 MHz to 40 MHz crystal on pins OSC1 and OSC2. For PIC18F1x20, the Config bits can be set to use internal RC oscillator clock (as defined in CONFIG1H). It is highly recommended to clear the CPB and WRTB bits in CONFIG5H and CONFIG6H to code protect the boot sector (in this case, CONFIG6H and CONFIG6H should be set to 0xBF). The rest of the Config bits can be changed afterwards with the bootloader application.
Power on the PIC18F device. The first time the bootloader firmware runs, it stays in boot mode until it receives its first program.
If u have Hitide, the IDE from the Hitech C, u can get the Bootloader templetes from the language templetes. Make appropriate changes in the configuration bytes and burn it using proper application.
Once the bootloader is inside the PIC, u can send the subprogram using the serial interface and hyperterminal. Make sure u configure the protocol and the program should wait on the serial data till it is recieved
If u r also working in the Microchip PIC u can get the asm version of the bootloader from Microchip itself..
Just search the site..
Best of luck,..,
 
in application programming supports only some microcontrollers. for PIC's you have to use bootloader ( works with some like 16f87x series) or like AT89C51rdx series
 
Re: helllllllllllllllllllllllllllp pgming micro controller f

Question:

What does "In-Circuit" mean? I have started programming PIC(simple ones) but up to this point I haven't understood what in circuit means. Please explain ...

---thanks in advance---
xcircuit
 

Re: helllllllllllllllllllllllllllp pgming micro controller f

it means u program it while it is in the circuit
without taking it out
 

Write control register of the EEPROM, popularly
 
Re: helllllllllllllllllllllllllllp pgming micro controller f

hi,
just started programming PICs and for now, there are library functions to achieve the purpose. i use it for now. later on, as i get familiar with the PIC programming, i'll get the full details on writing and reading the flash. i advise the same.
 
Re: helllllllllllllllllllllllllllp pgming micro controller f

In-circuit programming means the chip can be installed on a board, but you can provide power to it and Vpp, as well as data and clock through another 2 lines and you program it that way. However, the power to the chip is usually supplied through a jumper, which is removed, so that you apply power to the chip you need to program only, not to the whole board.

Second, the Vpp usually has to be disconnected from the rest of the circuit (usually through another jumper) because you may not be able to apply 12~13V to whatever the Vpp is connected on that board. For instance, if you have a PIC, the /MCLR/Vpp pin may be connected to some reset circuit. Most likely that circuit cannot take 13V at its output.

Moreover, the clock and data lines of the chip must have either jumpers to separate them from the rest of teh circuit, or at least some resistors in series with them, such that when you drive them with the clock and data these signals do not have to drive whatever is normally connected to those lines on the board. Thus, the resistors act as "separators".

As you can see, in-circuit programming simply means that you have few signals to deal with (just 4, plus ground) and so they can be easily isolated and there are no other requirements, like the clock running at a certain frequency, etc.
Programming PICs in-circuit is something I do most of the time at work.

Now, in-circuit programming does not mean self-programming capability. All of the above meant you had to supply power, Vpp, clock and data from some external programmer, although the chip was already installed on the board. However, the chip did not need to know how to program itself, that was done by the external programmer.

Self-programming means the chip is installed, running, the whole board is running and the chip gets its data from some external chip or even an on-board chip and it programs itself, without the need for a Vpp and running at the voltage the whole board runs at. Self-programming means the chip has to know how to program itself, and that is the task of the bootloader. Usually, the bootloader has to READ the data from some device and write it to some register that ensures it gets transferred to the FLASH. Teh bootloader now controls how and where the data is written, as opposed to the external programmer.

Be sure the chip you are using can program itself. For example, a PIC16F877 can program itself, but a PIC16F84 cannot, although both are FLASH-based devices. Be sure to check.
 
Re: helllllllllllllllllllllllllllp pgming micro controller f

I will definitely recommend uControllers with ICSP.

Trust me, after sometime you will hate using External programmer during testing and development.

Start with ICSP/ICD, and then use Gang programmer in production.
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top