├── docs ├── pinout.png └── pinout.diy ├── .gitignore ├── src ├── ui.h ├── dds.h ├── config.h ├── defines.h ├── dds.S ├── lcd.h ├── config.c ├── dds_defines.h ├── main.c ├── crc8.c ├── lcd.c ├── ui.c └── dds.c ├── utils └── waveforms.py ├── README.md ├── Makefile └── LICENSE /docs/pinout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timsavage/fg100alt-firmware/HEAD/docs/pinout.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | *.o 3 | *.hex 4 | *.out 5 | *.map 6 | 7 | # Eclipse fluff 8 | .metadata 9 | .project 10 | .cproject 11 | .settings -------------------------------------------------------------------------------- /src/ui.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | * ui.h 3 | * 4 | * Created: 25 Oct 2015 5 | * Author: tims 6 | * Revised: 17 Apr, 2017 7 | * By: crHARPER 8 | * 9 | *----------------------------------------------------------------------------- 10 | */ 11 | #ifndef SRC_UI_H_ 12 | #define SRC_UI_H_ 13 | 14 | #include "defines.h" 15 | 16 | void ui_show_splash(void); 17 | void ui_redraw_display(void); 18 | void ui_handle_event(uint8_t); 19 | 20 | #define RUN (!(PINC & _BV(RUN_STOP_PIN))) 21 | 22 | #define HOLD_TIME 25 23 | 24 | #endif /* SRC_UI_H_ */ 25 | -------------------------------------------------------------------------------- /src/dds.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | * dds.h 3 | * 4 | * Created: 23 Oct 2015 5 | * Author: tims 6 | * 7 | *----------------------------------------------------------------------------- 8 | */ 9 | #ifndef DDS_H_ 10 | #define DDS_H_ 11 | 12 | #include 13 | #include 14 | 15 | // DDS wave names 16 | extern const char* dds_wave_names[]; 17 | 18 | // Check that the DDS is enabled 19 | #define DDS_IS_ENABLED ((DDS_BREAK_REGISTER >> DDS_BREAK_BIT) & 1) 20 | 21 | #define DDS_ENABLE DDS_BREAK_REGISTER |= _BV(DDS_BREAK_BIT) 22 | #define DDS_DISABLE DDS_BREAK_REGISTER &= ~_BV(DDS_BREAK_BIT) 23 | 24 | 25 | void dds_init(void); 26 | void dds_select_wave(uint8_t); 27 | void dds_start(uint32_t); 28 | 29 | #endif /* DDS_H_ */ 30 | -------------------------------------------------------------------------------- /src/config.h: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------- 2 | * 3 | * crHARPER.com 4 | * 5 | *--------------------------------------------------------------------------- 6 | * 7 | * File: config.h 8 | * Author: crHARPER 9 | * $Revision: $ 10 | * $Date: 17 Arp, 2017$ 11 | * 12 | * Description: 13 | * 14 | * 15 | * 16 | *--------------------------------------------------------------------------- 17 | */ 18 | #ifndef CONFIG_H 19 | #define CONFIG_H 20 | 21 | #define CONFIG_VERSION 1 22 | 23 | //EEPROM structure for FG-100 24 | typedef struct { 25 | uint8_t version; 26 | uint32_t frequency; 27 | uint8_t cursor; 28 | uint8_t waveform; 29 | uint8_t crc; 30 | } Config_Eeprom_Type; 31 | 32 | void config_init(void); 33 | void config_write(void); 34 | 35 | #endif // CONFIG_H 36 | -------------------------------------------------------------------------------- /src/defines.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | * defines.h 3 | * 4 | * Created: 21 Oct 2015 5 | * Author: tims 6 | * Revised: 17 Apr, 2017 7 | * By: crHARPER 8 | * 9 | *----------------------------------------------------------------------------- 10 | */ 11 | #ifndef DEFINES_H_ 12 | #define DEFINES_H_ 13 | 14 | #include 15 | 16 | #define VERSION_MAJOR 1 17 | #define VERSION_MINOR 0 18 | 19 | 20 | // Input switches 21 | #define RUN_STOP_PIN PINC3 22 | 23 | #define MODE_PIN PINB5 24 | #define CURSOR_PIN PINB4 25 | #define PLUS_PIN PINB2 26 | #define MINUS_PIN PINB3 27 | #define BUTTON_STROBE PINB1 28 | 29 | 30 | // LCD 31 | #define LCD_CTRL_PORT PORTC 32 | #define LCD_CTRL_DDR DDRC 33 | #define LCD_DATA_PORT PORTB 34 | #define LCD_DATA_DDR DDRB 35 | 36 | #define LCD_RS PORTC2 37 | #define LCD_EN PORTC1 38 | #define LCD_LOW_BYTE PORTB2 39 | 40 | 41 | // Button equivalent bits 42 | #define NO_BUTTON 0x00 43 | #define MODE_BUTTON 0x01 44 | #define CURSOR_BUTTON 0x02 45 | #define PLUS_BUTTON 0x04 46 | #define MINUS_BUTTON 0x08 47 | #define RUN_STOP_BUTTON 0x10 48 | 49 | 50 | #endif /* DEFINES_H_ */ 51 | -------------------------------------------------------------------------------- /utils/waveforms.py: -------------------------------------------------------------------------------- 1 | import math 2 | 3 | TAU = math.pi * 2 4 | 5 | 6 | def render_wave(name, values): 7 | len_values = len(values) 8 | print(" // {} Wave \n {{".format(name, len_values)) 9 | for r in range(0, int(len_values / 16)): 10 | step = values[r * 16:(r + 1) * 16] 11 | print(' ', ', '.join("{:>3}".format(x) for x in step), ',', sep='') 12 | print(" },") 13 | 14 | print("uint8_t waves[][256] = {"); 15 | 16 | 17 | def sign_func(x): 18 | return 127 + int(math.sin((x / 256.0) * TAU) * 127 + 0.5) 19 | 20 | render_wave('Sign', [sign_func(x) for x in range(256)]) 21 | 22 | 23 | def triangle_func(x): 24 | if 0 <= x < 64: 25 | return 127 + x * 2 26 | elif 64 <= x < 192: 27 | return 255 - (x - 64) * 2 28 | elif x == 192: 29 | return 0 30 | else: 31 | return ((x - 192) * 2) - 1 32 | 33 | render_wave('Triangle', [triangle_func(x) for x in range(256)]) 34 | 35 | 36 | def saw_tooth_func(x): 37 | return (127 + x) % 256 38 | 39 | render_wave('Sawtooth', [saw_tooth_func(x) for x in range(256)]) 40 | 41 | 42 | def rsaw_tooth_func(x): 43 | return (127 - x) % 256 44 | 45 | render_wave('Reverse Sawtooth', [rsaw_tooth_func(x) for x in range(256)]) 46 | 47 | 48 | def square_func(x): 49 | return 255 if x < 128 else 0 50 | 51 | render_wave('Square', [square_func(x) for x in range(256)]) 52 | 53 | print("};") 54 | -------------------------------------------------------------------------------- /src/dds.S: -------------------------------------------------------------------------------- 1 | ;----------------------------------------------------------------------------- 2 | ; dds.S 3 | ; 4 | ; Created: 25 Oct 2015 5 | ; Author: tims 6 | ; Revised: 17 Apr, 2017 7 | ; By: crHARPER 8 | ; 9 | ;----------------------------------------------------------------------------- 10 | #include 11 | #include "dds_defines.h" 12 | 13 | .section .text 14 | 15 | ; extern void ddsloop(uint32_t step, uint8_t* waveform); 16 | .global ddsloop 17 | 18 | #define I r17 19 | #define FIX_L r18 20 | #define FIX_H r19 21 | 22 | ; Registers used by C Interface 23 | #define STEP_3 r25 24 | #define STEP_2 r24 25 | #define STEP_1 r23 26 | #define STEP_0 r22 27 | #define WAVEFORM_H r21 28 | #define WAVEFORM_L r20 29 | 30 | ddsloop: 31 | ; Reset registers to 0 32 | clr I 33 | clr FIX_L 34 | clr FIX_H 35 | 36 | ; Assign waveform address to Z register (16bit r30/r31) 37 | mov r31, WAVEFORM_H 38 | mov r30, WAVEFORM_L 39 | 40 | ; only works if WAVEFORM_L == 0 41 | loop: 42 | ; Add 24bit step to Fix with excess bits applied to the low byte of the Z register 43 | add FIX_L, STEP_0 ; 1 clock 44 | adc FIX_H, STEP_1 ; 1 clock 45 | adc r30, STEP_2 ; 1 clock 46 | 47 | ; Load value from waveform using 16bit address in Z register into I 48 | ld I, Z ; 2 clocks 49 | 50 | ; Apply I to 8bit DDS_Port 51 | out _SFR_IO_ADDR(DDS_PORT), I ; 1 clock 52 | 53 | ; Check for button press to cancel 54 | sbic _SFR_IO_ADDR(PINC), PINC3 ; 1 clock (if unset) 55 | rjmp loop ; 2 clocks 56 | ; -------- 57 | ; 9 clocks 58 | 59 | ; wait for R/S button release 60 | wait: 61 | sbis _SFR_IO_ADDR(PINC), PINC3 62 | rjmp wait 63 | ret 64 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # FG-100 alt firmware 2 | Alternate firmware for the FG-100 function generator 3 | 4 | The FG 100 is a cheap function generator widely available on Ebay. 5 | 6 | See https://hackaday.io/project/7985-alternate-firmware-for-fg-100-dds-function-gen for details 7 | 8 | ## Requirements 9 | 10 | You will need: 11 | 12 | * Obviously a FG-100 (ebay is a good source) 13 | * ATMega328p 28pin DIP microcontroller 14 | * AVR programmer/ISP (the Makefile defaults to using a USBTiny ISP) 15 | * AVR toolchain (eg avr-gcc, avrdude and gnumake) installed 16 | 17 | > Warning: There are many sources for the FG-100 of varying quality and performace. My particular unit has a high quality PCB with quality components (Rubicon capacitors), the output is clean with minimal noise. Other people (including a review on Hackaday) have not had such luck. YMMV 18 | 19 | If you are using a different programmer you will need to update the Makefile with the currect programmer code 20 | for AVRdude, update the *AVRDUDE_PROGRAMMER* parameter with the correct value for your programmer (see AVR dude 21 | documentation for info). 22 | 23 | ## Compile/Install 24 | 25 | All development was completed on GNU/Linux so all instructions relate to this OS (feel free to generate a 26 | project file for AVRStudio and send me a pull request ;) ). 27 | 28 | Steps to build/upload/set correct fuses: 29 | ```` 30 | > make program 31 | ```` 32 | 33 | If you prefer to do the steps separately: 34 | ```` 35 | # Compile/Link/Generate Hex 36 | > make hex 37 | # Upload to microcontroller 38 | > make upload 39 | # Set correct fuses 40 | > make fuses 41 | ```` 42 | 43 | Finally open up the FG-100, unscrew the LCD and remove the existing ATMega48 from it's socket, replace with your newly flashed ATMega328p, replace the LCD. 44 | 45 | ~ Enjoy! 46 | -------------------------------------------------------------------------------- /src/lcd.h: -------------------------------------------------------------------------------- 1 | /* 2 | * lcd.h 3 | * 4 | * Based on code by aostanin - https://github.com/aostanin/avr-hd44780 5 | */ 6 | 7 | #ifndef LCD_H_ 8 | #define LCD_H_ 9 | 10 | #include "defines.h" 11 | 12 | // LCD Commands 13 | #define LCD_CLEARDISPLAY 0x01 14 | #define LCD_RETURNHOME 0x02 15 | #define LCD_ENTRYMODESET 0x04 16 | #define LCD_DISPLAYCONTROL 0x08 17 | #define LCD_CURSORSHIFT 0x10 18 | #define LCD_FUNCTIONSET 0x20 19 | #define LCD_SETCGRAMADDR 0x40 20 | #define LCD_SETDDRAMADDR 0x80 21 | 22 | // Entry mode flags 23 | #define LCD_ENTRYRIGHT 0x00 24 | #define LCD_ENTRYLEFT 0x02 25 | #define LCD_ENTRYSHIFTINCREMENT 0x01 26 | #define LCD_ENTRYSHIFTDECREMENT 0x00 27 | 28 | // Display control flags 29 | #define LCD_DISPLAYON 0x04 30 | #define LCD_DISPLAYOFF 0x00 31 | #define LCD_CURSORON 0x02 32 | #define LCD_CURSOROFF 0x00 33 | #define LCD_BLINKON 0x01 34 | #define LCD_BLINKOFF 0x00 35 | 36 | // Cursor position flags 37 | #define LCD_DISPLAYMOVE 0x08 38 | #define LCD_CURSORMOVE 0x00 39 | #define LCD_MOVERIGHT 0x04 40 | #define LCD_MOVELEFT 0x00 41 | 42 | // Function set flags 43 | #define LCD_8BITMODE 0x10 44 | #define LCD_4BITMODE 0x00 45 | #define LCD_2LINE 0x08 46 | #define LCD_1LINE 0x00 47 | #define LCD_5x10DOTS 0x04 48 | #define LCD_5x8DOTS 0x00 49 | 50 | /** 51 | * Initialize LCD 52 | */ 53 | void lcd_init(void); 54 | 55 | /** 56 | * Send a command to the LCD 57 | */ 58 | void lcd_command(uint8_t command); 59 | 60 | /** 61 | * Write a character to the LCD 62 | */ 63 | void lcd_write(uint8_t value); 64 | 65 | void lcd_clear(void); 66 | void lcd_return_home(void); 67 | 68 | void lcd_enable_cursor(void); 69 | void lcd_disable_cursor(void); 70 | 71 | void lcd_set_cursor(uint8_t col, uint8_t row); 72 | 73 | void lcd_scroll_left(void); 74 | void lcd_scroll_right(void); 75 | 76 | void lcd_set_left_to_right(void); 77 | void lcd_set_right_to_left(void); 78 | 79 | void lcd_enable_autoscroll(void); 80 | void lcd_disable_autoscroll(void); 81 | 82 | void lcd_create_char(uint8_t location, uint8_t* charmap); 83 | 84 | void lcd_puts(const char *string); 85 | void lcd_printf(const char *format, ...); 86 | 87 | #endif /* LCD_H_ */ 88 | -------------------------------------------------------------------------------- /src/config.c: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------- 2 | * 3 | * crHARPER.com 4 | * 5 | *--------------------------------------------------------------------------- 6 | * 7 | * File: config.c 8 | * Author: crHARPER 9 | * $Revision: $ 10 | * $Date: 17 Apr, 2017$ 11 | * 12 | * Description: 13 | * For storing/retreaving configurables to EEPROM 14 | * 15 | * 16 | *--------------------------------------------------------------------------- 17 | */ 18 | #include 19 | 20 | #include "config.h" 21 | #include "dds.h" 22 | 23 | Config_Eeprom_Type ui_state; 24 | void config_once(void); 25 | 26 | extern uint8_t crc8( uint8_t *, uint8_t ); 27 | 28 | /*--------------------------------------------------------------------------- 29 | * read the EEPROM 30 | *--------------------------------------------------------------------------- 31 | */ 32 | uint8_t config_read(void){ 33 | uint8_t crc = 0; 34 | 35 | for (int i=0; i < sizeof(Config_Eeprom_Type); ++i) { 36 | ((uint8_t*) &ui_state)[i] = eeprom_read_byte((uint8_t*) i); 37 | } 38 | 39 | crc = crc8((uint8_t*) &ui_state, sizeof(Config_Eeprom_Type)-1); 40 | 41 | if (crc == ui_state.crc) { 42 | return 1; //pass 43 | } 44 | 45 | return 0; //fail 46 | } 47 | 48 | 49 | /*--------------------------------------------------------------------------- 50 | * write to EEPROM 51 | *--------------------------------------------------------------------------- 52 | */ 53 | void config_write(void){ 54 | ui_state.version = CONFIG_VERSION; 55 | 56 | ui_state.crc = crc8((uint8_t*) &ui_state, sizeof(Config_Eeprom_Type)-1); 57 | 58 | for (int i=0; i < sizeof(Config_Eeprom_Type); ++i) { 59 | eeprom_write_byte((uint8_t*) i, ((uint8_t*) &ui_state)[i]); 60 | } 61 | } 62 | 63 | 64 | /*--------------------------------------------------------------------------- 65 | * upon power up read EEPROM 66 | *--------------------------------------------------------------------------- 67 | */ 68 | void config_init(void){ 69 | if(!config_read()) { 70 | config_once(); //fault, initialize EEPROM 71 | } 72 | } 73 | 74 | 75 | /*--------------------------------------------------------------------------- 76 | * upon first time power up with a blank EEPROM 77 | * 78 | * load with default values 79 | * occures any time the crc test fails 80 | *--------------------------------------------------------------------------- 81 | */ 82 | void config_once(void){ 83 | ui_state.version = CONFIG_VERSION; 84 | ui_state.frequency = 1000; 85 | ui_state.cursor = 3; 86 | ui_state.waveform = DDS_SINE_WAVE; 87 | 88 | config_write(); 89 | } 90 | -------------------------------------------------------------------------------- /src/dds_defines.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | * dds_defines.h 3 | * 4 | * Created: 28 Oct 2015 5 | * Author: tims 6 | * 7 | *----------------------------------------------------------------------------- 8 | */ 9 | #ifndef DDS_DEFINES_H_ 10 | #define DDS_DEFINES_H_ 11 | 12 | /** 13 | * DDS Step constant 14 | * 15 | * This value should be defined in your Makefile (alongside F_CPU) 16 | * 17 | * This value is used to calculate the step size required to generate a 18 | * waveform at the specified frequency. The value is defined as: 19 | * 20 | * DDS_STEP_CONSTANT = (256^3 * ASM_LOOP_CYCLES) / F_CPU 21 | * 22 | * The value of 256 ^ 3 is derived from the length of the waveform table and 23 | * the offset of the bits used to index into the waveform table. The offset is 24 | * 256 << 16 (or 256 ^ 2). 25 | * 26 | * ASM_LOOP_CYCLES is the number of clock cycles required to complete one cycle 27 | * of the DDS generation loop, the current value is 9 clock cycles. 28 | * 29 | * F_CPU (this is defined in the Makefile as it is also used to scale 30 | * operations in ) is the clock speed in Hz. 31 | * 32 | * It is easier to pre-calculate this value, this Google Sheets document can be 33 | * used to calculate the value: 34 | * 35 | * https://docs.google.com/spreadsheets/d/1Oab6_2TZ5SzAQHbTxMHLZFGgJnOQwO2SQYt80mpjkCc/edit?usp=sharing 36 | */ 37 | #ifndef DDS_STEP_CONSTANT 38 | /* prevent compiler error by supplying a default based on a 30Mhz clock */ 39 | # warning "DDS_STEP_CONSTANT not defined for \"dds_defines.h\"" 40 | #define DDS_STEP_CONSTANT 5.0331648 41 | #endif 42 | 43 | // Define DDS port (defaults to PORTD) 44 | #ifndef DDS_PORT 45 | #define DDS_PORT PORTD 46 | #endif 47 | 48 | // Define DDS DDR (defaults to DDRD) 49 | #ifndef DDS_DDR 50 | #define DDS_DDR DDRD 51 | #endif 52 | 53 | // Register used to break the DDS cycle 54 | #ifndef DDS_BREAK_REGISTER 55 | #define DDS_BREAK_REGISTER GPIOR0 56 | #endif 57 | 58 | // Bit within the Break register 59 | #ifndef DDS_BREAK_BIT 60 | #define DDS_BREAK_BIT GPIOR00 61 | #endif 62 | 63 | // Minimum frequency 64 | #ifndef DDS_MIN_FREQ 65 | #define DDS_MIN_FREQ 0 66 | #endif 67 | 68 | // Maximum frequency (supported by hardware), default is 500kHz 69 | #ifndef DDS_MAX_FREQ 70 | #define DDS_MAX_FREQ 500000 71 | #endif 72 | 73 | // Check if frequency is in DDS range 74 | #define DDS_FREQ_IN_RANGE(freq) ((freq <= DDS_MAX_FREQ) & (freq >= DDS_MIN_FREQ)) 75 | 76 | // Waveforms 77 | #define DDS_SINE_WAVE 0 78 | #define DDS_TRIANGLE_WAVE 1 79 | #define DDS_SAWTOOTH_WAVE 2 80 | #define DDS_RSAWTOOTH_WAVE 3 81 | #define DDS_SQUARE_WAVE 4 82 | 83 | // Number of waveforms defined in the DDS waveform table. 84 | #define DDS_WAVE_COUNT (DDS_SQUARE_WAVE + 1) 85 | 86 | #endif /* DDS_DEFINES_H_ */ 87 | -------------------------------------------------------------------------------- /src/main.c: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | * main.c 3 | * 4 | * Created: 25 Oct 2015 5 | * Author: tims 6 | * Revised: 17 Apr, 2017 7 | * By: crHARPER 8 | * 9 | *----------------------------------------------------------------------------- 10 | */ 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | 17 | #include "defines.h" 18 | #include "config.h" 19 | #include "lcd.h" 20 | #include "ui.h" 21 | #include "dds.h" 22 | 23 | extern Config_Eeprom_Type ui_state; 24 | 25 | 26 | //----------------------------------------------------------------------------- 27 | void init(void) { 28 | // Do first to set correct DC offset of output 29 | // fixes bug in original code 30 | dds_init(); 31 | 32 | wdt_disable(); 33 | 34 | // Configure Strobe as Input 35 | DDRB &= ~_BV(BUTTON_STROBE); 36 | PORTB |= _BV(BUTTON_STROBE); // Enable pull up resistor 37 | // Configure Run/Stop as Input 38 | DDRC &= ~_BV(PINC3); 39 | PORTC |= _BV(PINC3); // Enable pull up resistor 40 | 41 | // Initialize the LCD and display splash message 42 | lcd_init(); 43 | ui_show_splash(); 44 | 45 | // Enable interrupts 46 | sei(); 47 | } 48 | 49 | 50 | //----------------------------------------------------------------------------- 51 | uint8_t check_strobe_pin(uint8_t pin) { 52 | uint8_t temp; 53 | 54 | // set PortB nibble for corrisponding button bit 55 | PORTB = (PORTB & ~(0x0F << PORTB2)) | _BV(pin); 56 | _delay_ms(5); // settling time 57 | temp = (PINB & _BV(BUTTON_STROBE)); //read 58 | PORTB = (PORTB & ~(0x0F << PORTB2)); 59 | return temp; 60 | } 61 | 62 | 63 | //----------------------------------------------------------------------------- 64 | // Generate UI events 65 | void operator_input() { 66 | uint8_t buttons = 0; 67 | 68 | if (RUN) { 69 | buttons |= RUN_STOP_BUTTON; 70 | } 71 | 72 | // strobed button inputs must be checked one at a time 73 | 74 | if (check_strobe_pin(MODE_PIN)) { 75 | buttons |= MODE_BUTTON; 76 | } 77 | if (check_strobe_pin(CURSOR_PIN)) { 78 | buttons |= CURSOR_BUTTON; 79 | } 80 | if (check_strobe_pin(PLUS_PIN)) { 81 | buttons |= PLUS_BUTTON; 82 | } 83 | if (check_strobe_pin(MINUS_PIN)) { 84 | buttons |= MINUS_BUTTON; 85 | } 86 | 87 | ui_handle_event(buttons); 88 | } 89 | 90 | 91 | 92 | //----------------------------------------------------------------------------- 93 | int main(void) { 94 | init(); 95 | 96 | config_init(); //get saves setting from EEPROM 97 | 98 | _delay_ms(2000); 99 | ui_redraw_display(); 100 | 101 | while (1) { 102 | operator_input(); 103 | 104 | if (DDS_IS_ENABLED) { 105 | lcd_disable_cursor(); 106 | 107 | dds_start(ui_state.frequency); 108 | 109 | lcd_enable_cursor(); 110 | DDS_DISABLE; 111 | } 112 | 113 | // implement sleep mode here to save power 114 | _delay_ms(100); 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /src/crc8.c: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------- 2 | * 3 | * crHARPER.com 4 | * 5 | *--------------------------------------------------------------------------- 6 | * 7 | * File: crc8.c 8 | * Author: crHARPER 9 | * $Revision: $ 10 | * $Date: 17 Apr, 2017$ 11 | * 12 | * Description: 13 | * Dallas Semiconductor's 8 bit CRC 14 | * 15 | * 16 | *--------------------------------------------------------------------------- 17 | */ 18 | #include 19 | 20 | /*--------------------------------------------------------------------------- 21 | * This table comes from Dallas sample code where it is freely reusable, 22 | * though Copyright (C) 2000 Dallas Semiconductor Corporation 23 | * 24 | * But here we are storing it in ROM so that the table does not have 25 | * to be regenerated in RAM. 26 | * 27 | *--------------------------------------------------------------------------- 28 | */ 29 | const uint8_t crc8table[] PROGMEM = { 30 | 0x00, 0x5e, 0xbc, 0xe2, 0x61, 0x3f, 0xdd, 0x83, 31 | 0xc2, 0x9c, 0x7e, 0x20, 0xa3, 0xfd, 0x1f, 0x41, 32 | 0x9d, 0xc3, 0x21, 0x7f, 0xfc, 0xa2, 0x40, 0x1e, 33 | 0x5f, 0x01, 0xe3, 0xbd, 0x3e, 0x60, 0x82, 0xdc, 34 | 0x23, 0x7d, 0x9f, 0xc1, 0x42, 0x1c, 0xfe, 0xa0, 35 | 0xe1, 0xbf, 0x5d, 0x03, 0x80, 0xde, 0x3c, 0x62, 36 | 0xbe, 0xe0, 0x02, 0x5c, 0xdf, 0x81, 0x63, 0x3d, 37 | 0x7c, 0x22, 0xc0, 0x9e, 0x1d, 0x43, 0xa1, 0xff, 38 | 0x46, 0x18, 0xfa, 0xa4, 0x27, 0x79, 0x9b, 0xc5, 39 | 0x84, 0xda, 0x38, 0x66, 0xe5, 0xbb, 0x59, 0x07, 40 | 0xdb, 0x85, 0x67, 0x39, 0xba, 0xe4, 0x06, 0x58, 41 | 0x19, 0x47, 0xa5, 0xfb, 0x78, 0x26, 0xc4, 0x9a, 42 | 0x65, 0x3b, 0xd9, 0x87, 0x04, 0x5a, 0xb8, 0xe6, 43 | 0xa7, 0xf9, 0x1b, 0x45, 0xc6, 0x98, 0x7a, 0x24, 44 | 0xf8, 0xa6, 0x44, 0x1a, 0x99, 0xc7, 0x25, 0x7b, 45 | 0x3a, 0x64, 0x86, 0xd8, 0x5b, 0x05, 0xe7, 0xb9, 46 | 0x8c, 0xd2, 0x30, 0x6e, 0xed, 0xb3, 0x51, 0x0f, 47 | 0x4e, 0x10, 0xf2, 0xac, 0x2f, 0x71, 0x93, 0xcd, 48 | 0x11, 0x4f, 0xad, 0xf3, 0x70, 0x2e, 0xcc, 0x92, 49 | 0xd3, 0x8d, 0x6f, 0x31, 0xb2, 0xec, 0x0e, 0x50, 50 | 0xaf, 0xf1, 0x13, 0x4d, 0xce, 0x90, 0x72, 0x2c, 51 | 0x6d, 0x33, 0xd1, 0x8f, 0x0c, 0x52, 0xb0, 0xee, 52 | 0x32, 0x6c, 0x8e, 0xd0, 0x53, 0x0d, 0xef, 0xb1, 53 | 0xf0, 0xae, 0x4c, 0x12, 0x91, 0xcf, 0x2d, 0x73, 54 | 0xca, 0x94, 0x76, 0x28, 0xab, 0xf5, 0x17, 0x49, 55 | 0x08, 0x56, 0xb4, 0xea, 0x69, 0x37, 0xd5, 0x8b, 56 | 0x57, 0x09, 0xeb, 0xb5, 0x36, 0x68, 0x8a, 0xd4, 57 | 0x95, 0xcb, 0x29, 0x77, 0xf4, 0xaa, 0x48, 0x16, 58 | 0xe9, 0xb7, 0x55, 0x0b, 0x88, 0xd6, 0x34, 0x6a, 59 | 0x2b, 0x75, 0x97, 0xc9, 0x4a, 0x14, 0xf6, 0xa8, 60 | 0x74, 0x2a, 0xc8, 0x96, 0x15, 0x4b, 0xa9, 0xf7, 61 | 0xb6, 0xe8, 0x0a, 0x54, 0xd7, 0x89, 0x6b, 0x35, 62 | }; 63 | 64 | 65 | /*--------------------------------------------------------------------------- 66 | * Dallas Semiconductor 8 bit CRC. 67 | * 68 | * uses the avr-gcc macro 'pgm_read_byte' to access ROM data 69 | *--------------------------------------------------------------------------- 70 | */ 71 | uint8_t crc8(uint8_t* addr, uint8_t len){ 72 | 73 | uint8_t crc = 0; 74 | 75 | for (uint8_t i = 0; i < len; i++) 76 | crc = pgm_read_byte(&crc8table[crc ^ addr[i] ]); 77 | 78 | return crc; 79 | } 80 | 81 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | #### Project configuration options #### 2 | 3 | # Name of target controller 4 | MCU = atmega328p 5 | 6 | # Project name 7 | PROJECTNAME = fg100alt 8 | 9 | # MCU Clock frequency 10 | CLK_FREQ = 30000000UL 11 | #CLK_FREQ = 20000000UL 12 | 13 | # DAC step constant 14 | DDS_STEP_CONSTANT = 5.0331648 15 | #DDS_STEP_CONSTANT = 7.5497472 16 | 17 | # Source files 18 | SRC = config.c crc8.c lcd.c ui.c dds.c dds.S main.c 19 | 20 | # Additional include paths 21 | INCLUDES = 22 | 23 | # Libraries to link in 24 | LIBS = 25 | 26 | # Optimization 27 | # use s (size opt), 1, 2, 3 or 0 (off) 28 | OPTIMIZE = 1 29 | 30 | # AVR Dude programmer 31 | AVRDUDE_PROGRAMMER = usbtiny 32 | 33 | #### End project configuration #### 34 | 35 | #### Firmware options configuration options #### 36 | 37 | # When incrementing (and decrementing) the value under the cursor, if 38 | # the value rolls over increment or decrement the adjacent value also. 39 | ROLL_OVER_ADJACENT = 1 40 | 41 | #### End firmware options configuration #### 42 | 43 | #### Flags 44 | 45 | DEFINES = -DF_CPU=$(CLK_FREQ) -DDDS_STEP_CONSTANT=$(DDS_STEP_CONSTANT) \ 46 | -DROLL_OVER_ADJACENT=$(ROLL_OVER_ADJACENT) 47 | 48 | # Compiler 49 | override CFLAGS = -I. $(INCLUDES) -g -O$(OPTIMIZE) -mmcu=$(MCU) $(DEFINES) \ 50 | -Wall -Werror -Wl,-section-start=.WaveBuffer=0x00800300 \ 51 | -pedantic -pedantic-errors -std=gnu99 \ 52 | -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -ffunction-sections 53 | 54 | 55 | # Assembler 56 | override ASMFLAGS = -I. $(INCLUDES) -mmcu=$(MCU) $(DEFINES) 57 | 58 | # Linker 59 | override LDFLAGS = -Wl,-Map,$(TRG).map $(CFLAGS) 60 | 61 | #### Executables 62 | 63 | CC = avr-gcc 64 | OBJCOPY = avr-objcopy 65 | OBJDUMP = avr-objdump 66 | SIZE = avr-size 67 | AVRDUDE = avrdude 68 | REMOVE = rm -f 69 | 70 | 71 | #### Target Names 72 | 73 | TRG = $(PROJECTNAME).out 74 | DUMPTRG = $(PROJECTNAME).s 75 | 76 | HEXROMTRG = $(PROJECTNAME).hex 77 | HEXTRG = $(HEXROMTRG) $(PROJECTNAME).ee.hex 78 | GDBINITFILE = gdbinit-$(PROJECTNAME) 79 | 80 | # Filter files by type 81 | CFILES = $(filter %.c, $(SRC)) 82 | ASMFILES = $(filter %.S, $(SRC)) 83 | 84 | # Generate list of object files 85 | OBJS = $(CFILES:.c=.c.o) $(ASMFILES:.S=.S.o) 86 | 87 | # Define .lst files 88 | LST = $(filter %.lst, $(OBJS:.o=.lst)) 89 | 90 | 91 | # Build all 92 | all: $(TRG) 93 | 94 | stats: $(TRG) 95 | $(OBJDUMP) -h $(TRG) 96 | $(SIZE) $(TRG) 97 | 98 | hex: $(HEXTRG) 99 | 100 | upload: hex 101 | $(AVRDUDE) -c $(AVRDUDE_PROGRAMMER) -p $(MCU) -U flash:w:$(HEXROMTRG) 102 | 103 | fuses: 104 | $(AVRDUDE) -c $(AVRDUDE_PROGRAMMER) -p $(MCU) -U lfuse:w:0xf7:m -U hfuse:w:0xd9:m 105 | 106 | # to use internal osc. for programing 107 | # otherwise an external xtal is required 108 | default: 109 | $(AVRDUDE) -c $(AVRDUDE_PROGRAMMER) -p $(MCU) -U lfuse:w:0x62:m -U hfuse:w:0xd9:m 110 | 111 | program: default upload fuses 112 | 113 | # Linking 114 | $(TRG): $(OBJS) 115 | $(CC) $(CFLAGS) $(LDFLAGS) -o $(TRG) $(OBJS) 116 | 117 | # Generate object files 118 | %.c.o: src/%.c 119 | $(CC) $(CFLAGS) -c $< -o $@ 120 | 121 | %.S.o: src/%.S 122 | $(CC) $(ASMFLAGS) -c $< -o $@ 123 | 124 | # Generate hex 125 | %.hex: %.out 126 | $(OBJCOPY) -j .text -j .data -O ihex $< $@ 127 | 128 | %.ee.hex: %.out 129 | $(OBJCOPY) -j .eeprom --change-section-lma .eeprom=0 -O ihex $< $@ 130 | 131 | # GDB Init file 132 | gdbinit: $(GDBINITFILE) 133 | @echo "file $(TRG)" > $(GDBINITFILE) 134 | @echo "target remote localhost:1212" >> $(GDBINITFILE) 135 | @echo "load" >> $(GDBINITFILE) 136 | @echo "break main" >> $(GDBINITFILE) 137 | @echo "continue" >> $(GDBINITFILE) 138 | @echo 139 | @echo "Use 'avr-gdb -x $(GDBINITFILE)'" 140 | 141 | clean: 142 | $(REMOVE) $(TRG) $(TRG).map 143 | $(REMOVE) $(OBJS) 144 | $(REMOVE) $(GDBINITFILE) 145 | $(REMOVE) *.hex 146 | -------------------------------------------------------------------------------- /src/lcd.c: -------------------------------------------------------------------------------- 1 | /* 2 | * lcd.c 3 | * 4 | * Based on code by aostanin - https://github.com/aostanin/avr-hd44780 5 | */ 6 | 7 | #include 8 | #include 9 | #include 10 | 11 | #include "lcd.h" 12 | 13 | #define BUFFER_SIZE 17 14 | 15 | static uint8_t lcd_displayparams; 16 | static char lcd_buffer[BUFFER_SIZE]; 17 | 18 | void lcd_send(uint8_t value, uint8_t mode); 19 | void lcd_write_nibble(uint8_t nibble); 20 | 21 | void lcd_command(uint8_t command) { 22 | lcd_send(command, 0); 23 | } 24 | 25 | void lcd_write(uint8_t value) { 26 | lcd_send(value, 1); 27 | } 28 | 29 | void lcd_send(uint8_t value, uint8_t mode) { 30 | if (mode) { 31 | LCD_CTRL_PORT = LCD_CTRL_PORT | (1 << LCD_RS); 32 | } else { 33 | LCD_CTRL_PORT = LCD_CTRL_PORT & ~(1 << LCD_RS); 34 | } 35 | lcd_write_nibble(value >> 4); 36 | lcd_write_nibble(value); 37 | } 38 | 39 | void lcd_write_nibble(uint8_t nibble) { 40 | // Bits need to be inverted as the data lines are in reverse order 41 | nibble = ( 42 | (nibble & 1) << 3 | (nibble & 2) << 1 | 43 | (nibble & 4) >> 1 | (nibble & 8) >> 3 44 | ); 45 | LCD_DATA_PORT = (LCD_DATA_PORT & 0xFF & ~(0x0F << LCD_LOW_BYTE)) | ((nibble & 0x0F) << LCD_LOW_BYTE); 46 | 47 | LCD_CTRL_PORT = LCD_CTRL_PORT & ~(1 << LCD_EN); 48 | LCD_CTRL_PORT = LCD_CTRL_PORT | (1 << LCD_EN); 49 | LCD_CTRL_PORT = LCD_CTRL_PORT & ~(1 << LCD_EN); 50 | _delay_ms(0.04); 51 | } 52 | 53 | void lcd_init(void) { 54 | // Configure control pins 55 | LCD_CTRL_DDR = LCD_CTRL_DDR 56 | | (1 << LCD_RS) 57 | | (1 << LCD_EN); 58 | 59 | // Configure data pins 60 | LCD_DATA_DDR = LCD_DATA_DDR | (0x0F << LCD_LOW_BYTE); 61 | 62 | // Wait for LCD 63 | _delay_ms(15); 64 | 65 | LCD_CTRL_PORT = LCD_CTRL_PORT 66 | & ~(1 << LCD_EN) 67 | & ~(1 << LCD_RS); 68 | 69 | _delay_ms(4.1); 70 | lcd_write_nibble(0x03); 71 | _delay_ms(4.1); 72 | lcd_write_nibble(0x03); 73 | _delay_ms(4.1); 74 | lcd_write_nibble(0x03); 75 | _delay_ms(4.1); 76 | lcd_write_nibble(0x02); // Set 4 bit 77 | 78 | lcd_command(LCD_FUNCTIONSET | LCD_4BITMODE | LCD_2LINE | LCD_5x8DOTS); 79 | 80 | lcd_displayparams = LCD_CURSOROFF | LCD_BLINKOFF | LCD_DISPLAYON; 81 | lcd_command(LCD_DISPLAYCONTROL | lcd_displayparams); 82 | } 83 | 84 | void lcd_on(void) { 85 | lcd_displayparams |= LCD_DISPLAYON; 86 | lcd_command(LCD_DISPLAYCONTROL | lcd_displayparams); 87 | } 88 | 89 | void lcd_off(void) { 90 | lcd_displayparams &= ~LCD_DISPLAYON; 91 | lcd_command(LCD_DISPLAYCONTROL | lcd_displayparams); 92 | } 93 | 94 | void lcd_clear(void) { 95 | lcd_command(LCD_CLEARDISPLAY); 96 | _delay_ms(2); 97 | } 98 | 99 | void lcd_return_home(void) { 100 | lcd_command(LCD_RETURNHOME); 101 | _delay_ms(2); 102 | } 103 | 104 | void lcd_enable_cursor(void) { 105 | lcd_displayparams |= LCD_CURSORON | LCD_BLINKON; 106 | lcd_command(LCD_DISPLAYCONTROL | lcd_displayparams); 107 | } 108 | 109 | void lcd_disable_cursor(void) { 110 | lcd_displayparams &= ~(LCD_CURSORON | LCD_BLINKON); 111 | lcd_command(LCD_DISPLAYCONTROL | lcd_displayparams); 112 | } 113 | 114 | void lcd_scroll_left(void) { 115 | lcd_command(LCD_CURSORSHIFT | LCD_DISPLAYMOVE | LCD_MOVELEFT); 116 | } 117 | 118 | void lcd_scroll_right(void) { 119 | lcd_command(LCD_CURSORSHIFT | LCD_DISPLAYMOVE | LCD_MOVERIGHT); 120 | } 121 | 122 | void lcd_set_left_to_right(void) { 123 | lcd_displayparams |= LCD_ENTRYLEFT; 124 | lcd_command(LCD_ENTRYMODESET | lcd_displayparams); 125 | } 126 | 127 | void lcd_set_right_to_left(void) { 128 | lcd_displayparams &= ~LCD_ENTRYLEFT; 129 | lcd_command(LCD_ENTRYMODESET | lcd_displayparams); 130 | } 131 | 132 | void lcd_enable_autoscroll(void) { 133 | lcd_displayparams |= LCD_ENTRYSHIFTINCREMENT; 134 | lcd_command(LCD_ENTRYMODESET | lcd_displayparams); 135 | } 136 | 137 | void lcd_disable_autoscroll(void) { 138 | lcd_displayparams &= ~LCD_ENTRYSHIFTINCREMENT; 139 | lcd_command(LCD_ENTRYMODESET | lcd_displayparams); 140 | } 141 | 142 | void lcd_create_char(uint8_t location, uint8_t *charmap) { 143 | int i; 144 | lcd_command(LCD_SETCGRAMADDR | ((location & 0x7) << 3)); 145 | for (i = 0; i < 8; i++) { 146 | lcd_write(charmap[i]); 147 | } 148 | } 149 | 150 | void lcd_set_cursor(uint8_t col, uint8_t row) { 151 | static uint8_t offsets[] = { 0x00, 0x40, 0x14, 0x54 }; 152 | 153 | if (row > 1) { 154 | row = 1; 155 | } 156 | 157 | lcd_command(LCD_SETDDRAMADDR | (col + offsets[row])); 158 | } 159 | 160 | void lcd_puts(const char* string) { 161 | const char* it; 162 | for (it = string; *it; it++) { 163 | lcd_write(*it); 164 | } 165 | } 166 | 167 | void lcd_printf(const char* format, ...) { 168 | va_list args; 169 | 170 | va_start(args, format); 171 | vsnprintf(lcd_buffer, BUFFER_SIZE, format, args); 172 | va_end(args); 173 | 174 | lcd_puts(lcd_buffer); 175 | } 176 | -------------------------------------------------------------------------------- /src/ui.c: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | * ui.c 3 | * 4 | * Created: 25 Oct 2015 5 | * Author: tims 6 | * Revised: 17 Apr, 2017 7 | * By: crHARPER 8 | * 9 | *----------------------------------------------------------------------------- 10 | */ 11 | 12 | #include "ui.h" 13 | #include "lcd.h" 14 | #include "dds.h" 15 | #include "config.h" 16 | 17 | const uint32_t powersOfTen[] = { 1, 10, 100, 1000, 10000, 100000 }; 18 | 19 | extern Config_Eeprom_Type ui_state; 20 | 21 | //----------------------------------------------------------------------------- 22 | void ui_show_splash(void) { 23 | lcd_clear(); 24 | lcd_printf("SH-100 V%02u.%02u", VERSION_MAJOR, VERSION_MINOR); 25 | lcd_set_cursor(0, 1); 26 | lcd_puts("SavageT/crHARPER"); 27 | } 28 | 29 | 30 | //----------------------------------------------------------------------------- 31 | void ui_redraw_display(void) { 32 | lcd_clear(); 33 | lcd_printf("Wave: %s", dds_wave_names[ui_state.waveform]); 34 | lcd_set_cursor(0, 1); 35 | lcd_printf("Freq: %06lu Hz", ui_state.frequency); 36 | 37 | lcd_set_cursor(11 - ui_state.cursor, 1); 38 | lcd_enable_cursor(); 39 | } 40 | 41 | 42 | //----------------------------------------------------------------------------- 43 | // returns digit under cursor: 0-9 44 | uint8_t ui_get_digit(uint8_t cursor, uint32_t value) { 45 | uint32_t a, b; 46 | 47 | a = value / powersOfTen[cursor]; 48 | b = a % 10; 49 | return b; 50 | } 51 | 52 | #if ROLL_OVER_ADJACENT != 1 53 | //----------------------------------------------------------------------------- 54 | // returns value less weighted value under cursor 55 | uint32_t ui_less_digit(uint8_t cursor, uint32_t value) { 56 | uint32_t a, b, c; 57 | 58 | a = value % powersOfTen[cursor]; 59 | b = value / powersOfTen[cursor + 1 ]; 60 | b *= powersOfTen[cursor + 1]; 61 | c = a + b; 62 | return c; 63 | } 64 | #endif 65 | 66 | 67 | //----------------------------------------------------------------------------- 68 | void ui_handle_event(uint8_t buttons) { 69 | static uint8_t hold = 0; 70 | static uint8_t previous = 0; 71 | 72 | // allow for extended button presses 73 | // use a counter for each button's extended hold function 74 | static uint8_t cursor_hold = HOLD_TIME; 75 | 76 | uint32_t frequency; 77 | uint8_t digit; 78 | 79 | if(!hold) { 80 | // normal button functions 81 | switch(buttons) { 82 | case MODE_BUTTON: 83 | ui_state.waveform = (ui_state.waveform + 1) % 5; 84 | ui_redraw_display(); 85 | hold = 1; 86 | break; 87 | 88 | case CURSOR_BUTTON: 89 | ui_state.cursor = (ui_state.cursor + 1) % 6; 90 | ui_redraw_display(); 91 | hold = 1; 92 | break; 93 | 94 | case PLUS_BUTTON: 95 | digit = ui_get_digit(ui_state.cursor, ui_state.frequency); 96 | 97 | if (digit >= 9) { 98 | digit = 0; 99 | } else { 100 | digit++; 101 | } 102 | 103 | #if ROLL_OVER_ADJACENT == 1 104 | frequency = ui_state.frequency + powersOfTen[ui_state.cursor]; 105 | #else 106 | frequency = ui_less_digit(ui_state.cursor, ui_state.frequency); 107 | frequency += powersOfTen[ui_state.cursor] * digit; 108 | #endif 109 | 110 | if (frequency > DDS_MAX_FREQ) { 111 | frequency = DDS_MIN_FREQ; 112 | } 113 | 114 | if (DDS_FREQ_IN_RANGE(frequency)) { 115 | ui_state.frequency = frequency; 116 | ui_redraw_display(); 117 | } 118 | 119 | hold = 1; 120 | break; 121 | 122 | case MINUS_BUTTON: 123 | digit = ui_get_digit(ui_state.cursor, ui_state.frequency); 124 | 125 | if (digit) { 126 | digit--; 127 | } else { 128 | digit = 9; 129 | } 130 | 131 | #if ROLL_OVER_ADJACENT == 1 132 | frequency = ui_state.frequency - powersOfTen[ui_state.cursor]; 133 | #else 134 | frequency = ui_less_digit(ui_state.cursor, ui_state.frequency); 135 | frequency += powersOfTen[ui_state.cursor] * digit; 136 | #endif 137 | 138 | // Allow freq. of 0 Hz temporarily 139 | // to simplify operator interaction 140 | // when setting frequency. Will get corrected below. 141 | if (DDS_FREQ_IN_RANGE(frequency)) { 142 | ui_state.frequency = frequency; 143 | ui_redraw_display(); 144 | } 145 | 146 | hold = 1; 147 | break; 148 | 149 | case RUN_STOP_BUTTON: 150 | dds_select_wave(ui_state.waveform); 151 | // Don't enable DSS until button is released 152 | hold = 1; 153 | break; 154 | 155 | } 156 | } else { 157 | // all buttons released 158 | if (!buttons) { 159 | hold = 0; // can allow next button input 160 | if( previous == RUN_STOP_BUTTON){ 161 | // because dds.S will return before button is released 162 | // we delay the start of the DDS until now 163 | 164 | // do not enable for 0 Hz (but you could) 165 | // square wave output would be held high 166 | // all other waveforms output 0V 167 | if( ui_state.frequency ) 168 | DDS_ENABLE; 169 | 170 | // EEPROM is only written here to minimized writes 171 | config_write(); // save last valid state to EEPROM 172 | } 173 | 174 | // for extended button presses 175 | // reset hold down counters here 176 | // since all buttons a released 177 | cursor_hold = HOLD_TIME; 178 | } else { 179 | // if a button is held down for an extended period 180 | // apply special functions here 181 | 182 | // clear frequency value when cursor button is held down 183 | if (buttons == CURSOR_BUTTON && previous == CURSOR_BUTTON) { 184 | if (cursor_hold) { 185 | if (!--cursor_hold) { 186 | ui_state.frequency = 0; 187 | ui_redraw_display(); 188 | } 189 | } 190 | } 191 | // end of extended cursor button function 192 | 193 | // additional extended button functions here 194 | } 195 | } 196 | 197 | previous = buttons; 198 | } 199 | 200 | -------------------------------------------------------------------------------- /src/dds.c: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | * dds.c 3 | * 4 | * Created: 23 Oct 2015 5 | * Author: tims 6 | * Revised: 17 Apr, 2017 7 | * By: crHARPER 8 | * 9 | *----------------------------------------------------------------------------- 10 | */ 11 | #include 12 | #include "dds.h" 13 | 14 | // Buffer used to store waveform 15 | uint8_t wave_buffer[256] __attribute__ ((section (".WaveBuffer"))); 16 | 17 | extern void ddsloop(uint32_t step, uint8_t* waveform); // dds.S 18 | 19 | // DDS wave names 20 | const char* dds_wave_names[] = { 21 | "Sine ", 22 | "Triangle ", 23 | "Sawtooth ", 24 | "ReSawtooth", 25 | "Square ", 26 | }; 27 | 28 | // DDS wave tables 29 | const uint8_t wave_table[][256] PROGMEM = { 30 | // Sine Wave 31 | { 32 | 0x80,0x83,0x86,0x89,0x8C,0x90,0x93,0x96,0x99,0x9C,0x9F,0xA2,0xA5,0xA8,0xAB,0xAE, 33 | 0xB1,0xB3,0xB6,0xB9,0xBC,0xBF,0xC1,0xC4,0xC7,0xC9,0xCC,0xCE,0xD1,0xD3,0xD5,0xD8, 34 | 0xDA,0xDC,0xDE,0xE0,0xE2,0xE4,0xE6,0xE8,0xEA,0xEB,0xED,0xEF,0xF0,0xF1,0xF3,0xF4, 35 | 0xF5,0xF6,0xF8,0xF9,0xFA,0xFA,0xFB,0xFC,0xFD,0xFD,0xFE,0xFE,0xFE,0xFF,0xFF,0xFF, 36 | 0xFF,0xFF,0xFF,0xFF,0xFE,0xFE,0xFE,0xFD,0xFD,0xFC,0xFB,0xFA,0xFA,0xF9,0xF8,0xF6, 37 | 0xF5,0xF4,0xF3,0xF1,0xF0,0xEF,0xED,0xEB,0xEA,0xE8,0xE6,0xE4,0xE2,0xE0,0xDE,0xDC, 38 | 0xDA,0xD8,0xD5,0xD3,0xD1,0xCE,0xCC,0xC9,0xC7,0xC4,0xC1,0xBF,0xBC,0xB9,0xB6,0xB3, 39 | 0xB1,0xAE,0xAB,0xA8,0xA5,0xA2,0x9F,0x9C,0x99,0x96,0x93,0x90,0x8C,0x89,0x86,0x83, 40 | 0x80,0x7E,0x7B,0x78,0x75,0x71,0x6E,0x6B,0x68,0x65,0x62,0x5F,0x5C,0x59,0x56,0x53, 41 | 0x50,0x4E,0x4B,0x48,0x45,0x42,0x40,0x3D,0x3A,0x38,0x35,0x33,0x30,0x2E,0x2C,0x29, 42 | 0x27,0x25,0x23,0x21,0x1F,0x1D,0x1B,0x19,0x17,0x16,0x14,0x12,0x11,0x10,0x0E,0x0D, 43 | 0x0C,0x0B,0x09,0x08,0x07,0x07,0x06,0x05,0x04,0x04,0x03,0x03,0x03,0x02,0x02,0x02, 44 | 0x02,0x02,0x02,0x02,0x03,0x03,0x03,0x04,0x04,0x05,0x06,0x07,0x07,0x08,0x09,0x0B, 45 | 0x0C,0x0D,0x0E,0x10,0x11,0x12,0x14,0x16,0x17,0x19,0x1B,0x1D,0x1F,0x21,0x23,0x25, 46 | 0x27,0x29,0x2C,0x2E,0x30,0x33,0x35,0x38,0x3A,0x3D,0x40,0x42,0x45,0x48,0x4B,0x4E, 47 | 0x50,0x53,0x56,0x59,0x5C,0x5F,0x62,0x65,0x68,0x6B,0x6E,0x71,0x75,0x78,0x7B,0x7E, 48 | }, 49 | // Triangle Wave 50 | { 51 | 0x80,0x82,0x84,0x86,0x88,0x8A,0x8C,0x8E,0x90,0x92,0x94,0x96,0x98,0x9A,0x9C,0x9E, 52 | 0xA0,0xA2,0xA4,0xA6,0xA8,0xAA,0xAC,0xAE,0xB0,0xB2,0xB4,0xB6,0xB8,0xBA,0xBC,0xBE, 53 | 0xC0,0xC1,0xC3,0xC5,0xC7,0xC9,0xCB,0xCD,0xCF,0xD1,0xD3,0xD5,0xD7,0xD9,0xDB,0xDD, 54 | 0xDF,0xE1,0xE3,0xE5,0xE7,0xE9,0xEB,0xED,0xEF,0xF1,0xF3,0xF5,0xF7,0xF9,0xFB,0xFD, 55 | 0xFF,0xFD,0xFB,0xF9,0xF7,0xF5,0xF3,0xF1,0xEF,0xED,0xEB,0xE9,0xE7,0xE5,0xE3,0xE1, 56 | 0xDF,0xDD,0xDB,0xD9,0xD7,0xD5,0xD3,0xD1,0xCF,0xCD,0xCB,0xC9,0xC7,0xC5,0xC3,0xC1, 57 | 0xC0,0xBE,0xBC,0xBA,0xB8,0xB6,0xB4,0xB2,0xB0,0xAE,0xAC,0xAA,0xA8,0xA6,0xA4,0xA2, 58 | 0xA0,0x9E,0x9C,0x9A,0x98,0x96,0x94,0x92,0x90,0x8E,0x8C,0x8A,0x88,0x86,0x84,0x82, 59 | 0x80,0x7F,0x7D,0x7B,0x79,0x77,0x75,0x73,0x71,0x6F,0x6D,0x6B,0x69,0x67,0x65,0x63, 60 | 0x61,0x5F,0x5D,0x5B,0x59,0x57,0x55,0x53,0x51,0x4F,0x4D,0x4B,0x49,0x47,0x45,0x43, 61 | 0x41,0x40,0x3E,0x3C,0x3A,0x38,0x36,0x34,0x32,0x30,0x2E,0x2C,0x2A,0x28,0x26,0x24, 62 | 0x22,0x20,0x1E,0x1C,0x1A,0x18,0x16,0x14,0x12,0x10,0x0E,0x0C,0x0A,0x08,0x06,0x04, 63 | 0x02,0x04,0x06,0x08,0x0A,0x0C,0x0E,0x10,0x12,0x14,0x16,0x18,0x1A,0x1C,0x1E,0x20, 64 | 0x22,0x24,0x26,0x28,0x2A,0x2C,0x2E,0x30,0x32,0x34,0x36,0x38,0x3A,0x3C,0x3E,0x40, 65 | 0x41,0x43,0x45,0x47,0x49,0x4B,0x4D,0x4F,0x51,0x53,0x55,0x57,0x59,0x5B,0x5D,0x5F, 66 | 0x61,0x63,0x65,0x67,0x69,0x6B,0x6D,0x6F,0x71,0x73,0x75,0x77,0x79,0x7B,0x7D,0x7F, 67 | }, 68 | // Sawtooth Wave 69 | { 70 | 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 71 | 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 72 | 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, 73 | 0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, 74 | 0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F, 75 | 0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F, 76 | 0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F, 77 | 0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F, 78 | 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, 79 | 0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, 80 | 0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, 81 | 0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, 82 | 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, 83 | 0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, 84 | 0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, 85 | 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF, 86 | }, 87 | // Reverse Sawtooth Wave 88 | { 89 | 0xFF,0xFE,0xFD,0xFC,0xFB,0xFA,0xF9,0xF8,0xF7,0xF6,0xF5,0xF4,0xF3,0xF2,0xF1,0xF0, 90 | 0xEF,0xEE,0xED,0xEC,0xEB,0xEA,0xE9,0xE8,0xE7,0xE6,0xE5,0xE4,0xE3,0xE2,0xE1,0xE0, 91 | 0xDF,0xDE,0xDD,0xDC,0xDB,0xDA,0xD9,0xD8,0xD7,0xD6,0xD5,0xD4,0xD3,0xD2,0xD1,0xD0, 92 | 0xCF,0xCE,0xCD,0xCC,0xCB,0xCA,0xC9,0xC8,0xC7,0xC6,0xC5,0xC4,0xC3,0xC2,0xC1,0xC0, 93 | 0xBF,0xBE,0xBD,0xBC,0xBB,0xBA,0xB9,0xB8,0xB7,0xB6,0xB5,0xB4,0xB3,0xB2,0xB1,0xB0, 94 | 0xAF,0xAE,0xAD,0xAC,0xAB,0xAA,0xA9,0xA8,0xA7,0xA6,0xA5,0xA4,0xA3,0xA2,0xA1,0xA0, 95 | 0x9F,0x9E,0x9D,0x9C,0x9B,0x9A,0x99,0x98,0x97,0x96,0x95,0x94,0x93,0x92,0x91,0x90, 96 | 0x8F,0x8E,0x8D,0x8C,0x8B,0x8A,0x89,0x88,0x87,0x86,0x85,0x84,0x83,0x82,0x81,0x80, 97 | 0x7F,0x7E,0x7D,0x7C,0x7B,0x7A,0x79,0x78,0x77,0x76,0x75,0x74,0x73,0x72,0x71,0x70, 98 | 0x6F,0x6E,0x6D,0x6C,0x6B,0x6A,0x69,0x68,0x67,0x66,0x65,0x64,0x63,0x62,0x61,0x60, 99 | 0x5F,0x5E,0x5D,0x5C,0x5B,0x5A,0x59,0x58,0x57,0x56,0x55,0x54,0x53,0x52,0x51,0x50, 100 | 0x4F,0x4E,0x4D,0x4C,0x4B,0x4A,0x49,0x48,0x47,0x46,0x45,0x44,0x43,0x42,0x41,0x40, 101 | 0x3F,0x3E,0x3D,0x3C,0x3B,0x3A,0x39,0x38,0x37,0x36,0x35,0x34,0x33,0x32,0x31,0x30, 102 | 0x2F,0x2E,0x2D,0x2C,0x2B,0x2A,0x29,0x28,0x27,0x26,0x25,0x24,0x23,0x22,0x21,0x20, 103 | 0x1F,0x1E,0x1D,0x1C,0x1B,0x1A,0x19,0x18,0x17,0x16,0x15,0x14,0x13,0x12,0x11,0x10, 104 | 0x0F,0x0E,0x0D,0x0C,0x0B,0x0A,0x09,0x08,0x07,0x06,0x05,0x04,0x03,0x02,0x01,0x00, 105 | }, 106 | // Square Wave 107 | { 108 | 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 109 | 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 110 | 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 111 | 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 112 | 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 113 | 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 114 | 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 115 | 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 116 | 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, 117 | 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, 118 | 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, 119 | 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, 120 | 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, 121 | 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, 122 | 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, 123 | 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, 124 | } 125 | }; 126 | 127 | //----------------------------------------------------------------------------- 128 | void dds_init(void) { 129 | // Set DAC port to output 130 | // try setting offset value before setting port as output 131 | DDS_PORT = 0x7F; // Set output to the middle (is offset to 0) 132 | 133 | DDS_DDR = 0xFF; // Enable all output pins on PORTD 134 | DDS_DISABLE; 135 | } 136 | 137 | //----------------------------------------------------------------------------- 138 | void dds_select_wave(uint8_t wave_idx) { 139 | memcpy_P(wave_buffer, wave_table[wave_idx], 256); 140 | } 141 | 142 | //----------------------------------------------------------------------------- 143 | // Enters and does not return from ddsloop until DDS is disabled/stopped 144 | void dds_start(uint32_t frequency) { 145 | uint32_t step = (frequency * DDS_STEP_CONSTANT) + 0.5; 146 | //DDS_ENABLE; 147 | ddsloop(step, wave_buffer); // dds.S 148 | DDS_DISABLE; 149 | DDS_PORT = 0x7F; 150 | } 151 | 152 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | 294 | Copyright (C) 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | , 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. -------------------------------------------------------------------------------- /docs/pinout.diy: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 3 5 | 28 6 | 0 7 | 8 | New Project 9 | Branislav Stojkovic 10 | 11 | 29.0 12 | cm 13 | 14 | 15 | 21.0 16 | cm 17 | 18 | 19 | 0.1 20 | in 21 | 22 | 23 | 24 | IC1 25 | 80 26 | 27 | DEFAULT 28 | _28 29 | 30 | 0.1 31 | in 32 | 33 | 34 | 0.3 35 | in 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | VALUE 68 | 69 | 128 70 | 128 71 | 128 72 | 255 73 | 74 | 75 | 89 76 | 89 77 | 89 78 | 255 79 | 80 | 81 | 255 82 | 255 83 | 255 84 | 255 85 | 86 | 87 | 89 88 | 89 89 | 89 90 | 255 91 | 92 | 93 | 94 | L1 95 | 96 | 28 - C5 NC 97 | 98 | 99 | 100 | posture 101 | 102 | 103 | 104 | superscript 105 | 106 | 107 | 108 | width 109 | 110 | 111 | 112 | size 113 | 14.0 114 | 115 | 116 | transform 117 | 118 | 119 | 120 | weight 121 | 122 | 123 | 124 | tracking 125 | 126 | 127 | 128 | family 129 | Tahoma 130 | 131 | 132 | 133 | 134 | 0 135 | 0 136 | 0 137 | 255 138 | 139 |
false
140 | LEFT 141 | CENTER 142 | DEFAULT 143 |
144 | 145 | L1 146 | 147 | 27 - C4 NC 148 | 149 | 150 | 151 | posture 152 | 153 | 154 | 155 | superscript 156 | 157 | 158 | 159 | width 160 | 161 | 162 | 163 | size 164 | 14.0 165 | 166 | 167 | transform 168 | 169 | 170 | 171 | weight 172 | 173 | 174 | 175 | tracking 176 | 177 | 178 | 179 | family 180 | Tahoma 181 | 182 | 183 | 184 | 185 | 0 186 | 0 187 | 0 188 | 255 189 | 190 |
false
191 | LEFT 192 | CENTER 193 | DEFAULT 194 |
195 | 196 | L1 197 | 198 | 26 - C3 Switch 5 (Run/Stop) 199 | 200 | 201 | 202 | posture 203 | 204 | 205 | 206 | superscript 207 | 208 | 209 | 210 | width 211 | 212 | 213 | 214 | size 215 | 14.0 216 | 217 | 218 | transform 219 | 220 | 221 | 222 | weight 223 | 224 | 225 | 226 | tracking 227 | 228 | 229 | 230 | family 231 | Tahoma 232 | 233 | 234 | 235 | 236 | 0 237 | 0 238 | 0 239 | 255 240 | 241 |
false
242 | LEFT 243 | CENTER 244 | DEFAULT 245 |
246 | 247 | L1 248 | 249 | 25 - C2 LCD RS 250 | 251 | 252 | 253 | posture 254 | 255 | 256 | 257 | superscript 258 | 259 | 260 | 261 | width 262 | 263 | 264 | 265 | size 266 | 14.0 267 | 268 | 269 | transform 270 | 271 | 272 | 273 | weight 274 | 275 | 276 | 277 | tracking 278 | 279 | 280 | 281 | family 282 | Tahoma 283 | 284 | 285 | 286 | 287 | 0 288 | 0 289 | 0 290 | 255 291 | 292 |
false
293 | LEFT 294 | CENTER 295 | DEFAULT 296 |
297 | 298 | L1 299 | 300 | 24 - C1 LCD Enable 301 | 302 | 303 | 304 | posture 305 | 306 | 307 | 308 | superscript 309 | 310 | 311 | 312 | width 313 | 314 | 315 | 316 | size 317 | 14.0 318 | 319 | 320 | transform 321 | 322 | 323 | 324 | weight 325 | 326 | 327 | 328 | tracking 329 | 330 | 331 | 332 | family 333 | Tahoma 334 | 335 | 336 | 337 | 338 | 0 339 | 0 340 | 0 341 | 255 342 | 343 |
false
344 | LEFT 345 | CENTER 346 | DEFAULT 347 |
348 | 349 | L1 350 | 351 | 23 - C0 ? (Via resistor to GND) 352 | 353 | 354 | 355 | posture 356 | 357 | 358 | 359 | superscript 360 | 361 | 362 | 363 | width 364 | 365 | 366 | 367 | size 368 | 14.0 369 | 370 | 371 | transform 372 | 373 | 374 | 375 | weight 376 | 377 | 378 | 379 | tracking 380 | 381 | 382 | 383 | family 384 | Tahoma 385 | 386 | 387 | 388 | 389 | 0 390 | 0 391 | 0 392 | 255 393 | 394 |
false
395 | LEFT 396 | CENTER 397 | DEFAULT 398 |
399 | 400 | L1 401 | 402 | 22 - GND 403 | 404 | 405 | 406 | posture 407 | 408 | 409 | 410 | superscript 411 | 412 | 413 | 414 | width 415 | 416 | 417 | 418 | size 419 | 14.0 420 | 421 | 422 | transform 423 | 424 | 425 | 426 | weight 427 | 428 | 429 | 430 | tracking 431 | 432 | 433 | 434 | family 435 | Tahoma 436 | 437 | 438 | 439 | 440 | 0 441 | 0 442 | 0 443 | 255 444 | 445 |
false
446 | LEFT 447 | CENTER 448 | DEFAULT 449 |
450 | 451 | L1 452 | 453 | 21 - ARef 454 | 455 | 456 | 457 | posture 458 | 459 | 460 | 461 | superscript 462 | 463 | 464 | 465 | width 466 | 467 | 468 | 469 | size 470 | 14.0 471 | 472 | 473 | transform 474 | 475 | 476 | 477 | weight 478 | 479 | 480 | 481 | tracking 482 | 483 | 484 | 485 | family 486 | Tahoma 487 | 488 | 489 | 490 | 491 | 0 492 | 0 493 | 0 494 | 255 495 | 496 |
false
497 | LEFT 498 | CENTER 499 | DEFAULT 500 |
501 | 502 | L1 503 | 504 | 20 - AVCC 505 | 506 | 507 | 508 | posture 509 | 510 | 511 | 512 | superscript 513 | 514 | 515 | 516 | width 517 | 518 | 519 | 520 | size 521 | 14.0 522 | 523 | 524 | transform 525 | 526 | 527 | 528 | weight 529 | 530 | 531 | 532 | tracking 533 | 534 | 535 | 536 | family 537 | Tahoma 538 | 539 | 540 | 541 | 542 | 0 543 | 0 544 | 0 545 | 255 546 | 547 |
false
548 | LEFT 549 | CENTER 550 | DEFAULT 551 |
552 | 553 | L1 554 | 555 | 19 - B5 LCD D4/Switch 4 (Mode) 556 | 557 | 558 | 559 | posture 560 | 561 | 562 | 563 | superscript 564 | 565 | 566 | 567 | width 568 | 569 | 570 | 571 | size 572 | 14.0 573 | 574 | 575 | transform 576 | 577 | 578 | 579 | weight 580 | 581 | 582 | 583 | tracking 584 | 585 | 586 | 587 | family 588 | Tahoma 589 | 590 | 591 | 592 | 593 | 0 594 | 0 595 | 0 596 | 255 597 | 598 |
false
599 | LEFT 600 | CENTER 601 | DEFAULT 602 |
603 | 604 | L1 605 | 606 | 18 - B4 LCD D5/Switch 3 (Cursor) 607 | 608 | 609 | 610 | posture 611 | 612 | 613 | 614 | superscript 615 | 616 | 617 | 618 | width 619 | 620 | 621 | 622 | size 623 | 14.0 624 | 625 | 626 | transform 627 | 628 | 629 | 630 | weight 631 | 632 | 633 | 634 | tracking 635 | 636 | 637 | 638 | family 639 | Tahoma 640 | 641 | 642 | 643 | 644 | 0 645 | 0 646 | 0 647 | 255 648 | 649 |
false
650 | LEFT 651 | CENTER 652 | DEFAULT 653 |
654 | 655 | L1 656 | 657 | 17 - B3 LCD D6/Switch 2 (-) 658 | 659 | 660 | 661 | posture 662 | 663 | 664 | 665 | superscript 666 | 667 | 668 | 669 | width 670 | 671 | 672 | 673 | size 674 | 14.0 675 | 676 | 677 | transform 678 | 679 | 680 | 681 | weight 682 | 683 | 684 | 685 | tracking 686 | 687 | 688 | 689 | family 690 | Tahoma 691 | 692 | 693 | 694 | 695 | 0 696 | 0 697 | 0 698 | 255 699 | 700 |
false
701 | LEFT 702 | CENTER 703 | DEFAULT 704 |
705 | 706 | L1 707 | 708 | 16 - B2 LCD D7/Switch 1 (+) 709 | 710 | 711 | 712 | posture 713 | 714 | 715 | 716 | superscript 717 | 718 | 719 | 720 | width 721 | 722 | 723 | 724 | size 725 | 14.0 726 | 727 | 728 | transform 729 | 730 | 731 | 732 | weight 733 | 734 | 735 | 736 | tracking 737 | 738 | 739 | 740 | family 741 | Tahoma 742 | 743 | 744 | 745 | 746 | 0 747 | 0 748 | 0 749 | 255 750 | 751 |
false
752 | LEFT 753 | CENTER 754 | DEFAULT 755 |
756 | 757 | L1 758 | 759 | 15 - B1 Switch 1-4 Strobe 760 | 761 | 762 | 763 | posture 764 | 765 | 766 | 767 | superscript 768 | 769 | 770 | 771 | width 772 | 773 | 774 | 775 | size 776 | 14.0 777 | 778 | 779 | transform 780 | 781 | 782 | 783 | weight 784 | 785 | 786 | 787 | tracking 788 | 789 | 790 | 791 | family 792 | Tahoma 793 | 794 | 795 | 796 | 797 | 0 798 | 0 799 | 0 800 | 255 801 | 802 |
false
803 | LEFT 804 | CENTER 805 | DEFAULT 806 |
807 | 808 | L1 809 | 810 | NC? - 14 811 | 812 | 813 | 814 | posture 815 | 816 | 817 | 818 | superscript 819 | 820 | 821 | 822 | width 823 | 824 | 825 | 826 | size 827 | 14.0 828 | 829 | 830 | transform 831 | 832 | 833 | 834 | weight 835 | 836 | 837 | 838 | tracking 839 | 840 | 841 | 842 | family 843 | Tahoma 844 | 845 | 846 | 847 | 848 | 0 849 | 0 850 | 0 851 | 255 852 | 853 |
false
854 | RIGHT 855 | CENTER 856 | DEFAULT 857 |
858 | 859 | L1 860 | 861 | DAC D7 - 13 862 | 863 | 864 | 865 | posture 866 | 867 | 868 | 869 | superscript 870 | 871 | 872 | 873 | width 874 | 875 | 876 | 877 | size 878 | 14.0 879 | 880 | 881 | transform 882 | 883 | 884 | 885 | weight 886 | 887 | 888 | 889 | tracking 890 | 891 | 892 | 893 | family 894 | Tahoma 895 | 896 | 897 | 898 | 899 | 0 900 | 0 901 | 0 902 | 255 903 | 904 |
false
905 | RIGHT 906 | CENTER 907 | DEFAULT 908 |
909 | 910 | L1 911 | 912 | DAC D6 - 12 913 | 914 | 915 | 916 | posture 917 | 918 | 919 | 920 | superscript 921 | 922 | 923 | 924 | width 925 | 926 | 927 | 928 | size 929 | 14.0 930 | 931 | 932 | transform 933 | 934 | 935 | 936 | weight 937 | 938 | 939 | 940 | tracking 941 | 942 | 943 | 944 | family 945 | Tahoma 946 | 947 | 948 | 949 | 950 | 0 951 | 0 952 | 0 953 | 255 954 | 955 |
false
956 | RIGHT 957 | CENTER 958 | DEFAULT 959 |
960 | 961 | L1 962 | 963 | DAC D5 - 11 964 | 965 | 966 | 967 | posture 968 | 969 | 970 | 971 | superscript 972 | 973 | 974 | 975 | width 976 | 977 | 978 | 979 | size 980 | 14.0 981 | 982 | 983 | transform 984 | 985 | 986 | 987 | weight 988 | 989 | 990 | 991 | tracking 992 | 993 | 994 | 995 | family 996 | Tahoma 997 | 998 | 999 | 1000 | 1001 | 0 1002 | 0 1003 | 0 1004 | 255 1005 | 1006 |
false
1007 | RIGHT 1008 | CENTER 1009 | DEFAULT 1010 |
1011 | 1012 | L1 1013 | 1014 | XTAL2 - 10 1015 | 1016 | 1017 | 1018 | posture 1019 | 1020 | 1021 | 1022 | superscript 1023 | 1024 | 1025 | 1026 | width 1027 | 1028 | 1029 | 1030 | size 1031 | 14.0 1032 | 1033 | 1034 | transform 1035 | 1036 | 1037 | 1038 | weight 1039 | 1040 | 1041 | 1042 | tracking 1043 | 1044 | 1045 | 1046 | family 1047 | Tahoma 1048 | 1049 | 1050 | 1051 | 1052 | 0 1053 | 0 1054 | 0 1055 | 255 1056 | 1057 |
false
1058 | RIGHT 1059 | CENTER 1060 | DEFAULT 1061 |
1062 | 1063 | L1 1064 | 1065 | XTAL1 - 09 1066 | 1067 | 1068 | 1069 | posture 1070 | 1071 | 1072 | 1073 | superscript 1074 | 1075 | 1076 | 1077 | width 1078 | 1079 | 1080 | 1081 | size 1082 | 14.0 1083 | 1084 | 1085 | transform 1086 | 1087 | 1088 | 1089 | weight 1090 | 1091 | 1092 | 1093 | tracking 1094 | 1095 | 1096 | 1097 | family 1098 | Tahoma 1099 | 1100 | 1101 | 1102 | 1103 | 0 1104 | 0 1105 | 0 1106 | 255 1107 | 1108 |
false
1109 | RIGHT 1110 | CENTER 1111 | DEFAULT 1112 |
1113 | 1114 | L1 1115 | 1116 | GND - 08 1117 | 1118 | 1119 | 1120 | posture 1121 | 1122 | 1123 | 1124 | superscript 1125 | 1126 | 1127 | 1128 | width 1129 | 1130 | 1131 | 1132 | size 1133 | 14.0 1134 | 1135 | 1136 | transform 1137 | 1138 | 1139 | 1140 | weight 1141 | 1142 | 1143 | 1144 | tracking 1145 | 1146 | 1147 | 1148 | family 1149 | Tahoma 1150 | 1151 | 1152 | 1153 | 1154 | 0 1155 | 0 1156 | 0 1157 | 255 1158 | 1159 |
false
1160 | RIGHT 1161 | CENTER 1162 | DEFAULT 1163 |
1164 | 1165 | L1 1166 | 1167 | VCC - 07 1168 | 1169 | 1170 | 1171 | posture 1172 | 1173 | 1174 | 1175 | superscript 1176 | 1177 | 1178 | 1179 | width 1180 | 1181 | 1182 | 1183 | size 1184 | 14.0 1185 | 1186 | 1187 | transform 1188 | 1189 | 1190 | 1191 | weight 1192 | 1193 | 1194 | 1195 | tracking 1196 | 1197 | 1198 | 1199 | family 1200 | Tahoma 1201 | 1202 | 1203 | 1204 | 1205 | 0 1206 | 0 1207 | 0 1208 | 255 1209 | 1210 |
false
1211 | RIGHT 1212 | CENTER 1213 | DEFAULT 1214 |
1215 | 1216 | L1 1217 | 1218 | DAC D4 - 06 1219 | 1220 | 1221 | 1222 | posture 1223 | 1224 | 1225 | 1226 | superscript 1227 | 1228 | 1229 | 1230 | width 1231 | 1232 | 1233 | 1234 | size 1235 | 14.0 1236 | 1237 | 1238 | transform 1239 | 1240 | 1241 | 1242 | weight 1243 | 1244 | 1245 | 1246 | tracking 1247 | 1248 | 1249 | 1250 | family 1251 | Tahoma 1252 | 1253 | 1254 | 1255 | 1256 | 0 1257 | 0 1258 | 0 1259 | 255 1260 | 1261 |
false
1262 | RIGHT 1263 | CENTER 1264 | DEFAULT 1265 |
1266 | 1267 | L1 1268 | 1269 | DAC D3 - 05 1270 | 1271 | 1272 | 1273 | posture 1274 | 1275 | 1276 | 1277 | superscript 1278 | 1279 | 1280 | 1281 | width 1282 | 1283 | 1284 | 1285 | size 1286 | 14.0 1287 | 1288 | 1289 | transform 1290 | 1291 | 1292 | 1293 | weight 1294 | 1295 | 1296 | 1297 | tracking 1298 | 1299 | 1300 | 1301 | family 1302 | Tahoma 1303 | 1304 | 1305 | 1306 | 1307 | 0 1308 | 0 1309 | 0 1310 | 255 1311 | 1312 |
false
1313 | RIGHT 1314 | CENTER 1315 | DEFAULT 1316 |
1317 | 1318 | L1 1319 | 1320 | DAC D1 - 03 1321 | 1322 | 1323 | 1324 | posture 1325 | 1326 | 1327 | 1328 | superscript 1329 | 1330 | 1331 | 1332 | width 1333 | 1334 | 1335 | 1336 | size 1337 | 14.0 1338 | 1339 | 1340 | transform 1341 | 1342 | 1343 | 1344 | weight 1345 | 1346 | 1347 | 1348 | tracking 1349 | 1350 | 1351 | 1352 | family 1353 | Tahoma 1354 | 1355 | 1356 | 1357 | 1358 | 0 1359 | 0 1360 | 0 1361 | 255 1362 | 1363 |
false
1364 | RIGHT 1365 | CENTER 1366 | DEFAULT 1367 |
1368 | 1369 | L1 1370 | 1371 | DAC D2 - 04 1372 | 1373 | 1374 | 1375 | posture 1376 | 1377 | 1378 | 1379 | superscript 1380 | 1381 | 1382 | 1383 | width 1384 | 1385 | 1386 | 1387 | size 1388 | 14.0 1389 | 1390 | 1391 | transform 1392 | 1393 | 1394 | 1395 | weight 1396 | 1397 | 1398 | 1399 | tracking 1400 | 1401 | 1402 | 1403 | family 1404 | Tahoma 1405 | 1406 | 1407 | 1408 | 1409 | 0 1410 | 0 1411 | 0 1412 | 255 1413 | 1414 |
false
1415 | RIGHT 1416 | CENTER 1417 | DEFAULT 1418 |
1419 | 1420 | L1 1421 | 1422 | DAC D0 - 02 1423 | 1424 | 1425 | 1426 | posture 1427 | 1428 | 1429 | 1430 | superscript 1431 | 1432 | 1433 | 1434 | width 1435 | 1436 | 1437 | 1438 | size 1439 | 14.0 1440 | 1441 | 1442 | transform 1443 | 1444 | 1445 | 1446 | weight 1447 | 1448 | 1449 | 1450 | tracking 1451 | 1452 | 1453 | 1454 | family 1455 | Tahoma 1456 | 1457 | 1458 | 1459 | 1460 | 0 1461 | 0 1462 | 0 1463 | 255 1464 | 1465 |
false
1466 | RIGHT 1467 | CENTER 1468 | DEFAULT 1469 |
1470 | 1471 | L1 1472 | 1473 | Reset - 01 1474 | 1475 | 1476 | 1477 | posture 1478 | 1479 | 1480 | 1481 | superscript 1482 | 1483 | 1484 | 1485 | width 1486 | 1487 | 1488 | 1489 | size 1490 | 14.0 1491 | 1492 | 1493 | transform 1494 | 1495 | 1496 | 1497 | weight 1498 | 1499 | 1500 | 1501 | tracking 1502 | 1503 | 1504 | 1505 | family 1506 | Tahoma 1507 | 1508 | 1509 | 1510 | 1511 | 0 1512 | 0 1513 | 0 1514 | 255 1515 | 1516 |
false
1517 | RIGHT 1518 | CENTER 1519 | DEFAULT 1520 |
1521 | 1522 | L2 1523 | 1524 | PORTD -> R2R Ladder 1525 | 1526 | 1527 |
false
1528 | CENTER 1529 | CENTER 1530 | _90 1531 |
1532 | 1533 | L3 1534 | 1535 | ATMega48PA 1536 | 1537 | 1538 |
false
1539 | CENTER 1540 | CENTER 1541 | DEFAULT 1542 |
1543 |
1544 | 1545 | 1546 |
--------------------------------------------------------------------------------