Electronic Components Datasheet Search |
|
AN1302 Datasheet(PDF) 4 Page - Microchip Technology |
|
AN1302 Datasheet(HTML) 4 Page - Microchip Technology |
4 / 8 page AN1302 DS01302A-page 4 2009 Microchip Technology Inc. FIRMWARE FUNCTION DESCRIPTIONS Among the functions of the bootloader firmware, some of them are more important: do_i2c_tasks : This function services all the I2C related events. The event decoding is based on the SSPIF flag and the SSPSTAT register. flash_memory read : This function takes a 16-bit value as a address parameter and returns the data read from Flash memory at the specified location. flash_memory_write : This function has two param- eters. The first one is a 16-bit value as an Address Pointer. Please note that the address must be properly aligned to an 8 word boundary. The second parameter is a pointer to buffer containing the data being written. It does not return any value (void). flash_memory_erase : Performs an erase operation starting with the address specified as a parameter. 32 instruction words are erased in a row and the specified address must be aligned to a 32 word boundary. service_isr : This function performs the interrupt for- warding feature. It is implemented as a GOTO instruc- tion. For more information see the following section. INTERRUPT FORWARDING The PIC16F1XXX enhanced core has the interrupt vec- tor at 0x0004. This address is located in the area where the bootloader firmware is located. To maintain the interrupt functionality it is required that the Interrupt Service Routine (ISR) be relocated at a different address, in the application segment. In the bootloader code, at the interrupt vector location ( 0x0004), a GOTO instruction is present. The Interrupt Service Routine is contained in the application code. The application code is shifted by 0x200, leaving room for the bootloader in the lower part of the Flash memory. It will also contain the Interrupt Service Routine at 0x0204. The boot- loader code will contain a "GOTO 0x0204" instruction. When an interrupt occurs, the program counter ( PC) jumps to 0x0004 in the bootloader segment. At this address, the "GOTO 0x0204" instruction will cause the PC to jump to 0x0204 in the application segment, where the Interrupt Service Routine is located (see Figure 1). Please notice that the PIC16F1XXX enhanced core features Automatic Context Saving. The interrupt latency will be increased by the GOTO instruction execution time. See the example demo application(s) for more details. MULTIPROCESSOR SYSTEM Since the proposed bootloader uses a standard I2C protocol, the target microcontroller can be interfaced with a larger microcontroller having more processing power (such as a main processor in a multiprocessor system). Several such devices can be connected in parallel on the I2C bus, each slave device having its own address (see Figure 2). FIGURE 2: MULTIPLE SLAVE DEVICES CONNECTED TO THE SAME BUS |
Similar Part No. - AN1302 |
|
Similar Description - AN1302 |
|
|
Link URL |
Privacy Policy |
ALLDATASHEET.NET |
Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
Family Site : ic2ic.com |
icmetro.com |