- punky likes this
- Netduino Forums
- → Viewing Profile: Likes: Stefan W.
Community Stats
- Group Members
- Active Posts 153
- Profile Views 7850
- Member Title Advanced Member
- Age Age Unknown
- Birthday Birthday Unknown
-
Gender
Not Telling
User Tools
Friends
Stefan W. hasn't added any friends yet.
Latest Visitors
#27445 Electronics 101 book recommendation
Posted by Stefan W. on 17 April 2012 - 09:10 AM
#21406 Forum topics color
Posted by Stefan W. on 06 December 2011 - 08:41 PM
- Arron Chapman likes this
#19940 Code fails when battery powered.
Posted by Stefan W. on 28 October 2011 - 09:24 PM
- Maqurade likes this
#18740 i2c voltage
Posted by Stefan W. on 04 October 2011 - 07:23 AM
You have only three choices:
make all the devices working under the same supply;
use two different I2C buses for each supply;
insert a double bidi-level adapter to decouple the different supplies.
Of course, I suggest to follow the first one, which is the simplest.
I disagree here, it's not the simplest simply because there are devices which do use different supplies ... but a bidirectional level adapter is pretty simple, have a look at the tx line from http://www.sparkfun....nverter-v10.pdf - two resistors, one mosfet, and you're done (note the resistors act as pullups, so if you already have pullups on both sides - as you have - you can ditch them, so your level converter becomes a single transistor.
- CW2 likes this
#18240 High resolution light measurement
Posted by Stefan W. on 20 September 2011 - 01:11 PM
- CW2 likes this
#18224 High resolution light measurement
Posted by Stefan W. on 20 September 2011 - 05:35 AM
- CW2 likes this
#17364 Input Debounce
Posted by Stefan W. on 31 August 2011 - 10:32 PM
public class Program { private static readonly InterruptPort Button1 = new InterruptPort(Pins.GPIO_PIN_D0, false, Port.ResistorMode.PullUp, Port.InterruptMode.InterruptEdgeLow); private static DateTime Button1LastPushed; public static void Main() { Button1.OnInterrupt += Button1_OnInterrupt; // ... main loop } private static void Button1_OnInterrupt(uint data1, uint data2, DateTime time) { // glitch filter. events within 50 milliseconds of the first event are discarded if (Button1LastPushed.AddMilliseconds(50) > time) return; // Debug.Print("Button 1 Interrupt"); Button1LastPushed = time; // actions on interrupt here } }
Also, Mario, i definitively did read an application note for a microswitch that strongly advised against putting a "naked" capacitor across a switch because of damaging effects. If i can turn it up again (I don't recall where I found it ...) i'll link it here.
Also for the record, if someone wants to do the hardware debouncing "cleanly" it should be probably done like in this article (german text, the schematic should be understandable though) using a RC filter with a schmitt trigger. However, as software debouncing is so easy and doesn't require additional components, i just do that Another useful bit of information in that (german) article is that switches usually bounce for up to 10ms, so the time constants for the debouncing (software or hardware) should be chosing according to that (and no human operates a switch 100 times a second anyway)
- Mark Anderson likes this
#17284 Input Debounce
Posted by Stefan W. on 30 August 2011 - 06:45 PM
- Rik P. likes this
- Netduino Forums
- → Viewing Profile: Likes: Stefan W.
- Privacy Policy