/Designs/HAM Constructions/SDRX01B/SW/timemark/main.c
0,0 → 1,66
#include "main.h"
 
#define LED1 PIN_E0
#define LED2 PIN_E1
#define SYNC_OUTPUT PIN_E2
 
int1 sync;
int8 sec;
 
#int_EXT
void EXT_isr(void)
{
if (sync==1)
{
output_high(SYNC_OUTPUT);
output_toggle(LED2);
delay_us(2);
output_low(SYNC_OUTPUT);
sync=0;
}
}
 
 
 
 
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);
enable_interrupts(INT_EXT);
enable_interrupts(GLOBAL);
setup_oscillator(OSC_8MHZ|OSC_TIMER1|OSC_31250|OSC_PLL_OFF);
 
sync=0;
//Example blinking LED program
while(true)
{
while (getch()!='$');
if (getch()!='G') continue;
if (getch()!='P') continue;
if (getch()!='R') continue;
if (getch()!='M') continue;
if (getch()!='C') continue;
if (getch()!=',') continue;
getch();
getch();
getch();
getch();
getch();
output_toggle(LED1);
sec=getch();
if ((sec!='9')) continue;
sync=1;
}
 
}
/Designs/HAM Constructions/SDRX01B/SW/timemark/main.h
0,0 → 1,36
#include <18F4550.h>
#device adc=8
 
#FUSES NOWDT //No Watch Dog Timer
#FUSES WDT128 //Watch Dog Timer uses 1:128 Postscale
#FUSES INTRC //Internal RC Osc
#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 PLL1 //No PLL PreScaler
#FUSES CPUDIV1 //No System Clock Postscaler
#FUSES USBDIV //USB clock source comes from PLL divide by 2
#FUSES VREGEN //USB voltage regulator enabled
#FUSES ICPRT //ICPRT enabled
 
#use delay(clock=8000000)
#use rs232(baud=9600,parity=N,xmit=PIN_C6,rcv=PIN_C7,bits=8)
 
/Designs/HAM Constructions/SDRX01B/SW/timemark/main.hex
0,0 → 1,37
:0400000065EF00F0B8
:08000800046ED8CF05F0E0CF33
:1000100006F00001E9CF0CF0EACF07F0E1CF08F0DD
:10002000E2CF09F0D9CF0AF0DACF0BF0F3CF12F01C
:10003000F4CF13F0FACF14F0F5CF15F0F6CF16F099
:10004000F7CF17F000C00EF001C00FF002C010F0A3
:1000500003C011F0F2A830EF00F0F2B257EF00F059
:100060000EC000F00FC001F010C002F011C003F08C
:100070000CC0E9FF07C0EAFF078E08C0E1FF09C016
:10008000E2FF0AC0D9FF0BC0DAFF12C0F3FF13C0B2
:10009000F4FF14C0FAFF15C0F5FF16C0F6FF17C035
:1000A000F7FF045006C0E0FF05C0D8FF100019A0FC
:1000B00009D096948D8496928D7200D000D096943B
:1000C0008D941990F29230EF00F0F86AD09E078E6E
:1000D000EA6AE96A700ED36ED350B8960C0EAF6E12
:1000E000A20EAC6E900EAB6EC150C00B0F09C16E6C
:1000F000070EB46EC150C00B0F09C16EC090C09204
:10010000C094C09EC2809698C69A949E9380939203
:10011000010EC66E000EC76ED190800ED56ECD6AF0
:10012000000ECA6E000ECB6E9484BD6AB76AB66AC2
:10013000070EB46E9250926E060E006E002EFED721
:100140000000B450A19CB56AF288C00EF212710E84
:10015000D36E800E9B6ED35019909EAAFED7AE50E0
:100160002408FBE19EAAFED7AE50470801E0F5D770
:100170009EAAFED7AE50500801E0EFD79EAAFED748
:10018000AE50520801E0E9D79EAAFED7AE504D0806
:1001900001E0E3D79EAAFED7AE50430801E0DDD7C9
:1001A0009EAAFED7AE502C0801E0D7D79EAAFED754
:1001B000AE509EAAFED7AE509EAAFED7AE509EAAC3
:1001C000FED7AE509EAAFED7AE5096908D709EAAD6
:1001D000FED7AECF1AF01A50390801E0BED7198009
:0401E000BCD7030085
:020000040030CA
:0E00000020C9390E0087A1000FC00FE00F408D
:00000001FF
;PIC18F4550
;CRC=262F CREATED="16-9-12 10:31"
/Designs/HAM Constructions/SDRX01B/SW/timemark/main.pjt
0,0 → 1,26
[PROJECT]
Target=C:\Users\kakl\Documents\PIC\timemark\main.hex
Development_Mode=
Processor_Text=PIC18F4550
ToolSuite=CCS
Processor=0x4550
[C:\Users\kakl\Documents\PIC\timemark\main]
Type=4
Path=
FileList=
BuildTool=
OptionString=
AdditionalOptionString=
[mru-list]
1=C:\Users\kakl\Documents\PIC\timemark\main.c
[Windows]
0=0000 %S 0 0 796 451 3 0
[Units]
Link=0
Count=1
1=C:\Users\kakl\Documents\PIC\timemark\main
[Opened Files]
1=main.c
2=main.h
3=
4=
/Designs/HAM Constructions/SDRX01B/SW/timemark/readme.txt
0,0 → 1,0
Program pro PIC18F4550 pro nacitani PPS impulsu z GPS.