![]() | ![]() | ![]() |
| | |||||||
| Electronic Projects Design/Ideas/Reviews Are you building an electronic project or want to? Maybe you need some assistance? Come and submit your electronic questions here and let our experienced members find a solution. |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| Hi, i'm trying to put my name (anthony) into this air display but i cant I do it with autor's page code and works excellent!!!! Thankss | |
| |
| | (permalink) |
| Why not just modify the code under "algorithm" and re-compile? John | |
| |
| | (permalink) |
| The problem is: i dont know re-copiler. Do you can say me what are the rigth tools to do that? Pls help me... i wanna learn about copilation process... | |
| |
| | (permalink) | |
| Quote:
http://www.microchip.com/stellent/id...&part=SW007002 Download and install into your PC, use the Help files in the MPLAB.
__________________ Eric "Good enough is Perfect" PIC tutorials: Gramo's: www.digital-diy.net/ Bill's: www.blueroomelectronics.com/ | ||
| |
| | (permalink) |
| There seem to be two choices to do what you want to do: 1) Edit the hex code directly; or 2) Edit the source code ("algorithm") and compile to give new hex code. The first choice in my view is much more difficult, particularly if you are not familiar with coding. You have to use a hex editor, not a text editor. If you use a text editior, it may seem to work from what you see on the screen, but it won't work when you try to re-program the chip. I have used a hex editor couple of times in my work when I did not have access to the source code, but I did have access the hex code. In fact, I did essentially what you are trying to do, namely change the names of some variables. However, as I just stated, it would not be my first choice, since the source code is available in the "algorithm." The second choice is easiest. The steps in the algorithm that spell out the greeting can simply be change to other letters to spell anything you want. Then when you program the chip the language of the "algorithm" will be converted to hex code by the compiler. I cannot get much more detailed than that without know what you have for a programmer and whether you are familiar with assembler (assembly) language. John | |
| |
| | (permalink) | |
| Quote:
However, it's a SERIOUSLY bad idea, you first have to understand fully how a HEX file is constructed (it's explained in the MPASM helpfile), and then how to create the values for one, including the correct checksum value. Far, far easier to load it in MPLAB and alter the source code, then re-assemble it. You could also load the HEX file in WinPicProg, and manually edit the HEX files there - as it's displayed as pure machine code, bit for bit, rather than the Intel HEX file format. But re-assembling the source is the way to go! - if you can't do that, you can't do the other options as they are more difficult. | ||
| |
| | (permalink) | |
| Quote:
I certainly defer to your experience and suspect I made an incorrect leap in assuming the exe was simply a hex file. Thank you for the correction. John Last edited by jpanhalt; 7th January 2008 at 02:46 PM. | ||
| |
| | (permalink) |
| Well i have MPLAB but i dont know use it!!! Can you guide me saying me few importants steps?? | |
| |
| | (permalink) |
| will be something like this??? Code: ; name : JP6293E
; author : Anthony Sotillet
; date : 07/01/08
; Microcontroller: 12f629 Speed: 4 Mhz Internal RC
delay 200 miliseconds
Set Comparator Mode 7
variable byte f = 00000000b ; Output data
variable byte s ; Temporal variable
variable byte o ; message number.
procedure salida( s as byte ) is
gpio = s
delay 500 us
gpio = 00000000b
delay 200 us
end procedure
procedure disp ( f as byte ) is
if f = "0" then f = "O"
if f = "A" then
salida(0011_0110)
salida(0000_0101)
salida(0000_0101)
salida(0011_0110)
end if
if f = "H" then
salida(0011_0111)
salida(0000_0100)
salida(0000_0100)
salida(0011_0111)
end if
if f = "N" then
salida(0011_0111)
salida(0000_0010)
salida(0000_0100)
salida(0001_0000)
salida(0011_0111)
end if
if f = "O" then
salida(0001_0110)
salida(0010_0001)
salida(0010_0001)
salida(0001_0110)
end if
if f = "T" then
salida(0000_0001)
salida(0011_0111)
salida(0000_0001)
end if
if f = "Y" then
salida(0000_0001)
salida(0000_0010)
salida(0011_0100)
salida(0000_0010)
salida(0000_0001)
end if
if f = "h" then ; 'h' lowercase = Hearth character
salida(0000_0010)
salida(0000_0111)
salida(0001_0111)
salida(0011_0110)
salida(0001_0111)
salida(0000_0111)
salida(0000_0010)
end if
if f = " " then ; space character.
delay 4 miliseconds
end if
delay 1 milisecond
end procedure
; main program
gpio = all output
if o = 0 then
; Display "BE HAPPY "
o = o + 1
forever loop
disp("A")
disp("N")
disp("T")
disp("H")
disp("O")
disp("N")
disp("Y")
disp(" ")
disp("h")
end loop
end if
o = 0
salida(0000_0000)
sleep microcontroller ; sleep command
nop ; No operation | |
| |
| | (permalink) |
| No body can help me?? | |
| |
| | (permalink) | |
| Quote:
__________________ Regards, Sarma. Last edited by mvs sarma; 7th July 2008 at 01:14 PM. | ||
| |
| | (permalink) |
| Hi Anthony, it would be a good idea to post the exact authors code which is normally displayed. I translated a BMS computer program from English to German without touching any other Bit, just replaced the English text with German. The program works fine with no malfunctions. I have two powerful hex editors and finding the author's code it will be changed very quickly. Assuming the author didn't deliver the source code (why should he?) the only way to apply changes is going directly to the hex code. Disassembling would be another choice, but do you know which language was used to create the hex file? Boncuk | |
| |
| | (permalink) | |
| Quote:
__________________ Regards, Sarma. | ||
| |
| | (permalink) | |
| Quote:
PD: I dont know use the MPLAB as well as you!! i even dont copile an one single code in the MPLAB | ||
| |
| | (permalink) | |
| Quote:
http://josepino.com/pic_projects/air...play_code.html Here's a flash video I'm working on for using MPLABs Wizard http://www.blueroomelectronics.com/S...HelloWorld.swf | ||
| |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
| | ||||
| Title | Starter | Forum | Replies | Latest |
| How a Hex code is operated in u-controller? | ibrar0 | Micro Controllers | 11 | 30th November 2007 09:15 PM |
| MP Lab Program Help | bamafan54 | Micro Controllers | 3 | 19th October 2007 03:53 AM |
| Need some help with a code provided by ATMEL | ikalogic | Micro Controllers | 1 | 23rd January 2007 03:46 PM |
| Tough assembly program for the PIC16F84 | asmpic | Micro Controllers | 34 | 3rd December 2004 07:50 PM |
| An error in pic16f84a, why? | Zener_Diode | Micro Controllers | 6 | 11th April 2004 03:55 AM |