Louis stated there was a STACK Underflow flag set in the PCON Register. I looked over his/her posted code and the only place I could find where a CALL/RETURN mis-match could occur was in the posted...
Type: Posts; User: mpgmike; Keyword(s):
Louis stated there was a STACK Underflow flag set in the PCON Register. I looked over his/her posted code and the only place I could find where a CALL/RETURN mis-match could occur was in the posted...
A STACK Underflow condition is caused by more RETURNs than CALLs (GOSUBs). I have a suggestion; in your ISR Rot_Encoder: change
IF (New_Bits & 100000) = (Old_Bits & 100000) then DoneRotEnc '...
Are these the only 2 variables you are trying to force in Bank0, or are there others the compiler is OK with? You might want to look at the .lst file to see how busy your Bank0 is. Remember, PBP...
High Endurance Flash (HEF).
EEPROMs have a limited number of times they can be written to; they can be read from infinitely, though. Flash has a VERY limited number of writes before it begins to...
Microchip has a cool site to filter through all their offerings. Several PICs meet your criteria. Here is the link:
https://www.microchip.com/ParamChartSearch/chart.aspx?branchID=30048
First recommendation is to start you own thread to ask your question (instead of reviving a 14 year old one).
Second, could you post the C code? Please use [ CODE ] and [ /CODE ] (without the...
Also, when using IF statements, it will probably take fewer lines of ASM code to execute if you put the clause most likely to give you a "yes", or the easiest to check first. IF (A = 2)... is the...
I have a project/product that uses tones generated with NCO. I created a generic #include file that lists the T2PR, T2CON, and NCO1INCU_H_L values for each note over 3 octaves. When I want a note,...
Sounds like things are much more challenging than the last time I ran a forum (over 10 years now). I don't envy your plight. However, we appreciate the work you do to provide the valuable service.
I assume you already found this, but several members compiled a book on using DT Interrupts:
http://www.picbasic.co.uk/forum/forumdisplay.php?f=41
Just in case you haven't seen it.
I started working with PC apps about 5 years ago. I bought Visual Studio 2015 Professional and 5 books on the subject. Although VS 2019 is out, the books probably update with the versioning. One I...
The line:
x = 1.0 + x / 256.0;
casts it as floating point. If you haven't used floating point math, you have your research cut out for you.
It appears to be a random number generator based on the "Seed". At the top is a function for InitializeComponent(); which isn't anywhere in the body of code. I don't understand fully what it's...
I have an old Pickit2 I haven't used in years. I also have a Pickit3 that I haven't used in about a year. I usually use either the Pickit4 or ICD4, depending on the board. I have the ME Labs U2...
Be sure to install MPLABX version 5.35 also, as PBP uses it for several tasks (DO NOT install the newest version, which is currently v5.45!). Unfortunately, even though MPLABX is available for the...
When you go to program, the Programmer window pops up. Under View/Configuration you can view your CONFIG options similarly to MPLABX. There are quite a few neat features in the header tabs. You...
Short answer is yes. For awhile I was using my Mac for programming with Virtual Machine. My wife uses Wine, but I never tried PBP on it. I have no idea if it will work with Linux.
My experience...
Something like this?
' 001110 001110 001110 001110
FullDisp VAR LONG
FullDisp.31 = 0
FullDisp.30 = 0
FullDisp.29 = 1
FullDisp.28 = 1
FullDisp.27 = 1
Either method works, however, placing your CONFIGs in your code lets you debug issues better. If something doesn't work, and the problem lies with your CONFIG settings you set up a program time...
Don't quite have the thought fully formed, but I'm thinking along the lines of:
FullDigit VAR LONG
FullDigit = ((Byte1 << 23) + (Byte2 << 17) + (Byte3 << 11)...
This might compact the...
Not sure how that happened. First, you wouldn't get "123", as Right Shift 2 (>> 2) is the same as Divide by 4; in which case 12345 >> 2 = 3086 and not 11419.
Since you're dealing with a display,...
Back to the original challenge, I'd do it in software:
IF ADC > 127 THEN ;Assuming 8-bit ADC
ADC_VAL = (ADC * 4) / 5 ;Yields 80% of value
ENDIF
The above snippet will deliver <128...
IF XVR > 999 THEN
[Work the first digit]
ENDIF ;If not, no action taken
IF XVR > 99 THEN
[Work the 2nd digit]
ENDIF ;If not, no action taken
Unfortunately, the Linker will reserve memory you claim at compile time. I can only suggest reserve test3 var byte[maximum expected size]. Unless you're scarce on SRAM, it shouldn't matter.
FCMEN is the Clock FailSafe Monitor for EXTOSC. If your crystal oscillator fails, FCMEN will revert to INTOSC, for safety sake. If you aren't running EXTOSC, you don't need FCMEN. It probably...