Switch's, Subtraction and Display

Discussion in 'The Projects Forum' started by aumandg, Feb 10, 2013.

  1. aumandg

    Thread Starter New Member

    Feb 10, 2013
    4
    0
    I am new to this kind of work and have no idea where to start looking for the parts I need for this project and need your help.

    My friend has a dice game that uses the numbers 2 thru 12. I would like to make one but would like it to do some math for me. The idea is that when I flip up a block of wood, 11 pieces numbered 2 thru 12, a momentary switch will be activated and subtract that number from 77 and display results on a OLED display. If more than one block is flipped up, all of those blocks are subtracted from 77 and displayed.

    This is the idea, OLED display is connected to a circuit board and all momentary switches are connected to circuit board as the momentary switches are lifted circuit board does the math and displays result on OLED.

    I have found momentary switches and OLED.
    http://www.ebay.com/itm/2pcs-64X48-...690?pt=LH_DefaultDomain_0&hash=item5add012632

    http://www.ebay.com/itm/320950857444?ssPageName=STRK:MEWAX:IT&_trksid=p3984.m1423.l2649

    Assuming these items will work, I need a suggestion for a circuit board and the directions on to program the board to do the math?

    Thank you for your help.
     
  2. takao21203

    Distinguished Member

    Apr 28, 2012
    3,577
    463
    Get a PICKIT3 clone from eBay + a PIC 18F24J10.

    These displays have serial interface.

    I have used said PIC for a 1.8" color TFT. It is certainly good enough for monochrome.

    You need a 3.3V regulator as well, and a USB adapter or 5V electronic transformer.

    You can also work it from batteries. Mind it displays need about 3 volts, can't work from 2.4 volts.

    For the display you need a SMD LCD adapter PCB.

    Unfortunately I do not see a datasheet for the OLED which you actually will need.
     
  3. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    The linked OLED doesn't have a serial interface.

    dig-ole on eBay sells 128x64 OLED displays that are 1"x½" with UART/I²C/SPI interface for about $14 White on black or Blue on black.

    What programming languages do you know? Have you worked with microcontrollers before?

    Do you plan on more microcontroller projects?

    What is the finished size of this device going to be, with power supply (3AA or AAA batteries works well, or 2 CR123 Lithium in series, which would give a Very Long runtime)
     
  4. aumandg

    Thread Starter New Member

    Feb 10, 2013
    4
    0
    could you please post the link to this OLED, I can not find witch one you are listing.
     
  5. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
  6. aumandg

    Thread Starter New Member

    Feb 10, 2013
    4
    0
    thatoneguy thank you,

    I am new to this and never done this before. No programing language and never used microcontrollers before. That is why I am asking for help. I have the idea and willing to try this out. I believe its not that hard, but I may be wrong.

    I have attached a schematic with no idea if this works. Any one that could add/subtract or say ok, that would be great.

    I am looking to purchase the PICKIT 3 Programmer Debugger & MCU Universal ZIF socket do get the proramming onto the chip. I will need help with the programing aswell.

    Once again thank you for your help.
     
  7. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    You'll need Port RC6 free, as that is the serial transmit (Tx) that needs to go to the serial display input.

    For the code, I'm used to BoostC, so if using C18, somebody else may be of better help in that area (includes and keywords are different).

    Start with just one switch and get the serial Display to say "pushed" or "released". Once you get to that point, the rest is relatively simple.
     
  8. aumandg

    Thread Starter New Member

    Feb 10, 2013
    4
    0
    going to use 2 digit LED, LTD-4708JR in liue of the OLED. What other items would I need to connect the LTD-4708JR to the chip?
     
  9. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    You'll need more I/O pins or an I²C or SPI port expander to drive 2 7 segment LED Displays (9 pins).

    Though that could be accomplished with shift registers, either way makes the programming quite a bit more complex.
     
  10. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,394
    1,606
    ZIF socket? What is that for? PICkit's are designed to do In Circuit (Serial) Programming (ICSP) which means you leave the PIC in your circuit and program it where it lays. The same pins can be used to run a debugger, meaning you can stop and see what the program is doing at any given point.

    That may not mean anything to you right now but as soon as you start to test your code it will be a huge help.

    All of the software tools are free to download. All you buy is the PIC and the PICkit.
     
Loading...