Shop OBEX P1 Docs P2 Docs Learn Events
Bs2 + DS1620 + Parallel LCD Problem — Parallax Forums

Bs2 + DS1620 + Parallel LCD Problem

WhatWhat Posts: 23
edited 2008-06-18 19:06 in BASIC Stamp
Hello everyone.

Its amazing what you do qith bs2, but i'm really a noob with this [noparse]:([/noparse]
I picked up a completed proyect and i'm trying to make it work, but the problem is the proyect uses a 1x16 parallel LCD and i have a 2x16 one, if i connect everything like the attached file says, i only got a full dark on the first line.
I don't know really how can i make it works, i would be really happy if someone can tell what should i have to change on the code.

Thanks to everyone here for your help.

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-06-17 14:38
    Is your 2x16 also parallel?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • WhatWhat Posts: 23
    edited 2008-06-17 15:37
    yes parallel

    please help me !!!
  • sylvie369sylvie369 Posts: 1,622
    edited 2008-06-17 15:41
    If I were you I'd start by simplifying things. Remove the 1620 from your circuit, and write a program by which you can simply send test strings and variable values to the LCD. Get that working, then separately get the 1620 to write data to the Debug terminal, THEN put the two together into your project.

    If the original LCD (the 1x16) and yours (the 2x16) are both HD44780 interfaces, you shouldn't have to change anything at all in the software, I don't think. According to the documentation of the software you sent, the 1x16 is HD44780. Make certain that your 2x16 really is as well. It almost certainly is, of course. You may have it hooked up incorrectly, though. If what you're using has a different interface, then you'll need to find out how to use that interface, and no-one here can tell you how to change the software without a LOT more details.

    Post Edited (sylvie369) : 6/17/2008 3:51:10 PM GMT
  • WhatWhat Posts: 23
    edited 2008-06-17 16:53
    Thanks for your answer sylvie, i tryed with the example code from stamworks and the debug command and the DS1620 works perfect. I'm using a BONA MC1602-13 Rev.3 LCD and has HD44780 interface (i think its the most common).
    Maibe i'm plugging something wrong, here is how i'm connecting.

    First question, what means that OutA??

    Pin 0 LCD.11 |
    ' Pin 1 LCD.12 |-- OutA
    ' Pin 2 LCD.13 |
    ' Pin 3 LCD.14 |

    I'm pluging like this

    Pin 0 /\/\/\ 220 ohm LCD.11 |
    ' Pin 1 /\/\/\ 220 ohm LCD.12 |-- OutA
    ' Pin 2 /\/\/\ 220 ohm LCD.13 |
    ' Pin 3 /\/\/\ 220 ohm LCD.14 |
    ' Pin 4 LCD.4
    ' Pin 5 LCD.6 /\/\/\ 470 Kohm to GND
    ' Pin 6 NC
    ' Pin 7 NC
    ' Pin 8 DS1620.3
    ' Pin 9 DS1620.2
    ' Pin 10 /\/\/\ 1Kohm DS1620.1
    ' Pin 11 NC
    ' Pin 12 NC
    ' Pin 13 NC
    ' Pin 14 NC
    ' Pin 15 NC

    Pin 5 (R/W) i have to leave it unplug or to GND?
    And with this setup, is DIRH and DIRL ok?
    DIRL = %00111111 ' LCD pins
    DIRH = %00000111 ' DS1620 pins
    OUTS = $0000 ' all outputs off to start


    Thanks for all your answers
    640 x 480 - 62K
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-06-17 17:20
    The connections you have listed are not compatible with the code from us that you said you tried. Our code uses P4 through P7 for the data connections to the LCD.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • WhatWhat Posts: 23
    edited 2008-06-17 17:31
    Thats what the code i attached above says. How can i fix it all mighty Chris P ?
  • FranklinFranklin Posts: 4,747
    edited 2008-06-17 17:37
    Put the data pins from the LCD that you show on pins 0 to 3 on pins 4 to 7. Try that and let us know.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • WhatWhat Posts: 23
    edited 2008-06-17 17:42
    Ok but if i change that, where should i plug Lcd pin 4 and 6? and what happend with pin 5?
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-06-17 17:56
    Connection details and the code can be found at the link below.

    http://www.parallax.com/Store/Accessories/Displays/tabid/159/CategoryID/34/List/0/Level/a/ProductID/49/Default.aspx?SortField=ProductName%2cProductName

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • WhatWhat Posts: 23
    edited 2008-06-17 21:14
    Sorry to keep boring you guys but i really need to do this work and still can't [noparse]:([/noparse]

    i change the pin connections and have some doubts still


    ' Pin 0 E (pin 6)
    ' Pin 1 NC
    ' Pin 2 R/W (pin 5)
    ' Pin 3 RS (pin 4)
    ' Pin 4 LCD.11
    ' Pin 5 LCD.12
    ' Pin 6 LCD.13
    ' Pin 7 LCD.14
    ' Pin 8 DS1620.3
    ' Pin 9 DS1620.2
    ' Pin 10 DS1620.1
    ' Pin 11 NC
    ' Pin 12 NC
    ' Pin 13 NC
    ' Pin 14 NC
    ' Pin 15 NC

    I modified the DIRL and DIRH from the code, is attached bellow.

    But i still seeing the same result as the picture above. I don't really know what else to do.

    My life almost depends to do this work, last class of my carrer.

    Thanks for your help and you have some code for this it will be really really welcome.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-06-17 22:44
    Have you tried just the example LCD program I linked with this setup?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • WhatWhat Posts: 23
    edited 2008-06-17 23:46
    yes, and it works perfect. I tried the DS1620 example in stampworks and works perfect too but is with debug command only and i need it to a LCD, just need to show the Tº in the LCD and i don't know why this one isn't working
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-06-18 00:55
    Try changing·the I_LCD subroutine to this:
    I_LCD:
            PAUSE 200
            OUTA = %0011           ' 8-bit mode
            PULSOUT E,1            ' Send Command Three Times
            PAUSE 10
            PULSOUT E,1
            PAUSE 10
            PULSOUT E,1
            PAUSE 10
            OUTA = %0010           ' 4-bit mode
            PULSOUT E, 1
            char = %00001100       ' disp on, crsr off, blink off
            GOSUB WrLCD
            char = %00000110       ' inc crsr, no disp shift
            GOSUB WrLCD
            char = %00000001       ' clear LCD
            GOSUB WrLCD
            HIGH RS 
    
  • WhatWhat Posts: 23
    edited 2008-06-18 04:08
    Same result [noparse]:([/noparse]
    I don't want to start to hate BS2
  • sylvie369sylvie369 Posts: 1,622
    edited 2008-06-18 10:50
    What said...
    Same result [noparse]:([/noparse]
    I don't want to start to hate BS2
    If your "life depends on this", you might think about spending the $30 for a serial 2x16 LCD, and using that instead of the parallel one. With the serial LCD it's a very simple matter of a few SEROUT commands, and you'll get exactly the same result you'd get with the parallel one.

    http://www.parallax.com/Store/Accessories/Displays/tabid/159/CategoryID/34/List/0/Level/a/ProductID/50/Default.aspx?SortField=ProductName%2cProductName
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-06-18 14:07
    The fact that the demo code for the parallel LCD works indicates the problem is in the code. My guess (without analyzing the code) is that it is in the initialization section. I would compare how the LCD is initialized in both pieces of code to see what the differences might be. That's as good a place to start as any.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • WhatWhat Posts: 23
    edited 2008-06-18 16:47
    I'm starting to give up with this LCD, i ordered the serial one. Somebody know any completed proyect to do a clock and/or thermometer with DS1302 and DS1620 ??

    I found this picture on the web, thats what i want, every link, name, code, everything is really welcome.

    Thanks all of you for your time and help.
    640 x 480 - 44K
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-06-18 19:06
    The project you’re referring to was one of my own. That screenshot is from the LCD, but that part of the system wasn’t for displaying time. That was left to 7-segment displays and binary arrays. You can see the project, pictures, code, etc. in its entirety at the following link (On these forums). As a note, I would not recommend giving up. You’ve proven the individual components in your current system work. Sometimes to get things to work means having to do a little work yourself to mesh everything together. If you’re not willing to go that far then your projects may never emerge. Take care.

    http://forums.parallax.com/showthread.php?p=552892

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support


    Post Edited (Chris Savage (Parallax)) : 6/18/2008 7:13:10 PM GMT
Sign In or Register to comment.