InterruptIn mode?

03 Jan 2010

Is there an explaination of what mode does for InterruptIn? I am working with a serial UART and (unfortunately mixing a 5V chip with the mbed) and am getting nowhere with my interrupt handler. The device is supposed to provide a falling edge (< 2.0V to somthing less than 0.5V). I've tried setting the mode to all three parameters (PullUp, PullDown and PullNone). Also, is the default condition PullNone? Having the PullNone would only make sense if you previously set it to one of the other parameters.

 

 

05 Jan 2010

Hi Gary,

Gary Trimble wrote:
Is there an explaination of what mode does for InterruptIn?

Yep, it sets an optional pullup, pulldown or neither to the input pin configuration.

The default for an input (InterruptIn, DigitalIn, BusIn) is a PullDown (so if nothing is connected to the pin, it is logical 0).

Simon

 

07 Jan 2010

Hi Simon,

Interesting...in the rs485 chip design I am working on (about to post it to the site) I had (per Maxim's data sheet) a 10K resistor to 5VDC pulling up the active-low IRQ line from the Max3140. I also tried putting the resistor between the 3.3VDC and the pin, This never worked when I had the InterruptIn.mode set to None or PullUp. I removed the resistor and set the mode to PullUp and it worked (I also has some timing problems). I guess what I am curious about is why the resistor-based pullup did not work while the InterruptIn.mode(PullUp) did. Any thoughts?

Gary