i'm not really familiar with the 16c74 but many people here shy away from longer code segments so i give it a try what seemed obvious in simulation is that the led's display and inmediately get cleared (if the receiver gets set up correctly , i did not check), you are looping to start which clears port b (within microseconds ) you never see them blink make the last part of your program loop movf RCREG,W ;Get input data movwf PORTB ;Display on LEDs movwf TXREG ;Echo character back goto loop end -----Original Message----- From: Aidi Moubhij To: PICLIST@MITVMA.MIT.EDU Date: Tuesday, May 04, 1999 12:53 PM Subject: PIC16c74 > Hi, > >I'm using the code below to receive a byte from the US ART. When I get the >byte I display it on the LED's and echo it back. >This code is not working for me. Can anybody tell me what I'm doing wrong. > Thanks > > > list p=16c74 > Title "first aidi Program" > > include > > org 00h > >Start > clrf PORTB ;Clear PORT_B output latches > > bsf STATUS,RP0 ;Go to Bank1 > > clrf TRISB ;Config PORT_B as all outputs > > > movlw 19h ;Set Band rate (9600 baud @4MHz) > movwf SPBRG > movlw b'00100100' ;8-bit transmit, transmitter enable > movwf TXSTA ;Asynchronous mode, High baud rate > > bcf STATUS,RP0 ;Go to Bank0 > > movlw b'10010000' ;8-bit receive, receiver enabled > movwf RCSTA ;serial port enabled > > movf RCREG,W ;Get input data > movwf PORTB ;Display on LEDs > movwf TXREG ;Echo character back > goto Start > > end > > > > >Aidi Moubhij > >aidi@mjr.com