Speeduino is now on Github Sponsors (Rather than Patreon): https://github.com/sponsors/noisymime
For anything not related to Speeduino, but still about car/bike/boat/engines etc
#42539
You need to set DDRB to xxxxx11 to set PB0 and PB1 to outputs. The safe way to do that is to use an OR function so:
Code: Select all
DDRB= DDRB | 0x03;
That way any other bits remain in their existing state, that makes the code more portable.

To drive the ouputs you should perform a read/modify/write on PORTB, you could write B0000001 but you overwrite all the bits with 0s. If you aren't using the other pins then it is valid but poor practice.
Code: Select all

uint8_t temp;

temp = PORTB;
temp = temp & 0xFC;         // clear bits 1,0
temp = temp | 0x01;           // set bit0
PORTB = temp;                    // write modified value to B.
Modified 3 cylinder

Yes, I understand there needs to be modifications […]

L TWIN ducati vr signal need help

As above a tooth log would be useful. Which condi[…]

In my experience the problem only usually occurs[…]

3rz-fe turbo. help with iac valve

READ THE WIKI. https://wiki.speeduino.com/en/conf[…]

Still can't find what you're looking for?