Browse Source

Merge pull request #743 from Opticalworm/Marlin_v1

Improved support for panelolu2 encoder and buzzer
ErikZalm 10 years ago
parent
commit
e1ae7952eb

+ 21
- 23
ArduinoAddons/Arduino_1.x.x/hardware/Sanguino/boards.txt View File

27
 atmega12848m.upload.maximum_size=131072
27
 atmega12848m.upload.maximum_size=131072
28
 atmega12848m.upload.speed=19200
28
 atmega12848m.upload.speed=19200
29
 
29
 
30
-atmega12848m.bootloader.low_fuses=0xFD
31
-atmega12848m.bootloader.high_fuses=0x9A
32
-atmega12848m.bootloader.extended_fuses=0xFF
30
+atmega1284.bootloader.low_fuses=0xD6
31
+atmega1284.bootloader.high_fuses=0xDA
32
+atmega1284.bootloader.extended_fuses=0xFD
33
 atmega12848m.bootloader.path=atmega
33
 atmega12848m.bootloader.path=atmega
34
 atmega12848m.bootloader.file=ATmegaBOOT_168_atmega1284p_8m.hex
34
 atmega12848m.bootloader.file=ATmegaBOOT_168_atmega1284p_8m.hex
35
 atmega12848m.bootloader.unlock_bits=0x3F
35
 atmega12848m.bootloader.unlock_bits=0x3F
48
 atmega1284.upload.maximum_size=131072
48
 atmega1284.upload.maximum_size=131072
49
 atmega1284.upload.speed=57600
49
 atmega1284.upload.speed=57600
50
 
50
 
51
-atmega1284.bootloader.low_fuses=0xFF
52
-atmega1284.bootloader.high_fuses=0x9A
53
-atmega1284.bootloader.extended_fuses=0xFF
51
+atmega1284.bootloader.low_fuses=0xD6
52
+atmega1284.bootloader.high_fuses=0xDA
53
+atmega1284.bootloader.extended_fuses=0xFD
54
 atmega1284.bootloader.path=atmega
54
 atmega1284.bootloader.path=atmega
55
 atmega1284.bootloader.file=ATmegaBOOT_168_atmega1284p.hex
55
 atmega1284.bootloader.file=ATmegaBOOT_168_atmega1284p.hex
56
 atmega1284.bootloader.unlock_bits=0x3F
56
 atmega1284.bootloader.unlock_bits=0x3F
60
 atmega1284.build.f_cpu=16000000L
60
 atmega1284.build.f_cpu=16000000L
61
 atmega1284.build.core=arduino
61
 atmega1284.build.core=arduino
62
 atmega1284.build.variant=standard
62
 atmega1284.build.variant=standard
63
-#
64
-
65
 ##############################################################
63
 ##############################################################
66
 
64
 
67
-atmega1284.name=Sanguino W/ ATmega1284p 16mhz ceramic resonator
65
+atmega1284m.name=Sanguino W/ ATmega1284p 20mhz
68
 
66
 
69
-atmega1284.upload.protocol=stk500
70
-atmega1284.upload.maximum_size=131072
71
-atmega1284.upload.speed=57600
67
+atmega1284m.upload.protocol=stk500
68
+atmega1284m.upload.maximum_size=131072
69
+atmega1284m.upload.speed=57600
72
 
70
 
73
-atmega1284.bootloader.low_fuses=0xD6
74
-atmega1284.bootloader.high_fuses=0xDC
75
-atmega1284.bootloader.extended_fuses=0xFD
76
-atmega1284.bootloader.path=atmega
77
-atmega1284.bootloader.file=ATmegaBOOT_168_atmega1284p.hex
78
-atmega1284.bootloader.unlock_bits=0x3F
79
-atmega1284.bootloader.lock_bits=0x0F
71
+atmega1284m.bootloader.low_fuses=0xD6
72
+atmega1284m.bootloader.high_fuses=0xDA
73
+atmega1284m.bootloader.extended_fuses=0xFD
74
+atmega1284m.bootloader.path=atmega
75
+atmega1284m.bootloader.file=ATmegaBOOT_168_atmega1284p.hex
76
+atmega1284m.bootloader.unlock_bits=0x3F
77
+atmega1284m.bootloader.lock_bits=0x0F
80
 
78
 
81
-atmega1284.build.mcu=atmega1284p
82
-atmega1284.build.f_cpu=16000000L
83
-atmega1284.build.core=arduino
84
-atmega1284.build.variant=standard
79
+atmega1284m.build.mcu=atmega1284p
80
+atmega1284m.build.f_cpu=20000000L
81
+atmega1284m.build.core=arduino
82
+atmega1284m.build.variant=standard
85
 #
83
 #

+ 17
- 0
Marlin/Configuration.h View File

451
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
451
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
452
 //#define ULTIMAKERCONTROLLER //as available from the ultimaker online store.
452
 //#define ULTIMAKERCONTROLLER //as available from the ultimaker online store.
453
 //#define ULTIPANEL  //the ultipanel as on thingiverse
453
 //#define ULTIPANEL  //the ultipanel as on thingiverse
454
+//#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
455
+//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
454
 
456
 
455
 // The MaKr3d Makr-Panel with graphic controller and SD support
457
 // The MaKr3d Makr-Panel with graphic controller and SD support
456
 // http://reprap.org/wiki/MaKr3d_MaKrPanel
458
 // http://reprap.org/wiki/MaKr3d_MaKrPanel
536
   #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD
538
   #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD
537
   #define NEWPANEL
539
   #define NEWPANEL
538
   #define ULTIPANEL
540
   #define ULTIPANEL
541
+  
542
+  #ifndef ENCODER_PULSES_PER_STEP
543
+	#define ENCODER_PULSES_PER_STEP 4
544
+  #endif 
545
+
546
+  #ifndef ENCODER_STEPS_PER_MENU_ITEM
547
+	#define ENCODER_STEPS_PER_MENU_ITEM 1
548
+  #endif 
549
+  
550
+  
551
+  #ifdef LCD_USE_I2C_BUZZER
552
+	#define LCD_FEEDBACK_FREQUENCY_HZ 1000
553
+	#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
554
+  #endif
555
+  
539
 #endif
556
 #endif
540
 
557
 
541
 // Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs
558
 // Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs

+ 9
- 3
Marlin/Marlin_main.cpp View File

2477
       break;
2477
       break;
2478
     #endif // NUM_SERVOS > 0
2478
     #endif // NUM_SERVOS > 0
2479
 
2479
 
2480
-    #if LARGE_FLASH == true && ( BEEPER > 0 || defined(ULTRALCD) )
2480
+    #if (LARGE_FLASH == true && ( BEEPER > 0 || defined(ULTRALCD) || defined(LCD_USE_I2C_BUZZER)))
2481
     case 300: // M300
2481
     case 300: // M300
2482
     {
2482
     {
2483
       int beepS = code_seen('S') ? code_value() : 110;
2483
       int beepS = code_seen('S') ? code_value() : 110;
2489
           delay(beepP);
2489
           delay(beepP);
2490
           noTone(BEEPER);
2490
           noTone(BEEPER);
2491
         #elif defined(ULTRALCD)
2491
         #elif defined(ULTRALCD)
2492
-          lcd_buzz(beepS, beepP);
2492
+		  lcd_buzz(beepS, beepP);
2493
+		#elif defined(LCD_USE_I2C_BUZZER)
2494
+		  lcd_buzz(beepP, beepS);
2493
         #endif
2495
         #endif
2494
       }
2496
       }
2495
       else
2497
       else
2747
             WRITE(BEEPER,LOW);
2749
             WRITE(BEEPER,LOW);
2748
             delay(3);
2750
             delay(3);
2749
           #else
2751
           #else
2750
-            lcd_buzz(1000/6,100);
2752
+			#if !defined(LCD_FEEDBACK_FREQUENCY_HZ) || !defined(LCD_FEEDBACK_FREQUENCY_DURATION_MS)
2753
+              lcd_buzz(1000/6,100);
2754
+			#else
2755
+			  lcd_buzz(LCD_FEEDBACK_FREQUENCY_DURATION_MS,LCD_FEEDBACK_FREQUENCY_HZ);
2756
+			#endif
2751
           #endif
2757
           #endif
2752
           }
2758
           }
2753
         }
2759
         }

+ 4
- 0
Marlin/pins.h View File

971
 #undef MOTHERBOARD
971
 #undef MOTHERBOARD
972
 #define MOTHERBOARD 6
972
 #define MOTHERBOARD 6
973
 #define SANGUINOLOLU_V_1_2
973
 #define SANGUINOLOLU_V_1_2
974
+
975
+#if defined(__AVR_ATmega1284P__)
976
+	#define LARGE_FLASH true
977
+#endif
974
 #endif
978
 #endif
975
 #if MOTHERBOARD == 6
979
 #if MOTHERBOARD == 6
976
 #define KNOWN_BOARD 1
980
 #define KNOWN_BOARD 1

+ 5
- 1
Marlin/ultralcd_implementation_hitachi_HD44780.h View File

711
 static void lcd_implementation_quick_feedback()
711
 static void lcd_implementation_quick_feedback()
712
 {
712
 {
713
 #ifdef LCD_USE_I2C_BUZZER
713
 #ifdef LCD_USE_I2C_BUZZER
714
-    lcd.buzz(60,1000/6);
714
+	#if !defined(LCD_FEEDBACK_FREQUENCY_HZ) || !defined(LCD_FEEDBACK_FREQUENCY_DURATION_MS)
715
+	  lcd_buzz(1000/6,100);
716
+	#else
717
+	  lcd_buzz(LCD_FEEDBACK_FREQUENCY_DURATION_MS,LCD_FEEDBACK_FREQUENCY_HZ);
718
+	#endif
715
 #elif defined(BEEPER) && BEEPER > -1
719
 #elif defined(BEEPER) && BEEPER > -1
716
     SET_OUTPUT(BEEPER);
720
     SET_OUTPUT(BEEPER);
717
     for(int8_t i=0;i<10;i++)
721
     for(int8_t i=0;i<10;i++)

Loading…
Cancel
Save