Shop OBEX P1 Docs P2 Docs Learn Events
How to show the total number to the LCD (2x8) — Parallax Forums

How to show the total number to the LCD (2x8)

davidchoidavidchoi Posts: 7
edited 2009-03-13 04:46 in BASIC Stamp
i buy the LCD appmod 2x8
i use basic stamp to do the coin electronic saving box
and i want to use LCD appmod 2x8 to display total coin in the saving box
coin it will be $1 $2 $5 and $10
how to write the program

Comments

  • JonathanJonathan Posts: 1,023
    edited 2009-03-12 15:29
    David,

    We need more details. Doyou have the LCD and have you got it working using the sample code? How are you counting the coins? Give as much information as youcan and folks will be happy to help.

    Jonathan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
  • davidchoidavidchoi Posts: 7
    edited 2009-03-12 17:40
    Jonathan,

    my LCD model is LCD TERMINAL APPMOD 29121 the LCD display it have 4 button . each button is set the coin number , i want the coin crash the button then the LCD display will add the total to input.

    I use the materials such as this LINK
    http://www.parallax.com/Portals/0/Downloads/docs/prod/appmod/29121-LcdAppMod-v1.2.pdf

    finally I ask one more question basic stamp can use 74C922 to connect keypad
  • Mike GreenMike Green Posts: 23,101
    edited 2009-03-13 01:10
    I believe there's a Nuts and Volts Column that includes a description and sample code for using a 74C922 with a keypad. Go to the main Propeller webpage and click on the Resources tab. You'll see a link to the Nuts and Volts Columns index. I don't remember which column #, but it's one of the earlier ones.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2009-03-13 01:18
    re. 74C922

    If you go to http://search.parallax.com·and type 74C922, you will find several links, one of which is: www.parallax.com/Portals/0/Downloads/docs/cols/nv/vol4/col/nv97.pdf

  • davidchoidavidchoi Posts: 7
    edited 2009-03-13 04:35
    i want to know that,how can i sum up the total coins number to show on a LCD????
    the LCD display have 4 button, how to set each button is +1,+2,+5,+10, how can i write a program to do this function?
  • Mike GreenMike Green Posts: 23,101
    edited 2009-03-13 04:46
    Have you gotten the demo program to work? Do you understand how the demo works?

    The routine to get the button values returns the button status in the lower 4 bits of the variable "buttons". You need to test each bit in turn and, if the button has changed from 0 to 1 you would add the appropriate value to a variable, perhaps called "coins". To keep track of whether the button changed from 0 to 1, you obviously have to remember the previous value of "buttons" so you can compare to the new value. You need another variable for that.

    If this doesn't make sense to you, you'll have to back up and learn some of the basics of programming the Stamps. "What's a Microcontroller?" is a good introduction to this. You can download it from the Stamps in Class Downloads page here: www.parallax.com/tabid/535/Default.aspx.

    If you don't already have it, you will need a copy of the BASIC Stamp Syntax and Reference Manual here: www.parallax.com/tabid/440/Default.aspx.
Sign In or Register to comment.