Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ProtocolError: Could not set IC2 speed #13

Open
averri opened this issue Jul 3, 2018 · 0 comments
Open

ProtocolError: Could not set IC2 speed #13

averri opened this issue Jul 3, 2018 · 0 comments

Comments

@averri
Copy link

averri commented Jul 3, 2018

The following code (Python 3):

from pyBusPirateLite.SPI  import *
i2c = I2C(portname='COM8', speed=115200)
i2c.pins = PIN_POWER | PIN_CS 
i2c.speed = '400kHz'

... leads to the following error:

ProtocolError                             Traceback (most recent call last)
<ipython-input-7-74521de54adf> in <module>()
      1 i2c.pins = PIN_POWER | PIN_CS
----> 2 i2c.speed = '400kHz'

D:\python\pyBusPirateLite\pyBusPirateLite\I2C.py in speed(self, frequency)
    220 
    221         if self.response(1, True) != 0x01:
--> 222             raise ProtocolError('Could not set IC2 speed')
    223         self.i2c_speed = frequency
    224 

ProtocolError: Could not set IC2 speed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant