1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

00-99 COUNT UP & DOWN USING PIC16f887a

Discussion in 'Microcontrollers' started by AnneMaj, Aug 27, 2013.

  1. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,794
    Likes:
    134
    Location:
    morristown,tn
    You better not say you wrote the code google will tell on you LOL

    ISIS is not going to be like real hardware it slows it down so you can see whats going on.
     
  2. AnneMaj

    AnneMaj New Member

    Joined:
    Aug 26, 2013
    Messages:
    23
    Likes:
    0
    Location:
    philippines
    we dont have to build the hardware.. our requirement is only the simulation in ISIS..
     
  3. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,794
    Likes:
    134
    Location:
    morristown,tn
    It's not the code that's letting you see it change segments it's ISIS and how it show the simulation.
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. AnneMaj

    AnneMaj New Member

    Joined:
    Aug 26, 2013
    Messages:
    23
    Likes:
    0
    Location:
    philippines

    but in other projects the display is not blinking alternatively.
     
  6. AnneMaj

    AnneMaj New Member

    Joined:
    Aug 26, 2013
    Messages:
    23
    Likes:
    0
    Location:
    philippines
    is it possible to change the display in ISIS to not make it blink?
     
  7. Ian Rogers

    Ian Rogers Super Moderator Most Helpful Member

    Joined:
    Mar 28, 2011
    Messages:
    9,148
    Likes:
    907
    Location:
    Rochdale UK
    Lke I said in post #13

    FOR SIMULATION PURPOSES..... You can use the dual as it makes NO difference for simulation..... The code isn't changed one bit...
     
  8. AnneMaj

    AnneMaj New Member

    Joined:
    Aug 26, 2013
    Messages:
    23
    Likes:
    0
    Location:
    philippines
    our requirement is 2 single digit.
     
  9. Ian Rogers

    Ian Rogers Super Moderator Most Helpful Member

    Joined:
    Mar 28, 2011
    Messages:
    9,148
    Likes:
    907
    Location:
    Rochdale UK
    Then you'll have to re-write the code to display the digits faster....
     
  10. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,794
    Likes:
    134
    Location:
    morristown,tn
    Play with this line in the code

    Code (text):
    msecs   equ     usecs*1000
    change it to
    Code (text):
    msecs   equ     usecs*100
    The code I posted for you was for a 16mhz clock you need to let ISIS no that.

    Or change this line
    Code (text):
    clock   equ     16    
    change the 16 to what your using.
     
  11. Cluene

    Cluene New Member

    Joined:
    Jan 27, 2012
    Messages:
    25
    Likes:
    0
    Location:
    Philippines
    Hello, i have the same project but in my case, the maximum value is 20 instead of 99. What do I need to change in the code?
     
  12. Cluene

    Cluene New Member

    Joined:
    Jan 27, 2012
    Messages:
    25
    Likes:
    0
    Location:
    Philippines
    good day, do you know how
    to make the maximum value into 20 instead of 99?
     
  13. Ian Rogers

    Ian Rogers Super Moderator Most Helpful Member

    Joined:
    Mar 28, 2011
    Messages:
    9,148
    Likes:
    907
    Location:
    Rochdale UK
    Cluene Your clue is here
    Code (text):
    xorlw 0xA0 ; upper limit 99?
    This appears to be 160 instead of the 99 that was required.... But here is you upper limit..
     
  14. Cluene

    Cluene New Member

    Joined:
    Jan 27, 2012
    Messages:
    25
    Likes:
    0
    Location:
    Philippines
    thank you :) i've f
    igured it out.. it set A0 to 21 to get a limit of 20 :)
     
  15. georgetwo

    georgetwo Member

    Joined:
    Jul 30, 2009
    Messages:
    197
    Likes:
    8
    Location:
    DELTA state Nigeria
    Without changing the code, you can easily convince anybody that the "simulation is not running at real time due to your cpu speed"
    and you can see the proof in the message written at the message bar of the ISIS application.
     
  16. Cluene

    Cluene New Member

    Joined:
    Jan 27, 2012
    Messages:
    25
    Likes:
    0
    Location:
    Philippines
    hello! i have placed the circuit on the breadboard but it doesnt seem to work.. the display doesn't light up in any way?.. anything you can say about it?
     
  17. Ian Rogers

    Ian Rogers Super Moderator Most Helpful Member

    Joined:
    Mar 28, 2011
    Messages:
    9,148
    Likes:
    907
    Location:
    Rochdale UK
    Most common is the program is for common cathode as apposed to the common anode or visa versa..
     
  18. georgetwo

    georgetwo Member

    Joined:
    Jul 30, 2009
    Messages:
    197
    Likes:
    8
    Location:
    DELTA state Nigeria
    Remember that ISIS application does not show the power supply pins for ICs in the schematic.
     
  19. KeepItSimpleStupid

    KeepItSimpleStupid Well-Known Member Most Helpful Member

    Joined:
    Oct 30, 2010
    Messages:
    9,910
    Likes:
    1,094
    ONLINE
    Blinking is "probably good". It might actually show that "inter-digit" blanking is being used. I did not look at the code.
    Just from my old days of 6800 class programming and a clock I made at an HP/Agilent Explorer's post.

    You have to briefly turn off the digit scan while loading the new digit. Otherwise, you will see artifacts (Low brightness versions of the previous digit)
     
  20. eng14

    eng14 New Member

    Joined:
    Mar 3, 2016
    Messages:
    3
    Likes:
    0
    i need this code in c
    can you help me:sorry:
     
  21. Ian Rogers

    Ian Rogers Super Moderator Most Helpful Member

    Joined:
    Mar 28, 2011
    Messages:
    9,148
    Likes:
    907
    Location:
    Rochdale UK
    Yes! But I want to see you write something first!!!
     

Share This Page