/Modules/PIC/PIC18F4550v01A/SW/blik/main.c
0,0 → 1,29
#include "main.h"
 
 
#define LED PIN_A5 //CHANGE PIN_XX TO YOUR LED PIN NUMBER, EX: PIN_A5
 
void main()
{
 
setup_adc_ports(NO_ANALOGS|VSS_VDD);
setup_adc(ADC_CLOCK_DIV_2);
setup_psp(PSP_DISABLED);
setup_spi(SPI_SS_DISABLED);
setup_wdt(WDT_OFF);
setup_timer_0(RTCC_INTERNAL);
setup_timer_1(T1_DISABLED);
setup_timer_2(T2_DISABLED,0,1);
setup_ccp1(CCP_OFF);
setup_comparator(NC_NC_NC_NC);
setup_vref(FALSE);
 
//Example blinking LED program
while(true){
output_low(LED);
delay_ms(1000);
output_high(LED);
delay_ms(1000);
}
 
}
/Modules/PIC/PIC18F4550v01A/SW/blik/main.h
0,0 → 1,35
#include <18F4550.h>
#device adc=8
 
#FUSES NOWDT //No Watch Dog Timer
#FUSES WDT128 //Watch Dog Timer uses 1:128 Postscale
#FUSES HS //High speed Osc (> 4mhz for PCM/PCH) (>10mhz for PCD)
#FUSES NOPROTECT //Code not protected from reading
#FUSES NOBROWNOUT //No brownout reset
#FUSES BORV20 //Brownout reset at 2.0V
#FUSES NOPUT //No Power Up Timer
#FUSES NOCPD //No EE protection
#FUSES STVREN //Stack full/underflow will cause reset
#FUSES NODEBUG //No Debug mode for ICD
#FUSES NOLVP //No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O
#FUSES NOWRT //Program memory not write protected
#FUSES NOWRTD //Data EEPROM not write protected
#FUSES IESO //Internal External Switch Over mode enabled
#FUSES FCMEN //Fail-safe clock monitor enabled
#FUSES PBADEN //PORTB pins are configured as analog input channels on RESET
#FUSES NOWRTC //configuration not registers write protected
#FUSES NOWRTB //Boot block not write protected
#FUSES NOEBTR //Memory not protected from table reads
#FUSES NOEBTRB //Boot block not protected from table reads
#FUSES NOCPB //No Boot Block code protection
#FUSES MCLR //Master Clear pin enabled
#FUSES LPT1OSC //Timer1 configured for low-power operation
#FUSES NOXINST //Extended set extension and Indexed Addressing mode disabled (Legacy mode)
#FUSES PLL6 //Divide By 12(48MHz oscillator input)
#FUSES CPUDIV1 //System Clock by 4
#FUSES USBDIV //USB clock source comes from PLL divide by 2
#FUSES VREGEN //USB voltage regulator enabled
#FUSES ICPRT //ICPRT enabled
 
#use delay(clock=20000000)
 
/Modules/PIC/PIC18F4550v01A/SW/blik/main.hex
0,0 → 1,17
:1000000015EF00F0EA6A060EE96EEF500DE0060EFD
:10001000016E006A002EFED7012EFBD77B0E006E0C
:10002000002EFED7EF2EF3D7000CF86AD09EEA6AB6
:10003000E96AC150C00B0F09C16E070EB46EC15002
:10004000C00B0F09C16EC090C092C094C09EC28008
:100050009698C69A949E93809392010EC66E000E57
:10006000C76ED190800ED56ECD6A000ECA6E000E9E
:10007000CB6E9484BD6AB76AB66A070EB46E9250AE
:10008000926E100E006E002EFED70000B450A19CA0
:10009000B56A929A899A040E056EFA0E066EB2DF60
:1000A000052EFBD7929A898A040E056EFA0E066E0B
:0A00B000A9DF052EFBD7EDD70300F2
:020000040030CA
:0E00000025CC390E0087A1000FC00FE00F4085
:00000001FF
;PIC18F4550
;CRC=C2E9 CREATED="06-XII-11 22:10"
/Modules/PIC/PIC18F4550v01A/SW/blik/main.pjt
0,0 → 1,28
[PROJECT]
Target=D:\MLAB\Modules\PIC\PIC18F4550v01A\SW\blik\main.hex
Development_Mode=
Processor_Text=PIC18F4550
ToolSuite=CCS
Processor=0x4550
[D:\MLAB\Modules\PIC\PIC18F4550v01A\SW\blik\main]
Type=4
Path=
FileList=
BuildTool=
OptionString=
AdditionalOptionString=
[mru-list]
1=D:\MLAB\Modules\PIC\PIC18F4550v01A\SW\blik\main.c
[Windows]
0=0000 %S 0 0 796 451 3 0
[Opened Files]
1=main.c
2=main.h
3=C:\Program Files\PICC\devices\18F4550.h
4=
[Target Data]
OptionString=-p +FH
FileList=D:\MLAB\Modules\PIC\PIC18F4550v01A\SW\blik\main.c
[Units]
Count=1
1=main (main)