8XC196MC, MD, MH USER’S MANUAL
8-6
; followed by a short (1 ms) pause, thus generating a MFM waveform.
;
; This program is assembled to run on the MD demo board.
;
;**************************************
; CONSTANT AND VARIABLE DECLARATIONS
;**************************************
; Program equates
; This section defines the constants used by this program.
; They can be changed at assembly time as required.
;**************************************
;
zero_time equ 1000 ;1 ms
zero_pause_time equ zero_time
one_time equ 2000 ;2 ms
one_pause_time equ one_time
carrier_freq equ 25 ;40 KHz
buf_size equ 8 ;size of data buffer (bytes)
fill_char equ 10100011b ;initial data for buffer
;
;**************************************
; SFR equates in a 32-byte window
; This section defines SFR locations as seen through a window
; to allow using compact read-modify-write instructions.
;**************************************
;
p2_mode_w equ 0f0H ;WSR = 7EH 1FD0H
p2_dir_w equ 0F2H ;WSR = 7EH 1FD2H
p2_reg_w equ 0F4H ;WSR = 7EH 1FD4H
p2_pin_w equ 0F6H ;WSR = 7EH 1FD6H
;
p7_mode_w equ 0f1H ;WSR = 7EH 1FD1H
p7_dir_w equ 0F3H ;WSR = 7EH 1FD3H
p7_reg_w equ 0F5H ;WSR = 7EH 1FD5H
p7_pin_w equ 0F7H ;WSR = 7EH 1FD7H
;
timer1_w equ 0FAH ;WSR = 7BH 1F7AH
comp3_con_w equ 0E4H ;WSR = 7BH 1F64H
comp3_time_w equ 0E6H ;WSR = 7BH 1F66H
;
;**************************************
; Other SFR equates
; This section defines the locations of the frequency generator SFRs.
;**************************************
;
freq_gen equ 1FB8H
freq_cnt equ 1FBAH
;
;**************************************
; Variable storage area
; This section defines the variables used by this program.
;**************************************
;
rseg at 30h
;
rism: dsb 13 ;reserved for RISM
;
rseg at 40h