changes to the GUI to allow for better loading and writing as well as tested our...
[goodfet] / firmware / lib / atmega168.c
index c6516ea..d8705ba 100644 (file)
@@ -51,8 +51,9 @@ void setbaud0(unsigned char rate){
     break;
   }
   
     break;
   }
   
-#define F_CPU 16000000L
-#define BAUD 230400L
+#define F_CPU 8000000L
+  //#define BAUD 115200L
+#define BAUD 9600L
 #include <util/setbaud.h>
   UBRR0H = UBRRH_VALUE;
   UBRR0L = UBRRL_VALUE;
 #include <util/setbaud.h>
   UBRR0H = UBRRH_VALUE;
   UBRR0L = UBRRL_VALUE;
@@ -88,7 +89,9 @@ void setbaud1(unsigned char rate){
 
 
 void avr_init_uart0(){
 
 
 void avr_init_uart0(){
+  PORTD = _BV(PD2);
   setbaud0(0);
   setbaud0(0);
+  _delay_ms(500); //takes a bit to stabilize
 }
 
 
 }