Shop OBEX P1 Docs P2 Docs Learn Events
Challenge - Can anyone make a BasicStamp Tamagotchi? Has anyone tried? — Parallax Forums

Challenge - Can anyone make a BasicStamp Tamagotchi? Has anyone tried?

LoopyBytelooseLoopyByteloose Posts: 12,537
edited 2005-03-27 13:58 in General Discussion
If you don't know what a Tamagotchi is, just Google it.

It is something like an electrotic pet chicken, dinosaur, or other varmit that yu have to take care of or it dies.· The interface is a few buttons and a small, very tiny graphic LCD display.

I am not sure if a 2X16 5X10 Character display could handle it, but it might be a beginning.



▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
G. Herzog in Taiwan

Comments

  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2005-01-07 15:31
    Well, I guess no one is interested in gaming and programming such.
    I did pick up a 122x32 LCD, but I find that it may be highly RAM dependent as it seems needed for such a project

    It is driven by a DOT MATRIX Printer controller (SED 1520)series. So instead of having a set of ASCII charaters on board, you must provide code for columns of dots.

    At the very least, one might have to create an extensive character and animation EEPROM for a game.

    So, I will set it aside for a rainy day and after I have finished my easier tasks.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    G. Herzog in Taiwan

    Post Edited (Kramer) : 1/11/2005 3:19:20 PM GMT
  • MacGeek117MacGeek117 Posts: 747
    edited 2005-01-07 16:28
    Kramer, you might have to use 2 BS2s conntected together if you don't have enough
    EEPROM or RAM. -bugg
  • Jim McCorisonJim McCorison Posts: 359
    edited 2005-01-07 17:54
    If sufficient memory is a problem, why not use an external EEPROM or RAM chip? It would seem to be a much cheaper solution than buying a whole additional stamp just to hold memory? Or have I, as usual, overlooked a subtlety to this issue?

    Jim
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2005-01-10 10:14
    Two processors may be needed --one dedicated one might be necessary for the Graphic LCD and the second to program for input and game play.

    Maybe the BasicStamp just can't do it. Adding EEPROM or RAM to the BS is pretty fancy programing and sorting out the tables from a serial input to the LCD output might just top out the programing capabilites.

    The LCD display I have seems to take one byte of input to create a column of 8 pixels or alternatively it accepts control codes of one byte format.

    The display is 122x32 pixels. There are two controllers which are EPSON SED 1520 dot matrix controllers that can be selected by a chip select input. So it seems to me that I have to provide an inventory of 'graphic characters' on EEPROM and create some kind of code (I could use ASCII or EBDIC if it was alpha-numeric) AND I have to decide how wide each and every chacter is.

    I could go with 5X8 or 8X8. Or I could get more interesting by using 12X8 and so on. I could even double up and use 16X16. Or 32X30.

    The only real quirk is the two controllers. One controls the Left 61 columns and the other controls the Right 61 columns.

    There are situations where having the two sides independent would be very useful - like having TWO indicators, one for temperature and the other for humidity. They could update independently.

    But, if I want the whole screen to work as a unit, my input has to be coordinated when it jumps the 61st column.

    ALSO, I am not really sure that the BasicStamp can handle all this because it only programs with One Dimension Arrays and it seems to me that I really need to work intensively with Multidimentional or at least Two Dimension Arrays in order to keep up with the EEPROM memory addressing and moving from the left to right sides of the LCD.

    It may be a project for the Ubicom SX-28 because of its complexity.

    I have seen PIC devices on the internet that use EEPROM and interface to create a serial input for the Graphic LCDs. If I wanted to be ultimately flexible, I would be using RAM instead of EEPROM so that I could intialize the graphics in RAM from another computer. But, that seems way too ambitious. I just wanted to get something that would play a game or be graphically more creative. My students would like to seem some Chinese rather than Alpha-numeric. I could do a few characters, but not the whole 7000 character inventory.

    Also, there is a Clock input that really has me wondering. Should I just connect any old oscillator or does it have to be in sync with the BS?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    G. Herzog in Taiwan

    Post Edited (Kramer) : 1/11/2005 3:22:22 PM GMT
  • Jim McCorisonJim McCorison Posts: 359
    edited 2005-01-10 15:51
    Herzog said...
    ALSO, I am not really sure that the BasicStamp can handle all this because it only programs with One Dimension Arrays

    Way back when dbase II was the hot thing I developed a manufacturing inventory control system with it. It only had one dimensional array support as well. But I got around that with a little math to calculate an offset into either a single dimension array, or even into single string.

    Let say you wanted a two dimensional array of a two byte variable, 2 wide by 3 deep, or in pseudo PBASIC:

    ArrayVar VAR byte*2 (2, 3)

    The attached program will support that. Variable space in a stamp is pretty limited. But you can use the same basic concept to calculate the offset into an area of Scratch Pad, EEPROM or external RAM.

    Jim
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-01-10 19:07
    The clock is used to latch data sent to it so you most definately need to have it syncronous to the BS. Using a pin to connect the two stamps can be used as a rudimentary handshaking signal, use a pull up resistor and configure the pin as open collector. When the chips are running in tandem mode, a chip waits for the pin to go high (deasserted) the stamp then asserts the signal and then when its done with its update it deasserts the line, this way the lcd is being accessed by only one stamp at a time. But make sure a stamp will pause a bit after deasserting the line to give the other stamp an adequate opportunity to assert the line.

    There are other ways of accomplishing the same thing (such a a multiplexor) but not knowing the timings involved I cannot answer if a single BS has enough power to do it. Like you said this may be a job for an SX using SX/B.

    Post Edited (Paul Baker) : 1/10/2005 7:11:25 PM GMT
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2005-01-11 15:13
    Well it is becoming more and more doable!

    Just use offsets instead of arrays.

    The clock is a 2000HZ specification, so there is leeway for computing, but it seems to indicate that one dedicated BS is required to drive a graphic LCD.· Otherwise the clock may wander out of sync.

    I really need to study the timing charts for the EPSON SED 1520 and the control codes to see what the output to the LCD must be restricted to.· If it is simple enough to allow room for async serial input, it is a 'go'.

    I am not sure we are on the same page about using two Stamps.· I had one dedicated for the gaminging and button inputs to the gaming with coded graphic output to the second Stamp.· The second Stamp is dedicated to decoding and sending the graphics to the LCD. (you seem to have both Stamps outputing to the LCD).

    It also seems to indicate that the BS2p-24 is an optimal choice because of its speed.· There is more space between clocking pulses for processing serial input into LCD output.

    I did some preliminary figuring and you can get basic alpha-numerical display at 5X8 resolution onto the Stamp, but to stop there would be silly - you would just a more expensive, maybe less functional serial LCD.·

    The really neat thing is that I can add EEPROMs with the BS2p by using I2C or one-wire EEPROMs and load them with the graphics data.· Then the whole project becomes a thing of beauty.· You can create your own graphics on EEPROMs and either expand the addresses or just unplug and switch EEPROMs to change your graphic scheme.

    I also saw an ad for color graphic LCDs in the Nuts & Volts.·

    There seems to be a lot of future possiblities for this.· I need to get back to my Toddler and finish it first as I can see this might become a passion.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    G. Herzog in Taiwan

    Post Edited (Kramer) : 1/11/2005 3:35:24 PM GMT
  • awassonawasson Posts: 57
    edited 2005-03-26 18:11
    I realize this is an old post however...
    Why not use your stamp to run the program and ise an SX (Ubicon) chip to run the LCD display.

    This could be a really neat project.
  • raimianraimian Posts: 6
    edited 2005-03-26 20:54
    parallax do a custom carector creator for lcds would that help.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2005-03-27 13:58
    Am always flattered to see people with similar interest.

    I simply haven't have the time for all the electronics projects I have.· As it stands, I have about 10 robot schemes in the works and I have been trying to keep up with my English teaching here in Taiwan.

    Writing code seems to fall to last place as it really requires some organized thought.

    Nonetheless, the SX Ubicom is ideal for driving a customized LCD graphic display with eprom and I am very sure that someone will get a great deal of useful expericence out of programing one.

    Good luck! Who will be the first Parallax Tomagotchi?· Maybe they will offer a competition?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    G. Herzog in Taiwan
Sign In or Register to comment.