参数资料
型号: DM163001
厂商: Microchip Technology
文件页数: 47/57页
文件大小: 0K
描述: BOARD DEMO PICDEM-1
标准包装: 3
其它名称: DM163001R
DM163001R-ND
PICDEM-1
Chapter 6. USART Demo – PIC17C42
btfss
call
goto
TEMP,1
Xmit
Loop
; check for key press
; send next value
; check again
;
;
Init_ports
movlb 0 ; select bank 0
clrf DDRB, F ; port b all ouptuts
clrf PORTB, F ; and all low.
return
;
; This routine initailizes the serial port. Baud rate, receive interrupt
; software flags are initailized.
;
Init_serial
movlb 0 ; select bank 0
movlw .25 ; select 9600 baud
movfp WREG,SPBRG ; /
movlw 0x90 ; set up serial pins
movfp WREG,RCSTA ; /
clrf TXSTA, F ; setup transmit status
movlb 1 ; select bank 1
clrf PIR, F ; clear all interrupts
clrf PIE, F ; clear all enables
bsf _rcie ; enable receive interrupt
movlb 0 ; select bank 0
bsf _txen ; enable transmit
bsf _peie ; enable peripheral ints
retfie
;
; This routine handles all the peripheral interrupts. In this example
; only the receive interrupt is handled.
; check for receive interrupts only
;
Service_perf
bcf _peie ; disable perf int
movlb 1 ; bank 1
btfsc _rbfl ; RX buffer full?
call Service_recv ; yes then service
Exit_perf
bsf _peie ; enable peripheral int
retfie
;
; This routine services the serially received info.
Service_recv
movlb
0
movfp
movwf
RCREG,WREG
PORTB
; load received value
? 1999 Microchip Technology Inc.
DS33015C-page 43
相关PDF资料
PDF描述
DM163004-LT BOARD DEMO PICDEM.NET
DM163005 KIT EVAL PIC16C432/433 LIN BUSS
DM163007 PICDEM CAN-LIN 1 FOR 18C658/858
DM163008 KIT MCP2120/2150 FOR IRDA COMM
DM163010 BOARD DEMO PICDEM USB
相关代理商/技术参数
参数描述
DM163002 制造商:Microchip Technology Inc 功能描述:PIC16C64/74 DEMO BOARD
DM163003 功能描述:开发板和工具包 - PIC / DSPIC PICDEM 3 PIC16C923/4 RoHS:否 制造商:Microchip Technology 产品:Starter Kits 工具用于评估:chipKIT 核心:Uno32 接口类型: 工作电源电压:
DM163004 功能描述:开发板和工具包 - PIC / DSPIC USE 579-DM163004-LT RoHS:否 制造商:Microchip Technology 产品:Starter Kits 工具用于评估:chipKIT 核心:Uno32 接口类型: 工作电源电压:
DM163004 制造商:Microchip Technology Inc 功能描述:DEMO BOARD W/TCP/IP ((NW))
DM163004-LT 功能描述:开发板和工具包 - PIC / DSPIC PICDEM.net Demo Kit w/o TCP/IP Lean Book RoHS:否 制造商:Microchip Technology 产品:Starter Kits 工具用于评估:chipKIT 核心:Uno32 接口类型: 工作电源电压: