9 years, 2 months ago.

Now DigitalIn doesn't work on LPC4088, or what am I doing wrong?

Hello all, Getting pretty tired here now after spending a whole week trying to get CAN output to work, only to find out that it only runs on 1Mbaud and on one channel.

When I ran into another problem related to reading a digital input.

I've really tried to follow all the howtos and so on, but a simple code as this:

#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;
    }
}

Dosen't work.

I seriously think there are major problems with the LPC4088 platform, or what am I doing wrong?

Is there a possibility that somone could help me getting forward.

BR JOhan

Your code uses p5 for the pushbutton, but the comment says that it is connected to p8.

posted by Angus Richman 24 Feb 2015

Never mind the comments I just used a code that was available, but i will change in the post anyway....

BR Johan

posted by Johan Svensson 24 Feb 2015

Sorry DigitalIn was a HW fault, but CAN isn't.

posted by Johan Svensson 26 Feb 2015

Is your mbed library upto date? I see that there is a bit of calculation implemented for CAN on this platform. Can you confirm? https://github.com/mbedmicro/mbed/blob/master/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC408X/TARGET_LPC4088/can_api.c#L179

posted by Sam Grove 01 Apr 2015
Be the first to answer this question.