PIC18 23

PIC18, MPLAB X IDE, XC8, TIMER, Interrupt

PIC18, MPLAB X IDE, XC8, TIMER, Interrupt 0. 참고 사항https://www.exploreembedded.com/wiki/PIC18F4520_Timer [ ] https://www.microchip.com/wwwproducts/en/PIC18F4520[ datasheet ] http://ww1.microchip.com/downloads/en/devicedoc/39631a.pdf 1. HW 연결2. 소스 설명full 소스는 아래 github를 통해 확인하세요. RegValue = TimerMax-((Delay * Fosc)/(Prescalar*4)) delay = ((MaxValue-REG_val)*(Prescal*4))/Fosc regvalue = 256 - ((0.02..

PIC18 2018.09.12

PIC18, MPLAB X IDE, XC8, GPIO, Interrupt

PIC18, MPLAB X IDE, XC8, GPIO, Interrupt 0. 참고 사항[ ] https://www.microchip.com/wwwproducts/en/PIC18F4520[ datasheet ] http://ww1.microchip.com/downloads/en/devicedoc/39631a.pdf 1. HW 연결RB0, PB1이 인터럽트를 설정할 수 있는 Pin이므로 Key Jupmper와 LED Jumper를 연결하였습니다. 2. 소스 설명full 소스는 아래 github를 통해 확인하세요. LED : RB7 ~ RB2 Interrupt : RB1 ~ RB0 //void __interrupt(high_priority) isr_low (void) void __interrupt(low_p..

PIC18 2018.09.12

PIC18, MPLAB X IPE PICkit3 오류 발생 시 대응방법

PIC18, MPLAB X IPE PICkit3 오류 발생 시 대응방법입니다. Target device was not found (could not detect target voltage VDO). You must connect to a target device to use PICkit 3. 1. 오류 발생 화면 2. Settings > Advanced Mode 3. Passwdword 입력 ( default : microchip ) 4. 좌측에 메뉴가 보여집니다. 5. Power > Power SettingsVDD: 3.5Power Target circuit from Tool 체크박스 선택 6. Power > Operate > Disconnect 버튼 7. Power > Operate > Connect..

PIC18 2018.07.31

PIC18, MPLAB X IDE 펌웨어 다운로드 시점에서 PICkit3 오류 발생 시

PIC18, MPLAB X IDE 펌웨어 다운로드 시점에서 PICkit3 오류 발생 시 대응방법입니다. Target device was not found (could not detect target voltage VDO). You must connect to a target device to use PICkit 3. 1. PICkit 3 펌웨어 다운로드 시 오류 2. Production > Set Project Configuration > Customize... 3. Conf > PICkit 3 4. Option categories > Power 5. Power target circuit from PICkit3 체크박스 확인 / Voltage Level : 3.5 6. 펌웨어 다운로드 : Make and..

PIC18 2018.07.31

PIC18, MPLAB Code Configurator 설치

PIC18, MPLAB Code Configurator 플러그인을 다운로드하는 방법과 설치하는 방법입니다. www.microchip.com/mplab 옛날 칩은 지원하지 않습니다.자세한 것은 릴리즈 노트를 참고하세요. http://ww1.microchip.com/downloads/en/DeviceDoc/release_notes_pic10_pic12_pic16_pic18_v1_75.pdf 1. MPLAB > MPLAB Code Configurator 선택 2. Current Download > MPLAB Code Configurator 다운로드 3. Tools > PlugIns 4. Downloads > Add PlugIns... 5. 다운로드 받은 MPLAB Code Configurator nbm 플러그..

PIC18 2018.07.31

PIC18, MPLAB X IDE, XC8, New Project로 개발 시작하기

PIC18, MPLAB X IDE 툴에서 New Project로 개발 시작하기입니다. 1. New Project... [ Ctrl + Shift + N ] 2. Choose Project > Standalone Project 3. Select Device [ PIC18F4520 ] 4. Select Tool [ PICKit3 ] 5. Select Compiler [ XC8 ] 6. Select Project Name and Folder 7. 프로젝트 생성 완료 8. File > New File [ Ctrl + N ] 9. Choose File Type [main.c] 10. Name and Location 11. 파일 생성 완료 12. 파일 위치 변경새로 추가된 파일을 Source Files로 옮겨서 프..

PIC18 2018.07.31