View Single Post
  #10   Report Post  
Old January 31st 06, 12:20 AM posted to rec.radio.amateur.homebrew
JJ
 
Posts: n/a
Default OM3CPH frequency counter doesn't work?

"xpyttl" wrote in
:

"JJ" wrote in message
...

Which line or area in LCD4CNTR.ASM can I find this extra 0x40 to
remove?


If you look at the code:

movlw LINE1 ; continue at right half of display
iorlw 080h ; Function set
call PutCMD ; Position cursor leftmost on first
line

under the label NoDot, this code moves the cursor to the second line.
It looks as if all you will see on the second line is the string "
MHz" (leading space). Anyway, comment out these three and the " "
should get written after the last digit instead of on the second line.

Looking more closely at this code, Peter does use the busy flag -- I
had looked at his initialization code where he only uses timing, but
when he goes to write, he checks the busy.

I did that, now when there is a dot the display shows the frequency twice
on the first line.
There is a bit more to it.




Up at the top of his code, the lines:

E equ 2 ; LCD Enable control line
RA2 R_W equ 0 ; LCD Read/Write control line
RA0 RS equ 1 ; LCD Register-Select
control line RA1

You are correct. These modded programs really need to be commented.
I just set
R-W equ 1
RS equ 0
and Peter's code works.

BTW, why use a 10Mhz cystal. Does the counter have better actual
resolution?

Well, you are certainly a better program debugger than me!

Thanks again,

JJ