All, I have written a very simple demo to test toggling a port pin as well as to test the EUSART #1. I used Tera Term for my terminal program, and a scope probe to test the pin. I used RB7 which comes out on pin 7 of J8. I have not written the code to be elegant, just functional. Below is the code I used. What it does is if you choose "H", it will turn RB7 on. If you choose "DL, it will turn RB7 off. Any other key press changes nothing. Note that "H" and "L" are case sensitive. They must be upper case to work. I done this on purpose. Let me know if there are any question regarding this code or how it works. Regards, Jim ;=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D ; ; Simple code example to test port pin and USART ;=20 ;=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D ; Configuration list p=3D18F8720 #include P18F8720.INC CONFIG OSC =3D HS CONFIG WDT =3D OFF CONFIG LVP =3D OFF CONFIG DEBUG =3D OFF ;=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D ; Variables=20 cblock 0x20 Temp endc org 0 ;=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D ; Initialize init: clrf PORTB ; Configure RB7 on PORTB for bcf TRISB, RB7 ; digital I/O for an LED. bcf TRISC, RC6 ; Set TRISC<6:7> to enable. PIC Pin 37 (xmt) bsf TRISC, RC7 ; serial. PIC Pin 38 (rcv) bcf PORTB, RB7 ; Turn LED off. PIC Pin 47 movlw 0x67 ; serial eusart to 9600 (0x19 with BRGH=3D0) movwf SPBRG1 ; baud. (0x67 with BRGH=3D1) =20 movlw b'00100100' ; Enable Transmit and clear SYNC movwf TXSTA1 ; to allow asynchronous mode. =20 movlw b'10010000' ; Enables Serial Port =20 movwf RCSTA1 ; and Continuous Receive =20 bcf RCSTA1, CREN ; Clear any errors by disbaling=20 nop ; continuous receive mode, then=20 bsf RCSTA1, CREN ; renable conitnuous receive mode =20 =20 receive=20 bsf PORTB, 7 movf RCREG1,W nop nop =09 btfss PIR1,5 ; (5) check for received data RC1IF goto $ - 2 movf RCREG1,W ; save received data in W=20 bcf PORTB, 7 =20 toggle: ; Toggle back and forth btg Temp, 0 ; between loading 'U' btfsc Temp, 0 ; and loading 'G' in the goto load_U ; W register. goto load_G ; ... load_U: =20 bsf LATB,7 ; ... movlw 'R' ; Put 'G' in W and call tx movlw 'B' call tx movlw '7' call tx movlw ' ' call tx movlw 'O' ; Put 'G' in W and call tx movlw 'n' call tx =09 movlw 0x0A ; Put 'CR/LF' in W and transmit. call tx movlw 0x0D call tx =09 btfss PIR1,5 ; (5) wait for received data RC1IF goto $ - 2 movlw 'D' subwf RCREG1,W btfsc STATUS,Z goto toggle goto load_U goto toggle=09 =09 load_G: =20 bcf LATB,7 ; ... movlw 'R' ; Put 'G' in W and call tx movlw 'B' call tx movlw '7' call tx movlw ' ' call tx movlw 'O' ; Put 'G' in W and call tx movlw 'f' call tx movlw 'f' call tx movlw 0x0A ; Put 'CR/LF' in W and transmit. call tx movlw 0x0D call tx btfss PIR1,5 ; (5) wait for received data RC1IF goto $ - 2 movlw 'U' subwf RCREG1,W btfsc STATUS,Z goto toggle goto load_G tx: movwf TXREG ; Move W into tx register and provide nop ; a cycle for TXIF to update. check: btfss PIR1, TXIF ; Wait for tx by monitoring TXIF goto check ; Goto check while not done. return =20 end =20 --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .