×

Please see all COVID-19 updates here as some shipments may be delayed due to CDC safety and staffing guidelines. If you have an order or shipping question please refer to our Customer Support page. For technical questions please check out our Forums. Thank you for your continued support.

Adrastos

Member Since: January 5, 2010

Country: Canada

  • ** port manipulation, not "power manipulation" :P

  • Note that you don't need to migrate the entire project into C to take advantage of direct power manipulation, you can do that straight in the Arduino code (without doing digitalWrites). Just make sure to add the sbi and cbi macros in the sketch:

    define sbi(var, mask) ((var) |= (uint8_t)(1 << mask))

    define cbi(var, mask) ((var) &= (uint8_t)~(1 << mask))

    void setup()
    {
    sbi(PORTC, 5);
    cbi(PORTC, 5);
    PORTD = 42;
    }
    etc... The Arduino functions just make sure you don't screw yourself if you don't know what you're doing, or for just plain ease of use.

No public wish lists :(