Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Converting asm to hex

Status
Not open for further replies.
Hi jpanhalt,
The PICKIT2 behaves in a very similar way to the PICKIT3. Neither will let you import a hex file unles it is connected to a PIC. I do not have a PIC16F84 so I just used a PIC16F628A. I have one of each connected to my computer at the moment. From my limited memory of the structure of a hex file I think near the start it says at what memory location to start loading the file. The way the source file is written there is no .org 0 statement. (There is a .org 4 and .org 5) I think the program is being loaded starting at location 5 The 3FFFs are just the blank state of a PIC. The source file starts with a jump to location 5 then 3 NOP instructions.

Les.
 
Lets start over!!! When you load the hex file... What!! Any LED's come on? You keep saying

But we don't know if the program is working but not as you expect, or it just doesn't run!!
It dose run but not as expected....it means for example when the circuit on the first yellow led blink and beep...after 30 second the program(zapping) starting at this time the out put should have to be 2.5khz.....and as a cross chek the out put voltage should have to be 1/2 of the battery voltage which means 4.5v has to show on the volt meter. None of this 2 are shown.NO. the surprising thing is After the yellow led light up and after 30 second complite the "zapping starting" for 7 minute when 7 minutes finished the green led comes on which means 28- 30 minute break time from zapping. ALL THE LED PROCESS IS ALRIGHT BUT WITH OUT OUTPUT (0khz).
 
Last edited:
If you will answer these questions we will proably be able to make some progress.
1/ Which version of the hex file is loaded into the PIC ?
2/ What is the measured voltage on pin 10 of the PIC during the 30 seconds while the yellow LED is fashing ?
3/ What is the measured voltage on pin 11 of the PIC during the 30 seconds while the yellow LED is fashing ?
4/ What is the measured voltage on pin 10 of the PIC during the 7 minutes zapping period seconds while the yellow LED is on ?
5/ What is the measured voltage on pin 11 of the PIC during the 7 minutes zapping period seconds while the yellow LED is on ?

Les.
 
The output on RB5 is on for the first 30 seconds so the output will be 0v The frequency is 2.5khz ( hex conversion gone wrong ) There is a an output of just under 8v peak to peak..

I'll need to go over your PCB layout as the simulation is perfect!!

New Hex:-
 

Attachments

  • zapper.HEX
    927 bytes · Views: 186
ERGOYE Can you tell me exactly which transistors you bought..

BC214 and BC184?? There are two versions... The L version ( hard to get now) have a different pinout to the B version.

I use the BC212L and the BC182L and the base is pin 1 on both.. The BC212B and BC182B have the base in the middle.. The B version are the one's in the shops now..
 
ERGOYE Can you tell me exactly which transistors you bought..

BC214 and BC184?? There are two versions... The L version ( hard to get now) have a different pinout to the B version.

I use the BC212L and the BC182L and the base is pin 1 on both.. The BC212B and BC182B have the base in the middle.. The B version are the one's in the shops now..
BC184C and BC214C
 
If you will answer these questions we will proably be able to make some progress.
1/ Which version of the hex file is loaded into the PIC ?
2/ What is the measured voltage on pin 10 of the PIC during the 30 seconds while the yellow LED is fashing ?
3/ What is the measured voltage on pin 11 of the PIC during the 30 seconds while the yellow LED is fashing ?
4/ What is the measured voltage on pin 10 of the PIC during the 7 minutes zapping period seconds while the yellow LED is on ?
5/ What is the measured voltage on pin 11 of the PIC during the 7 minutes zapping period seconds while the yellow LED is on ?

Les.
1/ PIC16F84
2/0V
3/5V
4/2.5V (2.48)
5/2.5V (2.48)
 
Your PCB posted in #86 is for the "L" versions. If you have replacement transistors with long leads, you can bend them to get the correct connections.
 
When I asked which version of the hex file you used I did not make the question clear enough. I have posted 2 versions in recent posts (And I think another one some time ago.) Ian has also posted a number of versions and there is also the original from the EPE website. Can you say from which post number the file came from that is loaded into the PIC at the moment ? From those voltage readings the software is working as it should do.
I agree with Ian and jpanhalt that the most likely cause of the fault now is the connections to the transistors. (Inserting the B version without taking into account that the pin layout is different to the L version.) You should have now learned giving a good description of the fault in post #123 and answering quesions properly like you did in post #128 results in rapid diagnosis of a fault. Hopefully you will have learned to answer questions if you have any future problems.

Les.
 
:happy::happy::happy::happy::happy: BINGO.
IAN,
LES
JPANHALT...and the rest of all this room members who tried to help me. the PROBLEM IS SOLVED. by changing the transistors BC214C by BC214L.....and BC184C by BC184L.
NOW i got the 2.499 kHz and 4.23V out put.
 
Last edited:
You expect people to make an effort to help you but you could not even be bothered to answer the last question now your problem has been solved.

Les.
 
You expect people to make an effort to help you but you could not even be bothered to answer the last question now your problem has been solved.

Les.
After page 2 I knew something else was amiss... The original file must have worked or Andy wouldn't have PCB's made...
 
When I asked which version of the hex file you used I did not make the question clear enough. I have posted 2 versions in recent posts (And I think another one some time ago.) Ian has also posted a number of versions and there is also the original from the EPE website. Can you say from which post number the file came from that is loaded into the PIC at the moment ? From those voltage readings the software is working as it should do.
I agree with Ian and jpanhalt that the most likely cause of the fault now is the connections to the transistors. (Inserting the B version without taking into account that the pin layout is different to the L version.) You should have now learned giving a good description of the fault in post #123 and answering quesions properly like you did in post #128 results in rapid diagnosis of a fault. Hopefully you will have learned to answer questions if you have any future problems.

Les.
Les...SORRY I Appologise , I was on the way to shop the transistor and when i came back i went to try to replacing the transistor ....all my attention was to see the result....i used the hex file from #104
 
Hi Ian,
If he had given the accurate description of the fault as he did in post #123 at the start of the thread at the start it would have been solved straight away. I agree that there was probably nothing wrong with the original hex file otherwise there would have been comments when doing a search for "Virus zapper" on the EPE website.

Les.
 
Here is a version of the version 1 zapper hex file created using MPASM to assemble it. PLEASE tell us what programmer you are using, what programming software and what version of windows you are using. Also are you using a PIC16F84 or a PIV16F84A ? If it fails to work give us an accurate description of how it does not work as expected.

Edit. For the benifit of the other members trying to help this was created by first using the EPE TK3 toolkit to disassemble the original zapper version 1 hex file to an MPASM compatible source file, comparing the listing with the original zapper version 1 source file and then assembling this file with MPASM. I have added most of the labels and comments from the origin source file to the one from the disassembly. I will post the file if anyone is interested. (Someone may spot a difference that I have missed.)

Les.

Hello Les. do you have the hex file for version 2 of the zapper using PIC16F84. I will be using MPLAB IPE v 4.15 and a picket 3 .. your help will be appreciated..
Thank you
 

Attachments

  • zapper 2.asm
    14.9 KB · Views: 165
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top