"> На малюнку В4 - схема підпрограми GET_BIT
Додаток Г
Main Routine SCI_01 - SCI Software Transmit/Receive Routines *
**
****************************************** ***********************************
**
* File Name: SCI_01.RTN Copyright (c) Motorola 1995 *
**
* Full Functional Description of Routine Design: *
* Program flow: *
* Reset: Call init to initialize port pins *
* Call get_char to receive a byte of data *
* Light frame error LED if frame error occurred *
* Light noise LED if frame error occurred *
* Call put_char to transmit the received byte of data *
* Loop back to get_char call (endless loop) *
**
****************************************** ***********************************
**
* Part Specific Framework Includes Section *
**
****************************************** ***********************************
# INCLUDE 'H705J1A.FRK'; Include the equates for the
; HC705J1A so all labels can
; be found. p align="justify"> MOR Bytes Definitions for the Main Routine *
**
****************************************** ***********************************
org MOR
fcb $ 20
****************************************** ************************************
**
* Equates and RAM Storage *
**
****************************************** ************************************
*** I/O Pin Equates: _port equ $ 01; port used for serial port
; pins_port equ $ 00; port used for driving LED's. equ 4; pin # for noise LEDequ 5; pin # for frame LEDequ 0; pin # for receive data pinequ 1; pin # for transmit data pin
*** Program Constant Equates:; Baud rate select table: _SEL equ $ 08; BAUD_SEL 4MHz osc 2MHz osc
; $ 04 19.2k 9600
; $ 08 9600 4800
; $ 10 4800 2400
; $ 20 2400 1200
; $ 40 1200 600
; $ 80600300
*** RAM variable allocation:
org RAMrmb 1; data register for scirmb 1; temp storage variable * main - example program that continually echoes back received characte...