PDA

View Full Version : Bcd-->Decimal please help



memo333
- 16th January 2006, 05:44
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

Melanie
- 16th January 2006, 08:37
> 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).

Ioannis
- 17th January 2006, 08:20
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

memo333
- 17th January 2006, 16:32
>
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)

Ioannis
- 18th January 2006, 11:27
You are welcome. Forums has many many topics to search for.


(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...