CAN port and DigitalIn problem LPC4088

25 Feb 2015

Hello, I'm sort of frustrated as I bought the LPC4088 to get me going in an easy way.

Now it' seems that it only works on 1 CAN port and only at 1Mbaud. Please look at this: http://developer.mbed.org/questions/6372/How-do-I-build-up-a-CAN-message-and-send/

Further moore the DigitalIn doesn't work, despite following all howtos.

Is the pin mapping broken?Or what is happening?

When can it be fixed

BR JOhan

25 Feb 2015

I don't have this board myself, so cannot do much to help you. But can you try a different version of the mbed library? Preferably the most recent one, but if you already used that one an older version. If you click on the library you can go to revisions to change the one you use.

This is mainly for DigitalIn: There is simply no way that non-working DigitalIn code does not get noticed. So either you have a hardware problem (broken board), or it might be one specific revision where something is wrong.

26 Feb 2015

This means, if everything works as it should I can us this code:

include "mbed.h"
 
DigitalOut myled(LED1);
DigitalIn pb(p5);
// SPST Pushbutton demo using internal PullUp function
// no external PullUp resistor needed
// Pushbutton from P5 to GND.
int main() {
    pb.mode(PullUp);
    while(1) {
        myled = pb;
    }
}

And when putting P5 pin to GND this should change the led state, or am I wrong?

/media/uploads/Jsvens/capture.jpg

Because nothing happens.

BR JOhan

26 Feb 2015

Assuming you just short p5 to that ground pin, then yes I assume that should work. I also take it you already tested that the LED does blink if you just run a blink program?

26 Feb 2015

Yes I have tested a normal blink program and the led works.

I have another LPC4088 to test the button on, to exclude pin damage....

BR JOhan

26 Feb 2015

Are you really using a physical button? Try shorting p5 to gnd using a jumper wire. Or for example a multimeter in current measurement mode, should measure some tens of micro-amps IIRC of pull-up current + be a good enough short. At the same time you can also measure the voltage of the pin, to see if the pull-up works.

26 Feb 2015

Sorry, DigitalIn was a HW fault from my side, but the CAN fault remains and this isn't related to HW.

BR JOhan