Pic te Cikis Sorunu

Başlatan yoket, 21 Haziran 2011, 20:32:32

yoket

S.A arkadaslar programi pic e yukluyorum (16f877) ama tum bacaklar 0.2 ile 1.2 arasi rasgele degerler aliyor acaba programimda mi sorun var diye basini burada paylasiyorum simdiden cok tesekkurler

#include <htc.h>
#include "delay.h"   // Gecikme kütüphanesi tanımlanıyor
#include "lcd.h"   // LCD kütüphanesi tanımlanıyor

int voltaj_1;
int voltaj_2;
int gonderr;
char i=1;
   
void main(void)      // Ana fonksiyon alanı
{   
   TRISA=0x03;      // Analog giriş için
   TRISB=0x00;      // LCD için çıkış
   TRISC=0x00;
   PORTB=0x00;
   PORTC=0x00;
   
   PCFG3=0;      // AN0 ve AN1 analog
   PCFG2=1;
   PCFG1=0;
   PCFG0=0;
   
   ADFM=1;         // Sağa dayalı yazılıyor
   ADON=1;         // ADC açılıyor
   
   ADIF=0;         // ADC bayrağı temizleniyor
   ADIE=1;         // ADC kesmesi izni veriliyor
   PEIE=1;         // Genel ve yardımcı kesme izinleri veriliyor
   GIE=1;
   
   lcd_init();            // LCD ilk ayarları yapılıyor


.....

buda hex

:0600000000308A002528F3
:10000800F30003088301AE000A08AF008A018301E8
:100018000C1F1E288B13AB08003003190130AB00EE
:100028002B0C031C192887161A288712831203130E
:100038000C138B172F088A002E088300F30E730EFB
:100048000900203084002B3037200030AD006E309E
:10005800AC002B3084002C303C200A128A11A629CF
:1000680004068001840A0406031D34286400003451
:10007800F4000A128A114C200A128A118000840A9C
:1000880004087406031900343D2883120313AC00D6
:10009800AD1B57282D1B5F282D088A002C08AC0A99
:1000A8000319AD0A820083132D1883172C08AC0A94
:1000B80084000008080047346534723469346C34AD
:1000C80069346D343D34003441346B3469346D34F3
:1000D8003D34003401340310FF30F407F409031CE5
:1000E800F507F509031CF607F609031CF707F709D6
:1000F8000800FA01F51F8728F409F40A0319F50323
:10010800F5097A17FA1777088039FA06F71F93283E
:10011800F609F60A0319F703F7099328FA01F80113
:10012800F90176087704031D9C28F401F5010034D1
:100138001F30FA040310FA0AF60DF70D031C9F2866
:10014800F70CF60C77087502031DAC2876087402C4
:10015800031CB4287608F4027708031C770AF50212
:10016800F80DF90DFA0BFA1AA428FA1FC028F80995
:10017800F80A0319F903F9097808F6007908F7006D
:100188007A1F0034F409F40A0319F503F509003459
:10019800FC01750D760DFA007A080319D728FC0DB5
:1001A800F601F5170800F401F501F6010034FC101A
:1001B800780D790DFB007B080319E7280318FC1458
:1001C800F901F8170800FB01F701F801F901080027
:1001D8007A080319D728F513FC0C7A0CF6000318D3
:1001E800F5179A29FA08031D0A29F401F501F60101
:1001F8009A2976030319F40A0319F50A0319F60A6A
:100208000310F60CF50CF40CFA0AF628F608031D90
:10021800FD28740875040319F928F51BEC28FA035E
:100228000319F9280310F40DF50D11298401CC20C8
:10023800DB20FD01FE01FF010730F9000310F80C77
:10024800F70C031C32297408FD0775080318750F8D
:10025800FE0776080318760FFF070310F40DF50D57
:10026800F60DF90B22290930F9003E290310FF0C7D
:10027800FE0CFD0C0310F80CF70C031C4D29740838
:10028800FD0775080318750FFE0776080318760F23
:10029800FF07F90B3A297C0CFC067D08F4007E0860
:1002A800F5007F08F6007A307B07FA07F628840104
:1002B800CC20F7018230FA07FA1BD728F030FA076A
:1002C800FA1B772918307A020318D728FA08031D71
:1002D80070297C186F200800FA030310F40DF50D3F
:1002E800F60DF70D6A290310F60CF50CF40CFA0F4D
:1002F80077296D29F71F83297C146F208429FC0135
:100308008E30FA008401F7080319F6280310F70C59
:10031800F60CF50CF40CFA0A8729F601F51BF6031E
:100328007608F7007E29F601F70183298408031966
:1003380000347608800084037508800084037408FC
:10034800800000340330831603138500860187017B
:1003580083128601870183169F111F159F101F1096
:100368009F1783121F140C1383160C170B178B1768
:100378000A128A115B235F30A7000030A8000A1216
:100388008A113B23A701A70A02300A128A117F2388
:100398006830A7000030A8000A128A113B230A120D
:1003A8008A119F121F129F110930A600A60BDA2985
:1003B8001F151F1DDD290230F600F7011E08AD00CC
:1003C800AC0183161E08F400F50183122C08F4070B
:1003D8000318F50A2D08F5070A128A117D207808F6
:1003E800F4007908F5000A128A1191213F30F700CC
:1003F8007A30F8003F30F9000A128A111A21F70101
:100408006430F8004130F9000A128A111A210A12E0
:100418008A115B217408A2007508A3000A30A7009E
:1004280001300A128A117F23E830F6000330F70002
:100438002308F5002208F4000A128A117D207808A2
:10044800303E0A128A112723E830F6000330F700FD
:100458002308F5002208F4000A128A117D2064306E
:10046800F6000030F7010A128A117D207808303E24
:100478000A128A1127232E300A128A112723643080
:10048800F600F7012308F5002208F4000A128A1181
:100498007D200A30F6000030F7010A128A117D200B
:1004A8007808303E0A128A1127230A30F600F7012D
:1004B8002308F5002208F4000A128A117D20740826
:1004C800303E0A128A11272356300A128A1127232E
:1004D8000A128A119F121F129F150930A600A60B37
:1004E800732A1F151F1D762A0230F600F7011E0811
:1004F800AD00AC0183161E08F400F50183122C0828
:10050800F4070318F50A2D08F5070A128A117D2049
:100518007808F4007908F5000A128A1191213F3011
:10052800F7007A30F8003F30F9000A128A111A21D0
:10053800AF30F7007030F8004130F9000A128A1124
:100548001A210A128A115B217408A4007508A500F3
:100558000A30A70002300A128A117F23E830F60019
:100568000330F7002508F5002408F4000A128A1160
:100578007D207808303E0A128A112723E830F600D9
:100588000330F7002508F5002408F4000A128A1140
:100598007D206430F6000030F7010A128A117D20B0
:1005A8007808303E0A128A1127232E300A128A113F
:1005B80027236430F600F7012508F5002408F40025
:1005C8000A128A117D200A30F6000030F7010A125B
:1005D8008A117D207808303E0A128A1127230A30B2
:1005E800F600F7012508F5002408F4000A128A111C
:1005F8007D207408303E0A128A11272341300A12DE
:100608008A1127230A128A11D52953308301AA0097
:10061800AA0B0C2B5330AA00AA0B102B080083013D
:10062800A900871007100715F0398600071109235C
:10063800071529080F39F400F40EF030F405740892
:1006480086000711092B8301A900871007140715D5
:10065800F039860007110923071529080F39F40016
:10066800F40EF030F405740886000711092B0923ED
:10067800492B2808AD002708A70A0319A80A0A1257
:100688008A1149200A128A1127232808AD00270851
:100698000A128A1149200A128A110038031908001F
:1006A8003D2B0130132302300A128A11A92B830132
:1006B8000710071187100F300A128A11A9230A128E
:1006C8008A1107150230132302300A128A11A9234E
:1006D8000A128A11283013230A128A1106301323AA
:1006E8000A128A110C3013230A128A1155230A128E
:1006F8008A118030132B8301A800280B952B10300A
:10070800F600F7012708F400F501FF30F407031C91
:10071800F5070A128A117D207408803E0A128A1190
:10072800132B1030F600F7012708F400F501FF300D
:10073800F407031CF5070A128A117D200A128A1190
:100748007408C03E0A128A11132B8301A7000430D3
:10075800A8005330A900A90BAF2BA80BAD2BA70BF2
:04076800AB2B0800AF
:00000001FF

dnacikaya

bu durum benim başımada gelmişti. program başlangıcında 250ms bir zaman gecikmesi kulanmama rağmen pin çıkış voltajları 2 voltu geçmiyordu. ana program ve alt programların başlangıçlarına 20ms gecikme ekledim ve bütün pinlerden 5 volt almayı başarmıştım.

birde pic16f877nin besleme uçlarını kontrol edin ondan emin olmak lazım. kolaygelsin.

mustafa_cmbz

SEma ve ozellikle pcb cizimini paylasirsan o kisimlaria da bir goz atabiliriz...

yoket

yok hocam sadece cikis olmasi gereken bacaklar degil tum bacaklar 0.2 1 arasi gidip geliyo besleme dogru sorun yok pic ucmus desem program yuklerken sorun cikmiyo acaba programda atladigim birsey mi var birde kristali kondansatorsuz kullaniyorum kondansatorle kullanirkende ayni sorun var gerci