Pic microcontroller serial port debugging program

Single chip microcomputer STM32L151CCU6
1206RGB (single)
0201 package SLP0603 ESD electrostatic diode 5V one-way ESD
Mobile phone crystal 3.2*2.5mm 3225 26M (26.000MHZ) 7.5PF 10PPM 20PPM 30PPM
Test - lowercase jpg
;************************************************ ; Using the serial port debugging wizard or HyperTerminal on the PC side, set the baud rate to 9600, 8 data bits, 1 stop bit, and no parity. ; When programming, ensure that the oscillator mode is set to XT and the WDT is disabled. ;************************************************ LISTP=16F877 INCLUDE "P16F877.INC" ;*********************************** ;__CONFIG_DEBUG_OFF & _CP_ALL & _WRT_HALF & _CPD_ON & _LVP_OFF & _BODEN_OFF & _PWRTE_ON & _WDT_OFF & _HS_OSC; ;************************ CBLOCK 0x20 TXBUFF:9 TXPTR TXCOUNT RXBUFF:9 PUTPTR GETPTR STATUS_TEMP FSR_TEMP ENDC ;********************************** W_TEMP EQU 7FH ;********************************** ORG 0X000 GOTO MAIN ORG 0X004 GOTO INT ORG 0X008 ;********************************** INT MOVWF W_TEMP ; save context SWAPF STATUS, W CLRF STATUS MOVWF STATUS_TEMP MOVWF FSR_TEMP ;------------------------ CHKRXINT BANKSEL PIR1 BTFSS PIR1, RCIF ; check USART receive interrupt GOTO CHKTXINT ;---------------------------- _RDRXFIFO BTFSC RCSTA, FERR ; frame error flag GOTO _FERR_PRO MOVLW RXBUFF ; load buffer address MOVWF FSR MOVF PUTPTR, W ADDWF FSR, F MOVF RCREG, W MOVWF INDF INCF PUTPTR, F ;MOVLW .7 ;ANDWF PUTPTR, F BTFSC PIR1, RCIF GOTO _RDRXFIFO ;-------------------------- BTFSS RCSTA, OERR ; over-run error flag GOTO ENDOFINT ;------------------------ _OERR_PRO BCF RCSTA, CREN ; disable continuous reception BSF RCSTA, CREN ; enable continuous reception GOTO ENDOFINT ;------------------------ _FERR_PRO MOVF RCREG, W GOTO ENDOFINT ;************************************ ; Sending program CHKTXINT BSF STATUS, RP0 ; select file register bank 1 BTFSS PIE1, TXIE ; check transmit interrupt enable GOTO ENDOFINT BCF STATUS, RP0 ; back to bank 0 BTFSS PIR1, TXIF ; check transmit interrupt flag GOTO ENDOFINT ;----------------------- MOVLW TXBUFF ; load buffer address MOVWF FSR MOVF TXPTR, W ADDWF FSR, F MOVF INDF, W MOVWF TXREG INCFSZ TXPTR, F ; increment pointer GOTO ENDOFINT ;---------------------- BSF STATUS, RP0 BCF PIE1, TXIE ; disable transmit interrupt BCF STATUS, RP0 ;-------------------------- ENDOFINT ; restore context CLRF STATUS MOVWF FSR_TEMP MOVWF FSR SWAPF STATUS_TEMP, W MOVWF STATUS SWAPF W_TEMP, F SWAPF W_TEMP, W RETFIE ;************************************************* ;************************************************* MAIN BANKSEL TXSTA ; select file register bank 1 MOVLW '00100100' ; enable USART, high speed mode MOVWF TXSTA MOVLW .25 ; set baud rate to 9600 MOVWF SPBRG CLRF PIE1 BSF PIE1, RCIE ; enable receive interrupt CLRF STATUS ; back to bank 0 CLRF TXCOUNT CLRF GETPTR CLRF PUTPTR MOVLW '10010000' ; enable USART and continuous receive MOVWF RCSTA CLRF INTCON BSF INTCON, PEIE ; enable peripheral interrupts BSF INTCON, GIE ; enable global interrupts ;********************************* LOOP CALL CHECK_DATA GOTO LOOP ;********************************* CHECK_DATA CLRF STATUS MOVF TXCOUNT, W SKPZ ; skip if zero RETURN MOVF GETPTR, W XORWF PUTPTR, W SKPNZ ; skip if not zero RETURN MOVLW RXBUFF MOVWF FSR MOVF GETPTR, W ADDWF FSR, F INCF GETPTR, F ;MOVLW .7 ;ANDWF GETPTR, F MOVF INDF, W MOVWF TXBUFF+0 ;MOVLW '-' ; example of sending a character ;MOVWF TXBUFF+1 ;MOVLW 'P' ;MOVWF TXBUFF+2 ;MOVLW 'I' ;MOVWF TXBUFF+3 ;MOVLW 'C' ;MOVWF TXBUFF+4 ;MOVLW 'A' ;MOVWF TXBUFF+5 ;MOVLW 'V' ;MOVWF TXBUFF+6 ;MOVLW 'R' ;MOVWF TXBUFF+7 MOVLW 0x0D ; carriage return MOVWF TXBUFF+1 MOVLW 0x0A ; line feed MOVWF TXBUFF+2 MOVLW .3 ; number of characters to send MOVWF TXCOUNT CLRF TXPTR ; start from index 0 BSF STATUS, RP0 BSF PIE1, TXIE ; enable transmit interrupt BCF STATUS, RP0 RETURN ;------------------------------- END

DIN Cables

There are many different versions of DIN Connectors. The name of each type comes from the number of pins the connector has (3-pin DIN, 4-pin DIN, etc.) Some of these pin numbers come in different configurations, with the pins arranged differently from one configuration to the next.

DIN cable connector 3-pin, 4-pin, 5-pin, 6-pin, 7-pin, 8-pin degree 180, 216, 240, 262, 270

DIN cables, DIN connector, telephone cable, computer cable, audio cable

ETOP WIREHARNESS LIMITED , https://www.etopwireharness.com