📄 printer.mac
字号:
j ge,stbc_ad0
ld a,152
j stbc_ad2
stbc_ad0:
cmp a,212
j lt,stbc_ad2
ld a,212
stbc_ad2:
;V4.04 ld d,(HD_TEMP)
;V4.04 shrc d ;;V4.02 d=(HD_TEMP)/2
;V4.04 ld e,32*2 ;32word * 2bytes pre each data block
;V4.04 mul d,e
;V4.04 add de,stb_pulse_tbl
;V4.05 ld de,(HD_TEMP) ;V4.04
sub a,152
;V4.04 inc a
;V4.04 and a,0y00111100
shrc a ;V4.04
shrc a ;V4.04
shlc a ;V4.04
ld w,0 ;V4.05
add wa,power_table ;V4.05
ld de,wa ;V4.05
ld wa,(de) ;V4.05wa=lg(Qv)
ld de,(HD_TEMP) ;V4.05de=lg(Pt)
stbc_ad3:
add de,wa ;V4.04 wa=lg(Pt)+lg(Qv)
stbc_ad4:
ld wa,de ;v4.04
sub wa,2849 ;V4.04 2849 is the mininum data
shlca wa ;V4.04
shlca wa ;V4.04
ld de,wa ;V4.05
;V4.04 ld b,a
@BBC (F_SSTB,stbc_70) ;2 times print? no->
;V4.04 inc b
;V4.04 inc b
;V4.05 inc wa ;V4.04
;V4.05 inc wa ;V4.04
inc de ;V4.05
inc de ;V4.05
stbc_70:
;V4.04 ld a,b
;V4.04 ld w,0
;V4.05 add de,wa
add de,stb_pulse_tbl ;V4.05
ld wa,(de)
stbc_79:
ld (STB_BAK),wa
@T1_SET ;reg.wa -> TREG1A
@T1_START
@BBC (F_SSTB,stbc_80) ;---> 2times print? no->
@STB1_TRG ;1/2 dot print
@STB2_OFF
j stbc_90
stbc_80:
@STB1_TRG ;all dot print
@STB2_TRG ;
stbc_90:
@SEB (F_STBON) ;under strobe output
ret
;
ltp_stb_cont:
call stb_calc
jp stbc_79 ;V4.16
;V4.16 ld (STB_BAK),wa
;V4.16 @T1_SET ;reg.wa -> TREG1A
;V4.16 @T1_START
;V4.16 @BBC (F_SSTB,ltp_stbc_80) ;---> 2times print? no->
;V4.16 @STB1_TRG ;1/2 dot print
;V4.16 @STB2_OFF
;V4.16 j ltp_stbc_90
;V4.16ltp_stbc_80:
;V4.16 @STB1_TRG ;all dot print
;V4.16 @STB2_TRG ;
;V4.16ltp_stbc_90:
;V4.16 @SEB (F_STBON) ;under strobe output
;V4.16 ret
;for LTP8235............................................................................................
ltp_timer_y_prn:
cmp (STEP_CT),40+3+(L_FEED_LTP*2) ;20+1+(feed line) dotline complete ?
j lt,ltp_timer_y_p08 ;no
@BBS (F_PRREQ,ltp_timer_y_p05) ;
@CLB (F_PRINT)
ld (STEP_CT),0
j ltp_timer_y_rush ;---> Motor stop Rush
ltp_timer_y_p05:
ld (STEP_CT),0
j ltp_timer_y_p10
ltp_timer_y_p08:
@BBC (F_STBON,ltp_timer_y_p10) ;complete output previouse strobe? yes->
@SEB (F_STBDLY) ;not yet --> start chopping
j timery_add ;---> Add to step_time
ltp_timer_y_p10:
inc (STEP_CT)
ld a,(STEP_CT)
cmp a,3
j lt,ltp_timer_y_p20 ;
cmp a,3+40 ;
j lt,ltp_timer_y_p40 ;step3 to step42? yes-> print
j ne,ltp_timer_y_p50 ;last step? no->
@CLB (F_PRREQ) ;== complete printing ==
j ltp_timer_y_p50 ;
ltp_timer_y_p20:
ld wa,0
ld (STB_BAK),wa ;for calculation "C" parameater
j ltp_timer_y_p50
;print out................
ltp_timer_y_p40:
call strobe_cont
ltp_timer_y_p50:
call phase_out ;MT STEP output
call next_step_set ;
j timer_y_exit
ltp_timer_y_rush:
@SEB (F_RUSH) ;start rush step
@T2_SET (STP_STOP_LTP) ;set step MT pulse length for wake up step
@T2_START16 ;timer2 start with 16us clock
j timer_y_exit
;
;==============================================================================
; Timer-1 Interrupt (turn off strobe pulse)
;==============================================================================
tm1_int:
@PUSH_REG
@T1_STOP
@STB1_OFF
@CHK_STB2_OFF (timer_x10) ;STB2 still off? yes-> output STB2
@STB2_OFF
@CLB (F_STBON)
@BBS (F_STBDLY,timer_x9)
jp timer_x11
timer_x9:
@PHASE_ON ;phase ON(MT driver enable)
@T2_STOP
;V4.16 j ltp_timer_y_p10 ;//TEST
@BBS (SW_LTP,ltp_timer_y_p10) ;LTP8235 printer? yes->
j timer_y_p10 ;---> strobe controle, next step set
timer_x10:
@STB2_TRG ;ON
@PHASE_ON ;phase ON(MT driver enable)
ld wa,(STB_BAK)
@T1_SET ;reg.wa -> TREG1A
@T1_START
ld wa,(STB_BAK)
shlca wa ; *2
ld (STB_BAK),wa
timer_x11:
@POP_REG
reti
;------------------------------------------------------------------------------------
;V4.04===============================================================================
; Voltage AD
power_table: ;=1000*lg(Qv) ;V4.04
; 5.938 6.094 6.25 6.406 6.563 6.719 6.875 7.031
;dw 322 296 270 245 218 192 166 141
dw 0x0142, 0x0128, 0x010e, 0x00f5, 0x00da, 0x00c0, 0x00a6, 0x008d
; 7.188 7.384 7.5 7.656 7.813 7.969 8.125 8.281
;dw 116 85 67 45 24 4 -14 -30
dw 0x0074, 0x0055, 0x0043, 0x002d, 0x0018, 0x0004, 0xfff2 ,0xffe2
;-----------------------------------------------------------------------------------
;V4.04==============================================================================
; Temp. AD index
lg_temp_table: ;=1000*lg(Pt) ;V4.04
dw 2879 ;V4.04 db 64 ;0
dw 2884 ;V4.04 db 63 ;1
dw 2889 ;V4.04 db 62 ;2
dw 2893 ;V4.04 db 61 ;3
dw 2898 ;V4.04 db 60 ;4
dw 2902 ;V4.04 db 59 ;5
dw 2906 ;V4.04 db 58 ;6
dw 2911 ;V4.04 db 57 ;7
dw 2915 ;V4.04 db 56 ;8
dw 2919 ;V4.04 db 55 ;9
dw 2923 ;V4.04 db 54 ;10
dw 2927 ;V4.04 db 53 ;11
dw 2929 ;V4.04 db 53 ;12
dw 2931 ;V4.04 db 52 ;13
dw 2936 ;V4.04 db 51 ;14
dw 2939 ;V4.04 db 50 ;15
dw 2943 ;V4.04 db 49 ;16
dw 2947 ;V4.04 db 48 ;17
dw 2949 ;V4.04 db 48 ;18
dw 2951 ;V4.04 db 47 ;19
dw 2955 ;V4.04 db 46 ;20
dw 2959 ;V4.04 db 45 ;21
dw 2963 ;V4.04 db 44 ;22
dw 2964 ;V4.04 db 44 ;23
dw 2966 ;V4.04 db 43 ;24
dw 2970 ;V4.04 db 42 ;25
dw 2974 ;V4.04 db 41 ;26
dw 2977 ;V4.04 db 40 ;27
dw 2980 ;V4.04 db 40 ;28
dw 2984 ;V4.04 db 39 ;29
dw 2990 ;V4.04 db 38 ;30
dw 2996 ;V4.04 db 37 ;31
dw 2999 ;V4.04 db 37 ;32
dw 3002 ;V4.04 db 36 ;33
dw 3008 ;V4.04 db 35 ;34
dw 3013 ;V4.04 db 34 ;35
dw 3019 ;V4.04 db 33 ;36
dw 3022 ;V4.04 db 33 ;37
dw 3025 ;V4.04 db 32 ;38
dw 3030 ;V4.04 db 31 ;39
dw 3036 ;V4.04 db 30 ;40
dw 3039 ;V4.04 db 30 ;41
dw 3041 ;V4.04 db 29 ;42
dw 3047 ;V4.04 db 28 ;43
dw 3052 ;V4.04 db 27 ;44
dw 3055 ;V4.04 db 27 ;45
dw 3057 ;V4.04 db 26 ;46
dw 3063 ;V4.04 db 25 ;47
dw 3068 ;V4.04 db 24 ;48
dw 3073 ;V4.04 db 23 ;49
dw 3075 ;V4.04 db 23 ;50
dw 3078 ;V4.04 db 22 ;51
dw 3083 ;V4.04 db 21 ;52
dw 3088 ;V4.04 db 20 ;53
dw 3093 ;V4.04 db 19 ;54
dw 3097 ;V4.04 db 18 ;55
dw 3100 ;V4.04 db 18 ;56
dw 3102 ;V4.04 db 17 ;57
dw 3107 ;V4.04 db 16 ;58
dw 3111 ;V4.04 db 15 ;59
dw 3116 ;V4.04 db 14 ;60
dw 3121 ;V4.04 db 13 ;61
dw 3125 ;V4.04 db 12 ;62
dw 3130 ;V4.04 db 11 ;63
dw 3134 ;V4.04 db 10 ;64
dw 3138 ;V4.04 db 9 ;65
dw 3143 ;V4.04 db 8 ;66
dw 3147 ;V4.04 db 7 ;67
dw 3151 ;V4.04 db 6 ;68
dw 3155 ;V4.04 db 5 ;69
dw 3160 ;V4.04 db 4 ;70
dw 3164 ;V4.04 db 3 ;71
dw 3168 ;V4.04 db 2 ;72
dw 3172 ;V4.04 db 1 ;73
dw 3176 ;V4.04 db 0 ;74
;==========================================================
temp_table:
db 64 ;0
db 63 ;1
db 62 ;2
db 61 ;3
db 60 ;4
db 59 ;5
db 58 ;6
db 57 ;7
db 56 ;8
db 55 ;9
db 54 ;10
db 53 ;11
db 53 ;12
db 52 ;13
db 51 ;14
db 50 ;15
db 49 ;16
db 48 ;17
db 48 ;18
db 47 ;19
db 46 ;20
db 45 ;21
db 44 ;22
db 44 ;23
db 43 ;24
db 42 ;25
db 41 ;26
db 40 ;27
db 40 ;28
db 39 ;29
db 38 ;30
db 37 ;31
db 37 ;32
db 36 ;33
db 35 ;34
db 34 ;35
db 33 ;36
db 33 ;37
db 32 ;38
db 31 ;39
db 30 ;40
db 30 ;41
db 29 ;42
db 28 ;43
db 27 ;44
db 27 ;45
db 26 ;46
db 25 ;47
db 24 ;48
db 23 ;49
db 23 ;50
db 22 ;51
db 21 ;52
db 20 ;53
db 19 ;54
db 18 ;55
db 18 ;56
db 17 ;57
db 16 ;58
db 15 ;59
db 14 ;60
db 13 ;61
db 12 ;62
db 11 ;63
db 10 ;64
db 9 ;65
db 8 ;66
db 7 ;67
db 6 ;68
db 5 ;69
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -