Bcd-->Decimal please help


Closed Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2006
    Location
    Izmir,Turkiye
    Posts
    3

    Default Bcd-->Decimal please help

    hi. i started pic basic pro and now ı have problem.I am making ad A/D converter using 16f877. Display is 4digit 7 segment common anodhe. So ı looked example codes, they use lcd and use "DEC" i tried it by this way:

    '----------------------- ADC ------------------------------------
    basla:
    ADCON1=$8E 'PORTA.1= ANALOG , SONUC SAGA DAYALI
    ADCON0=$A1 'CLOCK=INTERNAL A/D=PORTA.0 A/D=1
    pause 500 'BEKLEME (STANDARTTIR)
    ADCON0.2=1 'CEVRIM YAP
    don: PAUSE 5
    if ADCON0.2=1 THEN don ' CEVRIMIN BITMESINI BEKLE
    analog.highbyte=ADRESH
    analog.lowbyte=ADRESL

    now how can ı make analog decimal?

    thanks for help
    "You may kill Turks but You cannot defeat them" Napoleon

  2. #2
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    > now how can ı make analog decimal?

    Take a look at the DATASHEET for the PIC16F877... look at the ADCON1 Register and the TABLE for bits 3 thru zero. You will discover that 011x for these bits (x is don't care) will set everything Digital... two examples; ADCON1=%00000110 or ADCON1=%00000111.

    As for your buyline... ""You may kill Turks but You cannot defeat them"... King Jan Sobieski of Poland would disagree with that statement (two examples; Chocim 1673, Vienna 1683).

  3. #3
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,803


    Did you find this post helpful? Yes | No

    Default

    If I may add 1821 - Greece!

    Now about the subject, I suppose that the problem of the memo333 is how to display the value on the LED display. I would suggest searching in the forum. Many infos are there including Melanie's posts. An example can be found at http://picbasic.com/resources/articles/ledart.htm
    Last edited by Ioannis; - 17th January 2006 at 08:26.

  4. #4
    Join Date
    Jan 2006
    Location
    Izmir,Turkiye
    Posts
    3


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Melanie
    >
    As for your buyline... ""You may kill Turks but You cannot defeat them"... King Jan Sobieski of Poland would disagree with that statement (two examples; Chocim 1673, Vienna 1683).
    ahh vienna. it's too normal to you dont know. The first vienna trying we stopped it because we didnt come to take vienna. we came to say "we are here" and winter had started.

    the second vienna trying it's very tragical and comic. our famous "sadrazam" Merzifonlu Kara Mustafa Pasa wanted to show himself to the world. So he tried but of course weak Osmanli had a very bad defeat.

    I never meant "we're champion nobody can beat us".Of course we lost but if anybody searched our real history, most of loses are because of technological and although we winned we lost in front of the table.

    Kalimera my friend but and thanks for help very much. you added 1821 but this history because you are orthodox and russia helped you very much. Think about one think : "You were free about relic." It's an Islamic farz to us "Everyone is free"

    Finally i must add some dates 1453,1920-1923,1970 (Cyprus)

    Thanks for all help ı am new at pic and this forum so sorry to make a new topic and i am very happy to discuss history with europe

    (we dont need EU)
    "You may kill Turks but You cannot defeat them" Napoleon

  5. #5
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,803


    Did you find this post helpful? Yes | No

    Default

    You are welcome. Forums has many many topics to search for.

    Quote Originally Posted by memo333
    (we dont need EU)
    Hmm, some or many are on fire to get in though...! As for the dates, aren't these related to attacks? Who was defending and who was attacking? So a walk to, say, Vienna, was not for coffee I guess, but to spread the East Culture for sure...
    Last edited by Ioannis; - 18th January 2006 at 11:33.

Similar Threads

  1. Bcd Fomat Help
    By Santana in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 28th November 2012, 06:00
  2. DS1302 16F628 Woes
    By idtat in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 15th January 2009, 14:15
  3. BCD problem
    By Tobias in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 14th September 2008, 16:36
  4. Rotary BCD
    By Tobias in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 15th October 2007, 03:04
  5. Real time clock... what a headache!
    By Eng4444 in forum mel PIC BASIC
    Replies: 2
    Last Post: - 8th June 2006, 21:56

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts