Cheap and simple I²C to USB interface. Contribute to harbaum/I2C-Tiny-USB development by creating an account on GitHub. From: Till Harbaum till@ha. 2016-03-20 11:22:22 Hi, i am too sorry. Having searched half the evening a few seconds after asking my question i found the 'Specifying libraries by hand' section in the manual. As I understand, the existing kernel drivers should be invoked for this. First I tried with Raspian, all went fine: 66.451429 usb 1-1.3: new low-speed USB device number 7 using dwcotg 6. Jump to content.
This projects home is now on github.
GLCD2USB is the graphic display capable descendant of the LCD2USB. While the LCD2USB wasmeant to connect text LCDs via USB to a PC, GLCD2USB does the same forsome common graphic LCD modules. While the LCD2USB made use of thefact that there's a quasi standard for text LCD controllers, theGLCD2USB needs to cope with various graphic LCD controllersavailable. The GLCD2USB was thus designed for maximum flexibility andthe number and types of supported displays can easily be increased byproviding matching modified firmware versions. However, currentlyonly 128x64 ks0108 based displays are supported.
GLCD2USB is currently supported by lcd4linux.Since May '12 serdisplib also supports the glcd2usb.
Every now and then i have spare PCBs (11 Euro each) and flashed and tested CPUs available. Send me an email if you are interested.
Hardware
Unlike pcb V1.1 depicted above, the current pcb layout V1.2 has the USB connector mounted from the front side (the same side all other parts are mounted as well)!
Schematics and pcb layout
Supported display types
The GLCD2USB concept is meant to support various different displaytypes. Currently a version is available to directly attach to some ofthe popular ks0108 based displays like the Displaytech 64128A(available e.g. from Reichelt) orthe TG12864B (verified to work, available e.g. from Pollin).
The GLCD2USB features 16 firmware configurable interface lines(AVR ports A and C) which will allow to connect the GLCD2USB to virtuallyany intelligent graphic display out there. However, currently only a hardware design and a firmware for certain ks0108 based displays havebeen developed. Further hardware versions with a matching firmwaresolution may support other controllers as well.
Required parts
You can get all parts in germany from Reichelt or Conrad:
Part | Qty | Name | Reichelt | Conrad | Maplin UK |
---|---|---|---|---|---|
Q1 | 1 | 16Mhz crystal, HC49U package | 16,0000-HC49U-S | 155145 | RR89W |
R1 | 1 | 2.2k ohm resistor | 1/4W 2,2k | 403270 | M2K2 |
R2, R3 | 2 | 68 ohm resistor | 1/4W 68 | 403113 | M68R |
R4 | 1 | 47 ohm resistor | 1/4W 47 | 403091 | M47R |
R5 | 1 | 220 ohm resistor | 1/4W 220 | 403172 | M220R |
R6 | 1 | 4.7k ohm resistor | 1/4W 4,7k | 403334 | M4K7 |
C1, C2 | 2 | 22pF ceramic capacitor, 2.54mm | KERKO 22P | 457167 | RA34M |
C3, C5 | 2 | 100nF capacitor, 5.08mm | X7R-5 100N | 453358 | RA49D |
C6 | 1 | 10μF electrolytic capacitor | RAD 10/35 | 472484 | AT98G |
T1 | 1 | BC547C transistor | BC 547C | 154989 | QQ14Q |
S1, S2, S3, S4 | 4 | push button | TASTER 9305 | 700460 | KR89W |
SV1 | 1 | 10 pin ISP connector | WSL 10W | 742365 | JB85G |
JP1 | - | serial connector, for debugging only | - | - | - |
JP2 | 1 | display connector | BL 1X20G8 2,54 | 734993 | --- |
-- | 1 | display side connector for JP2 | SL 1X36G 2,54 | 744018 | JW59P |
LED1 | 1 | LED 3mm green | LED 3MM GN | 184713 | WL33L |
X1 | 1 | mini USB-B print connector | USB BWM | ??? | --- |
IC1 | 1 | Atmega16-16 DIP | ATMEGA 16-16 DIP | 154242 | --- |
-- | 1 | socket for IC1 | GS 40P | 184882 | HQ38R |
D1, D2 | 2 | 3.6V zener diode | ZF 3,6 | 180050 | QH03D |
R7 | 1 | 10k precision variable resistor | 962-20 10K | 425109 | WR49D |
-- | 1 | Display | LCD 128X064 BL, LCD 64128A LED | 187429, 187433 | --- |
Additionally required: Display, Mini USB cable
Part list remarks
The crystal should be in the small HC49U package. You can use acrystal in HC18 package, but you'd then have to mount it from the rear pcb side.
C1 and C2 should have their pins 2.54mm (1/10 inch) apart, C3 andC5 have their pins 5.08mm (2/10 inch) apart.
Although T1 is labeled BC547C, a BC547A or BC547B will be fine as well.
If the backlight of the display draws more current than the100mA the BC547 can handle a BC447 or BS170 may be used instead. Ihave not tested this and feedback is welcome. I have unknowingly beenrunning the BC547 with a display drawing over 120mA without anyproblems, but using a transistor specified for the required currentsure is a good idea.
Contrast voltage supply
Some contrast voltage has to provided to bascially any LCD in orderto generate readable output at a useful contrast. Without propercontrast voltage a LCD won't display anything. Unlike e.g. the HD44780controllers used with the LCD2USB, the KS0108needs a negative contrast voltage. This is provided by the displaycontroller itself and needs to be fed back into it. Since the AVR CPUcan't easily work with negative voltages, the contrast is not softwarecontrolled but by the variable resisitor R7.
Backlight polarity
Most of the 20 pin connector seems to be the same for many 128x64ks0108 displays. But you should still carefully verify the pinout ofthe display you are going to use. One frequent difference betweendifferent displays seems to be the polarity of the backlighting. TheGLCD2USB contains two SMD solder jumpers in the rear side below theprogramming connector. Please take care to close for the correntpolarity on your used by your display. Using the wrong polarity mightdamage the backlight of your display.
If the backlights cathode (GND) is on pin 19 and the anode (VCC) ison pin 20 then the innermost SMD pads are to be connected as seen onthe left image below. If the cathode of the displays backlight LED is onpin 19 and the anode on pin 20 then the both outermost SMD pads have tobe connected with a small solder blob as seen on the right image below.
Backlight current
Resistor R4 is the current limiting resistor for backlight. The47 ohm in the part list is a useful and secure value for some LCDswith low power LED backlighting. Some displays already include thecurrent limiting resistor and/or require a higher current. The symptomusually is a very dark or even barely visible backlighting with R4 at47 ohms. You can lower the value of R4 in order to increase thebacklight current and thus the brightness. Please consult thedatasheet of your display for its backlight power requirements and inorder to select the correct current limiting resistors. The BC547transistor T1 may not be sufficient for displays requiring backlightcurrents > 100mA.
Also keep in mind that the backlight is software controlled bythe AVR CPU and that it's not at full brightness at startup time.Use the 'Brightness' option in lcd4linux.conf to adjust to the fullbrightness by setting this value to 255 before doing any hardware modifications with regard to this.
Buttons
The GLCD2USB supports 4 user controllable buttons. The buttonsstates are reported to the host and can be used there for furtherprocessing. The GLCD2USB does not use the buttons by itself.
Software
The GLCD2USB consists of two software components: The firmwareinstalled inside the device and a software driver installed on the controlling host.
Firmware installation
The GLCD2USB is based on the Atmega16, member of the Atmel AVRfamily, but the hardware allows to use the Mega32 and Mega664 chips aswell if e.g. internal flash space becomes a bottleneck. It is drivenby a firmware available in the download section below. By installingdifferent firmware versions, various display types can besupported. Currently a firmware for ks0108 based displays isavailable.
The ATmega chips have initially to be flashed with the GLCD2USBfirmware using a special programming hardware like e.g. the AVR ISP or the USBASP.
Various AVR ISP programming solutions exist as well as variousPC flash software to use these. The following explanation detailsone of these possibilities.
If the firmware file named firmware.hex is to be uploaded to theAtmega16 using the AVRDUDE programming software and the USBASP programming hardwarethe following command is required:
This will install the firmware in the AVRs flash memory. Once thefirmware is installed and the device is powered up, the LED on theGLCD2USB will be switched on and an attached display will displaythe demo screen (actual contents may vary with different firmwareversions).
Host driver software
Currently only the SVN version of lcd4linux available heresupports the GLCD2USB interface. Fetch a copy from SVN as describedthere and compile and install it. The resulting lcd2linux binaryshould mention the GLCD2USB interface when invoked with the -lparameter.
The glcd2usb example configuration canbe used as a basis for own configurations. Please make sure thetux.png from the lcd4linux package is in the current directory whenrunning this demo config to make sure the little tux is displayed toshow the graphic capabilities of the display.
Adding support for a new display
LCDproc - Supported Hardware
The GLCD2USB was designed to be directly attached to certain ks0108controller based displays (see above). But it can be adopted to otherdisplays as well. If these displays are based upon one of thecontrollers already supported getting the display to work with theGLCD2USB may be as simple as doing the correct wiring. However, thiswill not be sufficient with displays based on controllers not yetsupported.
The GLCD2USB only supports 'intelligent' displays. This means thatit only supports displays with built-in graphic controller which dothe major work of driving the display. The GLCD2USB does e.g. not supportbare TFT displays as used in notebook computers or palmtops. As a basic ruleof thumb: GLCD2USB can be adopted to any display that some hackers havebeen able to drive via a PCs printer port (this is e.g. true for theks0108).On the other hand, displays that need to be connected to the videocard of a PC (either VGA, DVI or something similar) are not supportedby GLCD2USB.
Writing a driver for an unsupported display controller is failyeasy if you have access to the controllers specification or even someAVR library with routines for the controller in question. You can takethe ks0108 driver of the GLCD2USB as a reference to build your owndriver upon. The display connectors of the GLCD2USB give you accessto 16 general purpose pins of the AVR CPU. This should be sufficientto drive the vast majority of displays.
Downloads
See Full List On Github.com
This projects home is now on github.