electronics forum

Rules | Recent posts | topic RSS | Search | Register  | Log in

How the Programs in stored in Microcontrollers


Post new topic  Reply to topic    EDAboard.com Forum Index -> Embedded Systems and Real-Time OS -> How the Programs in stored in Microcontrollers
Author Message
Prabakaran



Joined: 22 Jan 2007
Posts: 160
Helped: 5
Location: Chennai(India)


Post12 Mar 2007 14:25   

How the Programs in stored in Microcontrollers


HI ALL
I HAVE A DOUBT REGARDING PROGRAMMING OF MICROCONTROLLERS. I KNOW THAT THE PROGRAMS DUMPED TO THE MICROCONTROLERS IS STORED IN FLASH MEMORY . THE SERIAL DOUNLOADING OF PROGRAM IN FORM OF HEX IS TRANSFERD TO MICRONTROLLER VIA RXD AND TXD.

HOW THE MICRONTROLLER DIFFERETIATE THAT COMMING HEX IS FOR PROGRAMMING THE MICRONTROLLER AND IS DIRECTLY MOVED TO FLASH MEMORY. THE SAME PIN IS USED FOR SEIAL INTTERUPT. COULD ANYONE CLEAR MY DOUBTS IT WOULD BE HELPFUL FOR MY REFRENCE.

THANKS
M.PRABAKARAN
Back to top
Jarik



Joined: 12 Mar 2007
Posts: 1


Post12 Mar 2007 18:36   

Re: How the Programs in stored in Microcontrollers


In HEX file information about addresses are stored. Each uController have own memory map with is know for compiler. Base on that during compilation compiler know what addresses belongs to FLASH memory area and locate to this area code of program. Other types (EEPROM) of memory if exists are filled by data.
Back to top
Google
AdSense
Google Adsense




Post12 Mar 2007 18:36   

Ads




Back to top
eltonjohn



Joined: 22 Feb 2002
Posts: 1751
Helped: 28


Post12 Mar 2007 18:54   

Re: How the Programs in stored in Microcontrollers


Not all the micros have a booloader to use the serial interface .Most of modern ones have a JTAG or ISP .interface ,,That's why they sell you a specific programmer.
Back to top
samport



Joined: 26 Aug 2005
Posts: 5


Post12 Mar 2007 19:15   

Re: How the Programs in stored in Microcontrollers


hello

First the program is converted to intel hex file or motorola s record file by the assembler or the compiler

then this file is transfered to the microcontroller flash by many ways

1- parallel programming like the AT89C51
2- in circuit serial programming (ISP) like PIC microcontrollers
3- using bootloader which is a small program on the target microcontroller
communicates with the PC with RS232,CAN bus or even Ethernet
4- using JTAG interface

some microcontrollers have one way like AT89C51 which can be programmed only in parallel way, some have all these methods like AVR manufatured by ATMEL

best regards

Samport
Back to top
Prabakaran



Joined: 22 Jan 2007
Posts: 160
Helped: 5
Location: Chennai(India)


Post13 Mar 2007 5:45   

How the Programs in stored in Microcontrollers


Jarik

Thanks jarik , Now i got cleared how the programs is stored .Can we find the address of the flash memory , and can we directly end the data to the microcontroller will it work if we do like that .If it possible will the program start running immediately after it downloaded it to controller.
Back to top
jhbbunch



Joined: 21 Feb 2006
Posts: 222
Helped: 16


Post18 Mar 2007 8:00   

Re: How the Programs in stored in Microcontrollers


Usually the micro is put into some kind of programming mode. With flash pic's it is with 13 votls being applied to the MCLR pin. Then data is clocked into the flash memory with a SPI interface. New generation pic's can rad and write prigram memory directly. This is useful for stroring constant data like strings and other values that won't change often, It makes the eeprom data memory redundant. Anyway, you can actually rewrite your program memory space if you know what you are doing. For example you could send instructions to the pic from the computer by USB or RS-232 or whatever. The pic jumps to a piece of code that takes data that has an address field and a data field and places that data into program memory, thereby changing it's programming. Once and end of data being downloaded condition is met the pic could jump to its reset vector, memory location 0 and start running the new program. This could even be done over the internet. I believe Microchip has an application note on it, but you'd have to check that out.
Back to top
Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
Post new topic  Reply to topic    EDAboard.com Forum Index -> Embedded Systems and Real-Time OS -> How the Programs in stored in Microcontrollers
Page 1 of 1 All times are GMT + 1 Hour
Similar topics:
How to free the buffer stored in XDATA memory (1)
How to uninstall the programs in Linux? (4)
Programs of book "BASIC for PIC microcontrollers" (8)
Using AT commnds How to Transfer Data stored in MMC card. (10)
c coding syntax error- how to send value stored in buffer? (1)
How to Send a Stored FAX to a FAX Machine? (4)
i need the cost of the programs (5)
how to install programs in linux (8)
how to uninstall programs on linux? (5)
How to analyze 2 programs in Xinlinx ISE5 (3)


Abuse || Administrator || Moderators || Support us || sitemap
topic RSS