revenger82
New Member
is it possible to 'on' 3 different LEDsby clicking to 3 command button of visual basic? Those LED are connected to PIC 16F84A and a serial port is connected between the pc and the PIC16F84A.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
revenger82 said:is it possible to 'on' 3 different LEDsby clicking to 3 command button of visual basic? Those LED are connected to PIC 16F84A and a serial port is connected between the pc and the PIC16F84A.
MathGeek said:I have a smilar question, and I have looked at Goodwin's tutorial.
However, the tutorial does not use hardware USART. is there a tutorial for hardware USART on 16f628?
MathGeek said:Thanks. I have looked at the code. but, to be honest with you, I still don't understand the fundamentals of USART.
;USART Serial routines
SER_INIT
BSF STATUS, RP0 ;select bank 1
MOVLW d'129' ;9600 baud @ 20 Mhz Fosc +0.16 err
MOVWF SPBRG
MOVLW b'00100100' ;brgh = 1
MOVWF TXSTA ;enable Async Transmission, set brgh
BCF STATUS, RP0 ;select bank 0
MOVLW b'10010000'
MOVWF RCSTA ;enable Async Reception
RETURN
XMIT_RS232 btfss PIR1, TXIF ;xmit buffer empty?
GOTO XMIT_RS232 ;no, wait
MOVWF TXREG ;now send
RETURN
Rcv_RS232 BTFSS PIR1, RCIF ; check for received data
GOTO Rcv_RS232
MOVF RCREG, W
RETURN
MathGeek said:Edit: One reason I want to learn hardware USART is that it is more elegant and I can save code space for other stuff in the code.