forked from vogelchr/avr_cobalt_panel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
83 lines (65 loc) · 3.47 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
This is a small project to connect a AVR microcontroller
(e.g. an "Arduino") to the LCD/Button panel of a Cobalt RaQ3.
I own one of these devices on which the mainboard was unfixably
broken, and I decided to use them as a general purpose case.
Pinout of the 26pin ribbon connector to the frontpanel, with
proposed connection to an AVR Mega168/Arduino:
--------:-----------:----------------------------:------------:---------
Button |LCD/245 |Arduino/AVR Ard/AVR|LCD |Button
--------:-----------:----------------------------:------------:---------
+-----------+
'245 \OE PB5(13)| ( 2) ( 1) | PB3(11) LCD_E(p6)
LCD_VCC(p2) | ( 4) ( 3) | GND
LCD_D0(p7) PC0(A0)| ( 6) ( 5) | PC1(A1) LCD_D1(p8) B_Pin
B_Left LCD_D2(p9) PC2(A2)| ( 8) ( 7) | PC3(A3) LCD_D3(p10) B_Up
B_Down LCD_D4(p11) PC4(A4)| (10) ( 9) | PC5(A5) LCD_D5(p12) B_Right
B_E LCD_D6(p13) PD6(6) | (12) (11) | PD7(7) LCD_D7(p14) B_S
LCD_RW(p5) GND! | (14) (13) | PB4(12) LCD_RS(p4)
n/c | (16) (15) | GND
Col (Cath) PD5(5) | (18) (17) | PB0(8) Web (LED Anode)
Link(Cath) PD4(4) | (20) (19) | PB1(9) Disk (LED Cath)
100M(Cath) PD3(3) | (22) (21) | n/c
TxRx(Cath) PD2(2) | (24) (23) | PB2(10) Logo (NPN base)
n/c | (26) (25) | n/c
+-----------+
LCD_x are connections to the hd44780-LCD (with pin numbers in
parentheses). B_x are connections to the buttons. They are put
on the D1..D7 lines when the \OE pin is low (there's a 74HC245
on the frontpanel board). LEDs are all wired up differently:
The network LEDs (Col, Link, 100M, TxRx) have their anodes
wired up to Vcc and expect to be pulled low with a suitable
resistor (say 200Ohms - 1kOhm for 5V). Web has the cathode wired
to ground, Disk has the anode wired to Vcc. Resistors are soldered.
Serial protocol (on an Arduino, this is the USB emulated serial port
/dev/ttyUSBn):
By default every character gets sent to the LCD.
The following ESC sequences are understood:
ESC 'c' -> clear and home
ESC 'h' -> home
ESC 'p' x y c b -> goto x y, turn on/off cursor and blink
x = '0'..'9' and 'a'..'e' -> x-position in hex
y = '0'..'1' -> y-position in hex
c = '0'..'1' show(1) or hide(0) cursor
b = '0'..'1' blink(1) or don't blink (0)
ESC 'u' x p0..p7 -> user-define character
x = '0'..'7' character number in hex
p0..p7 character data in BINARY!
A single 5x7 character looks like:
p0_bit4 p0_bit3 ... p0_bit0 <--- top
p1_bit4 p1_bit3 ... p1_bit0
... ...
p7_bit4 p7_bit3 ... p7_bit0 <--- bottom
ESC 'l' a b -> LED, lights up the LEDs corresponding to
the mask 0xab where
a = '0'..'9','a'..'f' -> high nibble in hex
b = '0'..'9','a'..'f' -> low nibble in hex
ESC '?' -> inquire, will return the string
avr-cobalt-panel\r\n
The keys pressed on the front-panel are returned as:
Up/Down/Left/Right/S/E -> 'U', 'D', 'L', 'R', 'S', 'E'
The sunken button that can only be reached with a *PIN* is
returned as the character 'P'.
Depending on desired use, you may want to disable the Arduino's auto reset
on serial connect: http://playground.arduino.cc/Main/DisablingAutoResetOnSerialConnection
I added a 100uf capacitor between reset and ground and it worked. This allowed
sending commands through echo (without it resetting).