Intel 8XC196MC User Manual page 195

Table of Contents

Advertisement

8XC196MC, MD, MH USER'S MANUAL
stb
ei
;
;
;*****************************************
; Now send buffer out as serial data bytes
;*****************************************
; This section issues a 1 millisecond pulse on P2.0
; for use with an oscilloscope monitor.
;*****************************************
;
ld
ld
andb p2_reg_w,#11111110b ;strobe p2.0 to sync
andb p2_dir_w,#11111110b ;scope
andb p2_mode_w,#11111110b;
orb
djnzw temp,$
andb p2_reg_w,#11111110b ;set pin low
ld
;*****************************************
; Initialize the buffers and flag register that the interrupt routine needs.
;*****************************************
;
ld
ld
ldb
;
;*****************************************
; Set the compare module's interrupt pending bit
; to start sending the buffer. Loop until the buffer
; send is complete, then start main program over.
;*****************************************
ldb
wait:
jbs
ljmp start
;
;
;*******************************************
; COMPARE3 INTERRUPT ROUTINE
;*******************************************
; This routine executes each time the EPA compare channel times out.
; The "flag" register identifies the reason for the interrupt request.
;*******************************************
;
cseg at 0f120H
;
pusha
jbs
jbs
jbs
jbs
sjmp all_done
;
get_byte:
andb flag,#10111111b
ldb
ldb
8-8
temp,freq_gen[0]
wsr,#7EH
temp,#0400
p2_reg_w,#00000001b ;set pin high
wsr,zero_reg
buf_start,#xmit_buf ;pointer reg
buf_cnt,#buf_size
flag,#11000000b
int_pend1,#00000010b;force interrupt
flag,7,wait
flag,1,one_pause
flag,0,zero_pause
flag,5,get_bit
flag,6,get_byte
shift_reg,[buf_start]+
bit_cnt,#8
Get other manuals https://www.bkmanuals.com
;into freq gen
;enable interrupts
;pause
;number to send
;set "buffer send in progress"
;and "get next byte" flags
;loop here until done
;then start over
;comp3 Int vector demo board
;save cpu status
;jump if one being sent
;jump if zero being sent
;get next bit
;get next byte
;if nothing set, done
;clear get byte flag
;get byte to send into temp
;# of bits to send per char

Advertisement

Table of Contents
loading

This manual is also suitable for:

8xc196md8xc196mh

Table of Contents