336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.


Naver

[pic 16f84]




졸업작품 의뢰 필요하신분은 댓글 남겨주시거나 (▶LINK)를 눌러주세요



PDF 90MB 분할압축

(다 받고 vol1을 압축해제하면 이어서 다 풀립니다.)

PIC A Practical Approach (PDF작업중).vol1.egg

PIC A Practical Approach (PDF작업중).vol2.egg

PIC A Practical Approach (PDF작업중).vol3.egg

PIC A Practical Approach (PDF작업중).vol4.egg

PIC A Practical Approach (PDF작업중).vol5.egg

PIC A Practical Approach (PDF작업중).vol6.egg

PIC A Practical Approach (PDF작업중).vol7.egg

PIC A Practical Approach (PDF작업중).vol8.egg

PIC A Practical Approach (PDF작업중).vol9.egg


▼다운로드 링크!!!

https://www.4shared.com/s/fDLAtIK99ca




Page 73

PIC12F629 - Flashing LED with a push button - C program

#include<pic12f6x.h>

void delay (void)

{

int j;

for(j=0; j<300; j++)

}

void main(void)

{

TRIS1 = 0;    //set port pin 1 to output

TRIS4 = 1;    //set port pin 4 to input

while(1)

{

if(GPIO4==1)    //is the push button pressed ??

{

GPIO1==1    //port pin 1 is HIGH

delay();        //short delay

GPIO1==0    //port pin is LOW

delay();        //short delay

}

}

}


Page 74

PIC12F629 - Flashing LED with a push button - assembly program

;SW_LED_12F629.asm

include "p12f629.inc"

;global variables

T1    equ    26h

T2    equ    27h

T3    equ    28h

Main     bsf    STATUS,5    ;select bank for TRISIO

;http://what-when-how.com/pic-microcontroller/the-pic16f84-microcontroller-part-2/

movlw    B'11111101'    ;Set GPIO1 as Output, rest of them as Inputs 

movwf    TRISIO            ;set GPIO1 as output

bcf        STATUS,5        ;select bank0

again    btfss       GPIO,GP4        ;is the push button pressed? (if Yes, skip next line)

goto        again            ;not pressed, read again

bsf         GPIO,GP1        ;set GPIO1 pin to 1

call         Delay             ;call Delay method

bcf        GPIO,GP1         ;reset GPIO1 pin to 0

call        Delay              ;call Delay method

goto        again            ;Back to again "again" Label


; Delay 0.5 sec

Delay    movlw    3                    ; load values "3"

movwf    T1                  ; T1 = 3 (변수 T1에 3을 담는다.)

movlw    0EBh                ; 14*16 + 11 = 235

; E is 14 in Hex, B is 11 in Hex

; LSB is 16^0, 16^1, 16^2 ... (getting up going to MSB)

; 0*16^2 + E*16^1 + B*16^0

DelT1    movwf    T2                   ;T2 = 235

DelT2    movwf    T3                    ;T3 = 235

DelT3    decfsz    T3,1                  ;T3=T3-1, repeat not 0

 ; decfsz : Decrease File, Skip if it is Zero

goto     DelT3

decfsz    T2,1                  ;T2=T2-1, Decrease T2 by 1 (1씩 감소)

goto     DelT2

decfsz    T1,1                    ;Decrease T1 by 1

goto     DelT1

return

;

end



Posted by ElectricShock
:
BLOG main image
잡동사니들(지극히 개인취향인...) (다른글에도 댓글 부탁해요♥) You May Leave English Messages on GuestBook. by ElectricShock

공지사항

카테고리

분류 전체보기 (782)
Programming(=프로그래밍) (3)
MiDi (2)
Animation (4)
Blender (3D Graphic Program.. (10)
Blendtuts.com (Series) (1)
Blender 기초 팁들 (2)
Processing (디지털미디어과) (2)
Music (1)
Books in the world (0)
Communication(CAN, UART, et.. (12)
MCU Examples (PIC 기반) (7)
Transistor (1)
Mikro C Pro (11)
Mikro Pascal (1)
Proton IDE (0)
Robot (0)
Swift 3D (1)
Dummies Series (1)
All about Hacking (0)
제2 외국어 (1)
PIC 해외서적들 (3)
AVR (25)
PIC (MikroC) (MPLAB) (4)
Assembly (2)
ARM (3)
Arduino (26)
PSpice (1)
Proteus ISIS (14)
CodeVision (2)
FPGA (15)
MPLAB (24)
PCB (the Procedure) (15)
3D Printer (5)
PICKIT3 (6)
Matlab (11)
RaspBerry PI (15)
BeagleBone (1)
Android Studio (17)
졸업작품 (172)
Korea History (0)
Issue(사회) (73)
Multimeter 리뷰 (1)
Oscilloscope (1)
A (34)
B (19)
J (6)
C (32)
P (12)
T (37)
H (12)
I (12)
M (44)
R (5)
E (5)
F (2)
D (9)
O (2)
L (7)
S (9)
W (2)
V (6)
G (14)
Visual C++ or Visual Studio (2)
Android App Development (0)

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백