// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // wave.c - waveform table - 1.02 - 20061202 // Copyright (C) 2006 miguel angel labolida // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License along // with this program; if not, write to the Free Software Foundation, Inc., // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // bits 4 (low order) to 7 (high order) waveform // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - __code unsigned char wave_table[4][16] = { { // sawtooth 0xF0, 0xE0, 0xD0, 0xC0, // 15 14 13 12 0xB0, 0xA0, 0x90, 0x80, // 11 10 9 8 0x70, 0x60, 0x50, 0x40, // 7 6 5 4 0x30, 0x20, 0x10, 0x00}, // 3 2 1 0 { // pulse 12% 0xF0, 0xF0, 0x00, 0x00, // 15 15 0 0 0x00, 0x00, 0x00, 0x00, // 0 0 0 0 0x00, 0x00, 0x00, 0x00, // 8 5 2 1 0x00, 0x00, 0x00, 0x00}, // 0 1 2 5 { // square 0xD0, 0xD0, 0xD0, 0xD0, // 13 13 13 13 0xD0, 0xD0, 0xD0, 0xD0, // 13 13 13 13 0x20, 0x20, 0x20, 0x20, // 2 2 2 2 0x20, 0x20, 0x20, 0x20}, // 2 2 2 2 { // triangle 0xE0, 0xC0, 0xA0, 0x80, // 14 12 10 8 0x60, 0x40, 0x20, 0x00, // 6 4 2 0 0x00, 0x20, 0x40, 0x60, // 0 2 4 6 0x80, 0xA0, 0xC0, 0xE0} // 8 10 12 14 /* { // sine 0x80, 0xA0, 0xD0, 0xE0, // 8 10 13 14 0xF0, 0xE0, 0xD0, 0xA0, // 15 14 13 10 0x80, 0x50, 0x20, 0x10, // 8 5 2 1 0x00, 0x10, 0x20, 0x50}, // 0 1 2 5 */ }; // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -