Question: The following code will receive bytes serially. Each byte received will be stored in the data memory starting from address D'20' to address D'35'. After








The following code will receive bytes serially. Each byte received will be stored in the data memory starting from address D'20' to address D'35'. After that, reception is stopped. The reception baud rate is 3 Kbps approximately, and Fosc= 2 MHz. Without parity. We are ignoring bank selection in the given code.(Estimated time 12 minutes) #include p16F877A.inc org 0x0000 bsf TXSTA, BRGH cirt counter START . movwt SPBRG bst RCSTA, SPEN mowt FSR WAIT goto WAIT goto WAIT movt RCREG,W movwf INDF incf counter, 1 FSR, 1 INCF subwf counter, o btfss STATUS, Z goto WAIT DONE goto DONE end The following code will receive bytes serially. Each byte received will be stored in the data memory starting from address D'20' to address D'35'. After that, reception is stopped. The reception baud rate is 3 Kbps approximately, and Fosc=2 MHz. Without parity. We are ignoring bank selection in the given code. (Estimated time 12 minutes) #include p16F877A.inc org Ox0000 bsf TXSTA, BRGH cirt counter START bsf bct bsf bct bst TRISC, 2 TRISC, 6 TRISC, 7 TRISC, 7 TRISC, 6 mowt FSR WAIT goto WAIT murf DORRA The following code will receive bytes serially. Each byte received will be stored in the data memory starting from address D'20' to address D'35'. After that, reception is stopped. The reception baud rate is 3 Kbps approximately, and Fosc= 2 MHz. Without parity. We are ignoring bank selection in the given code. (Estimated time 12 minutes) #include p16F877A.inc org Ox0000 bsf TXSTA, BRGH cirt counter START EN moviw moviw movlw moviw moviw movlw mowT D 20 D'17 D'24 D:41 D'15 D'30 FSR WAIT . goto WAIT MA DARBAI movwf SPBRG bst bst bsf bst bsf TXSTA, TXEN RCSTA, RX9 RCSTA, RX9D TXSTA, TX9 RCSTA, CREN WAIT goto WAIT bsf RCSTA, SPEN . WAIT movlw movlw movlw movlw movlw movlw D'27' D'20 D'23 ' D'29 D'25 D'22 V . inch counter, 1 INCF FSR, 1 subwf counter, O btfss STATUS, Z WAIT goto goto DONE DONE mowf FSR WAIT . btfss PIRI, TXIF btfss PIEI, RCIE movlw INDF btfss PIRI, RCIF btfsc RCSTA, OERR INCF FSR, 1 . inch counter, 1 INCF FSR, 1 D'17 D13 ''D moviw movlw movlw movlw movlw moviw DONE D15 D'23 D'20 The following code will receive bytes serially. Each byte received will be stored in the data memory starting from address D'20' to address D'35'. After that, reception is stopped. The reception baud rate is 3 Kbps approximately, and Fosc= 2 MHz. Without parity. We are ignoring bank selection in the given code.(Estimated time 12 minutes) #include p16F877A.inc org 0x0000 bsf TXSTA, BRGH cirt counter START . movwt SPBRG bst RCSTA, SPEN mowt FSR WAIT goto WAIT goto WAIT movt RCREG,W movwf INDF incf counter, 1 FSR, 1 INCF subwf counter, o btfss STATUS, Z goto WAIT DONE goto DONE end The following code will receive bytes serially. Each byte received will be stored in the data memory starting from address D'20' to address D'35'. After that, reception is stopped. The reception baud rate is 3 Kbps approximately, and Fosc=2 MHz. Without parity. We are ignoring bank selection in the given code. (Estimated time 12 minutes) #include p16F877A.inc org Ox0000 bsf TXSTA, BRGH cirt counter START bsf bct bsf bct bst TRISC, 2 TRISC, 6 TRISC, 7 TRISC, 7 TRISC, 6 mowt FSR WAIT goto WAIT murf DORRA The following code will receive bytes serially. Each byte received will be stored in the data memory starting from address D'20' to address D'35'. After that, reception is stopped. The reception baud rate is 3 Kbps approximately, and Fosc= 2 MHz. Without parity. We are ignoring bank selection in the given code. (Estimated time 12 minutes) #include p16F877A.inc org Ox0000 bsf TXSTA, BRGH cirt counter START EN moviw moviw movlw moviw moviw movlw mowT D 20 D'17 D'24 D:41 D'15 D'30 FSR WAIT . goto WAIT MA DARBAI movwf SPBRG bst bst bsf bst bsf TXSTA, TXEN RCSTA, RX9 RCSTA, RX9D TXSTA, TX9 RCSTA, CREN WAIT goto WAIT bsf RCSTA, SPEN . WAIT movlw movlw movlw movlw movlw movlw D'27' D'20 D'23 ' D'29 D'25 D'22 V . inch counter, 1 INCF FSR, 1 subwf counter, O btfss STATUS, Z WAIT goto goto DONE DONE mowf FSR WAIT . btfss PIRI, TXIF btfss PIEI, RCIE movlw INDF btfss PIRI, RCIF btfsc RCSTA, OERR INCF FSR, 1 . inch counter, 1 INCF FSR, 1 D'17 D13 ''D moviw movlw movlw movlw movlw moviw DONE D15 D'23 D'20
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
