Microsoft PowerPoint - PIC18F_39th設計競賽 [相容模式]

Size: px
Start display at page:

Download "Microsoft PowerPoint - PIC18F_39th設計競賽 [相容模式]"

Transcription

1 單晶片軟體設計講座 PIC18F4520 基礎課程 架構, 基本週邊及程式開發 Microchip Technology Taiwan Slide 1

2 開發 PIC18F4520 程式相關的 軟 / 硬體開發工具 使用軟體工具 ( 包含於 Microchip 產品 DVD 中 ) MPLAB IDE v8.xx ( 或更新版本 ) MPASM, MPLINK, MPLIB 使用硬體工具 MPLAB ICD2 Microchip APP001 Workshop Board (PIC18F4520 inside) APP026-3X 泛用型實驗板 + PIC18F4520 PIM Module 參考書籍 ( 可以從網站上下載 ) MPASM User s Guide with MPLINK and MPLIB (DS33014J) MPLAB IDE User ss Guide PIC18F4520 Data Sheet ( DS39631A ) Microchip Technology Taiwan Slide 2

3 包含於 Microchip 產品 DVD V4.0 Microchip Technology Taiwan Slide 3

4 PIC18F 系列 PIC18F4520 開發講座內容 PIC18F MCU 的架構 PIC18F MCU 主要周邊功能 開發工具介紹與使用 撰寫 PIC18 系列組合語言及參考資源 使用 MPLAB C18 於程式開發 Demo 1 : I/O 的操作 Demo 2 : 使用 Timer1 與中斷 Demo 3 : 使用 A/D 轉換器 Microchip Technology Taiwan Slide 4

5 新改良 PIC18Fxxxx ( 四碼 ) PIC18F4520 是廣泛使用的 40-Pin PIC18F 系列 MCU Extended Instruction Sets for C18 Compiler Efficiency Support nano-watt Technology 內建 31KHz ~ 8MHz 自由切換的 RC 震盪器 快速 RC 啟動模式 雙速啟動模式 系統時脈監視 / 故障切換功能 Low-Power Watch-Dog Timer Ultra Low-Power Wake-Up 省電模式 : Idle, Sleep Microchip Technology Taiwan Slide 5

6 PIC18Fxxxx Enhanced PICmicro MCU 的架構及主要特色 Microchip Technology Taiwan Slide 6

7 PIC18Fxxxx PIC18 系列 MCU 的主要特色 提供較多的指令 (77 個基本指令 ) 更大的程式與資料記憶體的定址能力 Program Memory : Up to 2M Bytes Data Memory : Up to 4K 程式記憶體使用線性排列方式存取 提供 Access Bank 設計觀念 內建 PLL 4 倍頻線路, 用 10Mhz 就得到 10 MIPs 的執行效 能 ( 100 ns 的指令執行時間 ) 有 8 * 8 的硬體乘法器 全系列提供 10 Bits 的 A/D 轉換器及 ICD 除錯功能 Microchip Technology Taiwan Slide 7

8 PIC18F4520 增加的功能 FLASH Program Memory 除了程式記憶體為 FLASH 外, CPU 可自我燒錄程式 10 萬次的寫入壽命 ICD Capability 支援 ICD 的介面 每個 CPU 都可視為一個 ICE Chip 高燒錄效率,PIC18F4520 燒錄時間約 3 秒 ( 32KB 程式 ) EEPROM PIC18F4520 都有內建 256 Bytes 的 EEPROM 100 萬次的寫入壽命 Microchip Technology Taiwan Slide 8

9 PIC18F4520 nanowatt 技術 什麼是 nano-watt 技術 Sleep Mode 下消耗功率低於 1uW 以下 PIC18F4520 Sleep Mode 下低於 0.1uA 內建的電源管理 內建 31KHz ~ 8MHz 自由切換的 RC 震盪器 快速 RC 啟動模式 雙速啟動模式 系統時脈監視 / 故障切換功能 Low-Power Watch-Dog Timer Ultra Low-Power Timer1 硬體設定或軟體控制的 Watch-Dog Timer 省電模式 : Idle (5.8uA), Sleep (0.1uA) Microchip Technology Taiwan Slide 9

10 PIC18F4520 主要的內建周邊 最多可提供 36 個 I/O 腳位 3 個可程式規劃的外部中斷 4 個可偵測 Pin-Change 的腳位 增強型 Input Capture/Output Compare/PWM 模組 MSSP module (Master Synchronous Serial Port) 支援硬體 I2C, SPI 增強型 Addressable USART module (EUSART) 支援高達 13 個 Channel 的 AD Converter module 兩個 Channel 的類比比較器 1 個 8-bit timer, 3 個 16-bit Timer Microchip Technology Taiwan Slide 10

11 Instruction Pipelining 預提取指令執行指令 movlw 0x 指令週期 MAIN 程式範例 movlw 0x0505 movwf REG1 rcall SUB1 addwf REG2 T0 Fetch 51 SUB1 movf PORTB,w SUB2 return movf PORTC,w 54 return Microchip Technology Taiwan Slide 11

12 Instruction Pipelining 預提取指令執行指令 movwf REG1 movlw 0x0505 指令週期 MAIN 程式範例 movlw 0x0505 movwf REG1 rcall SUB1 addwf REG2 T0 Fetch T1 Execute Fetch 51 SUB1 movf PORTB,w SUB2 return movf PORTC,w 54 return Microchip Technology Taiwan Slide 12

13 Instruction Pipelining 預提取指令 rcall SUB1 執行指令 movwf REG1 指令週期 MAIN 程式範例 movlw 0x0505 movwf REG1 rcall SUB1 addwf REG2 T0 T1 T2 Fetch Execute Fetch Execute Fetch 此階段執行一般指令 51 SUB1 movf PORTB,w SUB2 return movf PORTC,w 54 return Microchip Technology Taiwan Slide 13

14 Instruction Pipelining 預提取指令 addwf REG2 執行指令 rcall SUB1 指令週期 MAIN 程式範例 movlw 0x0505 movwf REG1 rcall SUB1 T0 T1 T2 T3 Fetch Execute Fetch Execute Fetch Execute 4 addwf REG2 Fetch 51 SUB1 movf PORTB,w SUB2 return movf PORTC,w 54 return Microchip Technology Taiwan Slide 14

15 Instruction Pipelining 預提取指令 movf PORTB,w 執行指令 rcall SUB1 指令週期 MAIN 程式範例 movlw 0x0505 movwf REG1 rcall SUB1 T0 T1 T2 T3 T4 Fetch Execute Fetch Execute Fetch Execute 4 addwf REG2 Fetch Flush 放棄 rcall 指令, 重新提取下一個指令 51 SUB1 movf PORTB,w SUB2 return movf PORTC,w 54 return Microchip Technology Taiwan Slide 15 Fetch

16 Instruction Pipelining 預提取指令 return 執行指令 movf PORTB,w 指令週期 MAIN 程式範例 movlw 0x0505 movwf REG1 rcall SUB1 T0 T1 T2 T3 T4 T5 Fetch Execute Fetch Execute Fetch Execute 4 addwf REG2 Fetch Flush 51 SUB1 movf PORTB,w SUB2 return movf PORTC,w 54 return Microchip Technology Taiwan Slide 16 Fetch Execute Fetch

17 Instruction Pipelining 預提取指令 movf PORTC,w 執行指令 return 指令週期 MAIN 程式範例 movlw 0x0505 movwf REG1 rcall SUB1 T0 T1 T2 T3 T4 T5 T6 Fetch Execute Fetch Execute Fetch Execute 4 addwf REG2 Fetch Flush 51 SUB1 movf PORTB,w SUB2 return movf PORTC,w 54 return Microchip Technology Taiwan Slide 17 Fetch Execute Fetch Execute Fetch

18 Instruction Pipelining 預提取指令 addwf REG2 執行指令 return 指令週期 MAIN 程式範例 movlw 0x0505 movwf REG1 rcall SUB1 T0 T1 T2 T3 T4 T5 T6 T7 Fetch Execute Fetch Execute Fetch Execute 4 addwf REG2 Fetch Flush Fetch 51 SUB1 movf PORTB,w SUB2 return movf PORTC,w 54 return Microchip Technology Taiwan Slide 18 Fetch Execute Fetch Execute Fetch Flush

19 21 21 Program Memory 16 PIC18F452 基本架構圖 Table Pointer <2> Inc/dec logic Program Bus OSC2/CLK0 OSC1/CLK1 VDD,VSS MCLR T1OS1 T1OSO PCLATU PCLATH PCU PCH 31 Level Stack PCL Program Counter TABLELATCH Timing Generation 4X PLL Precision Voltage Reference 8 Data RAM 12 (2) Address<12> 4 12 Data Bus BIT OP PRODH PRODL 8 x 8 Multiply WREG BSR FSR0 8 8 FSR1 FSR2 Instruction Register Power-up Timer Oscillator Start-up Timer Power-on Reset Watchdog Timer Brown-out Reset In-circuit it Debugger 12 Instruction Decode and Control 8 ALU<8> MSSP USART CCP PORTA PORTB PORTC PORTD PORTE TIMER A/D Microchip Technology Taiwan Slide 19

20 引用 Register File 的觀念 Data Memory (Register File) SFR s 位於 Bank 15 所 有指令皆可對任一暫存 w ALU f 07h 08h 09h 器操作, 無須切換 Bank d w f Data Bus 0Ah 0Bh 0Ch 0Dh Long word 的指令讓各暫存器可被直接定址 0Eh MOVFF src, dest 0Fh WREG 10h 周邊暫存器及狀態暫存 器皆為 Register files 的一部份 Opcode d a Address 指令解碼與執行 結果儲存控制 Microchip Technology Taiwan Slide 20 資料來源的位址

21 Data Memory 架構 有 16 banks 的 Data Memory, 每個 Bank 由 256 Bytes 組成 ( Max. 4K Bytes ) Special Function Registers (SFRs) 被安排在 Bank 15 使用 BSR<3:0> 來選擇適當的 BANK 或使用 BANKSEL 來做切換 BANK 的工作 MOVFF 指令可免去切換 BANK 的工作, 但需 2 words 的指令空間來完成 使用 Access Bank 的暫存器, 無須做 Bank 的切換 000h 07Fh 080h 0FFh 100h 1FFh 200h 2FFh D00h DFFh E00h EFFh F00h F7Fh F80h FFFh Access RAM Bank 0 GPR Bank 1 GPR Bank 2 GPR Bank 13 GPR Bank 14 GPR Bank 15 GPR Access SFR PIC16F8F2520/4520 暫存器的分布 Access Bank Access RAM Access SFR 256 Bytes 00h 7Fh 80h FFh Microchip Technology Taiwan Slide 21

22 PIC18 系列的架構 Program Memory 最大可達 2M MB Bytes (21bi bits) PC<20:0> 的程式空間 Reset Vector 位於程式位址 0x0000 高優先權中斷向量的位址位於 0008h CALL, RCALL, RETURN RETFIE, RETLW Stack Level 1 Stack Level 31 Reset Vector High Priority Interrupt Vector Low Priority Interrupt Vector 000h 008h 018h User Memory Space 低優先權中斷向量的位址位於 0018h On-Chip Programming 31 層獨立的位址堆疊區 Microchip Technology Taiwan Slide 22 Read 0 1FFFFFh h

23 豐富的內部與外部中斷來源 PIC18 系列的架構 Interrupt Overview 幾乎所有周邊皆有中斷 CPU 的能力 有些 I/O 的變化也可構成中斷條件 (PORTB) 每個周邊中斷可以被設定成具有高 / 低優先權 ( Hi/Low Priority) INT0 永遠為高優先權外部中斷 具相同優先權設定的中斷則可由軟體來決定其優先順序 有整體及各別的中斷致能控制位元 每個中斷都有其獨立的中斷旗標, 可用軟體詢問的方式 大部份的中斷可以用來喚醒處於 SLEEP 狀態的 PICmicro 中斷延遲固定為 3 個 cycle 容易以軟體來判斷中斷的經過時間 Microchip Technology Taiwan Slide 23

24 睡眠模式 (Sleep Mode) 指微控制器可以執行 Sleep 指令進入休眠狀態節省消耗功率 系統主振盪時脈停止運作 處理器進入靜態的狀態 資料保持不變 Watch-Dog Timer 因使用特定的 RC 振盪可以持續工作不受影響 處理器進入最低耗電模式 通常是漏電流 ( μA typical) MCLR WDT INT TMR1 ADC CMP CCP PORTB SSP PSP 一些可以喚醒睡眠模式的外部觸發事件 Master Clear Pin Asserted (pulled low) Watchdog Timer Timeout INT Pin Interrupt Timer 1 Interrupt (or also TMR3 on PIC18) A/D Conversion Complete Interrupt Comparator Output Change Interrupt Input Capture Event PORTB Interrupt on Change Synchronous Serial Port (I 2 C Mode) Start / Stop Bit Detect Interrupt Parallel Slave Port Read or Write Microchip Technology Taiwan Slide 24

25 PIC18 系列的架構 高優先全中斷邏輯架構 TMR0IF TMR0IE TMR0IP RBIF RBIF RBIF INT0IF INT0IE INT1IF INT1IE INT1IP INT2IF INT2IE INT2IP Peripheral Interrupt Enabled bit Peripheral Interrupt Flag bit Peripheral Interrupt Priority bit Additional Peripheral Interrupts High Priority Interrupt Generation IPEN From (a) IPEN GIEL/PEIE IPEN Interrupt to CPU Vector to location 0008h (High Priority Interrupt Vector Address) GIEH/GIE High Priority Interrupt initialized (Disable low priority interrupts) To (c) From (b) Microchip Technology Taiwan Slide 25

26 PIC18 系列的架構 低優先全中斷邏輯架構 Peripheral Interrupt Enabled bit Peripheral Interrupt Flag bit Peripheral Interrupt Priority bit Additional Peripheral Interrupts To (a) To (b) From (c) Wake-up (if in SLEEP mode) Interrupt to CPU Vector to Location 0018h (Low Priority Interrupt Vector Address) TMR0IF TMR0IE TMR0IP RBIF RBIF RBIF INT0IF INT0IE GIEH/GIE INT1IF INT1IE INT1IP INT2IF INT2IE INT2IP Microchip Technology Taiwan Slide 26

27 18F4520 中斷處理 18F4520 有兩個中斷向量點 高優先權 ==> 中斷向量位址 0x0008 低優先權 ==> 中斷向量位址 0x0018 每個中斷源均可選擇其中斷優先權 ( 二選一 ) 每個中斷源均有獨立的中斷旗標 (Flag) 中斷旗標的清除 ==> 自行用軟體清除 每個中斷源均可 Enable 或 Disable 當然 PIC18 系列也可設定與 PIC16Fxxx 系列的中斷相容 ( 關掉優先權的設定 ) Microchip Technology Taiwan Slide 27

28 以 Timer1 的中斷設定為範例 有關 T1CON 的控制位元, 請參考 PIC18F4520 Data Sheet RCON 的 <IPEN> 位元 : 啟動高 低權位的中斷功能 GIEH : 允許高優先權中斷 GIEL : 允許低優先權中斷 TMR1IE : 打開 Timer1 的中斷設定 TMR1IP = 1, 設定 Timer1 為高優先權中斷 Microchip Technology Taiwan Slide 28

29 PIC18 系列的架構 Clocking Scheme 一個指令周期等於輸入 CPU 頻率的 1/4 若 CPU 操作於 40 Mhz 時, 其指令周期為 100 ns Fosc 振盪頻率 /4= Tosc 指令週期 OSC1 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 OSC2 指令週期 一般性的動作 : Q1 = 解碼 Q2 = 讀取 Q3 = 執行 Q4 = 寫入 Microchip Technology Taiwan Slide 29

30 PIC18Fxxxx 定址模式 Microchip Technology Taiwan Slide 30

31 18Fxxxx 定址模式 四種基本的定址模式 立即定址模式 直接定址模式 間接定址模式 相對定址模式 Microchip Technology Taiwan Slide 31

32 PIC18 定址模式立即數的操作 8-bit 的常數值 (literal value) 被包含於程式碼之中 使用於 literal instructions, 例如 movlw, addlw, retlw, etc. 16-bit Instruction for Literal Instructions OP CODE k k k k k k k k Microchip Technology Taiwan Slide 32

33 PIC18 定址模式 Data Memory: 直接定址 (Banked) Data Memory 總共有效位址為 12 Bits ( 4K Bytes ) 8-bit 的直接位址由指令中得到 其他高位的 4-bits 由 BSR<0..3> 獲得 BSR Register 16-bit Instruction BSR<7:4> BSR<3:0> OP CODE f f f f f f f f 4-bits from BSR Register 8-bits from Instruction Word BSR<3:0> f f f f f f f f Effective 12-bit Register Address Microchip Technology Taiwan Slide 33

34 PIC18 定址模式 Data Memory : 直接定址 ( Non Banked) MOVFF src, dest ( RAM 對 RAM 的資料搬移 ) 2 Word 的指令, 直接指定兩個 4K 的位址 n n n n n n n n n n n n 來源位址 (Source) n n n n n n n n n n n n 目的位址 (Destination) 善用 Access BANK 或選擇 BANKED 的 Single Word 指令可增加執行效能及佔用較少的程式記憶體 Microchip Technology Taiwan Slide 34

35 PIC18 定址模式 Data Memory: 間接定址 (Indirect addressing) 三個 12-bit 寬的間接定址暫存器 FSR0, FSR1, FSR2 FSRn (File Select Register) 的內容可做以下調整 : Pre-Incremented : (PREINCx) 先被加一再存取其內容 Post-Incremented : (POSTINCx) 存取完 FSRn 所指內容後將 FSRn 加 1 Post-Decremented : (POSTDECx) 存取完 FSRn 所指內容後將 FSRn 減 1 Offset by WREG value (signed):(pluawx) FSRn 不變, 以 W 為偏移值相加後以產生新的索引指標 保持不變 : (INDFx) 12-bit FSRn Register Microchip Technology Taiwan Slide 35 f f f f f f f f f f f f

36 PIC18 定址模式 Data Memory: 間接定址 (Indirect Addressing) 範例 : 清除由位址 0x000 to 0x5FF 的資料內容 間接位址被寫入 FSRn 中 每當 INDFn 被當成運算元 (operand) operand), 實際上被操作的位址乃是由 FSRn 內容所指的位址 類似 定址法, 但功能更齊全 _Loop movlw 0x05 ; Value to compare lfsr 1,0x000 ; Clear address from 0 clrf POSTINC1 ; Clear, increment FSR1 cpfsgt FSR1H ; FSR1H > 5? ( 0x600 ) goto _Loop ; NO, loop : ; YES, next instruction Microchip Technology Taiwan Slide 36

37 PC 相對定址 : 計算 GOTO 位址 計算 GOTO 位址, 使用索引查 表方式建立跳躍表格 org 0x JTS movlw UPPER JUMP_TABLE movwf PCLATU movlw HIGH JUMP_TABLE movwf PCLATH movlw 0x04 mulwf USER_INPUT movf PRODL 0x addwf PCL, f JUMP_TABLE goto DoUserInput0 goto DoUserInput1 goto DoUserInput2 goto DoUserInput3 goto DoUserInput4 Microchip Technology Taiwan Slide 37 USER_INPUT 02 WREG 08 PCLATU PCLATH FF FF FF PCU PCH PCL 計算跳躍的偏移量位址每一個 goto 指令佔 4 bytes: 所以要乘四後才可以得到正確的偏移位址

38 PIC18FXXX 指令集 Microchip Technology Taiwan Slide 38

39 PIC18 系列 MCU 指令集 Instruction Set Overview 77 個指令 73 個是 Single Word 指令 4 個 two-word 指令 : MOVFF, LFSR, CALL, GOTO 55% 的指令只需 single cycle 即可完 4 個 two word 的指令須耗費 2 周期 10 個 branches, calls 會依情況耗費一或兩個周期 8 個對 Table 操做的指令為 2 周期 3 個 return 的指令需耗費 2 周期 10 個條件式的 SKIP 指令依狀況需耗費 1 or 2 周期 Microchip Technology Taiwan Slide 39

40 PIC18 系列 MCU 指令集 Summary (16-bit core) Byte-Oriented Oi t do Operations Byte -Oriented Oi do Operations ADDWF f, d, a Add WREG and f MULWF f, a Multiple WREG with f ADDWFC f, d, a Add WREG and f NEGF f, a Negate f ANDWF f, d, a AND WREG and f RLCF f, d, a Rotate left f through carry CLRF f, a Clear f RLNCF f, d, a Rotate left f, no carry COMF f, d, a Complement f RRCF f, d, a Rotate right f through carry CPFSEQ f, a Compare f with WREG, skip = RRNCF f, d, a Rotate right f, no carry CPFSGT f, a Compare f with WREG, skip > SETF f, a Set f CPFSLT f, a Compare f with WREG, skip < SUBFWB f, d, a Subtract f from WREG DECF f, d, a Decrement f with borrow DECFSZ f, d, a Decrement f, skip if zero SUBWF f, d, a Subtract WREG from f DCFSNZ f, d, a Decrement f, skip if not zero SUBWFB f, d, a Subtract WREG from f INCF f, d, a Increment f with borrow INCFSZ f, d, a Increment f, skip if zero SWAPF f, d, a Swap nibbles of f INFSNZ f, d, a Increment f, skip if not zero TSTFSZ f, a Test f, skip if zero IORWF f, d, a Inclusive OR WREG and f XORWF f, d, a Exclusive OR WREG and f MOVF f, d, a Move f MOVFF fs, fd Move fs (source) to fd (destination) MOVWF f, a Move WREG to f f = File Register, d = destination (1=f, 0=WREG), a = access bank (0=access bank, 1=BSR) Microchip Technology Taiwan Slide 40

41 PIC18 系列 MCU 指令集 Summary (16-bit core) Bit -Oriented Operations BCF f, b, a Bit clear f BSF f, b, a Bit set f BTG f, b, a Bit toggle f BTFSC f, b, a Bit test f, skip if clear BTFSS f, b, a Bit test f, skip if set Data Memory <--> Program Memory Operations TBLRD* - Table Read TBLRD*+ - Table Read with post-inc. TBLRD*- - Table Read with post-dec. TBLRD+* - Table Read with pre-inc. TBLWT* - Table Write TBLWT*+ - Table Write with post-inc. TBLWT*- - Table Write with post-dec. TBLWT+* - Table Write with pre-inc. Literal Operations ADDLW k Add literal with WREG ANDLW k AND literal with WREG IORLW k Inclusive OR literal with WREG LFSR f, k Move literal to FSRn MOVLB k Move literal to BSR MOVLW k Move literal to WREG MULLW k Multiply literal to WREG RETLW k Return, place literal in WREG SUBLW k Subtract WREG from literal XORLW k Exclusive OR literal with WREG f = File Register, k = literal value (8-bit), b = bit address (0-7) Microchip Technology Taiwan Slide 41

42 PIC18 系列 MCU 指令集 Summary (16-bit core) Control Operations Control Operations BC n Branch if Carry (n is 8-bit) BN n Branch if Negative (n is 8-bit) BNC n Branch if No Carry (n is 8-bit) BNN n Branch if Not Negative (n is 8-bit) BNOV n Branch if No Overflow (n is 8-bit) BNZ n Branch if Not Zero (n is 8-bit) BOV n Branch if Overflow (n is 8-bit) BRA n Branch (n is 11-bit) BZ n Branch if Zero (n is 8-bit) CALL n, s Call subroutine (n is 20-bit) CLRWDT - Clear Watchdog Timer DAW - Decimal Adjust WREG GOTO n Go to address (n is 20-bit) NOP - No Operation POP - Pop top of return stack (TOS) PUSH - Push top of return stack (TOS) RCALL n Relative call (n is 11-bit) RESET - Software device reset RETFIE s Return from interrupt enable RETLW k Return, place literal in WREG RETURN s Return from subroutine SLEEP - Go into standby mode n = absolute address or address offset, k = literal value (8-bit), s = fast restore Microchip Technology Taiwan Slide 42

43 Byte-Oriented Operations ADDWF f, d, a ADDWFC f, d, a ANDWF f, d, a CLRF f, a COMF f, d, a CPFSEQ f, a CPFSGT f, a CPFSLT f, a DECF f, d, a DECFSZ f, d, a DCFSNZ f, d, a INCF f, d, a INCFSZ f, d, a INFSNZ f, d, a IORWF f, d, a MOVF f, d, a MOVFF fs, fd MOVWF f, a PIC18 系列 MCU 指令集範例 以位元組為操作的對象 16-bit Instruction for Byte Oriented Operations OP CODE d = Destination Bit d = 0 運算結果置於 W d = 1 運算結果置於 F (Default d=1) a = Access Bit a = 0 指定置於 Access Bank 的暫存器 (Default a=0, 或不寫 ) a = 1 實際的位址由 BSR 與 8-bit 的暫存器位址組成 d a f f f f f f f f f = 8-bit 暫存器位址 Example: ADDWF 0, 0 ADDWF f, d, a Microchip Technology Taiwan Slide 43

44 Bit-Oriented Operations BCF BSF BTG BTFSC BTFSS f, b, a f, b, a f, b, a f, b, a f, b, a PIC18 系列 MCU 指令集範例 以位元組為操作的對象 16-bit Instruction for Bit Oriented Operations OP CODE b b b b = 3-Bit, 用來指定欲操作位元的位址 (Bit Number) a = Access Bit a = 0 指定置於 Access Bank 的暫存器 a = 1 實際的位址由 BSR 與 8-bit 的暫存器位址組成 Example: BTFSC STATUS, C, 0 BTFSC FLAGS, BIT_0, a a f f f f f f f f f = 8-bit 的暫存器位址 Microchip Technology Taiwan Slide 44

45 PIC18 系列 MCU 指令集 Data Memory <> Program Memory Table Pointer Operations TBLRD* - TBLRD*+ - TBLRD*- - TBLRD+* - TBLWT* - TBLWT*+ - TBLWT*- - TBLWT+* - 16-bit Instruction for TBLRD* or TBLWT* OP CODE nn = 00 * ( 指標不變 ) nn = 01 *+ ( 查表後指標加一 ) nn = 10 *- ( 查表後指標減一 ) n n nn = 11 +* ( 先將指標加一再查表 ) Microchip Technology Taiwan Slide 45

46 PIC18FXXX 加強的部份 相當有彈性的資料指標 3 個資料指標, 各有五種操作模式 更方便且有效率的 Table Read/Write 功能 以 Byte 為操作單位 多種的指標更新選項 用簡單的指令集來支援複雜的架構 新的 MOVFF,BRA, 以及條件式分支指令 Microchip Technology Taiwan Slide 46

47 PIC18FXXX 加強的部份 資料指標 ( Data Pointer ) 總共有三個獨立的指標 FSR0, FSR1, FSR2 指標為 12 Bits, 可定址 4K 的資料空間 指標有兩個暫存器組成 ( 例 : FSR0L, FSR0H) 五種指標的操作方式 ( 使用不同的虛擬暫存器 ) INDFn : 直接操作指標所指的內容 POSTINCn : 操作指標所指內容後將指標加一 POSTDECn : 操作指標所指內容後將指標減一 PREINCn : 將指標先加一後再對指標所指位址操作 PLUSWn : 將 WREG 的內容作為 Offset 值與 FSRn 相加後以其結果為指標來存取記憶體 Microchip Technology Taiwan Slide 47

48 PIC18Fxxxx I/O 介紹與運用 Microchip Technology Taiwan Slide 48

49 PIC18 系列的周邊 : I/O Ports 輸入 / 輸出腳, 為一般 MCU 最 基本的工作 PIC18 系列的 I/O 多了一個 LATx, 可有效解決所謂 Read- Modify-Write Wit 指令動作帶來 的困擾 每個 I/O Port 皆有三個獨立 的控制暫存器 PORTx LATx TRISx Microchip Technology Taiwan Slide 49

50 I/O 的輸出入暫存器 Internal Data Bus Write PORTx Write LATx Read LATx Read PORTx LATx 拴鎖暫存器或 PORTx 輸出暫存器 PORTx I/O Pins Microchip Technology Taiwan Slide 50

51 為什麼加入 LATx 拴鎖暫存器 1. 如果工作在較低頻率或較小的負載電容環境 BSF PORTx,PINy Q4 BSF PORTx,PINz Q1 Q2 Q3 電壓的呈現在 PORTx,PINy V IL t Read-Modify-Write 操作時的取樣點 2. 如果工作在較高頻率或較大的負載電容環境 BSF PORTx,PINy BSF PORTx,PINz Q4 Q1 Q2 Q3 Q4 電壓的呈現在 PORTx,PINy V IL 此時電壓還沒升到 V IL 轉態點 t Read-Modify-Write 操作時的取樣點 Microchip Technology Taiwan Slide 51

52 如何解決 Read-Modify Modify-Write 如果是對相同的 PORTx 連續操作 解決之道是在連續兩個 BSF/BCF 指令間加入適當個 NOP 指令 BSF PORTA,5 NOP BSF PORTA,0 使用 C18 則可加入 Nop( ) 的巨集 建議直接使用 LATx 的來取代 PORTx 的操作 這樣直接就對拴鎖暫存器操作, 而不是對外面的 PORT 操作也就沒有因電容所造成的延遲 BSF LATA,5 BSF LATA,0 Microchip Technology Taiwan Slide 52

53 I/O 輸出 / 輸入控制 I/O Pin 方向控制 TRISB PORTB In In In In Out Out Out Out TRISx 的每一獨立位元可單獨去控制相對應 PORTx 裡的位元的資料方向 (Reset 的初始定義為輸入功能 ) 1 = 輸入, 0 = 輸出 Microchip Technology Taiwan Slide 53

54 類比或數位腳位? 有些接腳是類比輸入與數位共用同一隻接腳 Power-On 後這些接腳的預設值為 類比輸入 類比輸入有 ADC 輸入與電壓比較器輸入 ADCON1 暫存器用來設定腳位是類比輸入還是數位 I/O 通常我們不需如此多的 AD Input Channel!! Bit 7 Bit X X VCFG1 VCFG0 PCFG3 PCFG2 PCFG1 PCFG0 設定最低 4 bits 為 1 時, 關閉所有 ADC 輸入腳功能 Microchip Technology Taiwan Slide 54

55 內含多功能程式編輯器 MPLAB IDE - 整合式的發展環境 MPLAB Integrated Development Environment 單一系統專案管理模式 語言工具軟體模擬模擬器及除錯器燒錄器 MPASM Assembler MPLAB SIM Sofware Simulator MPLAB REAL ICE PICkit 1 PICSTART Plus 原始檔案程式偵錯功能 協力廠商支援工具 Compilers IAR, Hi-Tech, CCS, ME Labs, Green Hills MPLINK MPLIB MPLAB ICE 2000 & 4000 MPLAB PM3 Real-time Operating Systems CMX, Vector, Realogy, Express Logic MPLAB C18 MPLAB C30 MPLAB C32 PICkit 2 MPLAB ICD 2 MATLAB Live Devices, CMX, Momentum Data Systems Uniquely supporting 8, 16 and 32 bit MCUS within one integrated development Environment! Microchip Technology Taiwan Slide 55

56 MPLAB IDE 的下載 由 Microchip 的首頁即可連結到 MPLAB IDE 的下載中心 It s free Microchip Technology Taiwan Slide 56

57 現有硬體除錯工具 Features s/speed d/trace 舊版現有 PICkit 2 Full Speed HID USB, 1 Device Family per Loader, Run, Halt, SS, Program, Read Full Speed Emul Select Devices MPLAB ICE 2000 MPLAB Parallel, REAL ICE USB Option High Speed Custom USB, Run, Halt, SS, Run, Halt, SS Complex Complex Ti Trigger/Break, Trigger/Break, Static Trace, Real Time Watch, Logic Probes, Stopwatch, Flexible circuit cable MPLAB ICD 2 Program, Read, 20 MIPS Emul Serial, Full Speed Dynamic Trace, PIC10F, 12F, 16C 2, Custom USB, Logic Probes, PIC16F, PIC17C 2, Run, Halt, SS, PIC18C LVDS 2, PIC18F Complex Full Speed Emul Trigger/Break PIC16F 1, PIC18F, Stopwatch, PIC24, dspic Program, Read Full Speed Emul PIC10F, 12F, 16F PIC18F, PIC24, dspic $50 $150 $500 $1500 Microchip Technology Taiwan Slide 57

58 新推出的硬體除錯工具 Feature es/spee ed/trace e PICkit 3 Full Speed USB HID, Run, Halt, SS, Simple Breakpoints, Program, Read All of Microchip s Flash PIC MCU and dspic DSCs MPLAB ICD 3 High Speed USB 2.0, Run, Halt, SS Software Breakpoints, Complex Breakpoints, Stopwatch, t Program, Read, All of Microchip s Flash PIC MCUs and dspic DSCs MPLAB REAL ICE Emulator High Speed USB 2.0, Run, Halt, SS Software Breakpoints, Complex Breakpoints/Triggers, Stopwatch, Program, Read, Real-Time Watch, Trace, Logic Probes, Performance Pak All of Microchip s Flash PIC MCUs and dspic DSCs $70 $220 $500 Microchip Technology Taiwan Slide 58

59 串列燒錄與除錯功能 In-Circuit Serial Programming & Debugging 燒錄時只用到兩支腳位 ( 請勿接電阻到地 ) RB6 PGC RB7 PGD Vpp 會有 13V 的觸發電壓輸入, 要使用 10K ohm 電阻接 Vdd, 最好不要再接電容到地以免影響 Vpp 上升時間造成燒錄錯誤 這種燒錄介面可以使用在 Microchip 所有的開發工具裏 ICD2, ICD3, Real ICE PICkit2, PM3 Pin V PP V DD V SS RB6 RB7 Application PCB MCLR/V PP PIC C18Fxxxx Function Programming Voltage = 13V Supply Voltage Ground Clock Input Data I/O & Command Input V DD V SS RB6 RB7 To application circuit V DD V DD Isolation circuits ICSP Connector Microchip Technology Taiwan Slide 59

60 Debugger/Programmer g 的界面與 Tool 的連接 Microchip MCU 使用 ICD/ICSP 界面與 Debugger/Programmer 連接 PICkit 2 與 PICkit 3 的介面定義如下 Microchip Technology Taiwan Slide 60

61 Debugger/Programmer g 的界面與 Tool 的連接 MPLAB ICD2/ICD3 使用的 RJ-11 連接器上的接腳與信號位置 ( 使用上簧片之 6P6C ) Microchip Technology Taiwan Slide 61

62 Debugger/Programmer g 的界面與 Tool 的連接 MPLAB ICD2/ICD3 隨附的 Modular Cable 示意圖 ( 注意 6P6C 排線上的順序兩端是相反的 ) Microchip Technology Taiwan Slide 62

63 Debugger/Programmer g 的界面與 Tool 的連接 自行 Layout 時, 若採用市售常見下簧片的 6P6C Connector, 與 MPLAB ICD2/ICD3 間的信號關係如下 ( 零件的 Layout 圖正面 ) Microchip Technology Taiwan Slide 63

64 MPLAB IDE 畫面 工具圖示區 C 的原始程式 工作項目 設定中斷點 編譯輸出 暫存器顯示 變數觀察視窗 Microchip Technology Taiwan Slide 64 狀態顯示列

65 PIC18 振盪器選擇 XT HS Standard frequency crystal oscillator High frequency crystal oscillator 100kHz - 4MHz DC - 40MHz HS+PLL High frequency crystal with 4x PLL 4MHz - 10MHz LP Low frequency crystal oscillator 5kHz - 200kHz RC External RC oscillator DC - 4MHz RCIO External RC oscillator, OSC2=RA6 DC - 4MHz INTRC Internal RC oscillator Various EC External Clock, OSC2=f osc /4 DC - 40MHz ECIO External Clock, OSC2=RA6 DC - 40MHz 提供多樣的振盪器選擇方式, 讓設計更加彈性 : LP 振盪模式提供了低功耗功能 RC 或 INTRC 振盪模式提供了低成本的效益 XT 提供一般使用的工作頻率 HS 提供需高速處理所需的工作頻率 速度範圍參考資料手冊所建議的範圍 Microchip Technology Taiwan Slide 65

66 設定 Configuration Word 的方式 直接在 MPLAB IDE 下設定 先確定 MPLAB IDE 使用的元件名稱 MPLAB IDE 目錄下 : Configure Configuration Bits 取消 Configuration Bits Set in code Microchip Technology Taiwan Slide 66

67 組合語言必需要使用的虛擬指令 LIST - 目錄控制 (Listing Control) list p=pic18f4520 #INCLUDE - 加入一原始檔 定義檔或敘述檔 #include <18f4520.inc> EQU - 宣告常數 變數 ( 不可重新定位 ) memory equ count 0x3f equ.100 io_set equ B ORG - 設定程式組譯的起始位址 org 0x00 ; 組譯位址從 00h 開始 org 0x30 ; 組譯位址從 30h 開始 END - 程式結束 Microchip Technology Taiwan Slide 67

68 虛擬指令的使用範例 list #include p=18f4520 ; 定義使用的 MCU 為 PIC18F4520 <p18f4520.inc> ; 使用 18F4520 的標準定義檔 ;***** 定義變數 ` 常數 參數區 ****** T_DELAY EQU D 100 ; 設定常數值 dly_count EQU H 00 ; 設定變數位址 ;********************************************************************** ORG 0x000 ; 設定程式執行位址從 0000" 開始 clrf PCLATU clrf PCLATH goto main ; ORG 0x ; 高優先權中斷向量進入位址 ;******* 中斷處理副程式區 ****** retfie s ; 中斷返回 ; main movlw T_DELAY ; 主程式開始 movwf dly_count ;** remaining code goes here END ; 程式結束 Microchip Technology Taiwan Slide 68

69 MPASM 的範本程式 安裝了 MPLAB IDE 後, MPASM 也一併安裝 目錄 : C:\Program Files\Microchip\MPASM Suite\ 在此目錄可找到各 PIC16F & PIC18F 的組合語言範本程式 C:\Program Files\Microchip\MPASM Suite\Template\Code C:\Program Files\Microchip\MPASM coc Suite\Template\Object e Code 子目錄的寫法為 單一 組合語言程式的範本 一個 Project 只包含 1 個.asm 的檔案, 定址都用 ORG & EQU Object 子目錄的寫法為 Relocatable code 的組合語言程式的範本 一個 Project 只包含多個.asm 的檔案 使用 CODE, RES 等 Directives 來定址 Microchip 提供 102ASP (W400), 一天的訓練課程 Microchip Technology Taiwan Slide 69

70 須另外安裝的語言工具 MPLAB C18 可由 免費下載 也可在 Microchip Taiwan 提供的 RTC 及產品 DVD 光碟找到 提供完整的 Peripheral Library, 讓周邊的操控更簡便 Microchip 提供 W401, 兩天的訓練課程 可在 的下載中新下載講義及練習檔 也可在 Microchip Taiwan 提供的 RTC 及產品 DVD 光碟找到 搭配 MPLAB IDE 可以做到 Source Level Debugging Microchip Technology Taiwan Slide 70

71 9V 電源輸入 RS-232 認識 APP001 實驗板 CAN RS-485 AD 輸入 VR1 ICD2 接頭 Reset 按鍵 Debug & Prog. 選擇 Jumper 5V 電源穩壓 I2C & SPI EEPROM CCP1 蜂鳴器 PI IC18F CCP2 PWM LED PORTD LED x8 2 x 16 LCD 外部震盪器插座 LCD 反襯度調整 溫度感測器 Microchip Technology Taiwan Slide 71 16MHz Crystal 按鍵開關 SW3 & SW2

72 APP026-3X 實驗板 Microchip RTC 課程及菁英班課程的專用實驗板 可以搭配 64 to 44 Pin 的轉接板, 使用來開發 PIC18F4520 Microchip Technology Taiwan Slide 72

73 APP026-3X 內建的 PICkit 2 相容 module 位置在 LCD Display 的下方 功能與 PICkit 2 相容 無法提供 Power 至 Target Board 沒有 EEPROM 24LC512 * 2, 所以無 Programmer to go 功能 24LC512 可自行加入 有 PICkit 2 相容的單排 2.54mm * 6-Pin 與 ICD 2 相容 RJ-11 Connector 兩種除錯及燒錄介面 Microchip Technology Taiwan Slide 73

74 PICKit 2 的重要功能 與 MPLAB ICD 2 類似, 可以搭配 MPLAB IDE 來對 Microchip Flash MCU 進行燒錄與除錯 只要將 Programmer or Debugger 的選擇選取 PICKit 2 即可 大部分的 PIC16F, PIC18F 大部分的 PIC24FJ, PIC24HJ & dspic33fj 大部分的 dspic30f 使用 HID Device Class, 安裝及使用比 MPLAB ICD 2 容易 操作介面及方法與 ICD 2 一致 Microchip Technology Taiwan Slide 74

75 使用 APP026-3X 實驗板的範例 Microchip Technology Taiwan Slide 75 APP026-3X 主要目的在提供一個穩定的基礎電路給 User 要使用的 CPU APP026-3X 只將 Power 及 Debug/Program 所需信號接妥 User 可依時際需求將 CPU 的功能 Pin 腳接至實驗板上的周邊 ( VR, Switch, LED, RS-232 收發器 ) 若 On-Board 的周邊功能不足, 可輕易地以杜邦跳線連接其他的控制板 APP026-3X 的電路與 APP026-3 相同, 說明書可於 Microchip 台灣網站下載

76 APP026-3X 重要的 Connectors APP026-3X 的設計原責 : 僅將必要信號定位, 其餘交由 User 自定 VR1 & VR2 的插針 JP2- Vdd 電壓選擇 (3.3V/5V) JP1-5V Source 5V 電壓的來源 JP5&JP6 CPU 選擇 JUMPER CON1-9V DC 插孔 JP20 - USB 信號 CON4-LCD 模組的控制信號 64-Pin CPU 模組 X Hhz 內建 PICKit 2 的 USB Connector 內建 PICKit 2 module 的 Debug 輸出 Debug 腳位選擇 ICD2 & PICKit 2 Connector Microchip Technology Taiwan Slide 76 JP8-ENVREG for PIC18J CON11 4.7K Pull-up * 4 按鍵 S1-S4 X1 8Mhz 震盪器 JP19- 按鍵及 LED 的插針 LED1 LED4

77 使用 APP026-3X 的注意事項 - 電源 接上電源前需確認 JP2 VDD 的選用是正確的 ( 3.3V or 5V) 不同的 MCU 有不同的工作電壓範圍, Power-On 前先確定電源設定是對的 Microchip Technology Taiwan Slide 77

78 使用 APP026-3X 的注意事項 - 電源 APP026-3 不管 JP2 VDD 設為 3.3V or 5V, 都需要一個 5V 的周邊電壓被產生, 因為 33V 3.3V 是經由 MCP170X LDO 由 5V 輸入獲得 33V 3.3V 輸出 使用 JP1 5V-SOURCE 來選擇周邊用 5V 的來源為 USB or 外接電源經 7805 而來 Microchip Technology Taiwan Slide 78

79 使用 APP026-3X 的注意事項 - 電源 若以 JP1 5V-SOURCE 來選擇周邊用 5V 的來源為 USB, 則 APP026-3X 的 CON15-USB 必需被連上 PC 的 USB Port 或 USB connector 相容的供電設備 Microchip Technology Taiwan Slide 79

80 使用 APP026-3X 的注意事項 電源 若以 JP1 5V-SOURCE 來選擇周邊用 5V 的來源為外接電源經 7805, 則 APP026-3X 的 CON1 必需被連上外接的 9V DC Power Microchip Technology Taiwan Slide 80

81 使用 APP026-3X 的注意事項 電源 如果你要使用 APP026-3X 上的 PICkit2 來 Debug, 則 CON18-USB1 需接上 PC 端的 USB Port 如此一來實驗板上的周邊用 5V 可以考慮共同使用 CON18-USB1 上的 5V VBUS 可以使用隨附的短杜邦線將 CON18A Pin2 的 5V 跳接至 +5V 的 Connector Microchip Technology Taiwan Slide 81

82 使用 APP026-3X 的注意事項連接 PICKit 2 APP026-3X 上的 PICKit 2 工具使用 HID 類別, 無需安裝 Driver!! 請使用隨附的 USB 線將 PC 與 APP026-3X 連接 CON19 與 CON19A 是並聯的, 都可用來 Debug 請用隨附的 6P 電話線將 CON19A 與 CON12 連接 參考前幾頁的電源設定來選擇要用何種供電方式 Microchip Technology Taiwan Slide 82

83 使用 APP026-3X 的注意事項 Debugger Pin 腳的選擇 如果使用 CON18-USB 的 5V VBUS 來供電, 則基本連線將如下圖 APP026-3X 隨附的是 PIC24FJ128GB pin TQFP 包裝的 MCU PIC24FJ128GB106 有 3 組 Debug/Program 腳位可選, 而 APP026-3X 有將第 1, 2 組引出 請將 JP15 &JP16 的 JUMPER 插上, 以便使用 PGEC1/PGED1 來 Debug.. Microchip Technology Taiwan Slide 83

84 在 APP026-3X 使用 PIC18F4520 PIM APP026-3X 可以使用 PIC18F4520 的 PIM ( Plug-In Module ) PIC18F4520 與 LCD 的連線已完成 RD0.. RD3 接至 LCD Data RD4 & RD5 接至 LCD 的 RS 及 RW 接腳 RA2 被接至 LCD 的 E 腳 PIC18F4520 的 Power, ICSP 連線亦已經完成 可以用 JP2 選 3.3 or 5V 的 Vdd PIC18F4520 的 ICSP 連線被接至 APP026-3X 原有 64-pin 腳位的 Pin-15 & Pin16 其它的腳位皆為 available, User 可以自行決定如何運用 Microchip Technology Taiwan Slide 84

85 在 APP026-3X 使用 PIC18F4520 PIM APP026-3X 使用 PIC18F4520 連接外部按鍵與 LED 的範例 Microchip Technology Taiwan Slide 85

86 PIC18F4520-I/PT I/PT 的腳位圖 Microchip Technology Taiwan Slide 86

87 Demo 1 : I/O 的操作 使用組合語言, 使程式能依按鍵的選擇來控制 LED 使用 MPASM 提供的範本程式為基礎, 練習組合語言 練習使用 APP026-3X 上的 PICkit 2 來 Debug/Program 設定 RB0, RA4 為輸入 設定 PORTD 為輸出 ( RD0.. RD3 驅動 LED1 ~ LED4 ) 按 S1 (RB0) 時, 點亮 LED1 LED2 按 S2 (RA4) 時, 點亮 LED3 LED4 使用中斷點來觀查程式的運作 Microchip Technology Taiwan Slide 87

88 Demo 2: 使用 Timer1 與中斷 使用 MPLAB C18 來撰寫 Demo 2 讓 Timer1 使用內部經倍頻後的 40 Mhz 為 clock 並啟動 Timer1 的中斷 : 設定 PIC18F4520 的工作模式後, 進入主程式的永久迴圈 檢查 ONE_SEC 旗標, 若為 1 則顯示 MM:SS 於 LCD 第一行 將 Timer1 設定為 10 ms 秒中斷 CPU 一次 Timer1 每次中斷後, 判斷是否已累積達 1 秒的時間後 Update Min, Sec 變數, 並設定 ONE_SEC 旗標 Microchip Technology Taiwan Slide 88

89 Demo 3:ADC 的操作 承接 Demo 2, 但在主程示迴圈不斷的讀取 VR1 & VR2 的 ADC 讀值顯示於 LCD 第二行 將 ADC 規劃為 : AN0 & AN1 enabled Right Justified Internal Reference Proper TAD and TACQ LCD 若 update 太快會有閃爍的現象, 所以要以程式處理 每 100 ms 才 update LCD 的 ADC 讀值 Pin-19, Pin-20 Microchip Technology Taiwan Slide 89

ICD ICD ICD ICD ICD

ICD ICD ICD ICD ICD MPLAB ICD2 MPLAB ICD2 PIC MPLAB-IDE V6.0 ICD2 usb PC RS232 MPLAB IDE PC PC 2.0 5.5V LED EEDATA MPLAB ICD2 Microchip MPLAB-IDE v6.0 Windows 95/98 Windows NT Windows 2000 www.elc-mcu.com 1 ICD2...4 1.1 ICD2...4

More information

PIC16F F MPLAB 08 16F LED 15 LED

PIC16F F MPLAB 08 16F LED 15 LED PIC16F877 PIC16F877 03 16F877 05 06 MPLAB 08 16F877 13 LED 15 LED 17 20 24 2 PIC16F877 PIC16F877 DIP VDD VSS CLOCK CPU :,AND,OR,XOR ROM: CPU ROM RAM: CPU,CPU I/O:CPU, CPU,, 16F877 RAM 512 128 Bank Bank

More information

第5章:汇编语言程序设计

第5章:汇编语言程序设计 第 5 章 : 汇编语言程序设计 程 汇编语言指令格式 系统伪指令 存储器选择方式 常用子程序 1 汇编语言程序设计 PIC 指令系统 语言系统 指 CPU 编 器语言 器语言 器语言 设计 用 语言 设计 语言 汇编语言 2 汇编语言指令格式 汇编语言指令格式 ( 指令 ) label opcode operand comment 指令 用 存 指令 指令语 3 汇编语言指令格式 1 指令 用 指令

More information

文件名

文件名 MICROCHIP PIC10F200/202/204/206 6 8 FLASH PIC10F200 PIC10F202 PIC10F204 PIC10F206 RISC CPU 33 12 8 8 4MHz 1 s 4MHz 1% TM ICSP TM ICD POR DRT WDT RC MCLR I/O /CMOS < 350 A @ 2V 4 MHz 100 na @ 2V FLASH 10000

More information

2.5 idlocs PIC idloc idloc 0x1234 ; 0x config idloc HEX errorlevel errorlevel Error (Warning) Message HEX 3-14 errorlevel

2.5 idlocs PIC idloc idloc 0x1234 ; 0x config idloc HEX errorlevel errorlevel Error (Warning) Message HEX 3-14 errorlevel 3.2.3 MPASM PIC 35 35 #include include #include MPASM include PIC MPLAB C:\Program Files\MPLAB IDE\MCHIP_Tools PIC.inc 3-01 #include ; PIC16F877A #include math.asm ; 3-01 MPASM MPLAB

More information

INCF SEC1,F ; 將 SEC1+1 作查表取回對應數字 MOVF SEC1,W banksel STRING1 banksel PORTB RETFIE run_sec2: MOVF SEC2,W SUBLW.5 GOTO run_min ; 將秒個位數歸 0 CLRF SEC1 MOVL

INCF SEC1,F ; 將 SEC1+1 作查表取回對應數字 MOVF SEC1,W banksel STRING1 banksel PORTB RETFIE run_sec2: MOVF SEC2,W SUBLW.5 GOTO run_min ; 將秒個位數歸 0 CLRF SEC1 MOVL ;************************************************ ; Null Clock REV:1.0 by Jed ; www.xuan.idv.tw ;************************************************ INCLUDE P16F84A.INC LIST P=16F84A,R=Dec CONFIG _XT_OSC&_WDT_OFF

More information

USB解决方案.ppt

USB解决方案.ppt USB USB? RS232 USB USB HID U modem ADSL cable modem IrDA Silabs USB CP210x USB UART USB RS-232 USB MCU 15 USB 12 FLASH MCU 3 USB MCU USB MCU C8051F32x 10 ADC 1.5%, Vref CPU 25MIPS 8051 16KB Flash -AMUX

More information

2 PIC PIC 1 / CPU PIC MCU PIC RC

2 PIC PIC 1 / CPU PIC MCU PIC RC 2 PIC PIC 1 /... 2-2 2... 2-3 3... 2-4 4... 2-4 5... 2-4 6 CPU... 2-5 7 PIC MCU... 2-6 8 PIC16... 2-6 9... 2-7 10... 2-7 11 RC... 2-7 12... 2-8 13... 2-8 14 NOP... 2-9 15 PMD... 2-9 16... 2-10 17 WDTWDT...

More information

C PICC C++ C++ C C #include<pic.h> C static volatile unsigned char 0x01; static volatile unsigned char 0x02; static volatile unsigned cha

C PICC C++ C++ C C #include<pic.h> C static volatile unsigned char 0x01; static volatile unsigned char 0x02; static volatile unsigned cha CYPOK CYPOK 1 UltraEdit Project-->Install Language Tool: Language Suite----->hi-tech picc Tool Name ---->PICC Compiler Executable ---->c:hi-picinpicc.exe ( Command-line Project-->New Project-->File Name--->myc

More information

Section1_16bit Arc.ppt

Section1_16bit Arc.ppt 16-bit Elite Program 2009 Summer Section-1 Microchip 16-bit 2005 Microchip Technology Incorporated. All Rights Reserved. Slide 1 MCU CPU (NOP),, (Data Memory), I/O CPU w. ALU/Working Reg. Data Mem. Data

More information

1-1 SH79F6431 A. 2( ) 9~15V ( 12V) U2 U3 3.3V SH79F B. 1(VCC/GND) SH79F6431 C. VDDIO SH79F6431 P4 P5 P0.6 P0.7 VDDIO VDDIO=5V D. 2 V 1.0

1-1 SH79F6431 A. 2( ) 9~15V ( 12V) U2 U3 3.3V SH79F B. 1(VCC/GND) SH79F6431 C. VDDIO SH79F6431 P4 P5 P0.6 P0.7 VDDIO VDDIO=5V D. 2 V 1.0 SH79F6431 1. SH79F6431 1T 8051 FLASH SH79F JET51 Keil µ vision JTAG 1.1. SH79F6431 LQFP64 1.2. (Target Board) SH79F6431 1 V 1.0 1-1 SH79F6431 A. 2( ) 9~15V ( 12V) U2 U3 3.3V SH79F6431 1 2 1 B. 1(VCC/GND)

More information

ARM Cortex-M3 (STM32F) STMicroelectronics ( ST) STM32F103 Core: ARM 32-bit Cortex -M3 CPU 72 MHz, 90 DMIPS with 1.25 DMIPS/MHz Single-cycle multiplica

ARM Cortex-M3 (STM32F) STMicroelectronics ( ST) STM32F103 Core: ARM 32-bit Cortex -M3 CPU 72 MHz, 90 DMIPS with 1.25 DMIPS/MHz Single-cycle multiplica CP Chip Power ARM Cortex-M3 (STM32F) ARM Cortex-M3 (STM32F) STMicroelectronics ( ST) STM32F103 Core: ARM 32-bit Cortex -M3 CPU 72 MHz, 90 DMIPS with 1.25 DMIPS/MHz Single-cycle multiplication and hardware

More information

(Microsoft PowerPoint - 102_ASP TW_CH [\254\333\256e\274\322\246\241])

(Microsoft PowerPoint - 102_ASP TW_CH [\254\333\256e\274\322\246\241]) 102 ASP PIC18F 基礎課程 架構 架構 指令集 指令集 組合語言 組合語言 基本週邊 Microchip Technology Taiwan Slide 1 歡迎參加 102 ASP 教育訓練課程 使用軟體工具 MPLAB IDE v8.xx ( 或更新版本 ) MPASM, MPLINK, MPLIB 使用硬體工具 MPLAB ICD2 Microchip APP001 Workshop

More information

2 Keil µ vision 2.1 1) Keil µ vision2 V2.34 µ vision3 2) Sino_Keil.exe Keil c:\keil\ 3) JET51 USB PC C:\Keil\ USB PC 4) S-L

2 Keil µ vision 2.1 1) Keil µ vision2 V2.34 µ vision3 2) Sino_Keil.exe   Keil c:\keil\ 3) JET51 USB PC C:\Keil\ USB PC 4) S-L 1 SH88F516 8051 64K FLASH 1024 EEPROM SH88F516 JET51 S-Lab Keil µ vision ISP51 Keil µ vision ISP51 ISP51 PC RS232 MCU SH88F516 SH88F516 1.1 SH88F516 1.1 SH88F516 SH88Fxx: QFP44, DIP40 RAM Flash E2 ADC

More information

PROTEUS VSM

PROTEUS  VSM Proteus VSM-- 1/1 PROTEUS VSM Proteus VSM ISIS Prospice VSM Proteus PROSPICE ARM7 PIC AVR HC11 8051 CPU LCD RS232 LED IAR Keil Hitech C make 6000 SPICE SPICE DLL SPICE3F5 14 FM PROTEUS PCB LED/LCD / 300

More information

目 录

目 录 1 Quick51...1 1.1 SmartSOPC Quick51...1 1.2 Quick51...1 1.3 Quick51...2 2 Keil C51 Quick51...4 2.1 Keil C51...4 2.2 Keil C51...4 2.3 1 Keil C51...4 2.4 Flash Magic...9 2.5 ISP...9 2.6...10 2.7 Keil C51...12

More information

(Load Project) (Save Project) (OffLine Mode) (Help) Intel Hex Motor

(Load Project) (Save Project) (OffLine Mode) (Help) Intel Hex Motor 1 4.1.1.1 (Load) 14 1.1 1 4.1.1.2 (Save) 14 1.1.1 1 4.1.2 (Buffer) 16 1.1.2 1 4.1.3 (Device) 16 1.1.3 1 4.1.3.1 (Select Device) 16 2 4.1.3.2 (Device Info) 16 2.1 2 4.1.3.3 (Adapter) 17 2.1.1 CD-ROM 2 4.1.4

More information

AN579

AN579 深圳市英锐恩科技有限公司 单片机集成方案全方位解决服务商 优质智能电子产品 芯 方案解决商 Microchip 产品用户参考手册 深圳市英锐恩科技有限公司 ENROO-TECH(SHENZHEN)CO.,LTD 中国 深圳市福田区福华路嘉汇新城汇商中心 27 楼 2701 Enroo-Tech Technologies CO., Limited Light-Tech International Limited

More information

PICkit2 燒寫器編程器調試器

PICkit2 燒寫器編程器調試器 PICkit2 燒寫器編程器調試器 Part No:MP-Micro-PIC-PICkit2 PICKit2 功能簡介 : PICKIT2 能夠對 Microchip 的 PIC10/12/16/18/24/32 dspic30/dspic33 等幾乎全系列 PIC 的 FLASH 單片機晶片進行線上編程和偵錯 並且 PICKIT2 能夠對 Microchip 的 KEELOQ HCS 系列晶片 MCP250xx

More information

ARM JTAG实时仿真器安装使用指南

ARM JTAG实时仿真器安装使用指南 ARM JTAG Version 1.31 2003. 11. 12 ARM JTAG ARM JTAG.3 ARM 2.1.4 2.2.4 ARM JTAG 3.1 18 3.2 18 3.2.1 Multi-ICE Server.18 3.2.2 ADS..21 ARM JTAG 4.1 Multi-ICE Server 33 4.1.1 Multi-ICE Server..... 33 4.1.2

More information

EK-STM32F

EK-STM32F STMEVKIT-STM32F10xx8 软 件 开 发 入 门 指 南 目 录 1 EWARM 安 装... 1 1.1 第 一 步 : 在 线 注 册... 1 1.2 第 二 步 : 下 载 软 件... 2 1.3 第 三 步 : 安 装 EWARM... 3 2 基 于 STMEVKIT-STM32F10xx8 的 示 例 代 码 运 行... 6 2.1 GPIO Demo... 6 2.2

More information

untitled

untitled EDM12864-GR 1 24 1. ----------------------------------------------------3 2. ----------------------------------------------------3 3. ----------------------------------------------------3 4. -------------------------------------------------------6

More information

目录

目录 ALTERA_CPLD... 3 11SY_03091... 3 12SY_03091...4....5 21 5 22...8 23..10 24..12 25..13..17 3 1EPM7128SLC.......17 3 2EPM7032SLC.......18 33HT46R47......19..20 41..20 42. 43..26..27 5151DEMO I/O...27 52A/D89C51...28

More information

Tel:010-62981668-2930 1

Tel:010-62981668-2930  1 Access 93C46 with SPI function V1.0.0 Jan. 31, 2005 http://www.sunplusmcu.com Tel:010-62981668-2930 http://www.sunplusmcu.com E-mail:mcu@sunplus.com.cn 1 0 0...2 1...3 2...4 2.1...4 2.2...5 3...6 3.1 AT93C46...6

More information

投影片 1

投影片 1 2 理 1 2-1 CPU 2-2 CPU 理 2-3 CPU 類 2 什 CPU CPU Central Processing Unit ( 理 ), 理 (Processor), CPU 料 ( 例 ) 邏 ( 例 ),, 若 了 CPU, 3 什 CPU CPU 了, 行, 利 CPU 力 來 行 4 什 CPU 5 2-2-1 CPU CPU 了 (CU, Control Unit) / 邏

More information

SPHE8202R Design Guide Important Notice SUNPLUS TECHNOLOGY CO. reserves the right to change this documentation without prior notice. Information provi

SPHE8202R Design Guide Important Notice SUNPLUS TECHNOLOGY CO. reserves the right to change this documentation without prior notice. Information provi SPHE8202R Design Guide V2.0 JUN, 2007 19, Innovation First Road Science Park Hsin-Chu Taiwan 300 R.O.C. Tel: 886-3-578-6005 Fax: 886-3-578-4418 Web: www.sunplus.com SPHE8202R Design Guide Important Notice

More information

FM1935X智能非接触读写器芯片

FM1935X智能非接触读写器芯片 FM33A0xx MCU 2017. 05 2.0 1 (http://www.fmsh.com/) 2.0 2 ... 3 1... 4 1.1... 4 1.2... 4 1.3... 5 1.3.1... 5 1.3.2... 5 1.4... 8 1.4.1 LQFP100... 8 1.4.2 LQFP80... 9 1.4.3... 9 2... 15 2.1 LQFP100... 15

More information

1 TPIS TPIS 2 2

1 TPIS TPIS 2 2 1 1 TPIS TPIS 2 2 1. 2. 3. 4. 3 3 4 5 4 TPIS TPIS 6 5 350 Mark Coil F3/F6 350 M 150 M 25 M 7.12M 8 M F3 F6 F4 F7 F8 8M AA 7 350 28V 5V IC HCPL2731 0.5mA 6 8 (TPIS) TPIS 9 7 IC AT89C2051 AT89C2051 CMOS8

More information

2 14 PORTC.1 PORTB.3 PORTA.2/T0 GND PORTB.2 PORTA.0 PORTC.3 PORB.0/OSCO PORTB.1/OSCI PORTC.0 PORTC.2 SH69P21 /SOP PORTA

2 14 PORTC.1 PORTB.3 PORTA.2/T0 GND PORTB.2 PORTA.0 PORTC.3 PORB.0/OSCO PORTB.1/OSCI PORTC.0 PORTC.2 SH69P21 /SOP PORTA 1K 4 SH6610C 4 OTP ROM 1K X 16 RAM 88 X 4-24 - 64 2.4V-5.5V - fosc = 30kHz - 4MHz, = 2.4V - 5.5V - fosc = 4MHz - 8MHz, = 4.5V - 5.5V 11 CMOS I/O 4 ( ) 8 / - 0 PORTA.0 ( / / ) - 0 - PORTB ( ) ( ) - 32.768kHz,

More information

33023A.book(31001A_cn.fm)

33023A.book(31001A_cn.fm) 1 第 1 章 简 介 简 介 目 录 本 章 包 括 下 面 一 些 主 要 内 容 : 1.1 简 介...1-2 1.2 本 手 册 的 宗 旨... 1-3 1.3 器 件 结 构... 1-4 1.4 开 发 支 持... 1-6 1.5 器 件 种 类... 1-7 1.6 格 式 和 符 号 的 约 定... 1-12 1.7 相 关 文 档... 1-14 1.8 相 关 应 用 笔

More information

P4V88+_BIOS_CN.p65

P4V88+_BIOS_CN.p65 1 Main H/W Monitor Boot Security Exit System Overview System Time System Date [ 17:00:09] [Wed 12/22/2004] BIOS Version : P4V88+ BIOS P1.00 Processor Type : Intel (R) Pentium (R) 4 CPU 2.40 GHz Processor

More information

PIC16F87X基本指令說明

PIC16F87X基本指令說明 PIC16F87X 基本指令說明 ADDLW K 是 Add Literal and W 縮寫,ADDLW K 此指令是將 W 的內容與數值 K 相加, 並將加完結果存於 W 內 即 (W)+K (W) 例 :W=0X11,K=0X15, 執行 ADDLW K 之後, 結果為 W=0X26,K=0X15 ADDWF 是 Add W and f 縮寫,ADDWF F,d 此指令是將 W 之內容與 RAM(file)

More information

audiogram3 Owners Manual

audiogram3 Owners Manual USB AUDIO INTERFACE ZH 2 AUDIOGRAM 3 ( ) * Yamaha USB Yamaha USB ( ) ( ) USB Yamaha (5)-10 1/2 AUDIOGRAM 3 3 MIC / INST (XLR ) (IEC60268 ): 1 2 (+) 3 (-) 2 1 3 Yamaha USB Yamaha Yamaha Steinberg Media

More information

C语言的应用.PDF

C语言的应用.PDF AVR C 9 1 AVR C IAR C, *.HEX, C,,! C, > 9.1 AVR C MCU,, AVR?! IAR AVR / IAR 32 ALU 1KBytes - 8MBytes (SPM ) 16 MBytes C C *var1, *var2; *var1++ = *--var2; AVR C 9 2 LD R16,-X ST Z+,R16 Auto (local

More information

Embargoed until May 4, 2004 EXPRESS 40 NI HQ 3000 1000 5000 ~ 500 10% / 500 85% NI LabVIEW 7 Express Express EXPRESS : #1 GPS Navigation PC/WWW/Email CD+RW Mobile Phone PDA DVD+RW Satellite Car Alarm/Radio

More information

DPJJX1.DOC

DPJJX1.DOC 8051 111 2K 1 2 3 ' ' 1 CPU RAM ROM / A/D D/A PC CPU 40 68 10 20 8 51 PIII 8051 2 MCS51 8051 8031 89C51 8051 8031 89C51? MCS51 INTEL INTEL 8031 8051 8751 8032 8052 8752 8051 8051 8051 MCS51 8031 8031

More information

1 Project New Project 1 2 Windows 1 3 N C test Windows uv2 KEIL uvision2 1 2 New Project Ateml AT89C AT89C51 3 KEIL Demo C C File

1 Project New Project 1 2 Windows 1 3 N C test Windows uv2 KEIL uvision2 1 2 New Project Ateml AT89C AT89C51 3 KEIL Demo C C File 51 C 51 51 C C C C C C * 2003-3-30 pnzwzw@163.com C C C C KEIL uvision2 MCS51 PLM C VC++ 51 KEIL51 KEIL51 KEIL51 KEIL 2K DEMO C KEIL KEIL51 P 1 1 1 1-1 - 1 Project New Project 1 2 Windows 1 3 N C test

More information

第 15 章 程 式 編 写 語 言 15.1 程 式 編 写 語 言 的 角 色 程 式 編 寫 語 言 是 程 式 編 寫 員 與 電 腦 溝 通 的 界 面 語 法 是 一 組 規 則 讓 程 式 編 寫 員 將 字 詞 集 合 起 來 電 腦 是 處 理 位 元 和 字 節 的 機 器, 與

第 15 章 程 式 編 写 語 言 15.1 程 式 編 写 語 言 的 角 色 程 式 編 寫 語 言 是 程 式 編 寫 員 與 電 腦 溝 通 的 界 面 語 法 是 一 組 規 則 讓 程 式 編 寫 員 將 字 詞 集 合 起 來 電 腦 是 處 理 位 元 和 字 節 的 機 器, 與 程 式 編 写 語 言 在 完 成 這 章 後, 你 將 能 夠 了 解 程 式 編 写 語 言 的 功 能 了 解 高 階 語 言 和 低 階 語 言 之 間 的 分 別 知 道 翻 譯 程 式 的 意 義 和 能 夠 把 翻 譯 程 式 分 類 為 : 匯 編 程 式 編 譯 程 式 和 解 譯 程 式 認 識 不 同 翻 譯 程 式 的 優 點 和 缺 點 程 式 是 指 揮 電 腦 的 指

More information

Cube20S small, speedy, safe Eextremely modular Up to 64 modules per bus node Quick reaction time: up to 20 µs Cube20S A new Member of the Cube Family

Cube20S small, speedy, safe Eextremely modular Up to 64 modules per bus node Quick reaction time: up to 20 µs Cube20S A new Member of the Cube Family small, speedy, safe Eextremely modular Up to 64 modules per bus de Quick reaction time: up to 20 µs A new Member of the Cube Family Murrelektronik s modular I/O system expands the field-tested Cube family

More information

General Description: Preliminary TTP916 Consumer IC VCD/DVD LCD Green mode Stand-by mode( 1W ) Features: 2.2V-5.5V LCD RAM read condition 2.6V-5.5V RC

General Description: Preliminary TTP916 Consumer IC VCD/DVD LCD Green mode Stand-by mode( 1W ) Features: 2.2V-5.5V LCD RAM read condition 2.6V-5.5V RC General Description: IC VCD/DVD LCD Green mode Stand-by mode( 1W ) Features: 2.2V-5.5V LCD RAM read condition 2.6V-5.5V RC 15K 300pF 256KHZ default on 32 function key Built-in TT6221/TT6222 decoder Provide

More information

P4VM800_BIOS_CN.p65

P4VM800_BIOS_CN.p65 1 Main H/W Monitor Boot Security Exit System Overview System Time System Date [ 17:00:09] [Fri 02/25/2005] BIOS Version : P4VM800 BIOS P1.00 Processor Type : Intel (R) Pentium (R) 4 CPU 2.40 GHz Processor

More information

1.1 ML_ONOFF = 1 Q 3 Q 8 C 0.3V M 2 L 1 ML_ONOFF = 0 Q 3 Q 8 C 1. + R31 VCC R21 10K ML_ONOFF R15 0:off 1:on 1K Green Light VCC=5V L1 Q VDD=12V C

1.1 ML_ONOFF = 1 Q 3 Q 8 C 0.3V M 2 L 1 ML_ONOFF = 0 Q 3 Q 8 C 1. + R31 VCC R21 10K ML_ONOFF R15 0:off 1:on 1K Green Light VCC=5V L1 Q VDD=12V C AUTOMATIC TROLLEY H K Hwang K K Chen J-S Lin S-C Wang M-L Li C-C Lin W-B Lin Dept. Of Electrical Engineering Far East College ABSTRACT This paper proposes an automatic trolley which can move automatically

More information

1 CPU

1 CPU 2000 Tel 82316285 82317634 Mail liuxd@buaa.edu.cn 1 CPU 2 CPU 7 72 A B 85 15 3 1/2 M301 2~17 : 3/4 1/2 323 IBM PC 1. 2. 3. 1. 2. 3. 1.1 Hardware Software 1.2 M3 M2 M1 1.2 M3 M1 M2 M2 M1 M1 M1 1.2 M3 M1

More information

51 C 51 isp 10 C PCB C C C C KEIL

51 C 51 isp 10   C   PCB C C C C KEIL http://wwwispdowncom 51 C " + + " 51 AT89S51 In-System-Programming ISP 10 io 244 CPLD ATMEL PIC CPLD/FPGA ARM9 ISP http://wwwispdowncom/showoneproductasp?productid=15 51 C C C C C ispdown http://wwwispdowncom

More information

12232A LED LED LED EL EL CCFL EL CCF

12232A LED LED LED EL EL CCFL EL CCF 12232A 0 50-20 +70-30 +85 LED LED LED EL EL CCFL EL CCF 122 x 32 1/32Duty 1/5Bias 6:00 STN( ), EL LED EL/100VAC 400HZ LED/4.2VDC 1 / VDD-VSS 0 6.5 V Ta=25 LCD VDD-V0 0 12.0 V V1 0 VDD V VDD-VSS - 4.75

More information

行业

行业 PCL-818HD/HG/L PCL-818HD/HG/L 1.1...2 1.1.1 /...2 1.1.2 ID...2 1.2...3 1.3...3 2.1...3 2.2...3 2.2.1...4 2.2.2...4 2.2.3 DMA...5 2.2.4...5 2.2.5 D/A...5 2.2.6...6 2.2.7 EXE.trigger GATE0...6 2.2.8 FIFO

More information

邏輯分析儀的概念與原理-展示版

邏輯分析儀的概念與原理-展示版 PC Base Standalone LA-100 Q&A - - - - - - - SCOPE - - LA - - ( Embedded ) ( Skew ) - Data In External CLK Internal CLK Display Buffer ASIC CPU Memory Trigger Level - - Clock BUS Timing State - ( Timing

More information

Bus Hound 5

Bus Hound 5 Bus Hound 5.0 ( 1.0) 21IC 2007 7 BusHound perisoft PC hound Bus Hound 6.0 5.0 5.0 Bus Hound, IDE SCSI USB 1394 DVD Windows9X,WindowsMe,NT4.0,2000,2003,XP XP IRP Html ZIP SCSI sense USB Bus Hound 1 Bus

More information

逢 甲 大 學

逢  甲  大  學 益 老 年 不 易更 例 不 異 列 - I - 錄 錄 流 錄 六 來 錄 - II - 錄 錄 錄 錄 錄 錄 參 料 錄 - III - 料 讀 讀 錄 讀 數 錄 錄 錄 錄 錄 - IV - 錄 錄 行 錄 錄 錄 錄 讀 錄 錄 錄 讀 錄 錄 - V - 了 說 力 兩 了 - 1 - 列 邏 路 列 不 不 FLEX 10K Devices at a Glance Feature

More information

行业

行业 PCL-1800 PCL-1800 1.1...2 1.1.1 1K FIFO...2 1.1.2...2 1.1.3 16...3 1.1.4...3 1.1.5...3 1.1.6...3 1.2...3 1.3...4 1.4...5 2.1...5 2.2...6 2.2.1...6 2.2.2...6 2.2.3 D/A...7 2.2.4...7 2.2.5 TRIG0 GATE0...8

More information

Microsoft PowerPoint - CA_02 Chapter5 Part-I_Single _V2.ppt

Microsoft PowerPoint - CA_02 Chapter5 Part-I_Single _V2.ppt Chapter5- The Processor: Datapath and Control (Single-cycle implementation) 臺大電機系吳安宇教授 V. 3/27/27 V2. 3/29/27 For 27 DSD Course 臺大電機吳安宇教授 - 計算機結構 Outline 5. Introduction 5.2 Logic Design Conventions 5.3

More information

P3B-F Pentium III/II/Celeron TM

P3B-F Pentium III/II/Celeron TM P3B-F Pentium III/II/Celeron TM 1999 2 3 4 5 6 7 8 9 10 11 12 1 2 3 4 5 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 13 R PS2 KBMS USB COM1 COM2 JTPWR ATXPWR PWR_FAN CPU_FAN Row 0 1 2 3 4 5 6 7 DSW JP20

More information

System Design and Setup of a Robot to Pass over Steps Abstract In the research, one special type of robots that can pass over steps is designed and se

System Design and Setup of a Robot to Pass over Steps Abstract In the research, one special type of robots that can pass over steps is designed and se 8051 8051 System Design and Setup of a Robot to Pass over Steps Abstract In the research, one special type of robots that can pass over steps is designed and setup. This type of robot uses two kinds of

More information

《计算机应用基础》学习材料(讲义)

《计算机应用基础》学习材料(讲义) 计 算 机 应 用 基 础 学 习 材 料 ( 讲 义 ) Fundamentals of Computer Application 2014-3-22 JIANGSU OPEN UNIVERSITY 第 二 学 习 周 计 算 机 基 础 知 识 ( 一 ) 导 学 在 本 学 习 周, 我 们 主 要 的 任 务 是 认 识 计 算 机 你 将 知 道 计 算 机 是 什 么 时 候 产 生 的,

More information

RESET OSCO OSCI OSC CPU WDTEN RC RESET PRESCALER PORTA (4-BITS) WATCHDOG TIMER Power on PORTB (4-BITS) PORTA [0:3] PORTB [0:3] LPD PORTC (4-BITS) LPDO

RESET OSCO OSCI OSC CPU WDTEN RC RESET PRESCALER PORTA (4-BITS) WATCHDOG TIMER Power on PORTB (4-BITS) PORTA [0:3] PORTB [0:3] LPD PORTC (4-BITS) LPDO 4K / I/O 4 SH6610C 4 OTPROM 4K X 16 SH69P25 MASK ROM 4K X 16 SH69K25 RAM 192 X 4-32 - 160 2.4V - 5.5V 5.0V 22 I/O 4 8 / PORTA-PORTF / - Timer0 - PORTB & PORTC / - 32.768kHz 4MHz - 400kHz 4MHz - RC 400kHz

More information

ATMEL AT90S8515 AVR CPU AVR AVR AVR ATMEL RISC 32 8 r0 r X Y Z R0 R1 R2 R13 R14 R15 R16 R17 R26 R27 R28 R29 R30 R31 0x00 0x

ATMEL AT90S8515 AVR CPU AVR AVR AVR ATMEL RISC 32 8 r0 r X Y Z R0 R1 R2 R13 R14 R15 R16 R17 R26 R27 R28 R29 R30 R31 0x00 0x 115 AVR W.V. Awdrey ATMEL AVR PIC AVR PIC AVR RISC AVR PIC AVR AVR AVR AVR AVR ATtiny15 AVR AVR AVR RAM ROM 121 116 122 ATMEL AT90S8515 AVR CPU AVR AVR AVR ATMEL RISC 32 8 r0 r31 3 16 X Y Z 6-1 118 7 0

More information

AN INTRODUCTION TO PHYSICAL COMPUTING USING ARDUINO, GRASSHOPPER, AND FIREFLY (CHINESE EDITION ) INTERACTIVE PROTOTYPING

AN INTRODUCTION TO PHYSICAL COMPUTING USING ARDUINO, GRASSHOPPER, AND FIREFLY (CHINESE EDITION ) INTERACTIVE PROTOTYPING AN INTRODUCTION TO PHYSICAL COMPUTING USING ARDUINO, GRASSHOPPER, AND FIREFLY (CHINESE EDITION ) INTERACTIVE PROTOTYPING 前言 - Andrew Payne 目录 1 2 Firefly Basics 3 COMPONENT TOOLBOX 目录 4 RESOURCES 致谢

More information

四位微控制器ML64168_ _.doc

四位微控制器ML64168_ _.doc SSSC /4168P 2005 8 4 4, (ADC), LCD Driver, (Buzzer), 1 3 CPU17 CPU 26 33 42 45 48 73 79 85 89 A/D 92 111 125 128 131 SSU4168P 133 143 A: / 153 B: 156 C: 158 D: 160 E: 161 F: 163 G: PAD 167 2 ,, 11 4 CMOS

More information

Microsoft PowerPoint - C15_LECTURE_NOTE_04.ppt

Microsoft PowerPoint - C15_LECTURE_NOTE_04.ppt MACHINE LANGUAGE CODING AND THE DEBUG SOFTWARE DEVELOPMENT PROGRAM OF THE PC General instruction format for machine code 611 37100 微處理機原理與應用 Lecture 04-4 MACHINE LANGUAGE CODING AND THE DEBUG SOFTWARE

More information

<4D F736F F D20B3E6B4B9A4F930365F32A443AC71C5E3A5DCBEB9B1B1A8EE2E646F63>

<4D F736F F D20B3E6B4B9A4F930365F32A443AC71C5E3A5DCBEB9B1B1A8EE2E646F63> 七段顯示器控制電路四位數 _ 使用解碼器驅動 +5 V 10 uf 8.2 k 12 MHz 20 pf 1 2 3 4 5 6 7 8 9 P1.0 P1.1 P1.2 P1.3 P1.4 P1.5 P1.6 P1.7 RESET 10 P3.0 11 12 13 14 15 16 17 18 19 20 P3.1 P3.2 P3.3 P3.4 P3.5 P3.6 P3.7 XTAL2 XTAL1

More information

Microsoft PowerPoint - C15_LECTURE_NOTE_04.ppt

Microsoft PowerPoint - C15_LECTURE_NOTE_04.ppt MACHINE LANGUAGE CODING AND THE DEBUG SOFTWARE DEVELOPMENT PROGRAM OF THE PC MACHINE LANGUAGE CODING AND THE DEBUG SOFTWARE DEVELOPMENT PROGRAM OF THE PC 4.1 Converting Assembly Language Instructions to

More information

JTAG ICE PC JTAG ICE JTAG ISP... 5 IDE AVR STUDIO JTAGICE JTAGICE... 12

JTAG ICE PC JTAG ICE JTAG ISP... 5 IDE AVR STUDIO JTAGICE JTAGICE... 12 ... 3... 3... 3... 3... 4 1JTAG ICE PC... 4 2JTAG ICE... 4 3... 4 4... 4 5JTAG... 5 6ISP... 5 IDE... 6 1 AVR STUDIO... 6 2 JTAGICE... 6 3JTAGICE... 12 4.... 16 5.... 17 6. JTAG ICE... 19 ISP... 20 1PonyProg2000...

More information

Microsoft PowerPoint - C15_LECTURE_NOTE_05.ppt

Microsoft PowerPoint - C15_LECTURE_NOTE_05.ppt 8088/8086 MICROPROCSOR PROGRAMMING INTEGER INSTRUCTIONS AND COMPUTATIONS The MOVE The move (MOV) instruction is used to transfer a byte or a word of data from a source operand to a destination operand

More information

Ác Åé å Serial ATA ( Sil3132) S A T A (1) SATA (2) BIOS SATA (3)* RAID BIOS RAID (4) SATA (5) SATA (a) S A T A ( S A T A R A I D ) (b) (c) Windows XP

Ác Åé å Serial ATA ( Sil3132) S A T A (1) SATA (2) BIOS SATA (3)* RAID BIOS RAID (4) SATA (5) SATA (a) S A T A ( S A T A R A I D ) (b) (c) Windows XP Serial ATA ( Sil3132)...2 (1) SATA... 2 (2) B I O S S A T A... 3 (3) RAID BIOS RAID... 6 (4) S A T A... 10 (5) S A T A... 12 Ác Åé å Serial ATA ( Sil3132) S A T A (1) SATA (2) BIOS SATA (3)* RAID BIOS

More information

ARK-14013/14017/14018

ARK-14013/14017/14018 ARK-24017F 8 ARK-24017F : 8 2 ii 1997~2000,,,,,, 1...3 1.1 ARK...3 1.2 ARK-24017F...3 ARK-24017F?...3 ARK-24017F...3 ARK-24017F...3 ARK-24017F...5 ARK-24017F...6...7 2.1...7 2.2...7 ARK...7...8...8...8...9

More information

Microsoft Word - LD5515_5V1.5A-DB-01 Demo Board Manual

Microsoft Word - LD5515_5V1.5A-DB-01 Demo Board Manual Subject LD5515 Demo Board Model Name (5V/1.5A) Key Features Built-In Pump Express TM Operation Flyback topology with PSR Control Constant Voltage Constant Current High Efficiency with QR Operation (Meet

More information

untitled

untitled niosii H:\DB2005\project\niosDK\Example\NiosSmall QuartusII4.2 File -> New Project Wizard Diectory,Name,Top-Level Entity Add Files EDA Tools Setting Finish, OK H:\DB2005\project\niosDK\Example\NiosSmall

More information

701PIC Introduction to PICMicro MCUs

701PIC Introduction to PICMicro MCUs 701 PIC PICmicro MCU 介绍 PIC16 系列产品的汇编编程 HANDS-ON Microchip Technology Incorporated. All Rights Reserved. 701 PIC PIC MCU - Introduction to Programming 1 日程 讲述部分 讲述 90 分钟 休息 20 分钟 实验部分 1 2 个实验 60 分钟 休息

More information

Pin Configurations Figure2. Pin Configuration of FS2012 (Top View) Table 1 Pin Description Pin Number Pin Name Description 1 GND 2 FB 3 SW Ground Pin.

Pin Configurations Figure2. Pin Configuration of FS2012 (Top View) Table 1 Pin Description Pin Number Pin Name Description 1 GND 2 FB 3 SW Ground Pin. Features Wide 3.6V to 32V Input Voltage Range Output Adjustable from 0.8V to 30V Maximum Duty Cycle 100% Minimum Drop Out 0.6V Fixed 300KHz Switching Frequency 12A Constant Output Current Capability Internal

More information

1

1 磁軌式讀卡機 1288 系列 使用手冊 Version 1.0 1 2 3 4 5 6 7 8 9 10 11 12 1288 MSR Micro controller : With Decoder Open Visual COM port to read data (UART Interface) From 1288 Or direct control 1288 by sending Command

More information

2/80 2

2/80 2 2/80 2 3/80 3 DSP2400 is a high performance Digital Signal Processor (DSP) designed and developed by author s laboratory. It is designed for multimedia and wireless application. To develop application

More information

: WICE-PIC 1.1 WICE-PIC 1.2 WICE-PIC : WICE-PIC WICE-PIC 2.5 WICE-PIC 2.6 : : : : A. B.E.V.Board 1. Internet Internet WWW: http//

: WICE-PIC 1.1 WICE-PIC 1.2 WICE-PIC : WICE-PIC WICE-PIC 2.5 WICE-PIC 2.6 : : : : A. B.E.V.Board 1. Internet Internet WWW: http// : WICE-PIC 1.1 WICE-PIC 1.2 WICE-PIC : WICE-PIC 2.1 2.2 2.3 2.4 WICE-PIC 2.5 WICE-PIC 2.6 : : : : A. B.E.V.Board 1. Internet Internet WWW: http//www.leap.com.tw 2. : TEL: 886-2-7884800 FAX: 886-2-6512307

More information

A Preliminary Implementation of Linux Kernel Virus and Process Hiding

A Preliminary Implementation of Linux Kernel Virus and Process Hiding 邵 俊 儒 翁 健 吉 妍 年 月 日 学 号 学 号 学 号 摘 要 结 合 课 堂 知 识 我 们 设 计 了 一 个 内 核 病 毒 该 病 毒 同 时 具 有 木 马 的 自 动 性 的 隐 蔽 性 和 蠕 虫 的 感 染 能 力 该 病 毒 获 得 权 限 后 会 自 动 将 自 身 加 入 内 核 模 块 中 劫 持 的 系 统 调 用 并 通 过 简 单 的 方 法 实 现 自 身 的

More information

untitled

untitled 8086/8088 CIP /. 2004.8 ISBN 7-03-014239-X.... TP313 CIP 2004 086019 16 100717 http://www.sciencep.com * 2004 8 2004 8 1 5 500 787 1092 1/16 16 1/2 391 000 1 2 ii 1 2 CAI CAI 3 To the teacher To the student

More information

2_dvdr3380_97_CT_21221b.indd

2_dvdr3380_97_CT_21221b.indd 64 65 66 ALL 3 67 a STANDBY-ON 2 a b c d e f g h i j k l b TIMER c SYSTEM-MENU d e SELECT f REC g. > h TOP MENU i ANGLE j RETURN k SUBTITLE l REC MODE 68 m n REC SOURCE o DISC-MENU p OK q EDIT r PLAYÉ

More information

行业

行业 PCI-1710 1.1...2 1.1.1...2 1.1.2...2 1.1.3 FIFO( )...2 1.1.4...2 1.1.5...2 1.1.6 16 16...3 1.1.7...3 1.2...3 1.3...3 2.1...3 2.2...4 2.2.1...4 2.2.2...5 2.3...9 2.3.1...10 2.3.2... 11 2.3.3...12 2.3.4...12

More information

(02)2809-4742 (02)2809-4742 27 28 (02)2809-4742 85 3 (02)3343-3300 156 12 (02

(02)2809-4742 (02)2809-4742 27 28 (02)2809-4742 85 3 (02)3343-3300  156 12 (02 3475 http://mops.tse.com.tw http://www.ic-fortune.com (02)2809-4742 denis.lee@ic-fortune.com (02)2809-4742 nanhui.lee@ic-fortune.com 27 28 (02)2809-4742 85 3 (02)3343-3300 http://www.fhs.com.tw 156 12

More information

els0xu_zh_nf_v8.book Page Wednesday, June, 009 9:5 AM ELS-0/0C.8

els0xu_zh_nf_v8.book Page Wednesday, June, 009 9:5 AM ELS-0/0C.8 els0xu_zh_nf_v8.book Page Wednesday, June, 009 9:5 AM ELS-0/0C.8 Yamaha ELS-0/0C..8 LCD ELS-0/0C v. typeu LCD ELS-0/0C typeu / -6 / [SEARCH] / - ZH ELS-0/0C.8 els0xu_zh_nf_v8.book Page Wednesday, June,

More information

,Microchip Technology PIC LCD, PIC16F913/914/ 916/917/946 PIC18F6390/6490/8390/8490 PIC16F65J90/85J90 Microchip LCD LCD, Microchip 的优势 LCD PIC, LCD LC

,Microchip Technology PIC LCD, PIC16F913/914/ 916/917/946 PIC18F6390/6490/8390/8490 PIC16F65J90/85J90 Microchip LCD LCD, Microchip 的优势 LCD PIC, LCD LC LCD PIC 单片机解决方案 集成 LCD 驱动器模块的 PIC 单片机 www.microchip.com/lcd ,Microchip Technology PIC LCD, PIC16F913/914/ 916/917/946 PIC18F6390/6490/8390/8490 PIC16F65J90/85J90 Microchip LCD LCD, Microchip 的优势 LCD PIC,

More information

68369 (ppp quickstart guide)

68369 (ppp quickstart guide) Printed in USA 04/02 P/N 68369 rev. B PresencePLUS Pro PC PresencePLUS Pro PresencePLUS Pro CD Pass/Fails page 2 1 1. C-PPCAM 2. PPC.. PPCAMPPCTL 3. DB9D.. STPX.. STP.. 01 Trigger Ready Power 02 03 TRIGGER

More information

学习MSP430单片机推荐参考书

学习MSP430单片机推荐参考书 MSP430 16 MSP430 C MSP430 C MSP430 FLASH 16 1 CPU 16 ALU 16 PC SP SR R4~R15 2 3 00-FFH 100-1FFH 4 5 1 2 51 24 27 6 1 2 3 4 5 6 4 12 SR SP SR CPU SR CPU C Z N GIE CPUOff CPU OscOff SCG0 SCG1 CPU EXIT SP

More information

untitled

untitled 0755 85286856 0755 82484849 路 4.5V ~5.5V 流 @VDD=5.0V,

More information

iml v C / 0W EVM - pplication Notes. IC Description The iml8683 is a Three Terminal Current Controller (TTCC) for regulating the current flowin

iml v C / 0W EVM - pplication Notes. IC Description The iml8683 is a Three Terminal Current Controller (TTCC) for regulating the current flowin iml8683-220v C / 0W EVM - pplication Notes iml8683 220V C 0W EVM pplication Notes Table of Content. IC Description... 2 2. Features... 2 3. Package and Pin Diagrams... 2 4. pplication Circuit... 3 5. PCB

More information

untitled

untitled C 8051 MCU SPI EEPROM Alexandru Valeanu Microchip Technology Inc. Microchip Technology 25XXX EEPROM SPI 25XXX EEPROM SO 25XXX EEPROM 3MHz 20 MHz SPI HOLD 25XXX EEPROM EEPROM MCU HOLD 25XXX EEPROM SPI EEPROM

More information

iml v C / 4W Down-Light EVM - pplication Notes. IC Description The iml8683 is a Three Terminal Current Controller (TTCC) for regulating the cur

iml v C / 4W Down-Light EVM - pplication Notes. IC Description The iml8683 is a Three Terminal Current Controller (TTCC) for regulating the cur iml8683-220v C / 4W Down-Light EVM - pplication Notes iml8683 220V C 4W Down Light EVM pplication Notes Table of Content. IC Description... 2 2. Features... 2 3. Package and Pin Diagrams... 2 4. pplication

More information

Microsoft Word - WAP001 Workshop Board 中文 Manual VER.3.doc

Microsoft Word - WAP001 Workshop Board 中文 Manual VER.3.doc MICROCHIP EVM Board:APP00 Ver..0 補充資料 APP00 Version.0 所做之重要功能修正或提升 A. 增加與 PICkit ICD LE 等 Debugger/Programmer 相容的 -pin.mm 單排排針介面, 增加使用的彈性 B. 增加 PICFXXXX J 系列之 support, 經由 JP0 可以選擇要使用 PICF J Family 或是標準的

More information

6 C51 ANSI C Turbo C C51 Turbo C C51 C51 C51 C51 C51 C51 C51 C51 C C C51 C51 ANSI C MCS-51 C51 ANSI C C C51 bit Byte bit sbit

6 C51 ANSI C Turbo C C51 Turbo C C51 C51 C51 C51 C51 C51 C51 C51 C C C51 C51 ANSI C MCS-51 C51 ANSI C C C51 bit Byte bit sbit 6 C51 ANSI C Turbo C C51 Turbo C C51 C51 C51 C51 C51 C51 C51 C51 C51 6.1 C51 6.1.1 C51 C51 ANSI C MCS-51 C51 ANSI C C51 6.1 6.1 C51 bit Byte bit sbit 1 0 1 unsigned char 8 1 0 255 Signed char 8 11 128

More information

untitled

untitled MODBUS 1 MODBUS...1 1...4 1.1...4 1.2...4 1.3...4 1.4... 2...5 2.1...5 2.2...5 3...6 3.1 OPENSERIAL...6 3.2 CLOSESERIAL...8 3.3 RDMULTIBIT...8 3.4 RDMULTIWORD...9 3.5 WRTONEBIT...11 3.6 WRTONEWORD...12

More information

Microsoft Word - MSP430 Launchpad 指导书.docx

Microsoft Word - MSP430 Launchpad 指导书.docx Contents 3... 9... 14 MSP430 LAUNCHPAD 指导书 3 第一部分第一个工程 New Project File > New > CCS Project Project name: ButtonLED Device>Family: MSP430 Variant: MSP430G2553 Project templates and examples : Empty Project

More information

52C-14266-5

52C-14266-5 逻 辑 分 析 仪 基 础 知 识 入 门 手 册 www.tektronix.com.cn/logic_analyzers 15 入 门 手 册 目 录 引 言 3-4 起 源 3 数 字 示 波 器 3 逻 辑 分 析 仪 4 逻 辑 分 析 仪 操 作 5-13 连 接 被 测 系 统 5 探 头 5 设 置 逻 辑 分 析 仪 7 设 置 时 钟 模 式 7 设 置 触 发 7 采 集 状

More information

Chroma 61500/ bit / RMS RMS VA ()61500 DSP THD /61508/61507/61609/61608/ (61500 ) Chroma STEP PULSE : LISTLIST 100 AC DC

Chroma 61500/ bit / RMS RMS VA ()61500 DSP THD /61508/61507/61609/61608/ (61500 ) Chroma STEP PULSE : LISTLIST 100 AC DC MODEL 61509/61508/61507/ 61609/61608/61607 PROGRAMMABLE AC POWER SOURCE MODEL 61509/61508/61507/ 61609/61608/61607 61509/61609: 6kVA 61508/61608: 4.5kVA 61507/61607: 3kVA : 0-175V/0-350V/Auto : DC, 15Hz-2kHz

More information

行业

行业 PCI-1716/1716L 1.1...2 1.1.1...2 1.1.2 / /SD*/BU*...2 1.1.3 FIFO( )...2 1.1.4...2 1.1.5 16 16...3 1.1.6...3 1.1.7 ID...3 1.2...3 2.1...3 2.2...4 2.2.1...4 2.2.2...6 2.3... 11 2.3.1... 11 2.3.2...12 2.3.3...13

More information

Serial ATA ( nvidia nforce4 Ultra/SLI)...2 (1) SATA... 2 (2) B I O S S A T A... 3 (3) RAID BIOS RAID... 6 (4) S A T A... 9 (5) S A T A (6) Micro

Serial ATA ( nvidia nforce4 Ultra/SLI)...2 (1) SATA... 2 (2) B I O S S A T A... 3 (3) RAID BIOS RAID... 6 (4) S A T A... 9 (5) S A T A (6) Micro Serial ATA ( nvidia nforce4 Ultra/SLI)...2 (1) SATA... 2 (2) B I O S S A T A... 3 (3) RAID BIOS RAID... 6 (4) S A T A... 9 (5) S A T A... 11 (6) Microsoft Windows 2000... 14 Ác Åé å Serial ATA ( nvidia

More information

MATLAB 1

MATLAB 1 MATLAB 1 MATLAB 2 MATLAB PCI-1711 / PCI-1712 MATLAB PCI-1711 / PCI-1712 MATLAB The Mathworks......1 1...........2 2.......3 3................4 4. DAQ...............5 4.1. DAQ......5 4.2. DAQ......6 5.

More information

Aquasnap Junior 30RH/RA RH/RA

Aquasnap Junior 30RH/RA RH/RA Aquasnap Junior 30RH/RA007-013 - 2004 11 25 1 30RH/RA007-013 2 30RH/RA007-013 30RH/ RA007-013 30RH/RA Junior Aquasnap CCN PRO-Dialog Plus PRO-DIALOG Plus PRO-Dialog Plus PID PRO-Dialog Plus PRO-Dialog

More information