Created
October 31, 2018 19:32
-
-
Save zeroflow/14cf8de4ecac754538eea88e8994a86d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Astrolux S43 driver layout | |
* ---- | |
* Reset - PB5 |1 8| VCC | |
* eswitch - PB3 |2 7| PB2 - indicator led | |
* 1x7135 - PB4 |3 6| PB1 - none | |
* GND |4 5| PB0 - FET | |
* ---- | |
*/ | |
#define PWM_CHANNELS 3 | |
#define SWITCH_PIN PB3 // pin 2 | |
#define SWITCH_PCINT PCINT3 // pin 2 pin change interrupt | |
#define PWM1_PIN PB4 // pin 3, 1x7135 PWM | |
#define PWM1_LVL OCR1B // OCR1B is the output compare register for PB4 | |
#define PWM2_PIN PB0 // pin 5, FET PWM | |
#define PWM2_LVL OCR0A // OCR0A is the output compare register for PB0 | |
#define PWM3_PIN // pin 6, 7x7135 PWM | |
#define PWM3_LVL OCR0B // OCR0B is the output compare register for PB1 | |
#define AUXLED_PIN PB2 // pin 7, indicator led | |
#define ADC_PRSCL 0x06 // clk/64 | |
// average drop across diode on this hardware | |
#define VOLTAGE_FUDGE_FACTOR 5 // add 0.25V | |
#define TEMP_CHANNEL 0b00001111 | |
#define FAST 0xA3 // fast PWM both channels | |
#define PHASE 0xA1 // phase-correct PWM both channels |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment