/Designs/Measuring_instruments/GM_counter/PrjInfo.txt
0,0 → 1,13
[InfoShortDescription.en]
Simple IR reflexive sensor.
 
[InfoShortDescription.cs]
Jednoduche reflexivni cidlo.
 
[InfoLongDescription.en]
 
 
[InfoLongDescription.cs]
Čidlo obsahuje pouze reflexní optron s odporovým trimrem a slouží k rozlišování tmavého a světlého povrchu. Dá se použít jak pro detekci čáry pro čárového robota tak i pro snímání otáčení pohonných kol.
 
[End]
/Designs/Measuring_instruments/GM_counter/SW/main.c
0,0 → 1,72
#include ".\main.h"
//#include <LCD.C>
 
 
#define LED PIN_C6 //CHANGE PIN_XX TO YOUR LED PIN NUMBER, EX: PIN_A5
 
//#define LCD_TYPE 1
//#include <lcd.c>
void main()
{
unsigned int setpoint;
unsigned int napeti;
unsigned int plneni=0;
 
/* lcd_init();
 
lcd_putc("\fReady...\n");
 
while (TRUE) {
k=kbd_getc();
if(k!=0)
if(k=='*')
lcd_putc('\f');
else
lcd_putc(k);
}
*/
 
setup_adc_ports(sAN0|VSS_VDD);
setup_adc(ADC_CLOCK_DIV_32);
setup_spi(SPI_SS_DISABLED);
setup_timer_0(RTCC_EXT_L_TO_H|RTCC_DIV_1);
setup_timer_1(T1_DISABLED);
setup_timer_2(T2_DIV_BY_1,255,1);
setup_ccp1(CCP_PWM);
setup_ccp2(CCP_PWM);
setup_comparator(NC_NC_NC_NC);// This device COMP currently not supported by the PICWizard
setup_oscillator(OSC_8MHZ);
 
set_pwm1_duty(0);
set_pwm2_duty(0);
 
 
// lcd_init();
setpoint = 60;
while(true)
{
set_adc_channel(1);
delay_us(100);
napeti = read_adc();
 
if (napeti <= setpoint)
{
if (plneni < 150) plneni++;
}
else
{
if (plneni > 0) plneni--;
}
 
set_pwm1_duty(plneni);
set_pwm2_duty(plneni);
 
output_low(LED);
delay_ms(100);
output_high(LED);
delay_ms(100);
}
 
}
/Designs/Measuring_instruments/GM_counter/SW/main.h
0,0 → 1,20
#include <16F887.h>
#device adc=10
 
#FUSES NOWDT //No Watch Dog Timer
#FUSES INTRC //Internal RC Osc
#FUSES NOPUT //No Power Up Timer
#FUSES MCLR //Master Clear pin enabled
#FUSES NOPROTECT //Code not protected from reading
#FUSES NOCPD //No EE protection
#FUSES NOBROWNOUT //No brownout reset
#FUSES IESO //Internal External Switch Over mode enabled
#FUSES FCMEN //Fail-safe clock monitor enabled
#FUSES NOLVP //No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O
#FUSES NODEBUG //No Debug mode for ICD
#FUSES NOWRT //Program memory not write protected
#FUSES BORV40 //Brownout reset at 4.0V
 
#use delay(clock=8000000)
#use rs232(baud=9600,parity=N,xmit=PIN_B6,rcv=PIN_B7,bits=5)
 
/Designs/Measuring_instruments/GM_counter/SW/main.hex
0,0 → 1,30
:1000000000308A0018280000243084008313000880
:10001000031917280230F800F701F70B0D28F80B29
:100020000C289730F700F70B1328800B0A280800DC
:10003000840183131F308305713083168F000F08EE
:10004000061383120617831603170908C03989009F
:1000500003131F129F1200300317880083128701B9
:1000600088018901FF300313A000A3018316031741
:100070000908C039890003131F129F1201300317AA
:100080008800831203131F139F1783169F17831271
:100090001F149412A01220088316870083122016C2
:1000A0002008831687008312A0112008831687007A
:1000B0000130831294000030831694000108C73980
:1000C00028388100831290010030F8000438920033
:1000D000FF308316920083122011200883168700B8
:1000E00083120711831609130C30831297008316AD
:1000F0009B019C0101309D008312A01020088316F3
:100100008700831287100C309D0001308000031798
:100110008701880189017130831603138F000F084E
:10012000831295019B013C30A1000430F8001F08A8
:10013000C33978049F004230F700F70B9D28000078
:100140009F149F18A12883161E088312A20022085C
:100150002102031CB0282308953C0318A30AB328E6
:10016000A308031DA3032308950023089B00201365
:10017000200883168700831207136430A40004202C
:100180002013200883168700831207176430A40009
:0601900004209528630025
:04400E00F52CFF3F4F
:00000001FF
;PIC16F887
;CRC=3E77 CREATED="29-IX-12 23:52"
/Designs/Measuring_instruments/GM_counter/SW/main.pjt
0,0 → 1,27
[PROJECT]
Target=D:\MLAB\Designs\Measuring_instruments\GM_counter\SW\main.hex
Development_Mode=
Processor_Text=PIC16F887
ToolSuite=CCS
Processor=0x887F
[D:\MLAB\Designs\Measuring_instruments\GM_counter\SW\main]
Type=4
Path=
FileList=
BuildTool=
OptionString=
AdditionalOptionString=
[mru-list]
1=D:\MLAB\Designs\Measuring_instruments\GM_counter\SW\main.c
[Windows]
0=0000 %S 0 0 796 451 3 0
[Opened Files]
1=main.c
2=
3=
[Target Data]
OptionString=-p +FM
FileList=D:\MLAB\Designs\Measuring_instruments\GM_counter\SW\main.c
[Units]
Count=1
1=main (main)