daily_automated
This commit is contained in:
188
trunk/Arduino/libraries/sys64738/GM_Table.h
Normal file
188
trunk/Arduino/libraries/sys64738/GM_Table.h
Normal file
@@ -0,0 +1,188 @@
|
||||
/* **************************************** *
|
||||
* MIDI: General MIDI Table & Drums *
|
||||
* **************************************** *
|
||||
* (C) 2016-05-17 Paolo Iocco *
|
||||
* rev. 1.0 *
|
||||
* **************************************** */
|
||||
|
||||
const char GM_Table[][24]PROGMEM = {
|
||||
{"Acoustic Grand Piano "}, // 1
|
||||
{"Bright Acoustic Piano "}, // 2
|
||||
{"Electric Grand Piano "}, // 3
|
||||
{"Honky-tonk Piano "}, // 4
|
||||
{"Electric Piano 1 "}, // 5
|
||||
{"Electric Piano 2 "}, // 6
|
||||
{"Harpsichord "}, // 7
|
||||
{"Clavi "}, // 8
|
||||
{"Celesta "}, // 9
|
||||
{"Glockenspiel "}, // 10
|
||||
{"Music Box "}, // 11
|
||||
{"Vibraphone "}, // 12
|
||||
{"Marimba "}, // 13
|
||||
{"Xylophone "}, // 14
|
||||
{"Tubular Bells "}, // 15
|
||||
{"Dulcimer "}, // 16
|
||||
{"Drawbar Organ "}, // 17
|
||||
{"Percussive Organ "}, // 18
|
||||
{"Rock Organ "}, // 19
|
||||
{"Church Organ "}, // 20
|
||||
{"Reed Organ "}, // 21
|
||||
{"Accordion "}, // 22
|
||||
{"Harmonica "}, // 23
|
||||
{"Tango Accordion "}, // 24
|
||||
{"Acoustic Guitar (nylon)"}, // 25
|
||||
{"Acoustic Guitar (steel)"}, // 26
|
||||
{"Electric Guitar (jazz) "}, // 27
|
||||
{"Electric Guitar (clean)"}, // 28
|
||||
{"Electric Guitar (muted)"}, // 29
|
||||
{"Overdriven Guitar "}, // 30
|
||||
{"Distortion Guitar "}, // 31
|
||||
{"Guitar harmonics "}, // 32
|
||||
{"Acoustic Bass "}, // 33
|
||||
{"Electric Bass (finger) "}, // 34
|
||||
{"Electric Bass (pick) "}, // 35
|
||||
{"Fretless Bass "}, // 36
|
||||
{"Slap Bass 1 "}, // 37
|
||||
{"Slap Bass 2 "}, // 38
|
||||
{"Synth Bass 1 "}, // 39
|
||||
{"Synth Bass 2 "}, // 40
|
||||
{"Violin "}, // 41
|
||||
{"Viola "}, // 42
|
||||
{"Cello "}, // 43
|
||||
{"Contrabass "}, // 44
|
||||
{"Tremolo Strings "}, // 45
|
||||
{"Pizzicato Strings "}, // 46
|
||||
{"Orchestral Harp "}, // 47
|
||||
{"Timpani "}, // 48
|
||||
{"String Ensemble 1 "}, // 49
|
||||
{"String Ensemble 2 "}, // 50
|
||||
{"SynthStrings 1 "}, // 51
|
||||
{"SynthStrings 2 "}, // 52
|
||||
{"Choir Aahs "}, // 53
|
||||
{"Voice Oohs "}, // 54
|
||||
{"Synth Voice "}, // 55
|
||||
{"Orchestra Hit "}, // 56
|
||||
{"Trumpet "}, // 57
|
||||
{"Trombone "}, // 58
|
||||
{"Tuba "}, // 59
|
||||
{"Muted Trumpet "}, // 60
|
||||
{"French Horn "}, // 61
|
||||
{"Brass Section "}, // 62
|
||||
{"SynthBrass 1 "}, // 63
|
||||
{"SynthBrass 2 "}, // 64
|
||||
{"Soprano Sax "}, // 65
|
||||
{"Alto Sax "}, // 66
|
||||
{"Tenor Sax "}, // 67
|
||||
{"Baritone Sax "}, // 68
|
||||
{"Oboe "}, // 69
|
||||
{"English Horn "}, // 70
|
||||
{"Bassoon "}, // 71
|
||||
{"Clarinet "}, // 72
|
||||
{"Piccolo "}, // 73
|
||||
{"Flute "}, // 74
|
||||
{"Recorder "}, // 75
|
||||
{"Pan Flute "}, // 76
|
||||
{"Blown Bottle "}, // 77
|
||||
{"Shakuhachi "}, // 78
|
||||
{"Whistle "}, // 79
|
||||
{"Ocarina "}, // 80
|
||||
{"Lead 1 (square) "}, // 81
|
||||
{"Lead 2 (sawtooth) "}, // 82
|
||||
{"Lead 3 (calliope) "}, // 83
|
||||
{"Lead 4 (chiff) "}, // 84
|
||||
{"Lead 5 (charang) "}, // 85
|
||||
{"Lead 6 (voice) "}, // 86
|
||||
{"Lead 7 (fifths) "}, // 87
|
||||
{"Lead 8 (bass + lead) "}, // 88
|
||||
{"Pad 1 (new age) "}, // 89
|
||||
{"Pad 2 (warm) "}, // 90
|
||||
{"Pad 3 (polysynth) "}, // 91
|
||||
{"Pad 4 (choir) "}, // 92
|
||||
{"Pad 5 (bowed) "}, // 93
|
||||
{"Pad 6 (metallic) "}, // 94
|
||||
{"Pad 7 (halo) "}, // 95
|
||||
{"Pad 8 (sweep) "}, // 96
|
||||
{"FX 1 (rain) "}, // 97
|
||||
{"FX 2 (soundtrack) "}, // 98
|
||||
{"FX 3 (crystal) "}, // 99
|
||||
{"FX 4 (atmosphere) "}, // 100
|
||||
{"FX 5 (brightness) "}, // 101
|
||||
{"FX 6 (goblins) "}, // 102
|
||||
{"FX 7 (echoes) "}, // 103
|
||||
{"FX 8 (sci-fi) "}, // 104
|
||||
{"Sitar "}, // 105
|
||||
{"Banjo "}, // 106
|
||||
{"Shamisen "}, // 107
|
||||
{"Koto "}, // 108
|
||||
{"Kalimba "}, // 109
|
||||
{"Bag pipe "}, // 110
|
||||
{"Fiddle "}, // 111
|
||||
{"Shanai "}, // 112
|
||||
{"Tinkle Bell "}, // 113
|
||||
{"Agogo "}, // 114
|
||||
{"Steel Drums "}, // 115
|
||||
{"Woodblock "}, // 116
|
||||
{"Taiko Drum "}, // 117
|
||||
{"Melodic Tom "}, // 118
|
||||
{"Synth Drum "}, // 119
|
||||
{"Reverse Cymbal "}, // 120
|
||||
{"Guitar Fret Noise "}, // 121
|
||||
{"Breath Noise "}, // 122
|
||||
{"Seashore "}, // 123
|
||||
{"Bird Tweet "}, // 124
|
||||
{"Telephone Ring "}, // 125
|
||||
{"Helicopter "}, // 126
|
||||
{"Applause "}, // 127
|
||||
{"Gunshot "} // 128
|
||||
};
|
||||
|
||||
const char GM_Drums[][19]PROGMEM = {
|
||||
{"Acoustic Bass Drum"}, // 35
|
||||
{"Bass Drum 1 "}, // 36
|
||||
{"Side Stick "}, // 37
|
||||
{"Acoustic Snare "}, // 38
|
||||
{"Hand Clap "}, // 39
|
||||
{"Electric Snare "}, // 40
|
||||
{"Low Floor Tom "}, // 41
|
||||
{"Closed Hi Hat "}, // 42
|
||||
{"High Floor Tom "}, // 43
|
||||
{"Pedal Hi-Hat "}, // 44
|
||||
{"Low Tom "}, // 45
|
||||
{"Open Hi-Hat "}, // 46
|
||||
{"Low-Mid Tom "}, // 47
|
||||
{"Hi-Mid Tom "}, // 48
|
||||
{"Crash Cymbal 1 "}, // 49
|
||||
{"High Tom "}, // 50
|
||||
{"Ride Cymbal 1 "}, // 51
|
||||
{"Chinese Cymbal "}, // 52
|
||||
{"Ride Bell "}, // 53
|
||||
{"Tambourine "}, // 54
|
||||
{"Splash Cymbal "}, // 55
|
||||
{"Cowbell "}, // 56
|
||||
{"Crash Cymbal 2 "}, // 57
|
||||
{"Vibraslap "}, // 58
|
||||
{"Ride Cymbal 2 "}, // 59
|
||||
{"Hi Bongo "}, // 60
|
||||
{"Low Bongo "}, // 61
|
||||
{"Mute Hi Conga "}, // 62
|
||||
{"Open Hi Conga "}, // 63
|
||||
{"Low Conga "}, // 64
|
||||
{"High Timbale "}, // 65
|
||||
{"Low Timbale "}, // 66
|
||||
{"High Agogo "}, // 67
|
||||
{"Low Agogo "}, // 68
|
||||
{"Cabasa "}, // 69
|
||||
{"Maracas "}, // 70
|
||||
{"Short Whistle "}, // 71
|
||||
{"Long Whistle "}, // 72
|
||||
{"Short Guiro "}, // 73
|
||||
{"Long Guiro "}, // 74
|
||||
{"Claves "}, // 75
|
||||
{"Hi Wood Block "}, // 76
|
||||
{"Low Wood Block "}, // 77
|
||||
{"Mute Cuica "}, // 78
|
||||
{"Open Cuica "}, // 79
|
||||
{"Mute Triangle "}, // 80
|
||||
{"Open Triangle "} // 81
|
||||
};
|
||||
|
||||
80
trunk/Arduino/libraries/sys64738/MIDI_Display.h
Normal file
80
trunk/Arduino/libraries/sys64738/MIDI_Display.h
Normal file
@@ -0,0 +1,80 @@
|
||||
/* **************************************** *
|
||||
* Display Constants & Bitmaps *
|
||||
* **************************************** *
|
||||
* (C) 2016-05-17 Paolo Iocco *
|
||||
* rev. 1.0 *
|
||||
* **************************************** */
|
||||
|
||||
const unsigned char StartScreen[] PROGMEM = {
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
|
||||
0x00,0x00,0x00,0x00,0xff,0xff,0xf0,0x38,0x0c,0x3c,0xf0,0xff,0xff,0x00,0x00,0x81,
|
||||
0xff,0xff,0xc3,0x81,0x00,0x00,0xff,0xff,0x81,0xc1,0xc3,0x7f,0x7e,0x00,0x00,0x81,
|
||||
0xff,0xff,0xc1,0x00,0x00,0x00,0x00,0x00,0x00,0x3e,0xff,0xc3,0x81,0x81,0xc1,0xc3,
|
||||
0x00,0x3c,0x7f,0xe3,0x81,0x81,0xc1,0xe7,0x7e,0x1c,0x00,0xff,0xff,0xf0,0x38,0x0c,
|
||||
0x3c,0xf0,0xff,0xff,0x00,0x00,0xff,0xff,0xf0,0x38,0x0c,0x3c,0xf0,0xff,0xff,0x00,
|
||||
0x00,0x03,0x1f,0xfe,0xe4,0xfc,0x7f,0x0f,0x01,0x00,0xff,0xff,0xe0,0x70,0x1c,0x0f,
|
||||
0xff,0xff,0x00,0x00,0xff,0xff,0xc1,0x81,0xc3,0xe7,0x7e,0x3c,0x00,0x00,0xff,0xff,
|
||||
0x91,0x91,0x91,0x00,0x00,0xff,0xff,0xdc,0x8c,0xde,0xff,0x73,0x01,0x00,0x00,0x00,
|
||||
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x06,0x03,0x01,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x0f,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xfe,0x80,0x40,0x60,
|
||||
0xa0,0xd0,0x58,0x28,0x24,0x14,0x12,0x1f,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x1f,
|
||||
0x38,0x20,0x30,0x3f,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0xfe,0xff,0x41,0x40,0x40,0x40,0x60,0x38,0x10,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
|
||||
0x01,0x03,0x03,0x03,0x03,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x03,0x03,0xff,0x7f,
|
||||
0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x0e,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x0f,0x1f,0xf8,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xff,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x07,0x0c,0x18,0x33,0xf6,
|
||||
0xfe,0x7f,0xcf,0x84,0x04,0x06,0x07,0x03,0x00,0x00,0x00,0x00,0x0c,0x1c,0x1c,0x1c,
|
||||
0x3c,0xfc,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0x31,0x30,0x30,0x30,
|
||||
0x20,0x20,0x20,0xf0,0xff,0x3f,0x03,0x00,0x00,0x80,0xc0,0xc0,0xc0,0xc0,0x80,0x80,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x78,0x7c,0xfc,
|
||||
0xfc,0xfe,0xfe,0x7c,0x7c,0x38,0xf0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xe0,0x70,0x30,0x13,0x17,
|
||||
0x11,0xf9,0xff,0x3e,0x30,0x60,0xc0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x70,0x70,0x70,0xf0,0xf0,0xe0,0x00,0x00,0x00,
|
||||
0x60,0xe0,0xe0,0xe0,0xe0,0xe0,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x01,0x00,0x00,0x01,0x01,0x00,0x01,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00,
|
||||
0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x01,0x81,
|
||||
0x81,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0xe0,0x00,0x00,0xe0,0x20,0x20,0x00,0x00,0xe0,0x00,0x00,0x00,0x20,0x60,0xc0,0x00,
|
||||
0xe0,0x00,0xe0,0x00,0x00,0xe0,0x00,0x00,0xe0,0x80,0x60,0x00,0x00,0x00,0xe0,0x40,
|
||||
0xc0,0x00,0xe0,0xe0,0x60,0x00,0xe0,0xa0,0x60,0x00,0x00,0x60,0xa0,0xe0,0x00,0x00,
|
||||
0x00,0x20,0xe0,0x00,0x60,0xa0,0xe0,0x00,0x60,0x80,0x00,0x60,0xa0,0x00,0x60,0xa0,
|
||||
0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
|
||||
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
|
||||
};
|
||||
2039
trunk/Arduino/libraries/sys64738/font.h
Normal file
2039
trunk/Arduino/libraries/sys64738/font.h
Normal file
File diff suppressed because it is too large
Load Diff
30
trunk/Arduino/libraries/sys64738/keywords.txt
Normal file
30
trunk/Arduino/libraries/sys64738/keywords.txt
Normal file
@@ -0,0 +1,30 @@
|
||||
#######################################
|
||||
# Syntax Coloring Map For sys64738
|
||||
#######################################
|
||||
|
||||
#######################################
|
||||
# Datatypes (KEYWORD1)
|
||||
#######################################
|
||||
|
||||
Morse KEYWORD1
|
||||
Display_Nokia KEYWORD1
|
||||
Display_OLED2 KEYWORD1
|
||||
|
||||
#######################################
|
||||
# Methods and Functions (KEYWORD2)
|
||||
#######################################
|
||||
|
||||
dot KEYWORD2
|
||||
dash KEYWORD2
|
||||
Init KEYWORD2
|
||||
|
||||
|
||||
#######################################
|
||||
# Instances (KEYWORD2)
|
||||
#######################################
|
||||
|
||||
#######################################
|
||||
# Constants (LITERAL1)
|
||||
#######################################
|
||||
BLACK LITERAL1
|
||||
WHITE LITERAL1
|
||||
393
trunk/Arduino/libraries/sys64738/oledfont.h
Normal file
393
trunk/Arduino/libraries/sys64738/oledfont.h
Normal file
@@ -0,0 +1,393 @@
|
||||
/****************************************************************
|
||||
*
|
||||
* ´FONTS & BITMAPS
|
||||
*
|
||||
*****************************************************************/
|
||||
|
||||
#include <avr/pgmspace.h>
|
||||
//#define PROGMEM
|
||||
#ifndef oledfont_h
|
||||
#define oledfont_h
|
||||
|
||||
/* Standard ASCII 5x7 font */
|
||||
/*
|
||||
static const byte PROGMEM font5x7[][5] =
|
||||
{
|
||||
{ 0x00, 0x00, 0x00, 0x00, 0x00 }, // 20 sp
|
||||
{ 0x00, 0x00, 0x2f, 0x00, 0x00 }, // 21 !
|
||||
{ 0x00, 0x07, 0x00, 0x07, 0x00 }, // 22 "
|
||||
{ 0x14, 0x7f, 0x14, 0x7f, 0x14 }, // 23 #
|
||||
{ 0x24, 0x2a, 0x7f, 0x2a, 0x12 }, // 24 $
|
||||
{ 0xc4, 0xc8, 0x10, 0x26, 0x46 }, // 25 %
|
||||
{ 0x36, 0x49, 0x55, 0x22, 0x50 }, // 26 &
|
||||
{ 0x00, 0x05, 0x03, 0x00, 0x00 }, // 27 '
|
||||
{ 0x00, 0x1c, 0x22, 0x41, 0x00 }, // 28 (
|
||||
{ 0x00, 0x41, 0x22, 0x1c, 0x00 }, // 29 )
|
||||
{ 0x14, 0x08, 0x3E, 0x08, 0x14 }, // 2a *
|
||||
{ 0x08, 0x08, 0x3E, 0x08, 0x08 }, // 2b +
|
||||
{ 0x00, 0x00, 0x50, 0x30, 0x00 }, // 2c ,
|
||||
{ 0x10, 0x10, 0x10, 0x10, 0x10 }, // 2d -
|
||||
{ 0x00, 0x60, 0x60, 0x00, 0x00 }, // 2e .
|
||||
{ 0x20, 0x10, 0x08, 0x04, 0x02 }, // 2f /
|
||||
{ 0x3E, 0x51, 0x49, 0x45, 0x3E }, // 30 0
|
||||
{ 0x00, 0x42, 0x7F, 0x40, 0x00 }, // 31 1
|
||||
{ 0x42, 0x61, 0x51, 0x49, 0x46 }, // 32 2
|
||||
{ 0x21, 0x41, 0x45, 0x4B, 0x31 }, // 33 3
|
||||
{ 0x18, 0x14, 0x12, 0x7F, 0x10 }, // 34 4
|
||||
{ 0x27, 0x45, 0x45, 0x45, 0x39 }, // 35 5
|
||||
{ 0x3C, 0x4A, 0x49, 0x49, 0x30 }, // 36 6
|
||||
{ 0x01, 0x71, 0x09, 0x05, 0x03 }, // 37 7
|
||||
{ 0x36, 0x49, 0x49, 0x49, 0x36 }, // 38 8
|
||||
{ 0x06, 0x49, 0x49, 0x29, 0x1E }, // 39 9
|
||||
{ 0x00, 0x36, 0x36, 0x00, 0x00 }, // 3a :
|
||||
{ 0x00, 0x56, 0x36, 0x00, 0x00 }, // 3b ;
|
||||
{ 0x08, 0x14, 0x22, 0x41, 0x00 }, // 3c <
|
||||
{ 0x14, 0x14, 0x14, 0x14, 0x14 }, // 3d =
|
||||
{ 0x00, 0x41, 0x22, 0x14, 0x08 }, // 3e >
|
||||
{ 0x02, 0x01, 0x51, 0x09, 0x06 }, // 3f ?
|
||||
{ 0x32, 0x49, 0x59, 0x51, 0x3E }, // 40 @
|
||||
{ 0x7E, 0x11, 0x11, 0x11, 0x7E }, // 41 A
|
||||
{ 0x7F, 0x49, 0x49, 0x49, 0x36 }, // 42 B
|
||||
{ 0x3E, 0x41, 0x41, 0x41, 0x22 }, // 43 C
|
||||
{ 0x7F, 0x41, 0x41, 0x22, 0x1C }, // 44 D
|
||||
{ 0x7F, 0x49, 0x49, 0x49, 0x41 }, // 45 E
|
||||
{ 0x7F, 0x09, 0x09, 0x09, 0x01 }, // 46 F
|
||||
{ 0x3E, 0x41, 0x49, 0x49, 0x7A }, // 47 G
|
||||
{ 0x7F, 0x08, 0x08, 0x08, 0x7F }, // 48 H
|
||||
{ 0x00, 0x41, 0x7F, 0x41, 0x00 }, // 49 I
|
||||
{ 0x20, 0x40, 0x41, 0x3F, 0x01 }, // 4a J
|
||||
{ 0x7F, 0x08, 0x14, 0x22, 0x41 }, // 4b K
|
||||
{ 0x7F, 0x40, 0x40, 0x40, 0x40 }, // 4c L
|
||||
{ 0x7F, 0x02, 0x0C, 0x02, 0x7F }, // 4d M
|
||||
{ 0x7F, 0x04, 0x08, 0x10, 0x7F }, // 4e N
|
||||
{ 0x3E, 0x41, 0x41, 0x41, 0x3E }, // 4f O
|
||||
{ 0x7F, 0x09, 0x09, 0x09, 0x06 }, // 50 P
|
||||
{ 0x3E, 0x41, 0x51, 0x21, 0x5E }, // 51 Q
|
||||
{ 0x7F, 0x09, 0x19, 0x29, 0x46 }, // 52 R
|
||||
{ 0x46, 0x49, 0x49, 0x49, 0x31 }, // 53 S
|
||||
{ 0x01, 0x01, 0x7F, 0x01, 0x01 }, // 54 T
|
||||
{ 0x3F, 0x40, 0x40, 0x40, 0x3F }, // 55 U
|
||||
{ 0x1F, 0x20, 0x40, 0x20, 0x1F }, // 56 V
|
||||
{ 0x3F, 0x40, 0x38, 0x40, 0x3F }, // 57 W
|
||||
{ 0x63, 0x14, 0x08, 0x14, 0x63 }, // 58 X
|
||||
{ 0x07, 0x08, 0x70, 0x08, 0x07 }, // 59 Y
|
||||
{ 0x61, 0x51, 0x49, 0x45, 0x43 }, // 5a Z
|
||||
{ 0x00, 0x7F, 0x41, 0x41, 0x00 }, // 5b [
|
||||
{ 0x02, 0x04, 0x08, 0x10, 0x20 }, // 5c back slash
|
||||
{ 0x00, 0x41, 0x41, 0x7f, 0x00 }, // 5d ]
|
||||
{ 0x04, 0x02, 0x01, 0x02, 0x04 }, // 5e ^
|
||||
{ 0x40, 0x40, 0x40, 0x40, 0x40 }, // 5f _
|
||||
{ 0x00, 0x01, 0x02, 0x04, 0x00 }, // 60 '
|
||||
{ 0x20, 0x54, 0x54, 0x54, 0x78 }, // 61 a
|
||||
{ 0x7F, 0x48, 0x44, 0x44, 0x38 }, // 62 b
|
||||
{ 0x38, 0x44, 0x44, 0x44, 0x20 }, // 63 c
|
||||
{ 0x38, 0x44, 0x44, 0x48, 0x7F }, // 64 d
|
||||
{ 0x38, 0x54, 0x54, 0x54, 0x18 }, // 65 e
|
||||
{ 0x08, 0x7E, 0x09, 0x01, 0x02 }, // 66 f
|
||||
{ 0x0C, 0x52, 0x52, 0x52, 0x3E }, // 67 g
|
||||
{ 0x7F, 0x08, 0x04, 0x04, 0x78 }, // 68 h
|
||||
{ 0x00, 0x44, 0x7D, 0x40, 0x00 }, // 69 i
|
||||
{ 0x20, 0x40, 0x44, 0x3D, 0x00 }, // 6a j
|
||||
{ 0x7F, 0x10, 0x28, 0x44, 0x00 }, // 6b k
|
||||
{ 0x00, 0x41, 0x7F, 0x40, 0x00 }, // 6c l
|
||||
{ 0x7C, 0x04, 0x18, 0x04, 0x78 }, // 6d m
|
||||
{ 0x7C, 0x08, 0x04, 0x04, 0x78 }, // 6e n
|
||||
{ 0x38, 0x44, 0x44, 0x44, 0x38 }, // 6f o
|
||||
{ 0x7C, 0x14, 0x14, 0x14, 0x08 }, // 70 p
|
||||
{ 0x08, 0x14, 0x14, 0x18, 0x7C }, // 71 q
|
||||
{ 0x7C, 0x08, 0x04, 0x04, 0x08 }, // 72 r
|
||||
{ 0x48, 0x54, 0x54, 0x54, 0x20 }, // 73 s
|
||||
{ 0x04, 0x3F, 0x44, 0x40, 0x20 }, // 74 t
|
||||
{ 0x3C, 0x40, 0x40, 0x20, 0x7C }, // 75 u
|
||||
{ 0x1C, 0x20, 0x40, 0x20, 0x1C }, // 76 v
|
||||
{ 0x3C, 0x40, 0x30, 0x40, 0x3C }, // 77 w
|
||||
{ 0x44, 0x28, 0x10, 0x28, 0x44 }, // 78 x
|
||||
{ 0x0C, 0x50, 0x50, 0x50, 0x3C }, // 79 y
|
||||
{ 0x44, 0x64, 0x54, 0x4C, 0x44 }, // 7a z
|
||||
{ 0x00, 0x08, 0x36, 0x41, 0x00 }, // 7b {
|
||||
{ 0x00, 0x00, 0x7f, 0x00, 0x00 }, // 7c |
|
||||
{ 0x00, 0x41, 0x36, 0x08, 0x00 }, // 7d }
|
||||
{ 0x04, 0x02, 0x04, 0x08, 0x04 }, // 7e ~
|
||||
{ 0x00, 0x00, 0x36, 0x00, 0x00 }, // 7f free (chr 127)
|
||||
{ 0x0e, 0x51, 0x31, 0x11, 0x08 }, // 80 free (chr 128)
|
||||
{ 0x3c, 0x41, 0x40, 0x21, 0x7c }, // 81 free (chr 129)
|
||||
{ 0x38, 0x54, 0x56, 0x55, 0x18 }, // 82 free (chr 130)
|
||||
{ 0x20, 0x56, 0x55, 0x56, 0x78 }, // 83 free (chr 131)
|
||||
{ 0x20, 0x55, 0x54, 0x55, 0x78 }, // 84 free (chr 132)
|
||||
{ 0x20, 0x55, 0x56, 0x54, 0x78 }, // 85 free (chr 133)
|
||||
{ 0x08, 0x08, 0x2a, 0x1c, 0x08 }, // 86 Right Arrow (chr 134)
|
||||
{ 0x0e, 0x51, 0x31, 0x11, 0x08 }, // 87 free (chr 135)
|
||||
{ 0x38, 0x56, 0x55, 0x56, 0x18 }, // 88 free (chr 136)
|
||||
};
|
||||
*/
|
||||
/*
|
||||
static const byte PROGMEM font8x8[][8] = {
|
||||
{ 0,0,0,0,0,0,0,0}, // space
|
||||
{24,24,24,24,0,0,24,0}, // !
|
||||
{102,102,102,0,0,0,0,0}, // "
|
||||
{102,102,255,102,255,102,102,0}, // #
|
||||
{24,62,64,60,2,124,24,0}, // $
|
||||
{98,98,12,24,48,102,70,0}, // %
|
||||
{120,204,120,112,206,204,126,0}, // &
|
||||
{24,24,24,0,0,0,0,0}, // '
|
||||
{24,48,96,96,96,48,24,0}, // (
|
||||
{24,12,6,6,6,12,24,0}, // )
|
||||
{0,102,60,255,60,60,102,0}, // *
|
||||
{0,24,24,126,24,24,0,0}, // +
|
||||
{0,0,0,0,24,24,48,0}, // ,
|
||||
{0,0,0,126,0,0,0,0}, // -
|
||||
{0,0,0,0,24,24,0,0}, // .
|
||||
{2,6,12,24,48,96,64,0}, // /
|
||||
{60,102,110,118,102,102,60,0}, // 0
|
||||
{24,24,56,24,24,24,126,0}, // 1
|
||||
{60,102,6,12,48,96,126,0}, // 2
|
||||
{60,102,6,28,6,102,60,0}, // 3
|
||||
{12,28,60,204,254,12,12,0}, // 4
|
||||
{126,96,124,6,6,102,60,0}, // 5
|
||||
{60,102,96,124,102,102,60,0}, // 6
|
||||
{126,102,12,24,24,24,24,0}, // 7
|
||||
{60,102,102,60,102,102,60,0}, // 8
|
||||
{60,102,102,62,6,102,60,0}, // 9
|
||||
{0,24,0,0,24,0,0,0}, // :
|
||||
{0,24,0,0,24,24,48,0}, // ;
|
||||
{14,24,48,96,48,24,14,0}, // <
|
||||
{0,0,0,124,0,124,0,0}, // =
|
||||
{112,24,12,6,12,24,112,0}, // >
|
||||
{60,102,6,24,24,0,24,0}, // ?
|
||||
{60,102,110,110,96,98,60,0}, // @
|
||||
{24,60,102,126,102,102,102,0}, // A
|
||||
{124,102,102,124,102,102,124,0}, // B
|
||||
{60,102,96,96,96,102,60,0}, // C
|
||||
{120,108,102,102,102,108,120,0}, // D
|
||||
{126,96,96,124,96,96,126,0}, // E
|
||||
{126,96,96,124,96,96,96,0}, // F
|
||||
{60,102,96,110,102,102,60,0}, // G
|
||||
{102,102,102,126,102,102,102,0}, // H
|
||||
{60,24,24,24,24,24,60,0}, // I
|
||||
{30,12,12,12,12,108,56,0}, // J
|
||||
{102,108,120,116,120,108,102,0}, // K
|
||||
{96,96,96,96,96,96,124,0}, // L
|
||||
{198,238,254,214,198,198,198,0}, // M
|
||||
{102,118,126,126,110,102,102,0}, // N
|
||||
{60,102,102,102,102,102,60,0}, // O
|
||||
{124,102,102,124,96,96,96,0}, // P
|
||||
{60,102,102,102,102,60,14,0}, // Q
|
||||
{124,102,102,124,120,108,102,0}, // R
|
||||
{60,102,96,60,6,102,60,0}, // S
|
||||
{126,24,24,24,24,24,24,0}, // T
|
||||
{102,102,102,102,102,102,60,0}, // U
|
||||
{102,102,102,102,102,60,24,0}, // V
|
||||
{198,198,198,214,254,238,198,0}, // W
|
||||
{102,102,60,24,60,102,102,0}, // X
|
||||
{102,102,102,60,24,24,24,0}, // Y
|
||||
{126,6,12,24,48,32,126,0}, // Z
|
||||
{120,96,96,96,96,96,120,0}, // [
|
||||
{64,96,48,24,12,6,2,0}, // Backslash
|
||||
{60,12,12,12,12,12,60,0},// ]
|
||||
{24,60,102,0,0,0,0,0}, // up arrow ^ in ASCII
|
||||
{0,0,0,0,0,0,255,0}, // # _ in ASCII
|
||||
{96,96,48,0,0,0,0,0}, // dash ` in ASCII
|
||||
{0,0,60,6,62,102,62,0}, // a
|
||||
{0,96,96,124,102,102,124,0}, // b
|
||||
{0,0,60,96,96,96,60,0}, // c
|
||||
{0,12,12,60,108,108,60,0}, // d
|
||||
{0,0,60,102,126,96,60,0}, // e
|
||||
{0,28,48,124,48,48,48,0}, // f
|
||||
{0,0,62,102,102,62,6,120}, // g
|
||||
{0,96,96,120,108,108,108,0}, // h
|
||||
{0,24,0,56,24,24,28,0}, // i
|
||||
{0,12,0,12,12,12,12,56}, // j
|
||||
{0,96,96,108,120,120,108,0}, // k
|
||||
{0,56,24,24,24,24,60,0}, // l
|
||||
{0,0,102,127,127,107,99,0}, // m
|
||||
{0,0,124,126,102,102,102,0}, // n
|
||||
{0,0,60,102,102,102,60,0}, // o
|
||||
{0,0,124,102,102,124,96,96}, // p
|
||||
{0,0,62,102,102,62,6,6}, // q
|
||||
{0,0,124,102,96,96,96,0}, // r
|
||||
{0,0,62,96,60,6,124,0}, // s
|
||||
{0,24,126,24,24,24,14,0}, // t
|
||||
{0,0,102,102,102,102,62,0}, // u
|
||||
{0,0,102,102,102,60,24,0}, // v
|
||||
{0,0,99,107,127,62,20,0}, // w
|
||||
{0,0,102,60,24,60,102,0}, // x
|
||||
{0,0,102,102,102,62,12,120}, // y
|
||||
{0,0,126,12,24,48,126,0}, // z
|
||||
{0,56,48,112,192,112,48,56}, // 1/4 { in ASCII
|
||||
{24,24,24,24,24,24,24,24}, // || | in ASCII
|
||||
{0,56,24,28,6,28,24,56}, // 3/4 } in ASCII
|
||||
{0,0,50,126,76,0,0,0}, // divide sign ~ in ASCII
|
||||
{255,255,255,255,255,255,255,255} // character-sized block
|
||||
// not defined in ASCII
|
||||
};
|
||||
*/
|
||||
|
||||
/* Standard ASCII 8x16 font */
|
||||
/*
|
||||
static const byte PROGMEM font8X16[] ={
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,// 0
|
||||
0x00,0x00,0x00,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x33,0x30,0x00,0x00,0x00,//! 1
|
||||
0x00,0x10,0x0C,0x06,0x10,0x0C,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//" 2
|
||||
0x40,0xC0,0x78,0x40,0xC0,0x78,0x40,0x00,0x04,0x3F,0x04,0x04,0x3F,0x04,0x04,0x00,//# 3
|
||||
0x00,0x70,0x88,0xFC,0x08,0x30,0x00,0x00,0x00,0x18,0x20,0xFF,0x21,0x1E,0x00,0x00,//$ 4
|
||||
0xF0,0x08,0xF0,0x00,0xE0,0x18,0x00,0x00,0x00,0x21,0x1C,0x03,0x1E,0x21,0x1E,0x00,//% 5
|
||||
0x00,0xF0,0x08,0x88,0x70,0x00,0x00,0x00,0x1E,0x21,0x23,0x24,0x19,0x27,0x21,0x10,//& 6
|
||||
0x10,0x16,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//' 7
|
||||
0x00,0x00,0x00,0xE0,0x18,0x04,0x02,0x00,0x00,0x00,0x00,0x07,0x18,0x20,0x40,0x00,//( 8
|
||||
0x00,0x02,0x04,0x18,0xE0,0x00,0x00,0x00,0x00,0x40,0x20,0x18,0x07,0x00,0x00,0x00,//) 9
|
||||
0x40,0x40,0x80,0xF0,0x80,0x40,0x40,0x00,0x02,0x02,0x01,0x0F,0x01,0x02,0x02,0x00,//* 10
|
||||
0x00,0x00,0x00,0xF0,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x1F,0x01,0x01,0x01,0x00,//+ 11
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xB0,0x70,0x00,0x00,0x00,0x00,0x00,//, 12
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,//- 13
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x00,0x00,0x00,//. 14
|
||||
0x00,0x00,0x00,0x00,0x80,0x60,0x18,0x04,0x00,0x60,0x18,0x06,0x01,0x00,0x00,0x00,/// 15
|
||||
0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x0F,0x10,0x20,0x20,0x10,0x0F,0x00,//0 16
|
||||
0x00,0x10,0x10,0xF8,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//1 17
|
||||
0x00,0x70,0x08,0x08,0x08,0x88,0x70,0x00,0x00,0x30,0x28,0x24,0x22,0x21,0x30,0x00,//2 18
|
||||
0x00,0x30,0x08,0x88,0x88,0x48,0x30,0x00,0x00,0x18,0x20,0x20,0x20,0x11,0x0E,0x00,//3 19
|
||||
0x00,0x00,0xC0,0x20,0x10,0xF8,0x00,0x00,0x00,0x07,0x04,0x24,0x24,0x3F,0x24,0x00,//4 20
|
||||
0x00,0xF8,0x08,0x88,0x88,0x08,0x08,0x00,0x00,0x19,0x21,0x20,0x20,0x11,0x0E,0x00,//5 21
|
||||
0x00,0xE0,0x10,0x88,0x88,0x18,0x00,0x00,0x00,0x0F,0x11,0x20,0x20,0x11,0x0E,0x00,//6 22
|
||||
0x00,0x38,0x08,0x08,0xC8,0x38,0x08,0x00,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x00,//7 23
|
||||
0x00,0x70,0x88,0x08,0x08,0x88,0x70,0x00,0x00,0x1C,0x22,0x21,0x21,0x22,0x1C,0x00,//8 24
|
||||
0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x00,0x31,0x22,0x22,0x11,0x0F,0x00,//9 25
|
||||
0x00,0x00,0x00,0xC0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x00,//: 26
|
||||
0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x60,0x00,0x00,0x00,0x00,//; 27
|
||||
0x00,0x00,0x80,0x40,0x20,0x10,0x08,0x00,0x00,0x01,0x02,0x04,0x08,0x10,0x20,0x00,//< 28
|
||||
0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x00,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x00,//= 29
|
||||
0x00,0x08,0x10,0x20,0x40,0x80,0x00,0x00,0x00,0x20,0x10,0x08,0x04,0x02,0x01,0x00,//> 30
|
||||
0x00,0x70,0x48,0x08,0x08,0x08,0xF0,0x00,0x00,0x00,0x00,0x30,0x36,0x01,0x00,0x00,//? 31
|
||||
0xC0,0x30,0xC8,0x28,0xE8,0x10,0xE0,0x00,0x07,0x18,0x27,0x24,0x23,0x14,0x0B,0x00,//@ 32
|
||||
0x00,0x00,0xC0,0x38,0xE0,0x00,0x00,0x00,0x20,0x3C,0x23,0x02,0x02,0x27,0x38,0x20,//A 33
|
||||
0x08,0xF8,0x88,0x88,0x88,0x70,0x00,0x00,0x20,0x3F,0x20,0x20,0x20,0x11,0x0E,0x00,//B 34
|
||||
0xC0,0x30,0x08,0x08,0x08,0x08,0x38,0x00,0x07,0x18,0x20,0x20,0x20,0x10,0x08,0x00,//C 35
|
||||
0x08,0xF8,0x08,0x08,0x08,0x10,0xE0,0x00,0x20,0x3F,0x20,0x20,0x20,0x10,0x0F,0x00,//D 36
|
||||
0x08,0xF8,0x88,0x88,0xE8,0x08,0x10,0x00,0x20,0x3F,0x20,0x20,0x23,0x20,0x18,0x00,//E 37
|
||||
0x08,0xF8,0x88,0x88,0xE8,0x08,0x10,0x00,0x20,0x3F,0x20,0x00,0x03,0x00,0x00,0x00,//F 38
|
||||
0xC0,0x30,0x08,0x08,0x08,0x38,0x00,0x00,0x07,0x18,0x20,0x20,0x22,0x1E,0x02,0x00,//G 39
|
||||
0x08,0xF8,0x08,0x00,0x00,0x08,0xF8,0x08,0x20,0x3F,0x21,0x01,0x01,0x21,0x3F,0x20,//H 40
|
||||
0x00,0x08,0x08,0xF8,0x08,0x08,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//I 41
|
||||
0x00,0x00,0x08,0x08,0xF8,0x08,0x08,0x00,0xC0,0x80,0x80,0x80,0x7F,0x00,0x00,0x00,//J 42
|
||||
0x08,0xF8,0x88,0xC0,0x28,0x18,0x08,0x00,0x20,0x3F,0x20,0x01,0x26,0x38,0x20,0x00,//K 43
|
||||
0x08,0xF8,0x08,0x00,0x00,0x00,0x00,0x00,0x20,0x3F,0x20,0x20,0x20,0x20,0x30,0x00,//L 44
|
||||
0x08,0xF8,0xF8,0x00,0xF8,0xF8,0x08,0x00,0x20,0x3F,0x00,0x3F,0x00,0x3F,0x20,0x00,//M 45
|
||||
0x08,0xF8,0x30,0xC0,0x00,0x08,0xF8,0x08,0x20,0x3F,0x20,0x00,0x07,0x18,0x3F,0x00,//N 46
|
||||
0xE0,0x10,0x08,0x08,0x08,0x10,0xE0,0x00,0x0F,0x10,0x20,0x20,0x20,0x10,0x0F,0x00,//O 47
|
||||
0x08,0xF8,0x08,0x08,0x08,0x08,0xF0,0x00,0x20,0x3F,0x21,0x01,0x01,0x01,0x00,0x00,//P 48
|
||||
0xE0,0x10,0x08,0x08,0x08,0x10,0xE0,0x00,0x0F,0x18,0x24,0x24,0x38,0x50,0x4F,0x00,//Q 49
|
||||
0x08,0xF8,0x88,0x88,0x88,0x88,0x70,0x00,0x20,0x3F,0x20,0x00,0x03,0x0C,0x30,0x20,//R 50
|
||||
0x00,0x70,0x88,0x08,0x08,0x08,0x38,0x00,0x00,0x38,0x20,0x21,0x21,0x22,0x1C,0x00,//S 51
|
||||
0x18,0x08,0x08,0xF8,0x08,0x08,0x18,0x00,0x00,0x00,0x20,0x3F,0x20,0x00,0x00,0x00,//T 52
|
||||
0x08,0xF8,0x08,0x00,0x00,0x08,0xF8,0x08,0x00,0x1F,0x20,0x20,0x20,0x20,0x1F,0x00,//U 53
|
||||
0x08,0x78,0x88,0x00,0x00,0xC8,0x38,0x08,0x00,0x00,0x07,0x38,0x0E,0x01,0x00,0x00,//V 54
|
||||
0xF8,0x08,0x00,0xF8,0x00,0x08,0xF8,0x00,0x03,0x3C,0x07,0x00,0x07,0x3C,0x03,0x00,//W 55
|
||||
0x08,0x18,0x68,0x80,0x80,0x68,0x18,0x08,0x20,0x30,0x2C,0x03,0x03,0x2C,0x30,0x20,//X 56
|
||||
0x08,0x38,0xC8,0x00,0xC8,0x38,0x08,0x00,0x00,0x00,0x20,0x3F,0x20,0x00,0x00,0x00,//Y 57
|
||||
0x10,0x08,0x08,0x08,0xC8,0x38,0x08,0x00,0x20,0x38,0x26,0x21,0x20,0x20,0x18,0x00,//Z 58
|
||||
0x00,0x00,0x00,0xFE,0x02,0x02,0x02,0x00,0x00,0x00,0x00,0x7F,0x40,0x40,0x40,0x00,//[ 59
|
||||
0x00,0x0C,0x30,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x06,0x38,0xC0,0x00,//\ 60
|
||||
0x00,0x02,0x02,0x02,0xFE,0x00,0x00,0x00,0x00,0x40,0x40,0x40,0x7F,0x00,0x00,0x00,//] 61
|
||||
0x00,0x00,0x04,0x02,0x02,0x02,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//^ 62
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,//_ 63
|
||||
0x00,0x02,0x02,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//` 64
|
||||
0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x19,0x24,0x22,0x22,0x22,0x3F,0x20,//a 65
|
||||
0x08,0xF8,0x00,0x80,0x80,0x00,0x00,0x00,0x00,0x3F,0x11,0x20,0x20,0x11,0x0E,0x00,//b 66
|
||||
0x00,0x00,0x00,0x80,0x80,0x80,0x00,0x00,0x00,0x0E,0x11,0x20,0x20,0x20,0x11,0x00,//c 67
|
||||
0x00,0x00,0x00,0x80,0x80,0x88,0xF8,0x00,0x00,0x0E,0x11,0x20,0x20,0x10,0x3F,0x20,//d 68
|
||||
0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x1F,0x22,0x22,0x22,0x22,0x13,0x00,//e 69
|
||||
0x00,0x80,0x80,0xF0,0x88,0x88,0x88,0x18,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//f 70
|
||||
0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x6B,0x94,0x94,0x94,0x93,0x60,0x00,//g 71
|
||||
0x08,0xF8,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x3F,0x21,0x00,0x00,0x20,0x3F,0x20,//h 72
|
||||
0x00,0x80,0x98,0x98,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//i 73
|
||||
0x00,0x00,0x00,0x80,0x98,0x98,0x00,0x00,0x00,0xC0,0x80,0x80,0x80,0x7F,0x00,0x00,//j 74
|
||||
0x08,0xF8,0x00,0x00,0x80,0x80,0x80,0x00,0x20,0x3F,0x24,0x02,0x2D,0x30,0x20,0x00,//k 75
|
||||
0x00,0x08,0x08,0xF8,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//l 76
|
||||
0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x20,0x3F,0x20,0x00,0x3F,0x20,0x00,0x3F,//m 77
|
||||
0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x3F,0x21,0x00,0x00,0x20,0x3F,0x20,//n 78
|
||||
0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x1F,0x20,0x20,0x20,0x20,0x1F,0x00,//o 79
|
||||
0x80,0x80,0x00,0x80,0x80,0x00,0x00,0x00,0x80,0xFF,0xA1,0x20,0x20,0x11,0x0E,0x00,//p 80
|
||||
0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x0E,0x11,0x20,0x20,0xA0,0xFF,0x80,//q 81
|
||||
0x80,0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x20,0x20,0x3F,0x21,0x20,0x00,0x01,0x00,//r 82
|
||||
0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x33,0x24,0x24,0x24,0x24,0x19,0x00,//s 83
|
||||
0x00,0x80,0x80,0xE0,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x1F,0x20,0x20,0x00,0x00,//t 84
|
||||
0x80,0x80,0x00,0x00,0x00,0x80,0x80,0x00,0x00,0x1F,0x20,0x20,0x20,0x10,0x3F,0x20,//u 85
|
||||
0x80,0x80,0x80,0x00,0x00,0x80,0x80,0x80,0x00,0x01,0x0E,0x30,0x08,0x06,0x01,0x00,//v 86
|
||||
0x80,0x80,0x00,0x80,0x00,0x80,0x80,0x80,0x0F,0x30,0x0C,0x03,0x0C,0x30,0x0F,0x00,//w 87
|
||||
0x00,0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x31,0x2E,0x0E,0x31,0x20,0x00,//x 88
|
||||
0x80,0x80,0x80,0x00,0x00,0x80,0x80,0x80,0x80,0x81,0x8E,0x70,0x18,0x06,0x01,0x00,//y 89
|
||||
0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x21,0x30,0x2C,0x22,0x21,0x30,0x00,//z 90
|
||||
0x00,0x00,0x00,0x00,0x80,0x7C,0x02,0x02,0x00,0x00,0x00,0x00,0x00,0x3F,0x40,0x40,//{ 91
|
||||
0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,//| 92
|
||||
0x00,0x02,0x02,0x7C,0x80,0x00,0x00,0x00,0x00,0x40,0x40,0x3F,0x00,0x00,0x00,0x00,//} 93
|
||||
0x00,0x06,0x01,0x01,0x02,0x02,0x04,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//~ 94
|
||||
};
|
||||
*/
|
||||
/* BMP 128*64 */
|
||||
//
|
||||
const char PROGMEM BMP1[] ={
|
||||
0x00,0x03,0x05,0x09,0x11,0xFF,0x11,0x89,0x05,0xC3,0x00,0xE0,0x00,0xF0,0x00,0xF8,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x44,0x28,0xFF,0x11,0xAA,0x44,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x83,0x01,0x38,0x44,0x82,0x92,
|
||||
0x92,0x74,0x01,0x83,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7C,0x44,0xFF,0x01,0x7D,
|
||||
0x7D,0x7D,0x01,0x7D,0x7D,0x7D,0x7D,0x01,0x7D,0x7D,0x7D,0x7D,0x7D,0x01,0xFF,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,
|
||||
0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x3F,0x03,0x03,
|
||||
0xF3,0x13,0x11,0x11,0x11,0x11,0x11,0x11,0x01,0xF1,0x11,0x61,0x81,0x01,0x01,0x01,
|
||||
0x81,0x61,0x11,0xF1,0x01,0x01,0x01,0x01,0x41,0x41,0xF1,0x01,0x01,0x01,0x01,0x01,
|
||||
0xC1,0x21,0x11,0x11,0x11,0x11,0x21,0xC1,0x01,0x01,0x01,0x01,0x41,0x41,0xF1,0x01,
|
||||
0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x11,0x11,0x11,0x11,0x11,0xD3,0x33,
|
||||
0x03,0x03,0x3F,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0xE0,0x00,0x00,
|
||||
0x7F,0x01,0x01,0x01,0x01,0x01,0x01,0x00,0x00,0x7F,0x00,0x00,0x01,0x06,0x18,0x06,
|
||||
0x01,0x00,0x00,0x7F,0x00,0x00,0x00,0x00,0x40,0x40,0x7F,0x40,0x40,0x00,0x00,0x00,
|
||||
0x1F,0x20,0x40,0x40,0x40,0x40,0x20,0x1F,0x00,0x00,0x00,0x00,0x40,0x40,0x7F,0x40,
|
||||
0x40,0x00,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x40,0x30,0x0C,0x03,0x00,0x00,
|
||||
0x00,0x00,0xE0,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x06,0x06,
|
||||
0x06,0x06,0x04,0x04,0x04,0x84,0x44,0x44,0x44,0x84,0x04,0x04,0x84,0x44,0x44,0x44,
|
||||
0x84,0x04,0x04,0x04,0x84,0xC4,0x04,0x04,0x04,0x04,0x84,0x44,0x44,0x44,0x84,0x04,
|
||||
0x04,0x04,0x04,0x04,0x84,0x44,0x44,0x44,0x84,0x04,0x04,0x04,0x04,0x04,0x84,0x44,
|
||||
0x44,0x44,0x84,0x04,0x04,0x84,0x44,0x44,0x44,0x84,0x04,0x04,0x04,0x04,0x06,0x06,
|
||||
0x06,0x06,0x07,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x10,0x18,0x14,0x12,0x11,0x00,0x00,0x0F,0x10,0x10,0x10,
|
||||
0x0F,0x00,0x00,0x00,0x10,0x1F,0x10,0x00,0x00,0x00,0x08,0x10,0x12,0x12,0x0D,0x00,
|
||||
0x00,0x18,0x00,0x00,0x0D,0x12,0x12,0x12,0x0D,0x00,0x00,0x18,0x00,0x00,0x10,0x18,
|
||||
0x14,0x12,0x11,0x00,0x00,0x10,0x18,0x14,0x12,0x11,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x80,0x80,
|
||||
0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x7F,0x03,0x0C,0x30,0x0C,0x03,0x7F,0x00,0x00,0x38,0x54,0x54,0x58,0x00,0x00,
|
||||
0x7C,0x04,0x04,0x78,0x00,0x00,0x3C,0x40,0x40,0x7C,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xAA,0xAA,0xAA,
|
||||
0x28,0x08,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0x03,0x0C,0x30,0x0C,0x03,0x7F,
|
||||
0x00,0x00,0x26,0x49,0x49,0x49,0x32,0x00,0x00,0x7F,0x02,0x04,0x08,0x10,0x7F,0x00,
|
||||
};
|
||||
#endif
|
||||
306
trunk/Arduino/libraries/sys64738/sys64738.cpp
Normal file
306
trunk/Arduino/libraries/sys64738/sys64738.cpp
Normal file
@@ -0,0 +1,306 @@
|
||||
/*
|
||||
sys64738.cpp - Library from sys64738.
|
||||
Created by Paolo Iocco, November 2, 2014.
|
||||
Released into the public domain.
|
||||
*/
|
||||
|
||||
//#include "Arduino.h"
|
||||
#include "sys64738.h"
|
||||
|
||||
|
||||
/*
|
||||
* Classe base per la grafica
|
||||
*/
|
||||
|
||||
graphic::graphic(void){
|
||||
_MaxX=84;
|
||||
_MaxY=48;
|
||||
_ch_width=6;
|
||||
_font=0;
|
||||
}
|
||||
void graphic::Clear(void){
|
||||
|
||||
}
|
||||
void graphic::Init(void){
|
||||
|
||||
}
|
||||
void graphic::Fillscreen(unsigned char FillData){
|
||||
|
||||
}
|
||||
void graphic::Locate (unsigned char x, unsigned char y){
|
||||
|
||||
}
|
||||
void graphic::WriteChar(char character, char font){
|
||||
|
||||
}
|
||||
|
||||
void graphic::WriteCharXY(unsigned char x, unsigned char y, char character, char font){
|
||||
Locate(x,y);
|
||||
WriteChar(character, font);
|
||||
}
|
||||
|
||||
void graphic::WriteString(char *characters, char font){
|
||||
while (*characters){
|
||||
WriteChar(*characters++,font);
|
||||
}
|
||||
}
|
||||
|
||||
void graphic::WriteStringXY(unsigned char x, unsigned char y, char *characters, char font){
|
||||
Locate(x,y);
|
||||
WriteString(characters,font);
|
||||
}
|
||||
|
||||
void graphic::Draw_BMP(unsigned char x0, unsigned char y0, unsigned char x1, unsigned char y1,const char BMP[]){
|
||||
|
||||
}
|
||||
|
||||
|
||||
//********************************************************************************************************************
|
||||
//** NOKIA 5110 Display over SPI
|
||||
|
||||
Display5110::Display5110(char PIN_SCE, char PIN_RESET, char PIN_DC, char PIN_SDIN, char PIN_SCLK){
|
||||
_PIN_SCE = PIN_SCE;
|
||||
_PIN_RESET = PIN_RESET;
|
||||
_PIN_DC = PIN_DC;
|
||||
_PIN_SDIN = PIN_SDIN;
|
||||
_PIN_SCLK = PIN_SCLK;
|
||||
_MaxX=84;
|
||||
_MaxY=48;
|
||||
}
|
||||
|
||||
void Display5110::Init(void){
|
||||
pinMode(_PIN_SCE, OUTPUT);
|
||||
pinMode(_PIN_RESET, OUTPUT);
|
||||
pinMode(_PIN_DC, OUTPUT);
|
||||
pinMode(_PIN_SDIN, OUTPUT);
|
||||
pinMode(_PIN_SCLK, OUTPUT);
|
||||
digitalWrite(_PIN_RESET, LOW);
|
||||
digitalWrite(_PIN_RESET, HIGH);
|
||||
WriteByte(LCD_C, 0x21 ); // set LCD mode:PDown=0, Vaddr=0, Hext=1
|
||||
WriteByte(LCD_C, 0xBC ); // set bias voltage, 0b(1)100.1000 (0x48) was: 0xB1
|
||||
WriteByte(LCD_C, 0x06 ); // temperature correction=0b(0000.01)10 was: 0x04
|
||||
WriteByte(LCD_C, 0x13 ); // set bias system: 0b(0001.0)011 --> 1:48 was: 0x14
|
||||
WriteByte(LCD_C, 0x20 ); // set LCD mode:PDown=0, Vaddr=0, Hext=0
|
||||
WriteByte(LCD_C, 0x0C ); // set LCD config, 0b(0000.1)100 --> normal mode
|
||||
digitalWrite(_PIN_SCE, LOW); // chip enable
|
||||
Clear();
|
||||
}
|
||||
|
||||
void Display5110::Clear(void){
|
||||
for (int index = 0; index < _MaxX * _MaxY / 8; index++){
|
||||
WriteByte(LCD_D, 0x00);
|
||||
}
|
||||
}
|
||||
|
||||
void Display5110::Locate(unsigned char x, unsigned char y){
|
||||
WriteByte( LCD_C, 0x80 | x); // Column.
|
||||
WriteByte( LCD_C, 0x40 | y); // Row.
|
||||
}
|
||||
|
||||
void Display5110::WriteChar(char character, char font){
|
||||
switch (font){
|
||||
case (FONT_4x6):
|
||||
_font=&font4x6[0][0];
|
||||
_ch_width=4;
|
||||
break;
|
||||
case (FONT_5x8):
|
||||
_font=&font5x8[0][0];
|
||||
_ch_width=5;
|
||||
break;
|
||||
case (FONT_6x8):
|
||||
_font=&font6x8[0][0];
|
||||
_ch_width=6;
|
||||
break;
|
||||
case (FONT_8x8):
|
||||
_font=&font8x8[0][0];
|
||||
_ch_width=8;
|
||||
break;
|
||||
case (FONT_C16):
|
||||
_font=&font_c16[0][0];
|
||||
_ch_width=8;
|
||||
break;
|
||||
}
|
||||
for (char index = 0; index < _ch_width; index++){
|
||||
WriteByte(LCD_D, pgm_read_byte(&(_font[_ch_width*character+index])));
|
||||
}
|
||||
}
|
||||
|
||||
void Display5110::WriteByte(byte dc, byte data){
|
||||
digitalWrite(_PIN_DC, dc);
|
||||
digitalWrite(_PIN_SCE, LOW);
|
||||
shiftOut(_PIN_SDIN, _PIN_SCLK, MSBFIRST, data);
|
||||
digitalWrite(_PIN_SCE, HIGH);
|
||||
}
|
||||
|
||||
void Display5110::SetContrast(unsigned char contrast) {
|
||||
WriteByte( 0x21, LCD_C ); // LCD Extended Commands.
|
||||
WriteByte( 0x80 | contrast, LCD_C ); // Set LCD Vop (Contrast).
|
||||
WriteByte( 0x20, LCD_C ); // LCD Standard Commands, horizontal addressing mode.
|
||||
}
|
||||
|
||||
//********************************************************************************************************************
|
||||
//** OLED 2 Colors display over I2C
|
||||
|
||||
DisplayIIC::DisplayIIC(int sda, int scl){
|
||||
_sda = sda;
|
||||
_scl = scl;
|
||||
pinMode(sda, OUTPUT);
|
||||
pinMode(scl, OUTPUT);
|
||||
}
|
||||
|
||||
// Comm start
|
||||
void DisplayIIC::Init(){
|
||||
IIC_Command(0xAE);//display off
|
||||
IIC_Command(0x00);//Set Memory Addressing Mode
|
||||
IIC_Command(0x10);//00,Horizontal Addressing Mode;01,Vertical Addressing Mode;10,Page Addressing Mode (RESET);11,Invalid
|
||||
IIC_Command(0x40);//Set Page Start Address for Page Addressing Mode,0-7
|
||||
IIC_Command(0x81);//Set COM Output Scan Direction
|
||||
IIC_Command(0xCF);//---set low column address
|
||||
IIC_Command(0xA1);//---set high column address
|
||||
IIC_Command(0xC8);//--set start line address
|
||||
IIC_Command(0xA6);//--set contrast control register
|
||||
IIC_Command(0xA8);
|
||||
IIC_Command(0x3F);//--set segment re-map 0 to 127
|
||||
IIC_Command(0xD3);//--set normal display
|
||||
IIC_Command(0x00);//--set multiplex ratio(1 to 64)
|
||||
IIC_Command(0xD5);//
|
||||
IIC_Command(0x80);//0xa4,Output follows RAM content;0xa5,Output ignores RAM content
|
||||
IIC_Command(0xD9);//-set display offset
|
||||
IIC_Command(0xF1);//-not offset
|
||||
IIC_Command(0xDA);//--set display clock divide ratio/oscillator frequency
|
||||
IIC_Command(0x12);//--set divide ratio
|
||||
IIC_Command(0xDB);//--set pre-charge period
|
||||
IIC_Command(0x40);//
|
||||
IIC_Command(0x20);//--set com pins hardware configuration
|
||||
IIC_Command(0x02);
|
||||
IIC_Command(0x8D);//--set vcomh
|
||||
IIC_Command(0x14);//0x20,0.77xVcc
|
||||
IIC_Command(0xA4);//--set DC-DC enable
|
||||
IIC_Command(0xA6);//
|
||||
IIC_Command(0xAF);//--turn on oled panel
|
||||
|
||||
|
||||
}
|
||||
void DisplayIIC::Clear(){
|
||||
FillScreen(0x00);
|
||||
}
|
||||
|
||||
void DisplayIIC::FillScreen(unsigned char fill_Data){
|
||||
unsigned char m,n;
|
||||
for(m=0;m<8;m++){
|
||||
IIC_Command(0xb0+m); //page0-page1
|
||||
IIC_Command(0x00); //low column start address
|
||||
IIC_Command(0x10); //high column start address
|
||||
IIC_Data();
|
||||
for(n=0;n<128;n++){
|
||||
IIC_WriteByte(fill_Data);
|
||||
}
|
||||
IIC_Stop();
|
||||
}
|
||||
}
|
||||
|
||||
void DisplayIIC::Locate(unsigned char x, unsigned char y){
|
||||
IIC_Start();
|
||||
IIC_WriteByte(0x78); //Slave address,SA0=0
|
||||
IIC_WriteByte(0x00); //write command
|
||||
IIC_WriteByte(0xb0+y);
|
||||
IIC_WriteByte(((x&0xf0)>>4)|0x10);//|0x10
|
||||
IIC_WriteByte((x&0x0f)|0x00); //|0x01
|
||||
IIC_Stop();//SetPos
|
||||
}
|
||||
|
||||
void DisplayIIC::WriteChar(char character, char font){
|
||||
switch (font){
|
||||
case (FONT_4x6):
|
||||
_font=&font4x6[0][0];
|
||||
_ch_width=4;
|
||||
break;
|
||||
case (FONT_5x8):
|
||||
_font=&font5x8[0][0];
|
||||
_ch_width=5;
|
||||
break;
|
||||
case (FONT_6x8):
|
||||
_font=&font6x8[0][0];
|
||||
_ch_width=6;
|
||||
break;
|
||||
case (FONT_8x8):
|
||||
_font=&font8x8[0][0];
|
||||
_ch_width=8;
|
||||
break;
|
||||
case (FONT_C16):
|
||||
_font=&font_c16[0][0];
|
||||
_ch_width=8;
|
||||
break;
|
||||
}
|
||||
IIC_Data();
|
||||
for (char index = 0; index < _ch_width; index++){
|
||||
IIC_WriteByte(pgm_read_byte(&(_font[_ch_width*character+index])));
|
||||
}
|
||||
IIC_Stop();
|
||||
}
|
||||
|
||||
void DisplayIIC::Draw_BMP(unsigned char x0, unsigned char y0, unsigned char x1, unsigned char y1,const char BMP[]){
|
||||
unsigned int j=0;
|
||||
unsigned char x,y;
|
||||
|
||||
if(y1%8==0)
|
||||
y=y1/8;
|
||||
else
|
||||
y=y1/8+1;
|
||||
for(y=y0;y<y1;y++){
|
||||
Locate(x0,y);
|
||||
IIC_Data();
|
||||
for(x=x0;x<x1;x++){
|
||||
IIC_WriteByte(pgm_read_byte(&(BMP[j++])));
|
||||
}
|
||||
IIC_Stop();
|
||||
}
|
||||
}
|
||||
|
||||
void DisplayIIC::IIC_Start(){
|
||||
digitalWrite(_scl, HIGH);
|
||||
digitalWrite(_sda, HIGH);
|
||||
digitalWrite(_sda, LOW);
|
||||
digitalWrite(_scl, LOW);
|
||||
}
|
||||
|
||||
//I2C Stop
|
||||
void DisplayIIC::IIC_Stop(){
|
||||
digitalWrite(_scl, LOW);
|
||||
digitalWrite(_sda, LOW);
|
||||
digitalWrite(_scl, HIGH);
|
||||
digitalWrite(_sda, HIGH);
|
||||
}
|
||||
|
||||
//Write Byte
|
||||
void DisplayIIC::IIC_WriteByte(unsigned char IIC_Byte){
|
||||
unsigned char i;
|
||||
for(i=0;i<8;i++){
|
||||
if((IIC_Byte << i) & 0x80)
|
||||
digitalWrite(_sda, HIGH);
|
||||
else
|
||||
digitalWrite(_sda, LOW);
|
||||
digitalWrite(_scl, HIGH);
|
||||
digitalWrite(_scl, LOW);
|
||||
// IIC_Byte<<=1;
|
||||
}
|
||||
digitalWrite(_sda, HIGH);
|
||||
digitalWrite(_scl, HIGH);
|
||||
digitalWrite(_scl, LOW);
|
||||
}
|
||||
|
||||
//Write Command
|
||||
void DisplayIIC::IIC_Command(unsigned char IIC_Command){
|
||||
IIC_Start();
|
||||
IIC_WriteByte(0x78); //Slave address,SA0=0
|
||||
IIC_WriteByte(0x00); //write command
|
||||
IIC_WriteByte(IIC_Command);
|
||||
IIC_Stop();
|
||||
}
|
||||
|
||||
//Write Begin_Data
|
||||
void DisplayIIC::IIC_Data(){
|
||||
IIC_Start();
|
||||
IIC_WriteByte(0x78);
|
||||
IIC_WriteByte(0x40); //write data
|
||||
}
|
||||
85
trunk/Arduino/libraries/sys64738/sys64738.h
Normal file
85
trunk/Arduino/libraries/sys64738/sys64738.h
Normal file
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
sys64738.h - Library from sys64738.
|
||||
Created by Paolo Iocco, October 20, 2014.
|
||||
Released into the public domain.
|
||||
*/
|
||||
#ifndef sys64738_h
|
||||
#define sys64738_h
|
||||
|
||||
//#if ARDUINO >= 100
|
||||
#include "Arduino.h"
|
||||
//#else
|
||||
//#include "WProgram.h"
|
||||
//#endif
|
||||
#include "font.h"
|
||||
|
||||
/*
|
||||
* Classe generale per la grafica
|
||||
*/
|
||||
|
||||
class graphic{
|
||||
public:
|
||||
graphic(void);
|
||||
virtual void Init(void);
|
||||
virtual void Clear(void);
|
||||
virtual void Fillscreen(unsigned char FillData);
|
||||
virtual void Locate (unsigned char x, unsigned char y);
|
||||
virtual void WriteChar(char character, char font);
|
||||
void WriteCharXY(unsigned char x, unsigned char y, char character, char font);
|
||||
void WriteString(char *characters, char font);
|
||||
void WriteStringXY(unsigned char x, unsigned char y, char *characters, char font);
|
||||
virtual void Draw_BMP(unsigned char x0, unsigned char y0, unsigned char x1, unsigned char y1,const char BMP[]);
|
||||
|
||||
protected:
|
||||
byte _MaxX, _MaxY;
|
||||
const byte *_font;
|
||||
byte _ch_width;
|
||||
};
|
||||
|
||||
//********************************************************************************************************************
|
||||
//** NOKIA 5110 Display over SPI
|
||||
|
||||
#define LCD_C LOW
|
||||
#define LCD_D HIGH
|
||||
class Display5110 : public graphic {
|
||||
public:
|
||||
Display5110(char PIN_SCE,char PIN_RESET,char PIN_DC,char PIN_SDIN,char PIN_SCLK);
|
||||
void Init(void);
|
||||
void Clear (void);
|
||||
void Locate (unsigned char x, unsigned char y);
|
||||
void WriteChar(char character, char font);
|
||||
private:
|
||||
void WriteByte(byte dc, byte data);
|
||||
void SetContrast(unsigned char contrast);
|
||||
char _PIN_SCE;
|
||||
char _PIN_RESET;
|
||||
char _PIN_DC;
|
||||
char _PIN_SDIN;
|
||||
char _PIN_SCLK;
|
||||
};
|
||||
|
||||
//********************************************************************************************************************
|
||||
//** OLED 2 Colors display over I2C
|
||||
|
||||
#define BLACK 0
|
||||
#define WHITE 1
|
||||
class DisplayIIC : public graphic{
|
||||
public:
|
||||
DisplayIIC(int sda, int scl);
|
||||
void Init();
|
||||
void Clear();
|
||||
void FillScreen(unsigned char fill_Data);
|
||||
void Locate(unsigned char x, unsigned char y);
|
||||
void WriteChar(char character, char font);
|
||||
void Draw_BMP(unsigned char x0, unsigned char y0, unsigned char x1, unsigned char y1,const char BMP[]);
|
||||
private:
|
||||
void IIC_Start();
|
||||
void IIC_Stop();
|
||||
void IIC_WriteByte(unsigned char IIC_Byte);
|
||||
void IIC_Command(unsigned char IIC_Command);
|
||||
void IIC_Data();
|
||||
int _sda;
|
||||
int _scl;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user