Search Results - MEL PICBASIC Forum


Search:

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

Page 1 of 4 1 2 3 4

Search: Search took 0.02 seconds.

  1. Replies
    4
    Views
    73

    Re: PWPS Servo Problem

    What those two chips have in common is auto context save for interrupts.
    i simulated the 1824 and the problem was not experienced, but who would trust a simulator



    try this for...
  2. Replies
    1
    Views
    51

    Re: 16Bit 125KHz PWM with PIC12F1572

    125KHz is [COLOR=#333333]only available with a pbpl compile

    from the manual hpwm section



    every chip you have posted about on this subject is quite capable of that output.
    your posted code...
  3. Replies
    4
    Views
    73

    Re: PWPS Servo Problem

    why would the uart need a TMR1 interrupt ?

    code ?
  4. Replies
    9
    Views
    356

    Re: 125KHz HW PWM Output

    your understanding is flawed and math is incorrect

    Duty is Steps x 0.625% // steps = CCPR1L x4 + CCP1CON<5:4>

    so:
    80x0.625% = 50% <=> steps = 20x4 + 0
    56x0.625% = 35% ...
  5. Replies
    9
    Views
    356

    Re: 125KHz HW PWM Output

    totally missing the point

    CCPR1L = $14 not 14 ; its hex 14 or dec 20
  6. Replies
    9
    Views
    356

    Re: 125KHz HW PWM Output

    maybe more like duty cycle of 2.8us/8us * 100 = 35%




    or correctly
    ' To get a 50% duty cycle output,
    CCPR1L to $14 and CCP1CON<5:4> to <0:0>.
  7. Replies
    8
    Views
    476

    Re: Sleep does not really sleep...

    from the data sheet, my best guess . i see no attempt to read portb before sleep
  8. Replies
    25
    Views
    1,965

    Re: PIC18FxxQ43 Version of DT_INTS

    You need to travel back in time ten years , last known semi workable setup was with mplabx 2.35
  9. Replies
    12
    Views
    710

    Re: Data processing in array

    i would not expect to ever receive a malformed bit from a keeloq serial stream , the data may be useless however.
    single point sampling should be ok imho
  10. Re: How to detect variable going below zero, without using PBPL ?

    in simple terms adding the two's compliment of a var to a number is equivalent to subtracting the var from a number
    providing they are all the same integer var type
  11. Replies
    12
    Views
    710

    Re: Data processing in array

    In a noisy environment you can over sample a bit to be sure of data validity, i expect the serial data from a keeloq
    chip to be quite clean so a single sample point would suffice

    sample...
  12. Replies
    12
    Views
    710

    Re: Data processing in array

    a couple of ways


    pulsetrain:
    index=67
    while index
    while !portb.0 :wend ;wait for hi
    index=index-1
    pauseus 600 ;bit period=3*te ie 3*400=1200uS
    code.0[index]= ~...
  13. Replies
    12
    Views
    710

    Re: Data processing in array

    result of sim
    9225
  14. Replies
    12
    Views
    710

    Re: Data processing in array

    maybe but it has positive indication of failure , it ceases testing on failure and it actually detects failures.
    i would not be quibbling over a few words of code space when the entire process of...
  15. Replies
    12
    Views
    710

    Re: Data processing in array

    i would do it this way




    sample_data var byte[32]
    fail var bit
    sample var byte
    a_one var byte
    a_zero var byte
  16. Replies
    4
    Views
    318

    Re: Parsing commands and parameters

    so a command is *99 or *9 or *09 [where 9 == a numeric digit]
    and a parameter is 9 up to 999999

    how do you signal that the command has been input and the parameter begins

    i would be...
  17. Re: Adding and reading byte variable from the bit array?

    where did you get that idea, it is very possible with the correct syntax

    suggest a read of the manual re

    Applying Offsets to Bits within a Variable or Register
  18. Replies
    4
    Views
    318

    Re: Parsing commands and parameters

    ask yourself

    what is the biggest command sequence that will be input ?
    how does the pic know when the input seq is complete ?

    when you know those answers then the answer will be obvious
  19. Replies
    14
    Views
    4,523

    Re: BH1750FVI sample code available?

    its best to be correct for future reference , not all i2c devices are so forgiving
  20. Replies
    14
    Views
    4,523

    Re: BH1750FVI sample code available?

    as maybe but you are still incorrect , if you use a logic analyzer you will see the transaction ends abnormally



    wrong way
    i2cwrite ldta, lclk, adr, cnt
    correct way
    i2cwrite ldta, lclk,...
  21. Replies
    14
    Views
    4,523

    Re: BH1750FVI sample code available?

    not in my view
    addr var byte
    addr= $46
    i2cwrite sda,sck,addr,[opecode]
    i2cread sda,sck,addr,[dat.highbyte,dat.lowbyte]
  22. Re: My "Library" for ST7920 Graphical displays, works fine, but...

    9x2x8 lcd "command delays" per text line is probably the worst delay
    your snippet lacks that exact detail


    the st7920 chip has a spi i/f that's a little faster and uses less pins too

    there...
  23. Re: How to detect variable going below zero, without using PBPL ?

    its called two's compliment , no magic involved

    https://en.wikipedia.org/wiki/Two%27s_complement
  24. Replies
    14
    Views
    4,523

    Re: BH1750FVI sample code available?

    each and every i2c command has incorrect syntax
  25. Re: How to detect variable going below zero, without using PBPL ?

    only if you interpret it incorrectly and ignore the sign bit



    show your code
Results 1 to 25 of 100
Page 1 of 4 1 2 3 4