• FORUM
  • LOGIN
  • ADVERTISE

16F628A Frequency Counter

Discussion group on micro controllers, programming, and related..

16F628A Frequency Counter

Postby VE3HHF » Mon May 16, 2011 10:08 pm

Hello,

I recently constructed a frequency counter with 16x2 LCD display using the FC0V51P hex file I found on your site. Functionally, it works quite well. The display, however, does not. The output to the LCD is split in half. It looks something like this:

00.0000
00Mhz

When I select the time base, it looks like this:

Gate Tim
e 125ms

Has anyone else seen this problem? Is it possible to obtain the source code to see if it can be corrected? Thanks.

Regards...

Joe Gabriele
VE3HHF
VE3HHF
 
Posts: 1
Joined: Mon May 16, 2011 9:54 pm

Postby vu3cns » Tue May 17, 2011 4:05 pm

Hi,
It is not a problem. The program/circuit is designed for a single line (1 x 16) LCD. Instead you used 2 line X 16 LCD. Change your LCD or program is the solution. The source is HERE
73's
CNS
vu3cns
 
Posts: 289
Joined: Sat Jun 14, 2003 12:00 am
Location: Calicut

Postby YO5VAE » Mon Aug 01, 2011 11:33 pm

Does anyone have the modified source or the hex for this project, but for a 2x16 LCD? Looks like I am not able to modify the source so that I can use a 2x16 LCD.
I need it for pic16f628a.
Thank you.
YO5VAE
 
Posts: 15
Joined: Mon Aug 01, 2011 11:29 pm

Postby vu3cns » Tue Aug 02, 2011 11:06 pm

I will explain what I did to make the code work with a 16x2 LCD display.

1. If I compile the asm file as is, it compiles ok without any errors but I get a split display.

2. I commented out ‘#DEFINE SINGLE_LINE’ so that DISPLAY_FREQ would default to a 2 line display.

3. When I tried to compile, I got two errors ‘Symbol not previously defined (DISP_OFFSET)’ and ‘Symbol not previously defined (NEG_ARG2)’.

4. Assuming that the IFNDEF SINGLE_LINE routine wasn’t working properly, I commented out the Single_Line subroutine and replaced the ‘GOTO DISP_OFFSET’ call with the code for DISP_OFFSET

5. I changed CALL NEG_ARG2 to CALL NEG_ARG0.

6. The new asm file compiled successfully without errors and then I loaded the hex file on the 16F628A.

I have used it to measure several frequency sources up to 20MHz with accuracy of over 99%.

Regards and 73s...
Joe
VE3HHF

The above was from e-mails between me and Joe
vu3cns
 
Posts: 289
Joined: Sat Jun 14, 2003 12:00 am
Location: Calicut

Postby YO5VAE » Tue Aug 02, 2011 11:12 pm

Thank you. I will try and return here with the results.
YO5VAE
 
Posts: 15
Joined: Mon Aug 01, 2011 11:29 pm

Postby mvs sarma » Wed Aug 03, 2011 11:34 pm

@vu3cns,
I tested your design up to 30MHz full with no perceptible difference. You know that i had the elektor SDR. one output of 74HC74 output is samples by applying to the freq counter and it reads perfect.
Regards
Sarma
mvs sarma
 
Posts: 638
Joined: Wed Oct 11, 2006 4:57 pm
Location: Hyderabad, India

Postby YO5VAE » Wed Aug 31, 2011 5:41 pm

Hello. I am back. I have managed to build the frequency counter and to modify the source file. But, so far, I have a small problem.
The LCD works good on the first line, but on the second line, when I press the if select button shortly, I have this:
First line: 0.000000 MHZ Second line: <D
First line: 0.455000 MHZ Second line: <0R
First line: 4.915000 MHZ Second line: <1R
First line: 9.000000 MHZ Second line: <2R
First line: 10.000000 MHZ Second line: <3R
First line: 10.700000 MHZ Second line: <4R
First line: 4.333000 MHZ Second line: <5R
First line: 10.245000 MHZ Second line: <6R
First line: 10.000000 MHZ Second line: <7R
First line: 10.000000 MHZ Second line: <8R
First line: 10.000000 MHZ Second line: <9R
First line: 0.000000 MHZ Second line: <D
This is how it should display or I have some problems?
And if it doesn`t display right, is there someone that can help me to solve this problem?
Thank you. 73.

Later edit:
After some tests, it looks like SW3 - NOR-REV doesn`t work either. Any suggestions?
YO5VAE
 
Posts: 15
Joined: Mon Aug 01, 2011 11:29 pm

Postby mvs sarma » Fri Sep 02, 2011 8:42 am

Nice to see that you changed the software for a single row display on 2*16 lcd module. As the original design is meant for 1*16 display,
i feel that once you managed the 2*16 to display in one row, even the ">D" etc should also come to1st row itself.
that is not really serious and you can well use it with no further changes.
Last edited by mvs sarma on Sat Sep 03, 2011 9:47 am, edited 1 time in total.
Regards
Sarma
mvs sarma
 
Posts: 638
Joined: Wed Oct 11, 2006 4:57 pm
Location: Hyderabad, India

Postby YO5VAE » Fri Sep 02, 2011 10:06 pm

I think it is better like this....showing that on the second line. I like it more.
Anyway, couldn`t find yet why SW3 - NOR-REV doesn`t work. Any ideas?
YO5VAE
 
Posts: 15
Joined: Mon Aug 01, 2011 11:29 pm

Postby mvs sarma » Sat Sep 03, 2011 9:49 am

please try to send me the revised hex and i shall check on my counter.
Regards
Sarma
mvs sarma
 
Posts: 638
Joined: Wed Oct 11, 2006 4:57 pm
Location: Hyderabad, India

Postby YO5VAE » Wed Sep 14, 2011 7:37 pm

Problems are still persisting with my frequency counter.
Last days i have managed to put it on a printed pcb, but I still have the same problems, no matter what hex I`m using, the original one or the one I have modified.
The problem would sound something like this:
After i program the pic, insert it in the frequency counter, everything works great. The frequency is displayed, I have the offsets and I can switch from nor to rev, etc. But if I power it off and then power it on again, the offset frequencies are gone. The IF select, for example, is 9.000000 MHz, even if it should be 9.001500 or in reverse 8.998500. So the offsets are gone after restart. The nor-rev switch is kind of working, meaning that if I put it in rev position, doesn`t change the letter from N to R only after I change to the next offset. Same if I put it in Nor position.
As Vcc, without PIC, I have 1.8 Vcc between collector and ground and also on pin 2 and 3 from Pic.
The changes I have made:
- L1, which should be 150uH has an unknown value, being recoverd from a broken power supply
- the transistor I have used is not 2N2222, is BC546B.
Hope someone can give me some help with these problems I have.
With best regards, YO5VAE - Edy


PS. I have tested with PIC16F84A and NOR-REV and if offsets are working fine even after restart.
YO5VAE
 
Posts: 15
Joined: Mon Aug 01, 2011 11:29 pm

Frequency counter, MAG with Pic 16f628a and Pic f84a

Postby CX5TK » Mon Sep 19, 2011 3:53 am

HI,
I have made MAG frequency counter with Pic 16f84a and works fine. I wish I could change the IFs!! Also with the same circuit and diferent source code I used Pic 16f628a. Works almost all OK. I have problem after the second time I turn it on with N and R shift (+-1,5khz), they don't work; the display (1601 from China) shows 9000000 instead 8998500 or 9001500 for example. Any way I changed the IFs: the nº 1 8998500 and nº2 9001500 for reading both side bands, and each time I switch the band of tranceiver, I switch the IF of frequency meter. I don't know much of programing. This is my experience with this nice frequency meter. '73, Claudio from Uruguay.
CX5TK
 
Posts: 3
Joined: Wed May 04, 2011 6:00 am

Postby mvs sarma » Tue Sep 20, 2011 11:56 am

deleted by me.
Regards
Sarma
mvs sarma
 
Posts: 638
Joined: Wed Oct 11, 2006 4:57 pm
Location: Hyderabad, India

Postby YO5VAE » Tue Oct 11, 2011 1:15 am

Any news yet?
YO5VAE
 
Posts: 15
Joined: Mon Aug 01, 2011 11:29 pm

Re: 16F628A Frequency Counter

Postby obet19 » Tue Apr 17, 2012 10:58 am

Hi, friends
anyone who can help me. I have also build my frequency meter using 16F628A all are working but the only problem is the other half displayed in second line. I have always reading in forums about this project. I only know to program the chip using JDM programmer in HEX file only. What tool do i use to program my LCD 16x2. i dont to use know ASM file. can you teach us?
obet19
 
Posts: 1
Joined: Sun Apr 15, 2012 5:15 pm

Next

Return to Micro controllers

Who is online

Users browsing this forum: No registered users and 1 guest