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.

Help needed desperately with PIC LCF meter

Status
Not open for further replies.
Hi. I'm trying to build the EPE LCF Meter, but the pic that i'm using is the 628A. I had problems to download the hex file which ericgibbs proposed. I probed some hex files from different forums, but any of them worked. In the mode of capacitor, the LCD display "Capacitor time out". Someone built the circuit an it worked fine?? What hex file used?? Please, I need help :(

hi,
This was the latest version for the16F628A , lets know if you have a problem.
 

Attachments

  • LCFmet790_4.asm
    36.1 KB · Views: 484
  • LCFmet790_4.hex
    7.2 KB · Views: 465
Hi

i have two questions...

a comparator such as the LM393 is it suitable to be placed
before the frequency meter so the instrument can measure sine wave
other than square?

second thing... what factors can cause instability to the instrument's
4011 oscillator? a leaky capacitor can be a cause?

P.S eric if you read this post still the LCF meter isn't working ok.
 
Hi

i have two questions...

a comparator such as the LM393 is it suitable to be placed
before the frequency meter so the instrument can measure sine wave
other than square?

second thing... what factors can cause instability to the instrument's
4011 oscillator? a leaky capacitor can be a cause?

P.S eric if you read this post still the LCF meter isn't working ok.

hi,
The LM393 is not a 'fast' comparator, what frequency range is required.

When you say the LCF is not working, whats the symptoms? Others have built the LCF and it works OK.

BTW: its not my design.
 
hi,
The LM393 is not a 'fast' comparator, what frequency range is required.

the LCF i think it can measure up to 5MHz square so i guess i need a comparator
for that frequency range .. how high the LM393 can go? also can you describe
how i can add a comparator to the instrument so i can avoid mistakes...

When you say the LCF is not working, whats the symptoms?

if you want check the previous pages and you'll understand ;)
 
up to what frequency the LM393 can go? sorry but i can't trace that detail at the PDF...
also can somebody describe how i can add a comparator to the instrument so i can avoid mistakes?

thanks in advance anyone willing to reply.. :)
 
Last edited:
hi,
This was the latest version for the16F628A , lets know if you have a problem.

Hi Eric.

First, thanks for posting the code.

I run a test with your code and it run really, but really fast.

I noticed that the original welcome message (EPE LCF METER) doesn't show anymore.

And another thing is that when enter either in IND or CAP correction mode, the first letter (I or C) doesn't show.

Another thing that happens with all code I've tested is that when a overflow happens in the second line is displayed 'OVERFLOW 2'.

Checking the code, in the INDUCT section, I found these lines:

Code:
call COPY_REGA_REGB     ; copy answer into REGB
call MULTIPLY           ; REGA * REGB -> REGA (squaring REGA)
movf STATUS,W
andlw 1
movwf OVERFLOW

movlw '2'
movf OVERFLOW,F
btfss STATUS,Z
goto SHOWOVERFLOW

I'm not a asm programmer, but since values stored are not betwen ', I changed the line

Code:
movlw '2'

to

Code:
movlw '!'

With this modification, now when a overflow happens is displayed OVERFLOW !

Maybe someone can try this too.

Now the questions:

1) Can you tell me how to put the welcome message back again?
2) How to correct the missing first letters from IND and CAP correction modes?
3) The modification I've made to show OVERFLOW ! can mess with the results from program?

My project was running really good. I've put a 56pF (cause I don't have a 68pF) capacitor to solve problem with hang up in capacitance mode.

I'll do a layout for this excelent project, with all components on board and if anyone want it I'll post here (I don't have much time, but try to do as fast I can).

Thanks for all and happy new year.
 
hi and welcome,:D

All I did with the original code was to make the minor changes from 16F628 to 16F628A.

I didn't remove any of the text messages or make any changes that you mention.

I am little puzzled by what you are seeing, are you using the correct crystal.?? I will recheck the code I posted to make sure that a problem has not crept in.

E
 
hi and welcome,:D

All I did with the original code was to make the minor changes from 16F628 to 16F628A.

I didn't remove any of the text messages or make any changes that you mention.

I am little puzzled by what you are seeing, are you using the correct crystal.?? I will recheck the code I posted to make sure that a problem has not crept in.

E

Eric,

I'm using the correct cystal (3.2768 MHz).

The only different parts are the 10nF - 1% capacitors that I can't find, but since I have a commercial capacimeter, I've seleceted capacitors with 10nF closest value.

But I think these have nothing to do with my questions.

Thanks for all.
 
Eric,

I'm using the correct cystal (3.2768 MHz).

The only different parts are the 10nF - 1% capacitors that I can't find, but since I have a commercial capacimeter, I've seleceted capacitors with 10nF closest value.

But I think these have nothing to do with my questions.

Thanks for all.

hi,
I have found the reason for the fast running.

Line 979 of the Code
PAUSIT: return
Delete that 'return' it was placed there for the Oshonsoft Simulator.! in order to speed up the simulation.

Just remove the 'return' and re-assemble the source code, let me know.

E
 
hi,
I have found the reason for the fast running.

Line 979 of the Code
PAUSIT: return
Delete that 'return' it was placed there for the Oshonsoft Simulator.! in order to speed up the simulation.

Just remove the 'return' and re-assemble the source code, let me know.

E

Eric,

Thanks. Removing return makes the code runs as it orginal speed, and also corrects the missing initial letters in correction modes.

In code you posted are another thing to do (for all that want to build this LCF meter), that is to change the config line.

In your code is this:

Code:
;       __CONFIG  h'3F21'	;628A ext xtal

	__CONFIG  h'3F30' ;[ int 4mhz osc 628A test ONLY]

For propper function, these lines must be this


Code:
       __CONFIG  h'3F21'	;628A ext xtal

;	__CONFIG  h'3F30' ;[ int 4mhz osc 628A test ONLY]

Last, what do you think about the modification I've made to show 'OVERFLOW !' instead 'OVERFLOW 2'.

Thanks in advance.
 
Eric,

Thanks. Removing return makes the code runs as it orginal speed, and also corrects the missing initial letters in correction modes.

In code you posted are another thing to do (for all that want to build this LCF meter), that is to change the config line.

In your code is this:

Code:
;       __CONFIG  h'3F21'    ;628A ext xtal

    __CONFIG  h'3F30' ;[ int 4mhz osc 628A test ONLY]
For propper function, these lines must be this


Code:
       __CONFIG  h'3F21'    ;628A ext xtal

;    __CONFIG  h'3F30' ;[ int 4mhz osc 628A test ONLY]
Last, what do you think about the modification I've made to show 'OVERFLOW !' instead 'OVERFLOW 2'.

Thanks in advance.

hi,
Thanks for checking out the code in hardware, I dont have a LCF built on the bench.

If you could post your working code listing here, it may help others, raise the issue name to
LCFmet790_5.asm

E.
 
hi,
Thanks for checking out the code in hardware, I dont have a LCF built on the bench.

If you could post your working code listing here, it may help others, raise the issue name to
LCFmet790_5.asm

E.

Eric,

Here are the asm and hex files that is working on my hardware.

I don't know why, but I noticed that this code is more accurate than original.

I have a 10nF 1% (styroflex, with big body) that shows 10.003 in my commercial meter.

With other codes are showed 10.200nF to 10.700nF.

Whit your code it shows 10.019nF. This happens with other values too.

Thanks for all help. Hope these files can help someone.

Regards.
 

Attachments

  • LCFmet790-5.rar
    10.9 KB · Views: 469
Last edited:
Hi,
Many thanks for that, I will keep a copy on file.

E.
 
congrats, so to Eric who structured the software to this accuracy... Best of many more designs in 2012 Eric !!
 
Last edited:
Hi to all forum's members.
I built epe lcf meter in accord with modifications of
http://calatron.me.uk/calatronweb/Electronics_Hobby/pe_lcf_meter_modifications.htm
for the capacitors.I put 1k resistors parallel to R2,because the values were too high.
Now i have accuracy for little capacitors,but when i check components higher than 1500 uF,my meter don't work.What can I do?I flashed 16f828 with LCFmet790_5.HEX,but this is for 16f628A.What's the latest code for 16f628?
Thanks!!!
 
Hi to all forum's members.
I built epe lcf meter in accord with modifications of
http://calatron.me.uk/calatronweb/Electronics_Hobby/pe_lcf_meter_modifications.htm
for the capacitors.I put 1k resistors parallel to R2,because the values were too high.
Now i have accuracy for little capacitors,but when i check components higher than 1500 uF,my meter don't work.What can I do?I flashed 16f828 with LCFmet790_5.HEX,but this is for 16f628A.What's the latest code for 16f628?
Thanks!!!

Hi,
The original authors code was written for the 16F628, you should be able to download from a post close to the start of this Thread.

No changes were made in the performance of the LCF meter program, only changes to suit the 16F628A.
 
hi

for very long time my LCF meter was useless because of an instability
which i couldn't manage to resolve without Eric's help..

to whoever tries to build this instrument i want to notify for two things,
first thing although the author at his article states the following:

"inductor L1 is mounted vertically on the board, with its other lead trimmed to
serve as a terminal pin. In the prototype it was originally mounted flat on the
board but it was found that this caused instability in the oscillation frequency
due to the proximity of a signal-carrying p.c.b. track running in parallel with
the inductor."


in fact you may find that the vertically mounted inductor is subject for
mechanical stress and damage which may not be obvious to the
eye, but can cause problems, so watch out how you solder that inductor
too much heat could damage it as well as mechanical stress, in my
case it was placed horizontally and it works well.

second thing, in case somebody modifies it to keep only one function
of the meter, don't foget to include a switch in order to calibarate the
instrument. :D
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top