DataSheet.es    


PDF TB025 Data sheet ( Hoja de datos )

Número de pieza TB025
Descripción Microcontrollers
Fabricantes Microchip Technology 
Logotipo Microchip Technology Logotipo



Hay una vista previa y un enlace de descarga de TB025 (archivo pdf) en la parte inferior de esta página.


Total 8 Páginas

No Preview Available ! TB025 Hoja de datos, Descripción, Manual

M
TB025
Downloading HEX Files to PIC16F87X PICmicro® Microcontrollers
Author: Rodger Richey
Microchip Technology Inc.
INTRODUCTION
www.DataSheet4U.com
The release of the PIC16F87X devices introduces the
first mid-range family of devices from Microchip Tech-
nology that has the capability to read and write to inter-
nal program memory. This family has FLASH-based
program memory, SRAM data memory and EEPROM
data memory. The FLASH program memory allows for
a truly reprogrammable system. Table 1 shows the fea-
tures of the PIC16F87X family of devices.
TABLE 1
PIC16F87X FAMILY FEATURES
ACCESSING MEMORY
The read and write operations are controlled by a set of
Special Function Registers (SFRs). There are six
SFRs required to access the FLASH program memory:
• EECON1
• EECON2
• EEDATA
• EEDATH
• EEADR
• EEADRH
The registers EEADRH:EEADR holds the 12-bit address
required to access a location in the 8K words of pro-
gram memory. The registers EEDATH:EEDATA are used
to hold the data values. When reading program mem-
ory, the EEPGD bit (EECON1<7>) must be set to indicate
to the microcontroller that the operation is going to be
on program memory. If the bit is cleared, the operation
will be performed on data memory at the address
pointed to by EEADR. The EEDATA register will hold the
data. The EECON1 register also has bits for write enable
and to initiate the read or write operation. There is also
a bit to indicate a write error has occurred, possibly due
to a reset condition happening while a write operation
is in progress. Figure 1 shows the register map for
EECON1.
The EECON2 register is not a physical register. Reading
it will result in all '0's. This register is used exclusively
in the EEPROM and FLASH write sequences. Listing 1
shows the code snippet to initiate a write operation on
the PIC16F87X devices.
Key Features
Operating Frequency
Resets
Flash Prog Memory (14-bit words)
Data Memory (bytes)
EEPROM Data Memory
Interrupts
I/O Ports
Timers
Capture/Compare/PWM modules
Serial Communications
Parallel Communications
10-bit Analog-to-Digital Module
PIC16F873
DC - 20 MHz
POR, BOR
4K
192
128
13
Ports A,B,C
3
2
MSSP, USART
5 input channels
PIC16F874
DC - 20 MHz
POR, BOR
4K
192
128
14
Ports A,B,C,D,E
3
2
MSSP, USART
PSP
8 input channels
PIC16F876
DC - 20 MHz
POR, BOR
8K
368
256
13
Ports A,B,C
3
2
MSSP, USART
5 input channels
PIC16F877
DC - 20 MHz
POR, BOR
8K
368
256
14
Ports A,B,C,D,E
3
2
MSSP, USART
PSP
8 input channels
© 1998 Microchip Technology Inc.
DS91025A-page 1

1 page




TB025 pdf
TB025
nop
bcf
www.DataSheet4U.com
banksel
bsf
bsf
bcf
nop
movf
subwf
btfss
retlw
movf
subwf
btfss
retlw
incf
btfsc
incf
decf
goto
DRCkChecksum
call
addwf
btfss
retlw
goto
EndOfFileRec
decf
btfss
goto
call
addwf
btfss
retlw
retlw
EECON1,WREN
EECON1
EECON1,EEPGD
EECON1,RD
STATUS,RP0
EEDATH,W
HexDataH,W
STATUS,Z
0xff
EEDATA,W
HexDataL,W
STATUS,Z
0xff
AddrL,F
STATUS,Z
AddrH,F
ByteCount,F
DRLoop
GetHex8
LineChecksum,W
STATUS,Z
1
DCStart
RecType,W
STATUS,Z
DCStart
GetHex8
LineChecksum,W
STATUS,Z
1
0
;Disable writes
;Read sequence
;Set EEPGD to indicate program memory
;Enable reads from memory
;Compare memory value to HexDataH:HexDataL
;If upper byte not equal, return FFh
; to indicate programming failure
;If lower byte not equal, return FFh
; to indicate programming failure
;Increment address for next iteration
;Decrement byte count
;Go back to check for ByteCount = 0
;Checksum verification
;Read in checksum
;Add to calculated checksum
;Result should be 0
; If not return 1 to indicate checksum fail
;Do it again
;End of File record (01h)
;If EOF record, decrement should = 0
;Not valid record type, wait for next :
;Read in checksum
;Add to calculated checksum
;Result should be 0
; If not return 1 to indicate checksum fail
;Otherwise return 0 to indicate success
GetByte
; Insert your code here to retrieve a byte of data from
; the desired interface. In this case it is the USART on F877.
;clear CTS
; banksel PIR1
;GH4Waitbtfss
PIR1,RCIF
; goto GH4Wait
;set CTS
nop
banksel
RCREG
movf
RCREG,W
return
GetHex8
call
call
movwf
swapf
GetByte
ASCII2Hex
Temp
Temp,F
;This function uses the USART
;Read a character from the USART
;Convert the character to binary
;Store result in high nibble
call
call
iorwf
movf
return
GetByte
ASCII2Hex
Temp,F
Temp,W
;Read a character from the USART
;Convert the character to binary
;Store result in low nibble
;Move result into WREG
© 1998 Microchip Technology Inc.
DS91025A-page 5

5 Page










PáginasTotal 8 Páginas
PDF Descargar[ Datasheet TB025.PDF ]




Hoja de datos destacado

Número de piezaDescripciónFabricantes
TB0213AIF SAW Filter Low Loss 70MHzGolledge
Golledge
TB0213A(TB0xxxA) SAW FiltersGSIF
GSIF
TB0213ALow Loss 70MHz IF SAW FilterTAI-SAW Technology
TAI-SAW Technology
TB025MicrocontrollersMicrochip Technology
Microchip Technology

Número de piezaDescripciónFabricantes
SLA6805M

High Voltage 3 phase Motor Driver IC.

Sanken
Sanken
SDC1742

12- and 14-Bit Hybrid Synchro / Resolver-to-Digital Converters.

Analog Devices
Analog Devices


DataSheet.es es una pagina web que funciona como un repositorio de manuales o hoja de datos de muchos de los productos más populares,
permitiéndote verlos en linea o descargarlos en PDF.


DataSheet.es    |   2020   |  Privacy Policy  |  Contacto  |  Buscar