![]() | ![]() | ![]() |
| | |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| After having battled with Crossware's 8051 Development Suite for a long time now, I am turning to a different kind of solution. There are a lot of people who use freeware in the process of developing microcontroller systems, atleast I seem to hear it in discussion forums. The only problem for me is the hex files that do not come out right. So I was wondering if anywone knows of any assembly to hex converter out on the web, which I can use to convert my assmebly codes into Hex file? I have done google search, but could not find anything. Many thanks! peace. | |
| |
| | (permalink) |
| Almost every assembler out there for the 8051 produces a .hex file. That said, if you can't get the supported crossware system to do what you want, how do you expect to deal with unsupported freeware. It would be nice if you had a greater understanding of the hardware platform, but I think you are giving up too easily. Since they guy at crossware was able to construct a working file you can also. | |
| |
| | (permalink) |
| It sounds like you're blaming the compiler for your lack of understanding of the 8051 or programmer. It's common to blame the tools, I see it all the time. First what programmer are you using? A homemade one possibly of poor design or something so old it has zero chance of working with a modern operating system? Can you read / write / modify bytes on the 8051 with your programmer? I googled 8051 assembler, lots of hits. http://www.google.ca/search?source=i...e+Search&meta= | |
| |
| | (permalink) |
| It may be a 'lack of understanding' but hey, Im doing all this so I can gain some understanding! Ok, I am patiently sticking with Crossware. I am pretty sure it is something minor that I need to get around. Once I have identified the problem, it would be sorted for good. Yes I can connect and write to my 8051 chip (using FLIP). The guy at Crossware could not help identify my problem. But he did get a working hex file from the same code (I emailed to him). Here is the code I wrote: ORG 0 HERE: MOV A, #255 MOV P1, A ACALL DELAY CLR A MOV P1, A ACALL DELAY SJMP HERE DELAY: MOV R5, #7 HERE1: MOV R4, #255 HERE2: MOV R3, #255 HERE3: DJNZ R3, HERE3 DJNZ R4, HERE2 DJNZ R5, HERE1 RET END Here is my hex file: :1040000031303338383931360050726F647563653A :1040100064206279207468652043726F73737761DE :104020007265204E6F6E2D436F6D6D6572636961B1 :104030006C2044656D6F6E73747261746F720043AF :104040006F70797269676874202863292032303074 :10405000312043726F737377617265204173736FA0 :0740600063696174657300E0 :0440670074F4F58078 :02406B000167EB :00000001FF here is his hex file for the same code: :1000000074FFF590110DE4F590110D80F37D077CE0 :0A001000FF7BFFDBFEDCFADDF622C9 :00000001FF His hex file works on my 8051, but my one does not. If I try an even more simple code: ; 8051 Initial Assembler Source File public START program segment code rseg program START ; startup code jumps to label START ; TODO: Add your assembler source code here MOV A, #255 MOV P0, A END Here is the hex file I get for this one: :1040000031303338383931360050726F647563653A :1040100064206279207468652043726F73737761DE :104020007265204E6F6E2D436F6D6D6572636961B1 :104030006C2044656D6F6E73747261746F720043AF :104040006F70797269676874202863292032303074 :10405000312043726F737377617265204173736FA0 :0740600063696174657300E0 :0440670074FFF5806D :03406B00024067A9 :00000001FF It looks very similiar to the other one. I am doing my best to figure out where it is I am going wrong. At the moment I have an LCD waiting to be programmed and code all typed up, as I want to, and need to learn to program these devices over the summer, and time is rolling on fast with this unexpected problem which has halted my progress. I am wondering if it could be anything to do with the fact that I am on Vista. I appreciate the help I have received here. Last edited by AceOfHearts; 13th June 2007 at 04:11 PM. | |
| |
| | (permalink) | |
| Quote:
What is there looks like a string of ascii characters rather than actual code. The contents of the string may give you a clue. Your code is on the line that begins: :0440670074FFF5806D The 74FF is the MOV A,#255 Last edited by Papabravo; 12th June 2007 at 09:56 PM. | ||
| |
| | (permalink) |
| I found a solution to the problem, Thank God. It seems to work when I embed my assmbly file into a C project using #asm and #endasm command Strange, it does not work when I make a dedicated assembly project... Last edited by AceOfHearts; 25th June 2007 at 02:02 AM. | |
| |
| | (permalink) |
| Edit the asm.bat file. change "hexfile.ASM" to the name of your asm file. also, you must have $mod51 before org 0 statement just double click on the asm.bat file in windows and it will produce a hex file in the same folder. If there are any errors, they will appear in the hexfile.lst file (or whatever you call the asm file) that will be created by the assembler. Good luck edit: file was removed, download asm2.zip (see post below) Last edited by johnsmith123; 8th July 2007 at 07:09 PM. | |
| |
| | (permalink) | |
| Quote:
I am very grateful for the compiler. Thanks very much. However, my .lst file lists loads of errors for some reason, even when my .asm file does not have any. I get a .hex file output which does not work when I try to load it into FLIP. And when I put &mod51 statement before I compile my .asm file, I get errors - so I tried putting it in after compilation, I dont know if that would work though. Thanks again for your help, waiting to hear (further instructions) from you again. Last edited by AceOfHearts; 6th July 2007 at 04:12 PM. | ||
| |
| | (permalink) |
| Hello I hope am understanding you right. You need a compiler nit a converter to compile you assembly code. With some library according to the controller you are using. Pleas more detail so hope I can help waleed | |
| |
| | (permalink) |
| I assembled your source without any errors. You probably made a mistake in the bat file, or something is wrong with the source code. Look in this zip file. The source code is in there with the edited bat file. It works. You will see the compiled hex file and lst file also. Download this zip file and delete the old one. I removed it from the server. Good luck | |
| |
| | (permalink) | |
| Quote:
Appologies for the late reply. Thanks for the clarification johnsmith123. | ||
| |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
| | ||||
| Title | Starter | Forum | Replies | Latest |
| ammeter for standby generator | jwnetsource | Electronic Projects Design/Ideas/Reviews | 4 | 3rd June 2006 06:30 AM |
| analog function generator theory schematic | walters | General Electronics Chat | 13 | 16th December 2005 05:28 PM |
| Electric motor as a generator, DC type? | Johnson777717 | General Electronics Chat | 5 | 23rd June 2004 10:13 PM |
| synchronous motor vs generator | iieeahmed | Electronic Projects Design/Ideas/Reviews | 1 | 28th November 2003 04:29 PM |
| Wide Band Signal Generator | CParsec | General Electronics Chat | 1 | 27th September 2003 03:48 AM |