Nu var det ju inte en ASM till Pbasic omvandlare jag sökte utan en person som kan läsa ASM och kanske kan förklara hur det fungerar i pbasic.
Ungerfär så här. I detta ASM språk så betyder detta " MOVLW b'00101101' ;prescaler 1:32, to WDT, ext RTCC" att det räknas pulser och lägger dom i ett minne (fast det nu inte stämmer pga att jag inte kan se logiken i detta språk eftersom jag inte kan det,
;main program here at the middle of the page (0x100)
org 0x100
start CLRF R ;zero rpm count when first started
;the main loop is here
forever
#ifdef pic84
MOVLW b'00010000' ;portA 0-3 is o/p, 4 is i/p(RTCC)
#else
MOVLW b'00000000' ;portA is all o/p
#endif
TRIS portA ;set i/o state
MOVLW b'00000000' ;portB, b0-b7=o/p
TRIS portB ;set i/o state
;reassign the i/o ports on each cycle in case they are
;corrupted for whatever reason
CLRWDT ;clear watchdog
;watchdog is cleared, so need to re-assign the prescaler
MOVLW b'00101101' ;prescaler 1:32, to WDT, ext RTCC clk+leading edge
OPTION ;assign it now
MOVFW R
MOVWF BR ;place a copy of R in BR
CALL div_5 ;convert BR to bar in BAR0, BAR1
CALL bin_bcd ;convert R to BCD in K0, K1, K2
;new timing cycle starts here
CLRF RTCC ;reset the counter
Mvh Tony