It's a programm for automatic water pump controller cum motor Protector and need to change the 10 minute dry running condition to 5 minute.I made it and its working now.i don't know I can post external link here.
OK, then show us the asm file. Maybe someone here can help.Sorry for my mistake.I forgot to mention.
I know how to programm a microcontroller.(My friend has programmer)
I need to edit the programm thats I am asking.
And I have 3 files of the programm(.LST , .asm , .hex).
I know hex is for burning to microcontroller
8051 Macro Assembler Copyright (C) 1990 by 2500AD Software Inc. Version 5.00b
DOS/16M Run-Time Copyright (C) 1987-89 by Rational Systems, Inc. Version 3.88
***** Active Commands *****
Ctrl S = Stop Output
Ctrl Q = Start Output
Esc C = Stop Assembly
Esc T = Terminal Output
Esc P = Printer Output
Esc D = Disk Output
Esc M = Multiple Output
Esc N = No Output
2 0000 $MOD51
***** Waternew.asm : Line 2 *****
***** ILLEGAL MNEMONIC *****
2500 A.D. 8051 Macro Assembler - Version 5.00b
------------------------------------------------
Input Filename : Waternew.asm
Output Filename : Waternew.obj
2 0000 $MOD51
***** Waternew.asm : Line 2 *****
***** ILLEGAL MNEMONIC *****
451 0773 30 A4 88 JNB P2.4, 0788H ;STILL H/V THEN GOTO 0788 H
***** Waternew.asm : Line 451 *****
***** RELATIVE JUMP TOO LARGE *****
454 077B 30 A3 8B JNB P2.3, 078BH ;STILL L/V THEN GOTO 078B H
***** Waternew.asm : Line 454 *****
***** RELATIVE JUMP TOO LARGE *****
457 0783 30 A1 8E JNB P2.1, 078EH ;STILL NOT DRY SUMP THEN GOTO 078E H
***** Waternew.asm : Line 457 *****
***** RELATIVE JUMP TOO LARGE *****
Lines Assembled : 465 Assembly Errors : 4
The 3 errors are due to 0788H, 078BH & 078EH have no corresponding labels. But that's easy to fix.The below is what I compiled and the errors.
I'm not sure which compiler you like to use?
Code:8051 Macro Assembler Copyright (C) 1990 by 2500AD Software Inc. Version 5.00b DOS/16M Run-Time Copyright (C) 1987-89 by Rational Systems, Inc. Version 3.88 ***** Active Commands ***** Ctrl S = Stop Output Ctrl Q = Start Output Esc C = Stop Assembly Esc T = Terminal Output Esc P = Printer Output Esc D = Disk Output Esc M = Multiple Output Esc N = No Output 2 0000 $MOD51 ***** Waternew.asm : Line 2 ***** ***** ILLEGAL MNEMONIC ***** 2500 A.D. 8051 Macro Assembler - Version 5.00b ------------------------------------------------ Input Filename : Waternew.asm Output Filename : Waternew.obj 2 0000 $MOD51 ***** Waternew.asm : Line 2 ***** ***** ILLEGAL MNEMONIC ***** 451 0773 30 A4 88 JNB P2.4, 0788H ;STILL H/V THEN GOTO 0788 H ***** Waternew.asm : Line 451 ***** ***** RELATIVE JUMP TOO LARGE ***** 454 077B 30 A3 8B JNB P2.3, 078BH ;STILL L/V THEN GOTO 078B H ***** Waternew.asm : Line 454 ***** ***** RELATIVE JUMP TOO LARGE ***** 457 0783 30 A1 8E JNB P2.1, 078EH ;STILL NOT DRY SUMP THEN GOTO 078E H ***** Waternew.asm : Line 457 ***** ***** RELATIVE JUMP TOO LARGE ***** Lines Assembled : 465 Assembly Errors : 4
L770: LCALL DLY_2SEC ;WAIT FOR 2 SECONDS
JNB P2.4, L0788H ;STILL H/V THEN GOTO 0788 H <-(1)
SJMP L764 ; NOT H/V THEN GOTO 0764 H
L778: LCALL DLY_2SEC ;WAIT FOR 2 SECONDS
JNB P2.3, L078BH ;STILL L/V THEN GOTO 078B H <-(2)
SJMP L767 ;NOT L/V THEN GOTO 0767 H
L780: LCALL DLY_2SEC ;WAIT FOR 2 SECONDS
JNB P2.1, L078EH ;STILL NOT DRY SUMP THEN GOTO 078E H <-(3)
SJMP L76A ;OTHERWISE GOTO 076A
L0788H: CLR 77H ;CLEAR FLAG 77H FOR H/V <-(4)
RET
L078BH: CLR 78H ;CLEAR FLAG 78H FOR L/V <-(5)
RET
L078EH: CLR 76H ;CLEAR FLAG 76H FOR DRY SUMP CHECK <-(6)
RET
Hi Scottwang i am now using the hex file you generated and my friend requested me to make the same water pump controller for him, but he needs the timer value to 1 minute .You want to create the *.hex by yourself?
I already attached the waternew.hex in the zip file.
The answer to those types of questions should always be the same: then become more experienced.don't know how to do it and I am a total noob to microcontrollers
;-----------------------------------------------
LOOP:
LCALL DLY_1MIN ;CALL 1 MIN. TIMER
JNB 78H,L3 ;L/V THEN GOTO 018B H
JNB 77H,L2 ;H/V THEN GOTO 0136 H
JB 76H,L5 ;DRY SUMP THEN GOTO 0188 H
JB P2.2,$ ;WAIT UNTIL TANK FULL
LOOP1:
LJMP TANK_FULL ;GOTO TANK FULL DISPLAY
;------------------------- ORG 05xxH ---------------------------------
ORG 05xxH
DLY_1MIN:
MOV R2,#07FH
L502:
MOV R3,#07FH
L504:
MOV R4,#0FFH
L506:
NOP
NOP
NOP
NOP
DJNZ R4, L506
DJNZ R3, L504
DJNZ R2, L502
RET ;BACK TO MAIN PROGRAMME
by Aaron Carman
by Aaron Carman