Intel 8XC196MC User Manual page 194

Table of Contents

Advertisement

;
temp:
dsw
temp1:
dsw
temp2:
dsw
buf_start:
dsw
buf_cnt:
dsb
bit_cnt:
dsb
flag:
dsb
;
xmit_buf:
dsb
shift_reg:
dsb
;
;*****************************
; MAIN PROGRAM
;*****************************
; Define the program location and set up the interrupts and stack.
;*****************************
;
cseg at 0e000h
;
start:
di
dpts
andb int_pend1,#10000000b;
orb
ld
;*****************************
; Initialize pin P7.7/FREQOUT for I/O and set the pin low.
;*****************************
;
ldb
andb p7_reg_w,#01111111b ;P7.7 = low
andb p7_dir_w,#01111111b ;P7.7 comp output
andb p7_mode_w,#01111111b;P7.7 = I/O
ldb
;*****************************
; This section fills the data buffer with a "fill" character.
; An application would typically place a block of data here.
;*****************************
;
ld
ldb
ldb
fill:
stb
djnz temp2,fill
;*****************************
; Start timer 1 with a 1 microsecond clock period,
; load the carrier frequency into FREQ_GEN, and
; enable the interrupts.
;*****************************
;
ldb
stb
ldb
1
1
1
1
1
1
1
buf_size
1
int_mask1,#00000010b;unmask compare3
sp,#0200h
wsr,#7EH
wsr,zero_reg
temp,#xmit_buf
temp1,#fill_char
temp2,#buf_size
temp1,[temp]+
temp,#11000010b
temp,t1control[0]
temp,#carrier_freq
Get other manuals https://www.bkmanuals.com
FREQUENCY GENERATOR
;bit 0 = zero being sent
;bit 1 = one being sent
;bit 5 = get next bit
;bit 6 = get next byte
;bit 7 = buffer send in progress
;block of data to send
;RISM user space
;set up interrupts
;set up stack
;move SFR;s into window
;initialize buffer data
;init EPA timer1
;1 uS ticks
;load carrier freq
8-7

Advertisement

Table of Contents
loading

This manual is also suitable for:

8xc196md8xc196mh

Table of Contents