Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
marlin-anet-a8
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jonas Leder
marlin-anet-a8
Commits
1874cb71
Commit
1874cb71
authored
May 2, 2012
by
Erik van der Zalm
Browse files
Options
Downloads
Patches
Plain Diff
Added option to increase the FAN PWM frequency.
parent
6a5a34e0
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
Marlin/Configuration.h
+4
-1
4 additions, 1 deletion
Marlin/Configuration.h
Marlin/Marlin.h
+4
-0
4 additions, 0 deletions
Marlin/Marlin.h
Marlin/Marlin.pde
+71
-0
71 additions, 0 deletions
Marlin/Marlin.pde
Marlin/temperature.cpp
+3
-0
3 additions, 0 deletions
Marlin/temperature.cpp
with
82 additions
and
1 deletion
Marlin/Configuration.h
+
4
−
1
View file @
1874cb71
...
...
@@ -8,7 +8,7 @@
//User specified version info of THIS file to display in [Pronterface, etc] terminal window during startup.
//Implementation of an idea by Prof Braino to inform user that any changes made
//to THIS file by the user have been successfully uploaded into firmware.
#define STRING_VERSION_CONFIG_H "2012-0
2-25
" //Personal revision number for changes to THIS file.
#define STRING_VERSION_CONFIG_H "2012-0
5-02
" //Personal revision number for changes to THIS file.
#define STRING_CONFIG_H_AUTHOR "erik" //Who made the changes.
// This determines the communication speed of the printer
...
...
@@ -230,6 +230,9 @@ const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of th
#endif
#endif
// Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
#define FAST_PWM_FAN
// M240 Triggers a camera by emulating a Canon RC-1 Remote
// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
// #define PHOTOGRAPH_PIN 23
...
...
...
...
This diff is collapsed.
Click to expand it.
Marlin/Marlin.h
+
4
−
0
View file @
1874cb71
...
...
@@ -170,6 +170,10 @@ bool IsStopped();
void
enquecommand
(
const
char
*
cmd
);
//put an ascii command at the end of the current buffer.
void
prepare_arc_move
(
char
isclockwise
);
#ifdef FAST_PWM_FAN
void
setPwmFrequency
(
uint8_t
pin
,
int
val
);
#endif
#ifndef CRITICAL_SECTION_START
#define CRITICAL_SECTION_START unsigned char _sreg = SREG; cli();
#define CRITICAL_SECTION_END SREG = _sreg;
...
...
...
...
This diff is collapsed.
Click to expand it.
Marlin/Marlin.pde
+
71
−
0
View file @
1874cb71
...
...
@@ -36,6 +36,7 @@
#include
"watchdog.h"
#include
"EEPROMwrite.h"
#include
"language.h"
#include
"pins_arduino.h"
#define VERSION_STRING "1.0.0 RC2"
...
...
@@ -1512,4 +1513,74 @@ void Stop()
bool
IsStopped
()
{
return
Stopped
;
};
#ifdef FAST_PWM_FAN
void
setPwmFrequency
(
uint8_t
pin
,
int
val
)
{
val
&=
0x07
;
switch
(
digitalPinToTimer
(
pin
))
{
#if defined(TCCR0A)
case
TIMER0A
:
case
TIMER0B
:
TCCR0B
&=
~
(
CS00
|
CS01
|
CS02
);
TCCR0B
|=
val
;
break
;
#endif
#if defined(TCCR1A)
case
TIMER1A
:
case
TIMER1B
:
TCCR1B
&=
~
(
CS10
|
CS11
|
CS12
);
TCCR1B
|=
val
;
break
;
#endif
#if defined(TCCR2)
case
TIMER2
:
case
TIMER2
:
TCCR2
&=
~
(
CS10
|
CS11
|
CS12
);
TCCR2
|=
val
;
break
;
#endif
#if defined(TCCR2A)
case
TIMER2A
:
case
TIMER2B
:
TCCR2B
&=
~
(
CS20
|
CS21
|
CS22
);
TCCR2B
|=
val
;
break
;
#endif
#if defined(TCCR3A)
case
TIMER3A
:
case
TIMER3B
:
case
TIMER3C
:
TCCR3B
&=
~
(
CS30
|
CS31
|
CS32
);
TCCR3B
|=
val
;
break
;
#endif
#if defined(TCCR4A)
case
TIMER4A
:
case
TIMER4B
:
case
TIMER4C
:
TCCR4B
&=
~
(
CS40
|
CS41
|
CS42
);
TCCR4B
|=
val
;
break
;
#endif
#if defined(TCCR5A)
case
TIMER5A
:
case
TIMER5B
:
case
TIMER5C
:
TCCR5B
&=
~
(
CS50
|
CS51
|
CS52
);
TCCR5B
|=
val
;
break
;
#endif
}
}
#endif
This diff is collapsed.
Click to expand it.
Marlin/temperature.cpp
+
3
−
0
View file @
1874cb71
...
...
@@ -559,6 +559,9 @@ void tp_init()
#endif
#if (FAN_PIN > -1)
SET_OUTPUT
(
FAN_PIN
);
#ifdef FAST_PWM_FAN
setPwmFrequency
(
FAN_PIN
,
1
);
// No prescaling. Pwm frequency = F_CPU/256/8
#endif
#endif
#ifdef HEATER_0_USES_MAX6675
...
...
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment