SourceryOne / Grenar

A DIY Throughhole variant of the Mutable Instruments Branches
11 stars 2 forks source link

Adding arduino nano clone Branches fix #1

Closed tpcarlson closed 1 year ago

tpcarlson commented 1 year ago

Some Arduino nano clones seem to have issues with the UART port (Pins D0 and D1) being left open, and pulled high, which makes channel 1b and the green side of the LED not work.

The fix is to disable the UART port with a register write.

See https://forum.arduino.cc/t/program-works-with-nano-new-bootloader-but-fails-with-old-one/1030240 for more information.

This is the diff against the original Branches code:

diff --git a/branches/branches.cc b/branches/branches.cc index 
3981c39..21b8922 100755
--- a/branches/branches.cc
+++ b/branches/branches.cc
@@ -147,6 +147,8 @@ void Init() {

   TCCR1A = 0;
   TCCR1B = 5;
+
+  UCSR0B &= 0xe7; }
SourceryOne commented 1 year ago

This is for clones with Old bootloader.