Coder Social home page Coder Social logo

Comments (4)

 avatar commented on July 28, 2024

`#include "mbed.h"
#include "string.h"

//--------Board pin Declarations
DigitalOut myled(PB30);
Serial pc(PA22,PA23);//tx, rx
DigitalIn interrupt1(PB04);
DigitalIn interrupt2(PB05);
I2C i2c(PA08,PA09);// I2C pins on Xplained Pro Board

char deviceAddress = 0x1D;

int main()
{
char byte_read[1];
char who_am_i[1];
who_am_i[0]=0xD;
byte_read[0]=0xFF;
while(1)
{

    i2c.start();                 // Start
    i2c.write(deviceAddress,who_am_i,1,true);
    i2c.stop();
    // done


wait_ms(500);
myled=1;
wait_ms(500);
myled=0;

}

}`

so if i use this code, in theory i should be writting two times on the SDA line isnt it? well on my scope i am only seeing one clock burst. so it is only sending the device address and it missed sending the register i want to read.

20170309_101813

from platform-atmelsam.

ivankravets avatar ivankravets commented on July 28, 2024

Does it work with mbed online IDE?

from platform-atmelsam.

ivankravets avatar ivankravets commented on July 28, 2024

We have updated mbed framework. Do you still experience this problem?

from platform-atmelsam.

ivankravets avatar ivankravets commented on July 28, 2024

Microchip left ARM mbed and ARM dropped support for this board. Please use Arduino framework instead.

from platform-atmelsam.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.