Shop OBEX P1 Docs P2 Docs Learn Events
Vishay display APD-128G032 — Parallax Forums

Vishay display APD-128G032

edge87edge87 Posts: 24
edited 2010-05-08 03:52 in BASIC Stamp
I would like to attach a Vishay APD-128G032 Display to my Stamp processor to send it serial data.

I wanted to create this to help everybody else who might be wanting to do something simular to this.

Here is the specs on that display:

www.vishay.com/docs/37006/apd128g.pdf

What I understand so far is that i will need power which i think i have done. then i need to send it a few signals to turn the display on and off as i send it data at a set hertz.

I'm not 100% sure the order in which i have to enable and disable things and when i should be sending data , and how to send that kind of data with a stamp. Also does the Basic Stamp 2 learning project kit come with some kind of a crystal clocking source?

Any help or snippets that people submit are greatly appreciated. Thanks!

Comments

  • FranklinFranklin Posts: 4,747
    edited 2010-05-05 17:39
    It would help us help you if you would show us how you have the stamp connected to the display and what code you are using to communicate with the display.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • edge87edge87 Posts: 24
    edited 2010-05-05 17:51
    I'm not sure i even have it remotely connected correctly. I just cut the ribbon cable and soldered pins on the end and plugged it into my bread board. so i'm really open for suggestions on how this should work.
  • FranklinFranklin Posts: 4,747
    edited 2010-05-05 18:20
    I'd start by finding a datasheet and then connecting it the way that tells you to. How do you have it connected now?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • edge87edge87 Posts: 24
    edited 2010-05-05 18:32
    I've attached the datasheet PDF.

    pin 2 4 6 8 10 12 14 are all grounds so i put them on two rows on the bread board and then but them to the ground bar.

    1 is the display enable
    3 is row data
    5 is row clock
    7 column latch
    9 dot clock
    11 serial data


    13 is not connected.

    i attached it to the basic stamp 2 as follows

    Pin 1 - 1
    pin 3 - 2
    pin 5 - 3
    pin 7 - 4
    pin 9 - 5
    pin 11 - 6

    the power i'm using is from a machine that the display came from so i'm fairly confident i've done the power correctly...
  • FranklinFranklin Posts: 4,747
    edited 2010-05-05 18:59
    OK, now how about your code?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • edge87edge87 Posts: 24
    edited 2010-05-05 21:45
    I know the constant is wrong. i haven't figured out how to do that yet. but the rest of it should be ok.


    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
    
    rowcounter VAR Byte
    
    ' -----[noparse][[/noparse] EEPROM Data ]-----------------------------------------------------
    
    
    'setup a line that repeats vertial posts | put this in every line
    
    solidBar  DATA %10101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010
    
    
    PAUSE 1000
    
    'must set clock on in/out 5 ??
    
    DO
      rowcounter = 0 'blank counter
    
      LOW 1 ' turn off "display enable" during inputs
      LOW 4 ' turn off "latch" during inputs must be done after display enable goes low
      HIGH 2 ' turn on to signal first row comming
      HIGH 3 ' rise before sending data
      OUT6 = solidBar
      LOW 3 'fall after sending data
      HIGH 4 'kick on latch to send data to output
      HIGH 1 'enable display to show our image
      'do this only once because the first is different from the rest
    
    
      DO
        LOW 1 ' turn off "display enable" during inputs
        LOW 4 ' turn off "latch" during inputs must be done after display enable goes low
        HIGH 3 ' rise before sending data
        OUT6 = solidBar
        LOW 3 'fall after sending data
        HIGH 4 'kick on latch to send data to output
        HIGH 1 'enable display to show our image
        rowcounter = rowcounter + 1
      LOOP UNTIL rowcounter = 31
    
    
    LOOP
    
    

    Post Edited (edge87) : 5/5/2010 10:01:34 PM GMT
  • FranklinFranklin Posts: 4,747
    edited 2010-05-06 03:45
    Your OUT6 is not what you expect, it puts pin 6 in a high or low state depending on whether solidbar is evaluated as a 1 or a 0.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • edge87edge87 Posts: 24
    edited 2010-05-06 13:18
    I see i should of used SEROUT. I made several improvements to the code. but im not sure how to store my image. I have run out of memory.

    
    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
    
    rowcounter VAR Byte
    sendthis VAR byte
    
    'the data for the row loop
    line0 VAR word
    line1 VAR word
    line2 VAR word
    line3 VAR word
    line4 VAR word
    line5 VAR word
    line6 VAR word
    line7 VAR word
    line8 VAR word
    line9 VAR word
    line10 VAR word
    line11 VAR word
    line12 VAR word
    line13 VAR word
    line14 VAR word
    line15 VAR word
    line16 VAR word
    line17 VAR word
    line18 VAR word
    line19 VAR word
    line20 VAR word
    line21 VAR word
    line22 VAR word
    line23 VAR word
    line24 VAR word
    line25 VAR word
    line26 VAR word
    line27 VAR word
    line28 VAR word
    line29 VAR word
    line30 VAR word
    line31 VAR Word 'really this is line 32 the final line on the display. We started at 0 for the loop init.
    
    ' -----[noparse][[/noparse] EEPROM Data ]-----------------------------------------------------
    
    'setup variables to hold our display message (gota find a better way to do this, seems like a major waste of memory  (could use a blank line and reuse it)
    
    
    line0  = "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
    line1  = "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
    line2  = "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
    line3  = "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
    line4  = "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
    line5  = "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
    line6  = "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
    line7  = "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
    line8  = "00000000000000000000000000000000000000001100000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
    line9  = "00000000000011000001100000110000000000001100000000000000000000000000000000000000000000000000000000000011000000000001100000000000"
    line10 = "00000000000011000001100000110000000000001100000000000000000000000000000000000000000000000000000000000011000000000001100000000000"
    line11 = "00000000000001100001110001100000000000001100000000000000000000000000000000000000000000000000000000000011000000000001100000000000"
    line12 = "00000000000001100011110001100001111100001100000111100000111100000011011110011110000001111100000000000011000000000001100000000000"
    line13 = "00000000000001100010010001100111111110001100011111110011111111000011111111111111000111111110000000000011000000000001100000000000"
    line14 = "00000000000001100010010001100110000111001100011000010011000011000011100011100011000110000111000000000011000000000001100000000000"
    line15 = "00000000000000110010011001001100000011001100110000000110000001100011000011000011001100000011000000000011000000000001100000000000"
    line16 = "00000000000000110110011011001111111111001100110000000110000001100011000011000011001111111111000000000011000000000001100000000000"
    line17 = "00000000000000110100001011001111111111001100110000000110000001100011000011000011001111111111000000000011000000000001100000000000"
    line18 = "00000000000000110100001011001100000000001100110000000110000001100011000011000011001100000000000000000000000000000000000000000000"
    line19 = "00000000000000011100001110000110000001001100111000010011000011000011000011000011000110000001000000000000000000000000000000000000"
    line20 = "00000000000000011100001110000111111111001100011111110011111111000011000011000011000111111111000000000011000000000001100000000000"
    line21 = "00000000000000011000000110000001111110001100001111100000111100000011000011000011000001111110000000000011000000000001100000000000"
    line22 = "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
    line23 = "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
    line24 = "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
    line25 = "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
    line26 = "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
    line27 = "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
    line28 = "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
    line29 = "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
    line30 = "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
    line31 = "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
    
    PAUSE 1000
    
    'must set clock on in/out 5 ??
    
    DO
      rowcounter = 0 'blank counter
    
      LOW 1 ' turn off "display enable" during inputs
      LOW 4 ' turn off "latch" during inputs must be done after display enable goes low
      HIGH 2 ' turn on to signal first row comming
      HIGH 3 ' rise before sending data
      SERout 6, 9600, [noparse][[/noparse]line0]
      LOW 3 'fall after sending data
      HIGH 4 'kick on latch to send data to output
      HIGH 1 'enable display to show our image
      'do this only once because the first is different from the rest
    
    
      DO
        sendthis = "line" + rowcounter
    
        LOW 1 ' turn off "display enable" during inputs
        LOW 4 ' turn off "latch" during inputs must be done after display enable goes low
        HIGH 3 ' rise before sending data
        SEROUT 6, 9600, [noparse][[/noparse]sendthis]
        LOW 3 'fall after sending data
        HIGH 4 'kick on latch to send data to output
        HIGH 1 'enable display to show our image
        rowcounter = rowcounter + 1
      LOOP UNTIL rowcounter = 31
    
    LOOP
    
    
  • FranklinFranklin Posts: 4,747
    edited 2010-05-07 02:11
    You probably should store your data on an EPROM and read it in a line at a time to a variable. also your biggest variable in bs2 is 16 bytes and your strings are longer than that. I don't think you are going to be able to do this with a stamp.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • edge87edge87 Posts: 24
    edited 2010-05-07 16:16
    I thank you for all the help thus far.

    I have also purchased a propeller learning kit, and a propeller chip for building this project. Will i have much better luck with a propeller? being that it is 32 bit?
  • FranklinFranklin Posts: 4,747
    edited 2010-05-08 03:52
    That depends, have you gotten anything to display on your device? If not you probably will not have better luck with the propeller.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
Sign In or Register to comment.