PIC16F505T-I/ST Microchip Technology, PIC16F505T-I/ST Datasheet
PIC16F505T-I/ST
Specifications of PIC16F505T-I/ST
Related parts for PIC16F505T-I/ST
PIC16F505T-I/ST Summary of contents
Page 1
... Pin Diagrams PDIP, SOIC, TSSOP RB5/OSC1/CLKIN RB4/OSC2/CLKOUT RB3/MCLR/V RC5/T0CKI QFN RB5/OSC1/CLKIN RB4/OSC2/CLKOUT RB3/MCLR RC5/T0CKI 2010 Microchip Technology Inc. PIC16F505 1.1 Hardware Requirements The PIC16F505 requires one power supply for V one for 1.2 Program/Verify Mode The Program/Verify mode for the PIC16F505 allows ...
Page 2
... During Programming Pin Type Pin Description I Clock input – Schmitt Trigger input I/O Data input/output – Schmitt Trigger input (1) P Program Mode Select P Power Supply P Ground (see Table 6-1) needs to be applied to the MCLR input. PP Preliminary 2010 Microchip Technology Inc. ...
Page 3
... Configuration Word from the logical address within the hex file and translate the address to the proper physical location when programming. 2010 Microchip Technology Inc. FIGURE 2-1: 2.4 Oscillator Calibration Bits The oscillator Calibration bits are stored at the Reset vector as the operand of a MOVLW instruction ...
Page 4
... Figure 3-3. The commands that are available are described in Table 3-1. Mapping (MSb … LSb Preliminary 1) SET 1) times with respect to the falling edge 2 measured DLY DLY must be delayed. DIS Data 0, data (14 data (14 Externally Timed Internally Timed 0 1 2010 Microchip Technology Inc. 2 ...
Page 5
... MSbs of the 14-bit word will be read as ‘0’s. If the program memory is code-protected (CP = 0), portions of the program memory will be read as zeros. See Section 5.0 “Code Protection” for details. FIGURE 3-3: READ DATA FROM PROGRAM MEMORY COMMAND ICSPCLK ICSPDAT T 1 SET 2010 Microchip Technology Inc DLY LSb strt_bit ...
Page 6
... End PROG Programming command. This command programs the current location, no erase is performed. FIGURE 3-5: BEGIN PROGRAMMING (EXTERNALLY TIMED) 1 ICSPCLK 0 ICSPDAT DS41226G-page SET T 1 HLD SET HLD Preliminary 2 DLY Next Command 1 2 PROG End Programming Command 2010 Microchip Technology Inc. ...
Page 7
... Read and save 0x3FF oscillator Calibration bits and 0x404 backup OSCCAL bits into computer/ programmer temporary memory. 2. Enter Program/Verify mode set to Configuration Word address. 3. Perform a Bulk Erase Program Memory command. 4. Wait T to complete Bulk Erase. ERA 5. Restore OSCCAL bits. 2010 Microchip Technology Inc ...
Page 8
... Program Memory Space First User ID Location E Legend Erased Unaffected FIGURE 3-7: BULK ERASE PROGRAM MEMORY COMMAND 1 2 ICSPCLK 1 ICSPDAT T 1 SET T HLD DS41226G-page 8 Configuration Memory Space Configuration Reset Vector Word Preliminary Backup User ID OSCCAL ERA Next Command 1 2 2010 Microchip Technology Inc. ...
Page 9
... FIGURE 3-8: READING AND TEMPORARY SAVING OF THE OSCCAL CALIBRATION BITS Increment Address 2010 Microchip Technology Inc. Start Enter Programming Mode 0x404? Yes Read Backup OSCCAL Calibration Bits and Save in Computer/Programmer Temp. Memory Exit Programming Mode Done Preliminary PIC16F505 DS41226G-page 9 ...
Page 10
... Bits from Computer/Programmer Temp. Memory Write Calibration Bits back as the operand of a MOVLW instruction to 0x3FF 0x404? Yes Read Backup OSCCAL Calibration Bits from Computer/Programmer Temp. Memory Write Backup OSCCAL Bits back to 0x404 Exit Programming Mode Done Preliminary 2010 Microchip Technology Inc. ...
Page 11
... All Programming Address Locations Command Done? Yes Exit Programming Mode Restore OSCCAL bits ( Figure 3-9 Program Configuration Memory Figure 3-11 ( Done 2010 Microchip Technology Inc. ) Report No Programming Failure ) ) Preliminary PIC16F505 PROGRAM CYCLE Load Data for Program Memory Begin Programming Command ...
Page 12
... One-Word Programming Cycle (see Figure 3-10) DS41226G-page 12 Programs Configuration Word Report Programming Failure Programs User IDs Read Data Command Report Data No Programming Correct? Failure Yes Increment Address Command No Address = 0x404? Yes Exit Programming Mode Done Preliminary 2010 Microchip Technology Inc. ...
Page 13
... PROGRAM FLOWCHART – ERASE PROGRAM MEMORY, CONFIGURATION WORD Start Read and save OSCCAL bits Figure 3 Enter Program/Verify mode PC = 0x7FF (Config Word) 2010 Microchip Technology Inc. Bulk Erase Device Wait T ERA Restore OSCCAL Bits ( Figure 3-9 ) Exit Programming Mode Done Preliminary ...
Page 14
... WORD AND USER ID Start Increment PC DS41226G-page 14 Read and save OSCCAL bits Figure 3 Enter Program/Verify mode PC = 0x7FF (Config Word 0x400? (First User ID) Yes Bulk Erase Device OSCCAL bits Wait T ERA Exit Programming Preliminary Restore Figure 3 Mode Done 2010 Microchip Technology Inc. ...
Page 15
... HS oscillator 011 = EC oscillator with RB4 function on RB4/OSC2/CLKOUT 100 = INTOSC with RB4 function on RB4/OSC2/CLKOUT 101 = INTOSC with CLKOUT function on RB4/OSC2/CLKOUT 110 = EXTRC with RB4 function on RB4/OSC2/CLKOUT 111 = EXTRC with CLKOUT function on RB4/OSC2/CLKOUT 2010 Microchip Technology Inc. — — MCLRE CP WDTE U = Unimplemented bit, read as ‘ ...
Page 16
... The following table describes how to calculate the checksum for each device. Note: The depending on the code-protect setting. Memory The Configuration Word and ID locations can always be read regardless of the code-protect settings. code, the be issued. a hex file, user ID Preliminary checksum calculation differs 2010 Microchip Technology Inc. ...
Page 17
... For example, ID0 = 0x1, ID1 = 0x2, ID2 = 0x3, ID3 = 0x4, then SUM_ID = 0x1234. *Checksum = [Sum of all the individual expressions] MODULO [0xFFFF Addition & = Bitwise AND Note 1: Checksum shown assumes that SUM_ID contains the unprotected checksum. 2010 Microchip Technology Inc. (1) Checksum* Preliminary PIC16F505 0x723 at 0 ...
Page 18
... DD Preliminary 40°C A 4.5V V 5.5V DD Conditions/ Max. Units Comments 5.5 V 5.5 V 0.5 mA 0.5 mA 13.5 V 0.45 mA s 1.0 s — — — ns s — — ns — ns s — s — ( ( s — — ms 2010 Microchip Technology Inc. ...
Page 19
... REVISION HISTORY Revision G (02/2010) Revised Section 1.1; Added QFN pin diagram; Revised Note 1, Table 1-1; Revised Section 3.1, 1st para; Added Revision History. 2010 Microchip Technology Inc. Preliminary PIC16F505 DS41226G-page 19 ...
Page 20
... PIC16F505 NOTES: DS41226G-page 20 Preliminary 2010 Microchip Technology Inc. ...
Page 21
... PICtail, REAL ICE, rfLAB, Select Mode, Total Endurance, TSHARC, UniWinDriver, WiperLock and ZENA are trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. SQTP is a service mark of Microchip Technology Incorporated in the U.S.A. All other trademarks mentioned herein are property of their respective companies. ...
Page 22
... Taiwan - Kaohsiung Tel: 886-7-536-4818 Fax: 886-7-536-4803 Taiwan - Taipei Tel: 886-2-2500-6610 Fax: 886-2-2508-0102 Thailand - Bangkok Tel: 66-2-694-1351 Fax: 66-2-694-1350 Preliminary 2010 Microchip Technology Inc. EUROPE Austria - Wels Tel: 43-7242-2244-39 Fax: 43-7242-2244-393 Denmark - Copenhagen Tel: 45-4450-2828 Fax: 45-4485-2829 France - Paris Tel: 33-1-69-53-63-20 ...