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
    14
    Views
    4,129

    Re: BH1750FVI sample code available?

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

    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,...
  3. Replies
    14
    Views
    4,129

    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]
  4. 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...
  5. 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
  6. Replies
    14
    Views
    4,129

    Re: BH1750FVI sample code available?

    each and every i2c command has incorrect syntax
  7. 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
  8. Re: How to detect variable going below zero, without using PBPL ?

    what does get bad mean ?

    show your code
  9. Re: How to detect variable going below zero, without using PBPL ?

    what have you tried ?
    in what way does it not provide a correct result?

    signed divides, multiplies and shifts need proper handling of the sign bit
    otherwise as long as the vars match in type...
  10. Re: Adapting a PICAXE program to PBP, to program a PIC (compiler Errors)

    a Pic12F629 has no adc module ADCIN Potar,PotADC is never going to fly use a Pic12F675

    also if you post code please put it in code tags 9220
  11. Replies
    13
    Views
    679

    Re: SEROUT2 Byte Array In HEX Format

    What is a package.?
    What else is sent ?
    Are interrupts involved ?
    My best guess is that the trouble is in the code not shown and that snippets are a yet again a pointless waste of time and effort
  12. Replies
    3
    Views
    251

    View Post

    i would be quite interested in seeing your theory on how consistent incremental distance data
    at 1m resolution can be extracted from a low cost GPS receiver at any rate let alone 5 times a second
  13. Thread: OWOUT Glitch

    by richard
    Replies
    7
    Views
    397

    Re: OWOUT Glitch

    using pbp "high level" commands with LATX registers is a great way to introduce hard to find bugs in your code
    5 stars
  14. Thread: OWOUT Glitch

    by richard
    Replies
    7
    Views
    397

    Re: OWOUT Glitch

    it doesn't, LOW lata.6 turns the PLL OFF as with HIGH lata.6

    porta address + 18 = trisa
    lata address + 18 = osctune on that chip [it varies]

    all pbp "high level" commands that set a...
  15. Thread: OWOUT Glitch

    by richard
    Replies
    7
    Views
    397

    Re: OWOUT Glitch

    not surprising at all. using pbp "high level" commands like HIGH,LOW is not allowable
    with LATX registers . its in the manual
  16. Replies
    8
    Views
    616

    Re: Best General Purpose PIC

    what about as part of an "interesting" mosaic along with other obsolete electronic parts inlaid into a coffee table
    using a clear epoxy
  17. Replies
    8
    Views
    616

    Re: Best General Purpose PIC

    it would totally depend on what version of pbp you use and how many pins you need
    anything with pps [ PERIPHERAL PIN SELECT (PPS) MODULE ] is a good start

    16F88 is best used as landfill :tongue:
  18. Replies
    119
    Views
    38,322

    Re: SSD1306 INCLUDE for PBP3

    For chips with multiple mssp modules microchip define sspcon and ssp1con to be equal , ditto for the rest of the mssp regs.
    If you have only one mssp then ssp1con etc are not defined .you can...
  19. Re: How to set port to high impedance? TRIS seems not to be working.

    charlieplexed correctly latx regs are not required at all
  20. Re: How to set port to high impedance? TRIS seems not to be working.

    its called charlieplexing, forum examples abound
  21. Replies
    119
    Views
    38,322

    Re: SSD1306 INCLUDE for PBP3

    not easily its a skimpy minimalist thing for pic16's, bitmaps are possible

    if you use a pic18 {with enough resources} i have a fancier method

    u can make your own font up to quite large [from...
  22. Replies
    4
    Views
    527

    Re: Interrupt on Change with 16F886

    but how is it wired , what will make the columns change state the rows are set to all 1's the initial col port pins are set to all 1's
    where can a o come from ?

    usually a zero or a one is...
  23. Replies
    4
    Views
    527

    Re: Interrupt on Change with 16F886

    what makes the pins change state ?
  24. Replies
    7
    Views
    567

    Re: Matrix keyboard with State Machine

    since pbp has no nibble var type i would guess that

    keyn(ix)=kin ' read the row inputs into nibbles of key0

    becomes
    keyn = keyn & ~$0f<<(ix*4);clear nibble
    keyn = keyn | kin<<(ix*4);load...
  25. Replies
    119
    Views
    38,322

    Re: SSD1306 INCLUDE for PBP3

    post #90 for the include

    '****************************************************************'
    * Name : ssd1306_I2C.INC *
    '* Author : richard ...
Results 1 to 25 of 100
Page 1 of 4 1 2 3 4