Sivaram M Cheekiralla wrote: > > Hi, > > I need some help regarding the UART feature in 16F877. I need to send a > byte of data over the serial port to the PC(just for the sake of > implementing UART). I am using a 11.0592 MHz crystal oscillator. > > 1. DO I need to use a MAX232 driver or can I directly connect to the > serial port(DB 9) pins(TX and RX). > 2. I have a windows PC. How can I read the serial port ? I mean if I send > the data from the PIC, how can I know what data I am receiving etc. > Are there any programs or s/w ? I would use a MAX232 or similar to communicate. I think it's much more reliable. org 0h ; ; START ; INTITIALISE PORTS ETC ; ; ; ------------------------------------ ; SET BAUD RATE TO COMMUNICATE WITH PC ; ------------------------------------ ; XTAL 11.0592 MHz, Baud Rate = 19200, No Parity, 1 Stop Bit ; movlw 0x23 ; 19200 baud movwf SPBRG movlw b'00100100' ; brgh = high (2) movwf TXSTA ; enable Async Transmission, set brgh movlw b'10010000' ; enable Async Reception clrf STATUS ; RAM Page 0 movwf RCSTA WaitLoop btfss PIR1,RCIF ; wait for RX byte goto WaitLoop movf RCREG,W ; get it movwf TXREG ; echo it back goto WaitLoop Download and use this to communicate and test... http://www.bubblesoftonline.com/terminal.zip -- Best regards Tony mICros http://www.bubblesoftonline.com mailto:sales@bubblesoftonline.com -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads