📄 voltage.asm
字号:
;********************************************************
; PROJECT NAME : nimh charger *
; Author : borg *
; VERSION : V0.0 *
; BODY : SN8P2704a *
; COMPILER : 1.99N *
; function : *
; input : *
; output : tempvolt1_l, tempvolt1_h *
; tempvolt2_l, tempvolt2_h *
; use register : data1, data2, tempvolt1_l, tempvolt1_h*
; tempvolt2_l, tempvolt2_h *
; use flag : dtemp1_f, dtemp2_f *
; run cycles : *
; *******************************************************
mnvoltage:
b0bts1 voltage_turn_f
jmp mnvoltage90
/*
bclr voltage_turn_f
bset current_turn_f
bclr pan_turn_f
bclr igbt_tturn_f
bclr igbt_vturn_f
*/
mov a,#10010000b
mov adm,a
mov a,#11111110b
mov p4con,a
call adcchange
mov a,data1
mov voltage_l,a
mov a,data2
mov voltage_h,a
mnvoltage10:
mov a,voltage_l
sub a,vol_const_l
mov a,voltage_h
sbc a,vol_const_h
b0bts1 fc
jmp mnvoltage20
jmp mnvoltage30
mnvoltage20:
bclr vol_warning_f
jmp mnvoltage90
mnvoltage30:
bset vol_warning_f
jmp mnvoltage90
mnvoltage90:
ret
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -