/Designs/LX200obfuscator/SW/PIC18F4550/main.c |
---|
0,0 → 1,54 |
#include "Z:\home\kakl\svn\MLAB\Designs\LX200obfuscator\SW\PIC18F4550\main.h" |
#define LX200 PIN_E0 //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_timer_3(T3_DISABLED|T3_DIV_BY_1); |
setup_comparator(NC_NC_NC_NC); |
setup_vref(FALSE); |
while(TRUE) |
{ |
output_low(LX200); |
delay_ms(1000); |
output_high(LX200); |
delay_us(100); |
output_toggle(LX200); |
delay_us(940); |
output_toggle(LX200); |
delay_us(100); |
output_toggle(LX200); |
delay_us(940); |
output_toggle(LX200); |
delay_us(100); |
output_toggle(LX200); |
delay_us(940); |
output_toggle(LX200); |
delay_us(200); |
output_toggle(LX200); |
delay_us(100); |
output_toggle(LX200); |
delay_us(100); |
output_toggle(LX200); |
delay_us(100); |
output_toggle(LX200); |
delay_us(100); |
output_toggle(LX200); |
delay_us(100); |
output_toggle(LX200); |
delay_us(200); |
output_toggle(LX200); |
} |
while(TRUE); |
} |
/Designs/LX200obfuscator/SW/PIC18F4550/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 PUT //Power Up Timer |
#FUSES NOCPD //No EE protection |
#FUSES NOSTVREN //Stack full/underflow will not 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 PLL12 //Divide By 12(48MHz oscillator input) |
#FUSES CPUDIV1 //System Clock by 4 |
//#FUSES NOUSBDIV //USB clock source comes from primary oscillator |
//#FUSES NOVREGEN //USB voltage regulator disabled |
//#FUSES NOICPRT //ICPRT disabled |
#use delay(clock=20000000) |
/Designs/LX200obfuscator/SW/PIC18F4550/main.hex |
---|
0,0 → 1,29 |
:1000000023EF00F0EA6A060EE96EEF500DE0060EEF |
:10001000016E006A002EFED7012EFBD77B0E006E0C |
:10002000002EFED7EF2EF3D75BEF00F0030E065E37 |
:1000300009E3EA6A060EE96EEF5004E001D000D051 |
:10004000EF2EFDD7000CF86AD09EEA6AE96AC1502B |
:10005000C00B0F09C16E070EB46EC150C00B0F0963 |
:10006000C16EC090C092C094C09EC2809698C69A3D |
:10007000949E93809392010EC66E000EC76ED1902F |
:10008000800ED56ECD6A000ECA6E000ECB6EB16AC0 |
:10009000070EB46E9250926E100E006E002EFED7B8 |
:1000A0000000B450A19CB56A96908D90040E056E28 |
:1000B000FA0E066EA7D7052EFBD796908D80A60E5A |
:1000C000006E002EFED7000096908D70040E056E17 |
:1000D000EA0E066EABDF052EFBD796908D70A60E4E |
:1000E000006E002EFED7000096908D70040E056EF7 |
:1000F000EA0E066E9BDF052EFBD796908D70A60E3E |
:10010000006E002EFED7000096908D70040E056ED6 |
:10011000EA0E066E8BDF052EFBD796908D70C80E0B |
:10012000066E84DF96908D70A60E006E002EFED7B0 |
:10013000000096908D70A60E006E002EFED7000077 |
:1001400096908D70A60E006E002EFED70000969041 |
:100150008D70A60E006E002EFED7000096908D705A |
:10016000A60E006E002EFED7000096908D70C80E71 |
:0E017000066E5CDF96908D7097D7FFD7030068 |
:020000040030CA |
:0E00000027CC380E008780000FC00FE00F40A5 |
:00000001FF |
;PIC18F4550 |
;CRC=A11E CREATED="07-Apr-14 00:56" |
/Designs/LX200obfuscator/SW/PIC18F4550/main.pjt |
---|
0,0 → 1,59 |
[PROJECT] |
Target=main.hex |
Development_Mode= |
Processor_Text=PIC18F4550 |
ToolSuite=CCS |
Processor=0x4550 |
[Z:\home\kakl\svn\MLAB\Designs\LX200obfuscator\SW\PIC18F4550\main] |
Type=4 |
Path= |
FileList= |
BuildTool= |
OptionString= |
AdditionalOptionString= |
[mru-list] |
1=main.c |
[Windows] |
0=0000 %S 0 0 796 451 3 0 |
[Units] |
Link=0 |
Count=1 |
1=main.c |
[Opened Files] |
1=main.c |
2=main.h |
3=..\..\..\..\..\..\..\..\..\/home/kakl/.wine/drive_c/Program Files (x86)/PICC/Devices\18F4550.h |
4= |
[Directories] |
Include=z:/home/kakl/.wine/drive_c/Program Files (x86)/PICC/Devices; |
Library= |
LinkerScript= |
[defines] |
enabled=0 |
D1= |
V1= |
[fileformats] |
forcecoff=0 |
debug=4 |
error=2 |
object=0 |
list=0 |
scratch=0 |
sta=1 |
tre=1 |
allerrors=1 |
allwarnings=1 |
stayupne=3 |
stayupoe=0 |
[Target Data] |
BuildTool=C-COMPILER |
OptionString=+FH |
AdditionalOptionString= |
BuildRequired=1 |
[main.c] |
Type=4 |
Path= |
FileList= |
BuildTool= |
OptionString= |
AdditionalOptionString= |