• For a long time I had a layout for this circuit, but could never build it, because the layout was to small to be made by tonertransfer.

    So it was the first layout I made with my new exposure unit. It’s quite small, so it fits under the LEDMatrix itself. Therefore only SMD parts are used.

    It took three trys to get it right. The first failed because the etching solution was to weak, took to long and caused heavy underetching. The second was not properly exposed.

    The third try worked perfectly. The alignment of the two layers was good and the etching took only 10 minutes.





    Soldering the SMD resistors and transistors was not very difficult using a magnifyer and tweezers.
    The 74HCT138 was more or less easy to solder, but the MAX6964 was a bit harder. (The pins have a pitch of only 0.635mm.) But with desoldering braid any superfluous solder can be removed.

    The MAX6964 is controlled via I²C. It has 2 8-bit registers which switch the 16 outputs on and off and 8 8-bit registers which controll the brightness (via PWM).

    To keep the layout easy and the number of vias low, i had to wire the pixels of the LED matrix in somewhat weird way. But this is easily compensated in software.

    The correct order for the rows is saved in a lookup-table (just an array).
    The data for one row is two bytes long. The first byte contains the data for the first four pixels. (Two bits per pixel, for red and green.) The first byte is left to right, the second byte is right to left.

    Most of the code is I²C communication and transforming pixel data to the correct format for the MAX6964.
    Layout and code can be downloaded here. Datasheet for MAX6964 here. (Maxim is very generous when it comes to shipping free samples…)

    Tags: , , , , , ,

  • I recently obtained a very old mobile phone from a friend. The battery was dead, so I dismantled it and to my surprise found a display with soldered contacts. In other mobile phones the display was connected via a conducting polymerpad, which was extremly difficult to use on selfmade circuitboards.

    Googling the name of the display brought up a site with pinout and a link to the datasheet of the driverchip.

    Using my I²C-Adapter and my I²C-Control program the testing was easy. Just look up the commands in the datasheet, put together a sequence and run it. The display works well and even the illumination is intact.

    Pinout (looking at the back of the display with the black blob to the top right):

    1. VLCD
    2. – LED1
    3. – LED2
    4. SCL
    5. VC (Contrast)
    6. VDD (+5V)
    7. SDA
    8. GND
    9. + LED 1&2 (+5V)
    10. VO

    Connect SDA, SCL, 5V supply and a 10k poti between 5V and GND and the centertap to VC and you are ready to go.

    The adress of the display is 01110100 for writing data.

    After sending the adress you first send a control byte, which determines if the following bytes are commands or characters. Sending 00000000 selects the commands. Then we set the datalength to 8bit, the number of lines to 4 and the voltage generator control to V0=VDD-0.8V by sending 00001110. The display is then switched on by sending 00001111, which also sets the cursor position and blinking. The following byte ( 00000110 ) configures the entrymode of the display to increment the adress after every written character and to freeze the display (and not shift it). Then we only have to specify in which of the four lines we want the following characters to be written. This is done by setting the DDRAM adress to one of the following values: 0x00 (1st line), 0x20 (2nd line), 0x40 (3rd line), 0x60 (4th line).

    Then you send a repeated START condition, the adress again, a controlbyte which tells the display that all following data are characters ( 01000000 ).

    Then you can send arbitrary characters. The character-table is on page 15 in the datasheet, and the commands are on pages 23 and 24.

    Clearing the display is done by sending 00000001 as a command.

    LPH7319 controlled via I²C

    LPH7319 controlled via I²C

    The driverchip is called PCF2116. The datasheet can be found here.

    I will post a complete sequence that clears the display and writes ‘Linex’ (x = 1..4) to the four lines soon.

    For now just a photo of the result:

    Tags: , , , , , ,

  • For quick testing of digital circuits and chips I often use the parallelport because it is easy to program in C and QBasic. But writing a program for every new circuit takes to much time. So I wrote a little program to control the parallelport via a nice GUI.

    Parallelport Control

    Parallelport Control

    When you start the executable, you get the Port-Control-Screen, which is divided into the three registers that contain the pins of the port. The pins can be set individually or a script can be created, which places the bitpatterns on the port automatically. Therefore you must select a port, enter the hex-value of the byte, and click ‘Add’. Delays work the same way. The script can be saved and loaded via the contextmenu of the listbox. You can also write the script with any editor, as long as the same syntax is used.

    The ‘Run’-button runs the script n times, with n being the number in the field next to the button.

    The I²C-Mode is activated with the button of the same name.

    I2C Control

    I2C Control

    Here you have a sequence-listbox, the available actions, the necessesary parameters and a listbox which displays the recieved data. Just select the desired action, enter hex-value of the byte to send or delay (if necessary) and click ‘Add’. The contextmenu of the sequence-listbox provides save and load for the scripts.

    In datasheets for i²c-chips you often only find binary values for the commands to send. So I included a field which converts the binary values to hexadecimal numbers. Instead of entering the binary value you can also select the bits directly. The value is loaded into the datafield by clicking the small ‘<‘ button right next to it.

    After clicking ‘Run’ it is first checked, if the bus is ready, that is if SCL and SDA are both high (idle). Then the sequence is processed.

    The pins are hardcoded for my parallel-i²c-adapter, which can be found here. If you have a different interface, you can change the code. Maybe I will in include those options in the next version.

    Delphi6 sourcecode can be found here (executable and inpout32.dll included).

    (I only use the code on a Win98 PC, where the inpout32.dll is sufficient. To use it with Win2K or XP you need something like DirectIO.)

    Tags: , , , ,

  • Parallel-to-I²C-Adapter


    Just a little circuitboard to interface I²C-chips to the parallel-port.

    I designed the layout so it can fit inside the case of the connector.

    An additional diode to protect LS05 from reverse polarity might be good. (I already ‘converted’ one to smoke 🙁 )

    Eagle5 layout and some simple TurboC++-Code for the adapter can be downloaded here.

    Tags: , , , , ,