Go Down

Topic: SoftwareSerial with ATTiny84 using ATtiny library (Read 51 times) previous topic - next topic

Coding Badly


Excellent.  Let me know when you are ready to try Knock-Bang.

Erni


Coding Badly

#37
Sep 25, 2012, 09:07 pm Last Edit: Sep 25, 2012, 09:12 pm by Coding Badly Reason: 1

Modify TinyISP to use Knock-Bang instead of Serial...

• Load TinyISP.pde into Arduino 1.0.1

• Navigate to the TinyISP_BuildOptions.h tab

• Change RELAY_KNOCK_BANG_ENABLED to this (change the zero to a one)...

[font=Courier New]#define RELAY_KNOCK_BANG_ENABLED           1  [/font]

• Change RELAY_SERIAL_ENABLED to this (change the one to a zero)...

[font=Courier New]#define RELAY_SERIAL_ENABLED               0  [/font]

• Navigate to the TinyISP tab

• Add a comment to this line...

[font=Courier New]// #include <SoftwareSerial.h>[/font]

• Upload the sketch to your Uno

Coding Badly


Install the Tiny Debug Knock-Bang library...

• Download the latest version of Tiny Debug Knock-Bang...
https://github.com/Coding-Badly/TinyDebugKnockBang/zipball/master
https://github.com/Coding-Badly/TinyDebugKnockBang

• Extract the contents to a directory named TinyDebugKnockBang in your Arduino sketchbook library folder

• Start the Arduino IDE

• Ensure one of the tiny processor "boards" is selected

• Copy-and-paste this small test into the edit window...

Code: [Select]
#include <TinyDebugKnockBang.h>

void setup( void )
{
  Debug.begin( 250000 );
}

void loop( void )
{
  Debug.println( F( "Caitlin! " ) );
  delay( 1000 );
}


• Verify that the sketch compiles

Coding Badly


At this point, you should be able to upload the test sketch to a tiny processor and use Serial Monitor for debugging.

Knock-Bang uses MISO (and GND) for communications.  You only need to connect the target (the tiny processor) and programmer (the Uno) as would normally do for programming.  No extra connections are needed.

Go Up