?? 877i2ca.asm
字號:
;****************************************************
;* 877I2CA.asm *
;* Very simple I2C sample program without Display *
;****************************************************
;* *
;* Written by: Calvin Ho *
;* Senior Applications Engr. *
;* Microchip Technology Inc. *
;* Date: 12 April 2000 *
;* Revision: 1.00 *
;****************************************************
;*********************************************************************************************
; This source code provides a demonstration of the MSSP peripheral
; on the PIC16F877 MCU.
; The additional external subroutine are used for LCD Module
; PIC16F877 磅︽繵瞯 : 4 Mhz
;
; The subroutines for I2C
; :I2C_BYTE_READ ; Read a Byte from Address I2C_Addr and put into I2C_Data
; :I2C_BYTE_WRITE ; Write to I2C_Addr with data @ I2C_Data
; :I2C_ACK_CHECK ; Wait until I2C device can accept further command
; :InitI2C ; Initial I2C Module
; :StartI2C ; Set START Condition !!
; :StopI2C ; Set STOP Condition
; :RstartI2C ; Set Restart Condition
; :RecI2C ; Enable I2C Receive
; :ACKI2C ; Initial ACK response
; :NACKI2C ; Initial NACK response
; :WaitI2C ; Wait until SSPIF Set
;*********************************************************************************************
list p=16f877
#include <p16f877.inc>
CBLOCK 0x20
I2C_Data
I2C_Addr
ENDC
w_temp EQU 0x72
status_temp EQU 0x73
pclath_temp EQU 0x74
;********************************************
; Locates startup code @ the reset vector
;********************************************
Reset_Addr
org 0x00
nop
goto Prog_Main
nop
nop
;***************************************************************************
;**** The Start Address of ISR is 0x004
;**** "PUSH" & "POP"
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -