radovi u microBasicu za PIC

Sve vezano za mikrokontrolere

Moderators: pedja089, stojke369, [eDo], trax

Post Reply
User avatar
niho
Pravi forumaš
Pravi forumaš
Posts: 1895
Joined: 24-09-2009, 17:26
Location: Brcko, Bosnia and Herzegovina

radovi u microBasicu za PIC

Post by niho »

Napisao sam kod za semafor u microBasicu for PIC ali ga nemam na cemu isprobati pa ako neko ima razvojnu plocu molio bih da pokusa testirati. Hvala

program semafor
main:
trisb = 0
radi:
PORTB = %11011110 ' 1. semafor - crvena 2. semafor zelena
Delay_ms(10000) ' pauza 10s
PORTB = %11101100 ' 1. semafor - crvena i zuta 2. semafor zuta
Delay_ms(3000) ' pauza 3s
PORTB = %11110011 ' 1. semafor zelena 2. semafor crvena
Delay_ms(10000) ' pauza 10s
PORTB = %11100101 ' 1. semafor - zuta 2. semafor crvena i zuta
Delay_ms(3000) ' pauza 3s
goto radi
end .

a ovo izgleda hex fajl:
:100000000428FF3FFF3FFF3F031383168601DE30C6
:10001000831286003330CC00FF30CB00FF30CA00A3
:10002000CC0B13281A28CB0B16281928CA0B162814
:1000300013281028FD30CB00FF30CA00CB0B21283D
:100040002428CA0B21281E28B530CA00CA0B26282E
:100050000000EC3086001030CC00FF30CB00FF30C9
:10006000CA00CC0B34283B28CB0B37283A28CA0BC4
:100070003728342831284C30CB00FF30CA00CB0B56
:1000800042284528CA0B42283F28CE30CA00CA0B56
:100090004728F33086003330CC00FF30CB00FF30F0
:1000A000CA00CC0B54285B28CB0B57285A28CA0B04
:1000B000572854285128FD30CB00FF30CA00CB0B05
:1000C00062286528CA0B62285F28B530CA00CA0BAF
:1000D00067280000E53086001030CC00FF30CB00F0
:1000E000FF30CA00CC0B75287C28CB0B78287B28E6
:1000F000CA0B7828752872284C30CB00FF30CA0014
:10010000CB0B83288628CA0B83288028CE30CA00D0
:10011000CA0B882807288B28FF3FFF3FFF3FFF3F80
:00000001FF
User avatar
Smjesko
Stariji član
Stariji član
Posts: 4012
Joined: 26-12-2005, 17:12

Re: radovi u microBasicu za PIC

Post by Smjesko »

Ajde nacrtaj shemu i naznači za koji mikrokontroler si pisao kod. Ako ja imam taj kontroler, mogu isprobati radi li to sve.
User avatar
grunf
Pravo uznapredovao :)
Pravo uznapredovao :)
Posts: 286
Joined: 19-04-2008, 14:22
Location: Cvjećara

Re: radovi u microBasicu za PIC

Post by grunf »

ma ne treba ti razvojni sistem....skini sebi proteus i mozes simulirati svoj program!!!
User avatar
niho
Pravi forumaš
Pravi forumaš
Posts: 1895
Joined: 24-09-2009, 17:26
Location: Brcko, Bosnia and Herzegovina

Re: radovi u microBasicu za PIC

Post by niho »

Kod je pisan za 16F84 a proteus sam instalirao mada se tek uvodim u rad te mu ne znam sve opcije. U njemu sam nacrtao i plocicu i shemu uredjaja pa cu pokusati uploadovati. IStina tamo kad odstampam direktno iz proteusa nece da radi ogledalo pa sam prebacio u pdf. http://www.skole.bdcentral.net/deveta/semafor.pdf a evo i bmp sheme uredjaja Image
Post Reply