EasyPic5 i MPLAB IDE

Rasprava o PIC mikrokontrolerima, PIC projekti i drugo vezano za PIC-eve...

Moderators: pedja089, stojke369, [eDo], trax

Post Reply
gladiator
Posts: 5
Joined: 28-03-2010, 20:54

EasyPic5 i MPLAB IDE

Post by gladiator »

zdravo na site ucam da programiram vo asembler i kodot go pisuvam vo MPLAB IDE pa kodot go vnesuvam vo
16F877A preku EasyPic5 no nesto ne raboti kako sto treba dali mozete da mi predlozite nekoj drug softver vi blagodaram
User avatar
Elektronicar
Pravo uznapredovao :)
Pravo uznapredovao :)
Posts: 467
Joined: 19-01-2008, 17:05
Location: Balkan

Re: EasyPic5 i MPLAB IDE

Post by Elektronicar »

Sta je to sto neraboti. Ako ti je potreban neki drugi compiler imas ih gomilu PicBasic, Mikro Basic, MikroC,Hi Tech ... bla bla bla ... daj da vidimo to sto neradi ... ukljuci se ...
gladiator
Posts: 5
Joined: 28-03-2010, 20:54

Re: EasyPic5 i MPLAB IDE

Post by gladiator »

znaci vaka jas sum pocetni i neznam skoro nisto sega ucam pa spored kodov koga ke stegnam RA0 bi trebalo dase isklucat izlezite ako voopsto go imam dobro napisano eve go ;
a i ke zaboravev fala puno za odgovorot :D

list p=16f887 ; procesor
#include <p16f887.inc> ; Definicija SFR registara
; mikrokontrolera PIC16F887

errorlevel -302 ; Zabranjuje se pojava poruke "Register
; in operand not in bank 0. Ensure that
; bank bits are correct."
;**********************************************************************

__CONFIG _CONFIG1, _HS_OSC & _WDT_OFF & _PWRTE_ON & _MCLRE_ON & _CP_OFF & _CPD_OFF & _BOR_ON & _IESO_ON & _FCMEN_ON & _LVP_OFF & _DEBUG_OFF

__CONFIG _CONFIG2, _BOR40V & _WRT_OFF

;**********************************************************************


org 0x0000

banksel TRISB
clrf TRISB
banksel TRISA
movlw B'00000001'
movwf TRISA

banksel PORTB

movlw B'11111111'
movwf PORTB
pro
btfss PORTA,0
goto pro
pro1
clrf PORTB
goto pro1


end
User avatar
Elektronicar
Pravo uznapredovao :)
Pravo uznapredovao :)
Posts: 467
Joined: 19-01-2008, 17:05
Location: Balkan

Re: EasyPic5 i MPLAB IDE

Post by Elektronicar »

Koliko vidim PORTA nisi konfigurisao kako treba.
Pogledaj datasheet poglavlje 3.0

CLRF ANSEL ;digital I/O
The ANSEL register must be initialized to
configure an analog channel as a digital
input. Pins configured as analog inputs will
read ‘0’.
Davno sam prestao da koristim asembler tako da ...
User avatar
trax
Administrator sajta
Administrator sajta
Posts: 3509
Joined: 08-01-2005, 18:04
Location: 75k, BA
Contact:

Re: EasyPic5 i MPLAB IDE

Post by trax »

Downloaduj projekt http://www.elektronika.ba/563/sms-box-projekt/" onclick="window.open(this.href);return false;

U njemu sam ja inicijalizovao 16F877A da bude all-digital, u asembleru.
Post Reply