Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

AT89S2051- need software to convert assemply language to hex

Status
Not open for further replies.

THE ADMIRAL

Newbie level 3
Joined
Apr 10, 2009
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,345
pulse_train

I HAVE A MICROCONTROLER AT89S2051

And i need a software to convert the assemply language to hex

and the soft ware programming is: -


{
Listing Software
;===========================================
; PROGRAM INVERTER OLEH: DIDIK ROSTYONO 2006
;===========================================
;P1=INPUT P3=OUTPUT
;P1.2=TOMBOL START P1.3=BATERE CEK
;P3.0=DRIVER1 P3.1=DRIVER2
;P3.4=BUZZER P3.5=LED
;INISIALISASI (BEEP PENDEK + BEEP PANJANG)
ORG 00H
ON: MOV P3,#20H; DRIVER OFF, BUZZER OFF, LED OFF
ACALL DELAI; TUNGGU 1/4 DETIK
SETB P3.4; BEEP ON
CLR P3.5; LED BIRU ON
ACALL DELAI; TUNGGU 1/4 DETIK
CLR P3.4; BEEP OFF
SETB P3.5; LED BIRU OFF
ACALL DELAI; TUNGGU 1/4 DETIK
SETB P3.4; BEEP ON
CLR P3.5; LED BIRU ON
ACALL DELAI; TUNGGU 1/4 DETIK
ACALL DELAI; TUNGGU 1/4 DETIK
ACALL DELAI; TUNGGU 1/4 DETIK
ACALL DELAI; TUNGGU 1/4 DETIK
CLR P3.4; BEEP OFF
SETB P3.5; LED BIRU OFF
;CEK KONDISI BATERE (LOW VOLTAGE = 2 X BEEP PENDEK)
CEK: JNB P1.3,MULAI; CEK KONDISI BATERE
CLR P3.5; LED BIRU ON
SETB P3.4; BEEP ON
ACALL DELAI; TUNGGU 1/4 DETIK
SETB P3.5; LED BIRU OFF
CLR P3.4; BEEP OFF
ACALL DELAI; TUNGGU 1/4 DETIK
CLR P3.5; LED BIRU ON
SETB P3.4; BEEP ON
ACALL DELAI; TUNGGU 1/4 DETIK
SETB P3.5; LED BIRU OFF
CLR P3.4; BEEP OFF
ACALL DELAI; TUNGGU 1/4 DETIK
ACALL DELAI; TUNGGU 1/4 DETIK
ACALL DELAI; TUNGGU 1/4 DETIK
ACALL DELAI; TUNGGU 1/4 DETIK
SJMP CEK
;INVERTER MENUNGGU PENEKANAN TOMBOL ON
MULAI: SETB P3.5; LED BIRU OFF
CLR P3.4; BEEP OFF
MULAI1: JNB P1.2,START; BACA TOMBOL START
CLR P3.5; LED BIRU ON
ACALL DELAI; TUNGGU 1/4 DETIK
ACALL DELAI; TUNGGU 1/4 DETIK
ACALL DELAI; TUNGGU 1/4 DETIK
ACALL DELAI; TUNGGU 1/4 DETIK
JNB P1.2,START; BACA TOMBOL START
SETB P3.5; LED BIRU OFF
ACALL DELAI; TUNGGU 1/4 DETIK
ACALL DELAI; TUNGGU 1/4 DETIK
ACALL DELAI; TUNGGU 1/4 DETIK
ACALL DELAI; TUNGGU 1/4 DETIK
AJMP CEK
;INVERTER ON
START: SETB P3.5; LED BIRU OFF
CLR P3.4; BEEP OFF
ACALL DELAI; TUNGGU 1/4 DETIK
ACALL DELAI; TUNGGU 1/4 DETIK
ACALL DELAI; TUNGGU 1/4 DETIK
ACALL DELAI; TUNGGU 1/4 DETIK
SETB P3.4; BEEP ON
CLR P3.5; LED BIRU ON
ACALL DELAI; TUNGGU 1/4 DETIK
CLR P3.4; BEEP OFF
ACALL DELAI; TUNGGU 1/4 DETIK
;PWM GENERATOR
PULSE: JNB P1.2,ON; JIKA STOP DITEKAN KEMBALI KE AWAL
JB P1.3,ON; CEK KONDISI BATERE
PWM: CLR P3.0;
CLR P3.1;
SETB P3.0;
ACALL PULSE_TRAIN;
CLR P3.0;
CLR P3.1;
ACALL PULSE_TRAIN;
CLR P3.0;
CLR P3.1;
AJMP PULSE
;RUTIN DELAI1
DELAI: MOV R1,#2
L1: MOV R2,#250
L2: MOV R3,#250
L3: DJNZ R3,L3
DJNZ R2,L2
DJNZ R1,L1
RET


}



please help meeeeeeeeee
 

Re: HELP ME PLEASE

what development environment are you using?
ur assembler does d job 4u if ur using an IDE
 

HELP ME PLEASE

Just compile the source code and get the hex file in the same compiler in which you have written the code. Or use Keil.
 

HELP ME PLEASE

use X51 and L51
 

HELP ME PLEASE

Use Keil...it is best option
 

Re: HELP ME PLEASE

Generic Board for 8051 Microcontroller

**broken link removed**
 

HELP ME PLEASE

thaks all

but any one can convert the assemply to hex for me
 

Re: HELP ME PLEASE

your code is missing the subroutine called "PULSE_TRAIN". The code will not assemble.

once that code is included it will assemble without errors. you can paste the missing code in the test.asm file included in this zip file. Paste the code before the "END" command.

To assemble into a hex file, just run the asm.bat file.

you should set up the stack pointer at the beginning of your program. Most 8051 devices set the stack at a default address of 07h, I am not sure about some derivatives though. It is always a good practice to do it.

paste the following line at the very beginning of the code
right after "ON:"
paste this line:

Code:
	mov	sp,#6Fh      ;set up stack near top of  ram

Best of Luck
 

Hello., have the same issue here , want to see if the code works and never been good with codes., anyhow i followed the directions and i get 5 errors when it compile.?
ofcourse it doesnt say what is wrong with code., so would you be able to help or do the copy and paste ...etc and verify if it works please and post it too, i need to find were iam making the mistake
sincerely
 

Hi there is a prolem with the code (i got two error )
1) no END directive is present...but this is trivial
2) there are 3 calls l to function "PULSE_TRAIN" but no such function is defined....is pulse train function same as pulse?

Asimov
 

Hi,

Sorry to bump this thread, I have the same problem...

Is the problem solved?

Please share the correct code..


TIA..
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top