Save us to guess what you want to do... AND give us your PIC model.
There's only few hundreds of model.. but who want to guess?
Save us to guess what you want to do... AND give us your PIC model.
There's only few hundreds of model.. but who want to guess?
Last edited by mister_e; - 22nd November 2006 at 22:54.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
My problem solved by paul borgmeier.Originally Posted by mister_e
My pic is 16f88.
His schematic shows a F88 but he fixed his code by adding TRISA.0 = 1 (pot on RA1 not RA0) - does not make sense??
Try this for the second block of ASM code
Any second opinions on the conversion?Code:;;;;;;;;;;;;;;;;;;;;;;;;;;;; AUTHORIZATION OF COUNTING TMR0 = 0 TRISABUF.3 = 1 PORTA = TRISABUF ;;;;;;;;;;;;;;;;;;;;;;;;;;;; BASE TIME COUNT1=TEMPS PAUSEUS (COUNT*4+2) PAUSE 5 ;;;;;;;;;;;;;;;;;;;;;;;;;;; STOP OF COUNTING TRISABUF.3=0 PORTA=TRISABUF ;;;;;;;;;;;;;;;;;;;;;;;;;;; RECUPERATION OF THE METERS FHI=TMR0 COUNT1=0 Toggle: COUNT1=COUNT1+1 PORTA.3=1 PORTA.3=0 IF (FHI-TMR0) = 0 THEN Toggle COUNT1=(COUNT1^$FF) FLO=COUNT1+1 ;;;;;;;;;;;;;;;;;;;;;;;;;;; BASE TIME
Savnik, what does your program do?
Paul Borgmeier
Salt Lake City, UT
USA
__________________
Sorry ,the pot is on RA0 (the schematic is wrong)Originally Posted by paul borgmeier
With the first block of asm the frequency meter work.
When i change the second asm with yours code i take error when compile.
When I change the PAUSEUS (COUNT*4+2) with PAUSEUS (COUNT1*4+2) and the Toggle with Toggle1 the code compile , but the frequency on LCD is above 14Mhz the regular (90.6Mhz -> 104.6Mhz)
Now that it is not 2Am, I see that it might be the PAUSEUS line - PAUSEUS has a minimum delay of 24uS when used with a 4 MHz XTAL. I also took "your" comments about the delay loop as being accurate at 1 mS. I will check that as well.
What XTAL speed are you running?
Unfortuantely, it is "Off to Grandma's House" here as it is a major holiday. I will not have a minute to debug until tomorrow night (36 hours from now). As asked before,
Anyone else have an opinion on the ASM to BASIC conversion or want to take a stab at the problem? If not, I will revisit when I return.
Paul Borgmeier
Salt Lake City, UT
USA
__________________
I guess I lied - I do not see an easy solution to the minimum PAUSEUS problem noted above - I am glad it works for you with the ASM blocks.Also, why the ASM? Everything you show is easy in PBP?
Good Luck,
Paul Borgmeier
Salt Lake City, UT
USA
__________________
Bookmarks