Search Results - MEL PICBASIC Forum


Search:

Type: Posts; User: mpgmike; Keyword(s):

Page 1 of 4 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    32
    Views
    1,597

    Re: Rotary encoder with DT interrupts

    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...
  2. Replies
    32
    Views
    1,597

    Re: Rotary encoder with DT interrupts

    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 '...
  3. Re: Unable to fit variable XXX in requested bank 0

    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...
  4. Replies
    10
    Views
    849

    Re: Chip had no EE, should PBP3 know that?

    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...
  5. Replies
    10
    Views
    849

    Re: Chip had no EE, should PBP3 know that?

    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
  6. Replies
    19
    Views
    6,654

    Re: 12f629 freq divider?

    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...
  7. Replies
    10
    Views
    709

    Re: Logical AND/OR/ Sequencing question

    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...
  8. Re: Anyone did a simple 1 channel midi file import routine?

    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,...
  9. Replies
    5
    Views
    388

    Re: No emails since December

    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.
  10. Re: HSERIN using EUSART RX interrupt - how does it really work?

    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.
  11. Replies
    12
    Views
    569

    Re: USB to send ASCII characters to PC

    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...
  12. Thread: exponent math

    by mpgmike
    Replies
    4
    Views
    1,513

    Re: exponent math

    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.
  13. Replies
    8
    Views
    385

    Re: Challenge & Response

    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...
  14. Re: Help with PIC 12F683 bit confituration in PBP3

    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...
  15. Re: Wondering if I can move PBP3 and MPLAB over to newer system - which is Linux

    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...
  16. Re: Help with PIC 12F683 bit confituration in PBP3

    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...
  17. Re: Wondering if I can move PBP3 and MPLAB over to newer system - which is Linux

    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...
  18. Re: Joining 5 bit variables and splitting them into 8 bit ones later?

    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
  19. Re: Help with PIC 12F683 bit confituration in PBP3

    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...
  20. Re: Joining 5 bit variables and splitting them into 8 bit ones later?

    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...
  21. Re: Determining variable length (number of digits) possible?

    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,...
  22. Re: Current sensor output modification. PIC or opamp or something else?

    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...
  23. Re: Determining variable length (number of digits) possible?

    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
  24. Replies
    7
    Views
    2,654

    Re: varable index buffer setup unsing a varable

    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.
  25. Re: PIC16F15355 config setting to work on internal OSC with clock 4MHz

    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...
Results 1 to 25 of 100
Page 1 of 4 1 2 3 4