Darrel,
I think these Gentlemen may be having a little fun at your expense as they try to get a rise out of you (LOL). That's the only reason I can think of for avoiding a simple question and for becoming a bit offensive when challenged.
My precalculated "output table" or "toggle table" MIBAM method should work fine with 13 or 14 bit duty cycle values but as you've already determined I can only get refresh rates of 610-Hz (8-chan, 13-bit, 200-nsec step) or 305-Hz (16-chan, 13-bit, 400-nsec step), etc., when using an 18F' device and 40-MHz clock (Tcy = 100-nsec). ISR "overhead" would be about 77% for the example below but could be improved with some structural changes.
Take care. Kind regards, Mike
Code:
;
; 8-chan (port b), 13-bit, 200-nsec (1638.4-usec period), 610-Hz
;
v_isr_h
movff bdat+12,LATB ; b12 data (2048T)
inDlyCy(2048*tStep-2) ; half 2^12
movff bdat+11,LATB ; b11 data (1024T)
inDlyCy(1024*tStep-2) ; half 2^11
movff bdat+10,LATB ; b10 data (512T)
inDlyCy(512*tStep-2) ; half 2^10
movff bdat+09,LATB ; b9 data (256T)
inDlyCy(256*tStep-2) ; half 2^9
movff bdat+08,LATB ; b8 data (128T)
inDlyCy(128*tStep-2) ; half 2^8
movff bdat+07,LATB ; b7 data (64T)
inDlyCy(64*tStep-2) ; half 2^7
movff bdat+06,LATB ; b6 data (32T)
inDlyCy(32*tStep-2) ; half 2^6
movff bdat+05,LATB ; b5 data (16T)
inDlyCy(16*tStep-2) ; half 2^5
movff bdat+04,LATB ; b4 data (8T)
inDlyCy(8*tStep-2) ; half 2^4
movff bdat+03,LATB ; b3 data (4T)
inDlyCy(4*tStep-2) ; half 2^3
movff bdat+02,LATB ; b2 data (2T)
inDlyCy(2*tStep-2) ; half 2^2
movff bdat+01,LATB ; b1 data (1T)
inDlyCy(1*tStep-2) ; half 2^1 (0 delay)
movff bdat+00,LATB ; b0 data (1T)
inDlyCy(1*tStep-2) ; full 2^0 (0 delay)
movff bdat+01,LATB ; b1 data (1T)
inDlyCy(1*tStep-2) ; half 2^1 (0 delay)
movff bdat+02,LATB ; b2 data (2T)
inDlyCy(2*tStep-2) ; half 2^2
movff bdat+03,LATB ; b3 data (4T)
inDlyCy(4*tStep-2) ; half 2^3
movff bdat+04,LATB ; b4 data (8T)
inDlyCy(8*tStep-2) ; half 2^4
movff bdat+05,LATB ; b5 data (16T)
inDlyCy(16*tStep-2) ; half 2^5
movff bdat+06,LATB ; b6 data (32T)
inDlyCy(32*tStep-2) ; half 2^6
movff bdat+07,LATB ; b7 data (64T)
inDlyCy(64*tStep-2) ; half 2^7
movff bdat+08,LATB ; b8 data (128T)
inDlyCy(128*tStep-2) ; half 2^8
movff bdat+09,LATB ; b9 data (256T)
inDlyCy(256*tStep-2) ; half 2^9
movff bdat+10,LATB ; b10 data (512T)
inDlyCy(512*tStep-2) ; half 2^10
movff bdat+11,LATB ; b11 data (1024T)
inDlyCy(1024*tStep-802) ; half 2^11
rcall prep ; rebuild bdat array
movff btmp,LATB ; b12 data (2048T)
retfie FAST ;
;
Bookmarks