I don't change the PIC (16F876),Are you compiling for a 16F or 18F part?But, inside PBPPIC18.MAC
I don't change the PIC (16F876),Are you compiling for a 16F or 18F part?But, inside PBPPIC18.MAC
I compile for PIC16F, but there is the same error in PBPPIC18.MAC and PBPPIC14.MAC.
PBP 2.50C, MCS+ 3.0.0.5, MPLAB 8, MPASM 5.14, ASIX Presto, PoScope, mE mikroBasic V7.2, PICKIT2
Can you post your code with variable declarations?
I don't want to post my source... it is one of our good cashcows.
But the error is obvious in the macro SHIFTL?WCW (and others) !
Before accessing an register, the RP-bits have to be set right. The programmer has interchanged Win and Wout.
Look at the SHIFTR?WCW-macro, it is right !
Last edited by BigWumpus; - 4th August 2006 at 16:40.
PBP 2.50C, MCS+ 3.0.0.5, MPLAB 8, MPASM 5.14, ASIX Presto, PoScope, mE mikroBasic V7.2, PICKIT2
I can't check the SHIFTR?WCW macro in version 2.46, but it looks fine in
V2.47, and definitely changes banks appropriately.
@Bruce,
look at the SHIFTL?WCW in 2.47, it is right ?
PBP 2.50C, MCS+ 3.0.0.5, MPLAB 8, MPASM 5.14, ASIX Presto, PoScope, mE mikroBasic V7.2, PICKIT2
Nope. SHIFTL?WCW is not right. SHIFTR?WCW is fine.
Make this change;
Code:SHIFTL?WCW macro Win, Cin, Wout if (Cin == 1) bcf STATUS, C if (Wout == Win) CHK?RP Wout rlf Wout, F rlf Wout + 1, F else CHK?RP Win rlf Win, W MOVE?AB Wout CHK?RP Wout ' <- change this to CHK?RP Win and save it rlf Win + 1, W MOVE?AB Wout + 1 endif else MOVE?WW Win, R0 MOVE?CA Cin L?CALL SHIFTL MOVE?AWW R0, Wout endif endm
Bookmarks