BH1750FVI sample code available?


Closed Thread
Results 1 to 15 of 15

Hybrid View

  1. #1
    Join Date
    Feb 2013
    Posts
    1,158


    Did you find this post helpful? Yes | No

    Default Re: criteria percussionist ugg boots shop

    OK, got clear with "bogus" but still no idea how to interpret datasheet to I2CWRITE/READ .

  2. #2
    Join Date
    Feb 2013
    Posts
    1,158


    Did you find this post helpful? Yes | No

    Default Re: BH1750FVI sample code available?

    8 years passed and now I'm giving it 2nd try, but it still does not works (returns 58317 constantly). Here's code:

    Code:
    ldta  var porta.6 
    lclk  var porta.3        
    
    
    x var word
    adr var byte
    adr=23
    
    
    i2cwrite ldta, lclk, adr, %0100011
    pause 200
    i2cwrite ldta, lclk, adr, %00010001
    pause 200
    maik:
    i2cread ldta, lclk, adr, %0100011, x 
    pause 200
    lcdout $fe, $1, dec x
    pause 200
    goto maik
    Here's the module https://www.addicore.com/BH1750FVI-p/ad290.htm
    With arduino it works fine, tested.

    Here's screenshot from datasheet, based on which I wrote the above code.

    Name:  datasheet.jpg
Views: 1025
Size:  240.3 KB

Similar Threads

  1. please who can help me for sample code
    By jasem700 in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 22nd February 2009, 21:41
  2. USBJADEM sample code
    By SterlingY in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 14th March 2007, 01:57
  3. sample code for M25P32
    By Pedro Santos in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 9th January 2007, 03:37
  4. Sample code for pwm
    By Md.Shah in forum mel PIC BASIC
    Replies: 1
    Last Post: - 10th October 2006, 17:59
  5. 12F675 code sample
    By marad73 in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 23rd May 2006, 14:53

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts