• I've got a project that requires communicating with a message bus via Manchester encoding at 1.2kHz.

    Essentially this means I need to be able to accurately create pulses of low -> high or high -> low voltage lasting ~417 micoseconds each. (so the total low to high or high to low cycle is 813microseconds)

    I've tried chaining digitalPulse() calls - but hit a few stumbling blocks, in particular the fact that two consecutive '1' pulses will be separated by a short '0' voltage.

    I then looked at setInterval() in conjunction with a function calling digitalWrite() which seemed good down to about 0.5ms (so nearly but not quite the accuracy I need.)

    UART I don't think will work because of the start and stop bits (not needed in my implementation), and then I did start to look at using SPI.send8bit() / SPI.send4bit() just over 1 wire, but either that simply has no chance of working because there's no clock connected or else I couldn't seem to slow the baud rate down sufficiently.

    Any other suggestions out there I might try before I have to resort to embedded C (i.e. arduino) and give up on the arduino / javascript route?

About