Recent Posts

Pages: [1] 2 3 ... 10
1
General Discussion / pwm phase delay
« Last post by m777 on May 04, 2015, 06:14:37 PM »
Hello,

I have the following code.  I'm using 2 pwm pins to generate 2 pulses.  How do I add a phase delay on pwm pin 2.  I notice that both pulse goes from low to high at the same time.  I'm monitoring the 2 pulses using an oscilloscope.  I would appreciate any help.  Thanks.

mb.pwmOn(1)
mb.pwmDuty(1, 200)
mb.pwmOn(2)
mb.pwmDuty(2, 700)


2
Python / Re: scan for slave address on i2c bus
« Last post by m777 on December 08, 2014, 03:17:06 PM »
Hi Richard,

Can you add an i2c scan function?  I would like to use this board for testing the memory address of our parts by sending data bytes.  Thanks.

3
Basic Setup and Usage / Re: i2c programming
« Last post by riklaunim on November 16, 2014, 11:41:14 AM »
To have slave address scan function would be nice.  When do you think Pymcu version 2.0 would be available?

That idea was here since long time. I'm curious too, but in the meantime I have pyboard with MicroPython and WeIO soon on its way :)
4
Basic Setup and Usage / Re: i2c programming
« Last post by m777 on November 13, 2014, 01:06:23 PM »
To have slave address scan function would be nice.  When do you think Pymcu version 2.0 would be available?
5
Python / Re: scan for slave address on i2c bus
« Last post by m777 on November 07, 2014, 01:38:19 PM »
Does Pymcu has a function for scanning the slave address of any device?
6
Python / Re: scan for slave address on i2c bus
« Last post by m777 on October 29, 2014, 03:26:40 PM »
Hello Richard

Here's the test code I use for i2c slave address scanning.  I'm not sure if this is the right way of doing it.
The scanning runs very slow around 1 second per loop.  If the address is 0x5B (decimal 91), it would take 91 seconds to find the address.  What is the best way to scan the slave address of a device faster?  I appreciate your help.  Thanks.

import pymcu
mb = pymcu.mcuModule()

for S_ADDR in range(0, 127):  # scan for device slave address
    ADDR = mb.i2cRead((S_ADDR << 1) + 1, 0x00, 1)
    result = str(ADDR)[1:-1]  # if address found, result to 0
    if result == '0':
        print 'slave address found'
        print S_ADDR
        break
    else:  # if not found, result is empty
        print 'slave address not found'
        print S_ADDR
7
Basic Setup and Usage / Re: i2c programming
« Last post by richard on October 28, 2014, 10:25:25 PM »
Yes I would like to eventually add a config function to be able to change the clock speed.
That might have to wait for pyMCU 2.0 though.
8
Basic Setup and Usage / Re: i2c programming
« Last post by m777 on October 28, 2014, 05:31:46 PM »
Hello Richard,

Looks like the I2C SCL frequency for the pymcu board is 100kHz.  Any plans for future update for 400kHz data transfer rate or higher?
9
Python / Re: scan for slave address on i2c bus
« Last post by riklaunim on October 25, 2014, 11:47:54 AM »
I2C is slightly unusual on pyMCU than on Arduino and other following similar API. Thats makes is harder to copy-port the code. MicroPython on pyboard is better, but still, I don't like I2C for some reasons... serial rules :)
10
Python / Re: scan for slave address on i2c bus
« Last post by m777 on October 22, 2014, 02:04:17 PM »
Thank you so much for your help.  This will help me get started.  For the slave address scanning question, here is the link.
http://micrel.com.  search for part number MIC23156.   I can't attached the file because it's too big.  I appreciate your help.
Pages: [1] 2 3 ... 10