#include <iomacros.h>
#include "avr.h"
-#include "glitch.h"
+//#include "glitch.h"
//! Setup the AVR pins.
void avrsetup(){
//! Initialized an attached AVR.
void avrconnect(){
//set I/O pins
- avrsetup();
+ avrsetup(); //Cut this?
+
+ SETSS;
+ delay(50);
//Pulse !RST (SS) at least twice while CLK is low.
CLRCLK;
CLRSS;
+ delay(5);
SETSS;
CLRCLK;
- //delay(5);
+ delay(5);
CLRSS;
- //delay(5);
+ delay(5);
//Enable programming
avr_prgen();